/* ===================================================================
   PREMIUM BRANDED CARDS - FLAT & CLEAN
   =================================================================== */

/* Grid Layout - Géré par catalogue-grid.css */

/* Card Container */
.product-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(184, 70, 31, 0.08);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.03),
        0 4px 6px rgba(184, 70, 31, 0.02);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
    overflow: hidden;
    /* Ensure image stays inside rounded corners */
    cursor: pointer;
    box-sizing: border-box;
    width: 100%;
}

/* Hover State - Simple Lift */
.product-card:hover {
    transform: translateY(-8px);
    /* Simple lift, no rotation */
    border-color: rgba(184, 70, 31, 0.4);
    box-shadow:
        0 15px 40px rgba(184, 70, 31, 0.12),
        0 0 0 1px rgba(184, 70, 31, 0.1);
}

/* Image Container - Full Width */
.product-image-container {
    position: relative;
    width: 100%;
    /* Full width */
    margin: 0;
    /* No margin */
    padding-top: 100%;
    /* Square aspect ratio */
    overflow: hidden;
    background: #f8f5f2;
    /* No border-radius needed here as parent has overflow:hidden */
    transition: transform 0.5s ease;
    box-sizing: border-box;
}

/* Zoom on Hover */
.product-card:hover .product-image-container {
    /* No 3D translate, just zoom */
}

/* Images */
.product-image-primary,
.product-image-secondary {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.6s ease;
}

.product-image-secondary {
    opacity: 0;
    z-index: 2;
}

.product-card:hover .product-image-secondary {
    opacity: 1;
    transform: scale(1.08);
    /* Subtle zoom */
}

.product-card:hover .product-image-primary {
    transform: scale(1.08);
}

/* Actions Overlay */
.product-actions {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 30;
    pointer-events: none;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.add-to-cart-btn,
.quick-view-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(184, 70, 31, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B8461F;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
}

.add-to-cart-btn:hover,
.quick-view-btn:hover {
    background: linear-gradient(135deg, #B8461F 0%, #8B2F0F 100%);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(184, 70, 31, 0.3);
}

/* Product Info */
.product-info {
    padding: 16px 20px 20px;
    /* Increased padding for better spacing */
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    background: #ffffff;
    box-sizing: border-box;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.stars {
    color: #FFD700;
    font-size: 12px;
    letter-spacing: 1px;
}

.rating-count {
    color: #9CA3AF;
    font-size: 10px;
    font-weight: 600;
    background: #f8f5f2;
    padding: 2px 6px;
    border-radius: 6px;
}

/* Title */
.product-name {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    /* Slightly larger */
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.product-card:hover .product-name {
    color: #B8461F;
}

/* Price */
.product-price {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
}

.price-current {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #B8461F 0%, #8B2F0F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.price-original {
    font-size: 13px;
    color: #9CA3AF;
    text-decoration: line-through;
    font-weight: 500;
}

/* Responsive Adjustments */

/* Tablet Landscape & Small Laptops (900px - 1200px) */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 30px 15px;
    }
}

/* Tablet Portrait (600px - 900px) */
@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        padding: 20px 15px;
    }

    .product-info {
        padding: 14px 14px 18px;
    }

    .product-name {
        font-size: 14px;
    }

    .price-current {
        font-size: 18px;
    }
}

/* Mobile (Under 600px) */
@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px 10px;
    }

    .product-card {
        border-radius: 16px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }

    .product-card:hover {
        transform: none !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }

    /* On mobile, image is still full width */
    .product-image-container {
        width: 100%;
        margin: 0;
    }

    .product-info {
        padding: 10px 10px 14px;
        gap: 4px;
    }

    .product-rating {
        margin-bottom: 2px;
    }

    .stars {
        font-size: 10px;
    }

    .rating-count {
        font-size: 9px;
        padding: 1px 4px;
    }

    .product-name {
        font-size: 13px;
        line-height: 1.3;
        height: 34px;
    }

    .product-price {
        padding-top: 4px;
        gap: 6px;
        flex-wrap: wrap;
    }

    .price-current {
        font-size: 16px;
    }

    .price-original {
        font-size: 11px;
    }

    .product-actions {
        display: none !important;
    }

    .product-image-secondary {
        display: none;
    }
}

/* Very Small Screens */
@media (max-width: 360px) {
    .products-grid {
        gap: 8px;
        padding: 10px 5px;
    }

    .product-name {
        font-size: 12px;
    }
}