/* ═══════════════════════════════════════════════════════════
   Modern Product Cards CSS - Fully Responsive Design
   ═══════════════════════════════════════════════════════════ */

:root {
    --primary-brown: #8d6748;
    --primary-light: #bfa074;
    --dark-bg: #1a1a1a;
    --light-bg: #f9f8f7;
    --border-color: #e8ddd3;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

/* ═══════════════════════════════════════════════════════════ */
/* Product Card Container */
/* ═══════════════════════════════════════════════════════════ */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
    align-items: stretch;
}

.product-card-modern {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    height: 100%;
    min-height: 420px;
    align-self: stretch;
}

.product-card-link {
    display: flex;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.product-card-link:hover {
    text-decoration: none;
}

.product-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.product-card-modern:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
}

.product-image,
.product-img-wrapper {
    position: relative;
    width: 100%;
    height: 270px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(248, 250, 249, 0.5) 0%, transparent 100%);
    flex-shrink: 0;
}

.product-image img,
.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.5s ease;
}

.product-card-modern:hover .product-image img,
.product-card-modern:hover .product-img {
    transform: scale(1.08);
}

.product-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    background: #f3f1ee;
}

/* ─────────────────────────────────────────────────────────── */
/* Discount Ribbon Banner */
/* ─────────────────────────────────────────────────────────── */

.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 20;
    pointer-events: none;
    display: inline-flex;
}

.discount-percent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 14px 18px 18px 12px;
    background: linear-gradient(135deg, #ff5d5d 0%, #e63939 58%, #b10000 100%);
    color: #fff;
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 0.15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    box-shadow: 0 10px 24px rgba(183, 28, 28, 0.27);
    border: 1.5px solid rgba(255, 255, 255, 0.65);
    line-height: 1;
    transform: translateY(0);
}

.discount-percent::before {
    content: '';
    display: none;
}



/* ─────────────────────────────────────────────────────────── */
/* Stock Badge */
/* ─────────────────────────────────────────────────────────── */

.stock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    padding: 8px 14px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stock-badge.in-stock {
    background: linear-gradient(135deg, #8d6748 0%, #bfa074 100%);
    color: white;
}

.stock-badge.on-order {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.stock-badge.out-of-stock {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    opacity: 0.9;
}

/* ─────────────────────────────────────────────────────────── */
/* Category Tag */
/* ─────────────────────────────────────────────────────────── */

.category-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 12px;
    background: linear-gradient(135deg, #8d6748 0%, #7b5636 100%);
    color: #fff;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(141, 103, 72, 0.18);
    text-align: center;
}

/* ─────────────────────────────────────────────────────────── */
/* Content Section */
/* ─────────────────────────────────────────────────────────── */

.product-content {
    padding: 14px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(to bottom, rgba(248, 250, 249, 0.3) 0%, transparent 100%);
    position: relative;
    justify-content: flex-start;
    height: 100%;
}

.product-content > *:last-child {
    margin-top: auto;
}

.product-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(141, 103, 72, 0.10) 50%, transparent 100%);
}

@media (max-width: 767px) {
    .product-content {
        padding: 12px 12px 12px;
        gap: 7px;
    }
}

/* ─────────────────────────────────────────────────────────── */
/* Product Name */
/* ─────────────────────────────────────────────────────────── */

.product-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.35em;
    transition: color 0.3s ease;
}

.product-card-modern:hover .product-name {
    color: #8d6748;
}

@media (max-width: 767px) {
    .product-name {
        font-size: 0.88rem;
        min-height: 2.2em;
    }
}

/* ─────────────────────────────────────────────────────────── */
/* Product Attributes */
/* ─────────────────────────────────────────────────────────── */

.product-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 0;
    min-height: 34px;
}

.attr-dimension,
.attr-colors {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(141, 103, 72, 0.15);
    background: rgba(191, 160, 116, 0.07);
    color: #8d6748;
    transition: all 0.3s ease;
}

.product-card-modern:hover .attr-dimension,
.product-card-modern:hover .attr-colors {
    background: rgba(191, 160, 116, 0.13);
    border-color: rgba(141, 103, 72, 0.25);
}

@media (max-width: 767px) {
    .attr-dimension,
    .attr-colors {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
}

/* ─────────────────────────────────────────────────────────── */
/* Price Section */
/* ─────────────────────────────────────────────────────────── */

.price-box {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(191, 160, 116, 0.14);
    position: relative;
}

.price-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #8d6748 0%, transparent 100%);
}

.price-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}

.price-group-discount {
    align-items: center;
    gap: 12px;
}

.discount-highlight {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fffdfb 0%, #f8f1ea 100%);
    color: #8f2b2b;
    border: 1px solid #ead6c8;
    border-left: 4px solid #b71c1c;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1px;
    box-shadow: 0 3px 10px rgba(141, 103, 72, 0.08);
}

.discount-highlight::before {
    content: '';
    display: none;
}

.price-old {
    font-size: 0.8rem;
    font-weight: 700;
    color: #9a9a9a;
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(154, 154, 154, 0.7);
    opacity: 0.85;
}

.price-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    font-size: 1.22rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    padding: 7px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #d92d2d 0%, #b30000 100%);
    box-shadow: 0 6px 14px rgba(183, 28, 28, 0.22);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.price-single {
    font-size: 1.25rem;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (max-width: 767px) {
    .price-old {
        font-size: 0.76rem;
    }
    
    .price-new,
    .price-single {
        font-size: 1.08rem;
    }

    .discount-highlight {
        font-size: 0.65rem;
        padding: 5px 8px;
    }
}

/* ─────────────────────────────────────────────────────────── */
/* Animations */
/* ─────────────────────────────────────────────────────────── */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card-modern {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

/* Stagger animation */
.product-card-modern:nth-child(1) { animation-delay: 0s; }
.product-card-modern:nth-child(2) { animation-delay: 0.1s; }
.product-card-modern:nth-child(3) { animation-delay: 0.2s; }
.product-card-modern:nth-child(4) { animation-delay: 0.3s; }
.product-card-modern:nth-child(5) { animation-delay: 0.4s; }
.product-card-modern:nth-child(6) { animation-delay: 0.5s; }
.product-card-modern:nth-child(7) { animation-delay: 0.6s; }
.product-card-modern:nth-child(8) { animation-delay: 0.7s; }
.product-card-modern:nth-child(n+9) { animation-delay: 0.8s; }

/* ─────────────────────────────────────────────────────────── */
/* Additional Sophistication */
/* ─────────────────────────────────────────────────────────── */

.product-card-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(141, 103, 72, 0.03) 0%, transparent 100%);
    border-radius: 0 0 20px 20px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card-modern:hover::after {
    opacity: 1;
}

/* ─────────────────────────────────────────────────────────── */
/* Mobile Optimizations */
/* ─────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    
    .discount-badge {
        top: 10px;
        left: 10px;
    }
    
    .discount-percent {
        font-size: 0.86rem;
        padding: 5px 9px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        gap: 12px;
    }
    
    .product-card-modern {
        border-radius: 12px;
    }
    
    .discount-badge {
        top: 8px;
        left: 8px;
    }
    
    .discount-percent {
        font-size: 0.8rem;
        padding: 5px 8px;
    }
    
    .category-tag {
        bottom: 8px;
        left: 8px;
        right: 8px;
        padding: 6px 12px;
        font-size: 0.65rem;
    }
}

/* ═══════════════════════════════════════════════════════════
   End of Modern Product Cards CSS
   ═══════════════════════════════════════════════════════════ */
