/* Product Cards Styling - Firewood & Fuel Theme */
.products-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.products-section .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #3f2b21;
    position: relative;
}

.products-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #7cbc42, #5a9c2e);
    border-radius: 2px;
}

/* Product Card Container */
.product-miniature {
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
    height: 100%;
}

.product-miniature:hover {
    transform: translateY(-3px);
}

.product-miniature .card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
}

.product-miniature .card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: scale(1.02);
}

/* Product Image */
.product-miniature__image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f8f9fa;
}

.product-miniature__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-miniature__link:hover .product-miniature__image {
    transform: scale(1.05);
}

/* Product Flags */
.product-flags {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-flags .badge {
    display: block;
    margin-bottom: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-flags .discount {
    background: #dc3545;
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.product-flags .new {
    background: #7cbc42;
    color: white;
    box-shadow: 0 2px 8px rgba(124, 188, 66, 0.3);
}

.product-flags .out_of_stock {
    background: rgba(108, 117, 125, 0.85);
    color: white;
    font-size: 0.7rem;
    padding: 5px 10px;
}

/* Removed wishlist button - not needed */

/* Card Body - Centered Layout */
.product-miniature__infos {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.product-miniature__infos > * {
    width: 100%;
    text-align: center;
}

/* Product Title - Centered */
.product-miniature__title {
    font-size: 1rem;
    font-weight: 700;
    color: #3f2b21;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    min-height: 2.8em;
}

.product-miniature__infos a {
    text-decoration: none;
}

.product-miniature__infos a:hover .product-miniature__title {
    color: #7cbc42;
}

/* Measurements - Firewood specific - Centered */
.product-miniature__measurements {
    margin-bottom: 1.25rem;
    flex-grow: 1;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
}

.product-miniature__measurements span {
    font-size: 0.875rem;
    color: #3f2b21;
    line-height: 1.5;
    display: block;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 0.875rem;
    border-radius: 8px;
    border-left: 4px solid #7cbc42;
    position: relative;
    text-align: center;
    font-weight: 600;
    min-height: 3em;
}

.product-miniature__measurements span::before {
    content: '📏';
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

/* Price Section - Properly Centered Layout */
.product-miniature__prices {
    margin-bottom: 1.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.product-miniature__price {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

/* Regular price (crossed out) - Properly Centered */
.regular-price {
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    text-decoration: line-through;
    display: block;
    margin-bottom: 0.25rem;
    text-align: center;
    width: 100%;
}

/* Sale price (main price) - Properly Centered - BIGGER & BOLDER */
.product-miniature__price .sale-price,
.product-miniature__price > span:not(.regular-price) {
    font-size: 2rem;
    font-weight: 900;
    color: #2d2d2d;
    display: block;
    line-height: 1;
    text-align: center;
    width: 100%;
    margin: 0 auto;
}

/* VAT text - Properly Centered */
.vat-text {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
    margin-top: 0.25rem;
    display: block;
    text-align: center;
    width: 100%;
}

/* When there's no discount - Properly Centered - BIGGER & BOLDER */
.product-miniature__price:not(:has(.regular-price)) > span {
    font-size: 2rem;
    font-weight: 900;
    color: #2d2d2d;
    text-align: center;
    width: 100%;
    margin: 0 auto;
}

/* Quick Buy Button - Modern Style */
.add-to-cart-form {
    margin-top: auto;
    padding: 0 1rem 0.5rem;
}

.product-miniature .buy-now-btn,
.products-section .buy-now-btn,
.btn.buy-now-btn {
    background: #7cbc42 !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 0.875rem 2.5rem !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(124, 188, 66, 0.25) !important;
    color: white !important;
    font-size: 0.95rem !important;
    margin: 0 auto !important;
    width: auto !important;
    max-width: 200px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    white-space: nowrap !important;
}

.buy-now-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.product-miniature .buy-now-btn:hover,
.products-section .buy-now-btn:hover,
.btn.buy-now-btn:hover {
    background: #5a9c2e !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(124, 188, 66, 0.4) !important;
    color: white !important;
}

.buy-now-btn:hover::before {
    transform: translateX(100%);
}

.buy-now-btn:active {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(124, 188, 66, 0.25);
}

.buy-now-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.buy-now-btn:hover i {
    transform: rotate(15deg) scale(1.1);
}

/* View Details Button with better padding */
.btn-outline-primary {
    border: 2px solid #3f2b21;
    color: #3f2b21;
    border-radius: 8px;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.8rem;
    background: transparent;
    margin-bottom: 0.5rem;
}

.btn-outline-primary:hover {
    background: #3f2b21;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(63, 43, 33, 0.3);
}

.btn-outline-primary i {
    margin-right: 0.5rem;
}

/* Out of Stock Button */
.btn-secondary:disabled {
    background: #e0e0e0;
    border: none;
    color: #666666;
    opacity: 1;
    cursor: not-allowed;
    padding: 0.875rem 2.5rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.3px;
    border-radius: 50px;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: auto;
    white-space: nowrap;
}

/* Button container spacing */
.product-miniature .d-grid,
.products-section .d-grid {
    padding: 0.75rem 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

/* Action buttons container */
.mt-auto {
    padding: 0.75rem 1rem 1rem 1rem;
    margin-top: auto;
}

/* Loading States */
.buy-now-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.buy-now-btn.loading {
    pointer-events: none;
}

.buy-now-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-section .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .product-miniature__infos {
        padding: 1.25rem;
    }

    .product-miniature__title {
        font-size: 1rem;
    }

    .product-miniature__measurements span {
        font-size: 0.8rem;
        padding: 0.75rem;
    }

    .buy-now-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        border-radius: 40px;
    }

    .btn-outline-primary {
        padding: 0.75rem 1.5rem;
        font-size: 0.75rem;
    }

    .mt-auto {
        padding: 0.5rem 0.75rem 0.75rem 0.75rem;
    }

    .d-grid.gap-2 {
        gap: 0.75rem !important;
        padding: 0.5rem 0;
    }

    .product-miniature__price .sale-price,
    .product-miniature__price > span:not(.regular-price) {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .product-miniature {
        margin-bottom: 1.5rem;
    }

    .products-section {
        padding: 1rem 0;
    }

    .buy-now-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
        border-radius: 35px;
    }

    .btn-outline-primary {
        padding: 0.625rem 1.25rem;
        font-size: 0.7rem;
    }

    .mt-auto {
        padding: 0.5rem;
    }
}

/* Animation on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-miniature {
    animation: fadeInUp 0.6s ease forwards;
}

.product-miniature:nth-child(1) { animation-delay: 0.1s; }
.product-miniature:nth-child(2) { animation-delay: 0.2s; }
.product-miniature:nth-child(3) { animation-delay: 0.3s; }
.product-miniature:nth-child(4) { animation-delay: 0.4s; }
.product-miniature:nth-child(5) { animation-delay: 0.5s; }
.product-miniature:nth-child(6) { animation-delay: 0.6s; }
.product-miniature:nth-child(7) { animation-delay: 0.7s; }
.product-miniature:nth-child(8) { animation-delay: 0.8s; }

/* Grid improvements */
.products.row {
    margin: 0 -0.75rem;
}

.products.row > * {
    padding: 0 0.75rem;
}

/* Firewood specific styling */
.products-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7cbc42, #3f2b21, #7cbc42);
}

/* Better contrast for firewood industry */
.card {
    border: 1px solid rgba(63, 43, 33, 0.1);
}

/* Material icons styling */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 16px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}
