/* ========================================
   PRODUCT GALLERY STYLES - BURHANI TIMBER
   Enhanced Product Gallery UI with Modern Design
   ======================================== */

/* Direct color definitions - no CSS variables */
:root {
    --gallery-bg: #f8f6f0;
    --card-bg: #ffffff;
    --card-shadow: 0 8px 32px rgba(80, 64, 55, 0.12);
    --card-shadow-hover: 0 16px 48px rgba(80, 64, 55, 0.2);
    --card-border: 1px solid rgba(177, 136, 87, 0.15);
    --card-border-hover: 2px solid var(--theme-color-text_link);
    --image-bg: #fafafa;
    --title-color: #ffffff;
    --description-color: #ffffff;
    --accent-color: var(--theme-color-text_link);
    --accent-hover: var(--theme-color-text_hover);
    --watermark-opacity: 0.03;
    --transition-smooth: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-fast: all 0.2s ease-in-out;
}

/* ========================================
   GALLERY HEADER SECTION
   ======================================== */
.product-gallery-header {
    background: #504037;
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(80, 64, 55, 0.1);
    border: 2px solid var(--theme-color-bd_color);
}
/* ========================================
   GALLERY HEADER SECTION
   ======================================== */
.product-gallery-header {
    background: linear-gradient(45deg, #71594b, #4c3b31, #6b574b, #3f322b);
    border-color: #9a7c6b;
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(80, 64, 55, 0.1);
    border: 2px solid #b18857;
}

/* Decorative background pattern */
.product-gallery-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(177, 136, 87, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(177, 136, 87, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.gallery-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
}

.gallery-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #b18857, #8b6b3f);
    border-radius: 2px;
}

.gallery-description {
    font-size: 1.1rem;
    color: #ffffff;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

/* ========================================
   PRODUCT CARDS CONTAINER
   ======================================== */
.product-cards-container {
    position: relative;
    padding: 2rem 0;
}

/* Background watermark */
.product-cards-container::before {
    content: 'BURHANI TIMBERS';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 8rem;
    font-weight: 900;
    color: #b18857;
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
    white-space: nowrap;
    letter-spacing: 1rem;
}

.product-cards-container::after {
    content: 'PHANI';
    position: fixed;
    top: 60%;
    left: 60%;
    transform: translate(-50%, -50%) rotate(45deg);
    font-size: 6rem;
    font-weight: 900;
    color: #b18857;
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
    white-space: nowrap;
    letter-spacing: 0.5rem;
}

/* ========================================
   PRODUCT CARD STYLES
   ======================================== */
.product-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(80, 64, 55, 0.12);
    border: 1px solid rgba(177, 136, 87, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

/* Card hover effects */
.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(80, 64, 55, 0.2);
    border: 2px solid #b18857;
}

.product-card:hover .card-image {
    transform: scale(1.1);
}

.product-card:hover .card-content {
    background: #504037;
}

/* Card image wrapper */
.card-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f0eddf;
    border-radius: 20px 20px 0 0;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Product image */
.card-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Image overlay on hover */
.card-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(177, 136, 87, 0.1), rgba(177, 136, 87, 0.05));
    opacity: 0;
    transition: all 0.2s ease-in-out;
    z-index: 1;
}

.product-card:hover .card-image-wrapper::before {
    opacity: 1;
}

/* Card content */
.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(45deg, #71594b, #4c3b31, #6b574b, #3f322b);
    
    position: relative;
    z-index: 2;
}

/* Card title */
.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.3;
}

 /* Card description */
 .card-description {
     font-size: 0.95rem;
     color: #ffffff;
     text-align: center;
     line-height: 1.5;
     margin: 0 0 1rem 0;
     font-weight: 400;
 }

/* Card features */
.card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: auto;
}

.feature-tag {
    background: linear-gradient(135deg, #b18857, #8b6b3f);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.2s ease-in-out;
}

.feature-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(177, 136, 87, 0.3);
}

/* ========================================
   ENHANCED CARD FEATURES
   ======================================== */
/* Product category badge */
.product-card::before {
    content: 'PRODUCT';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #b18857, #8b6b3f);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
    opacity: 0.9;
}

/* Card corner accent */
.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 30px 30px;
    border-color: transparent transparent #b18857 transparent;
    opacity: 0.3;
    transition: all 0.2s ease-in-out;
}

.product-card:hover::after {
    opacity: 0.6;
    border-width: 0 0 40px 40px;
}

/* ========================================
   HIGHLIGHTED CARD ANIMATION
   ======================================== */
.product-card.highlighted {
    animation: cardHighlight 3s ease-in-out;
    border-color: #b18857;
    box-shadow: 0 0 40px rgba(177, 136, 87, 0.4);
}

@keyframes cardHighlight {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 32px rgba(80, 64, 55, 0.12);
    }
    25% {
        transform: scale(1.05);
        box-shadow: 0 0 50px rgba(177, 136, 87, 0.6);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 60px rgba(177, 136, 87, 0.8);
    }
    75% {
        transform: scale(1.05);
        box-shadow: 0 0 50px rgba(177, 136, 87, 0.6);
    }
}

/* ========================================
   GALLERY FOOTER
   ======================================== */
.product-gallery-footer {
    background: linear-gradient(45deg, #71594b, #4c3b31, #6b574b, #3f322b);
    border-radius: 20px;
    padding: 2.5rem;
    margin-top: 3rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(80, 64, 55, 0.1);
        border: 2px solid #b18857;
    position: relative;
    overflow: hidden;
}

.product-gallery-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #b18857, #8b6b3f, #b18857);
}

 .product-gallery-footer p {
     font-size: 1.1rem;
     color: #ffffff;
     line-height: 1.7;
     margin: 0;
     max-width: 900px;
     margin: 0 auto;
 }

/* ========================================
   GALLERY STATS SECTION
   ======================================== */
.gallery-stats {
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: all 0.2s ease-in-out;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);
    border-color: #b18857;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: #b18857;
    margin-bottom: 0.3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1200px) {
    .gallery-title {
        font-size: 2.2rem;
    }
    
    .card-image-wrapper {
        height: 250px;
    }
}

@media (max-width: 992px) {
    .product-gallery-header {
        padding: 2rem 1.5rem;
    }
    
    .gallery-title {
        font-size: 2rem;
        letter-spacing: 1.5px;
    }
    
    .gallery-description {
        font-size: 1rem;
    }
    
    .card-image-wrapper {
        height: 220px;
        padding: 1.5rem;
    }
    
    .card-content {
        padding: 1.2rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .product-gallery-header {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
    }
    
    .gallery-title {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    
    .gallery-description {
        font-size: 0.95rem;
    }
    
    .gallery-stats {
        margin-top: 1.5rem;
    }
    
    .stat-item {
        padding: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .product-cards-container {
        padding: 1rem 0;
    }
    
    .card-image-wrapper {
        height: 200px;
        padding: 1rem;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .card-description {
        font-size: 0.9rem;
    }
    
    .product-gallery-footer {
        padding: 2rem 1.5rem;
        margin-top: 2rem;
    }
    
    .product-gallery-footer p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .product-gallery-header {
        padding: 1rem;
        border-radius: 15px;
    }
    
    .gallery-title {
        font-size: 1.5rem;
        letter-spacing: 0.5px;
    }
    
    .gallery-title::after {
        width: 60px;
        height: 3px;
    }
    
    .gallery-description {
        font-size: 0.9rem;
    }
    
    .card-image-wrapper {
        height: 180px;
        padding: 0.8rem;
    }
    
    .card-content {
        padding: 0.8rem;
    }
    
    .card-title {
        font-size: 1rem;
        letter-spacing: 0.5px;
    }
    
    .card-description {
        font-size: 0.85rem;
    }
    
    .product-card::before {
        font-size: 0.6rem;
        padding: 0.2rem 0.6rem;
        top: 0.8rem;
        right: 0.8rem;
    }
    
    .product-gallery-footer {
        padding: 1.5rem 1rem;
        border-radius: 15px;
    }
    
    .product-gallery-footer p {
        font-size: 0.9rem;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
/* Focus states for keyboard navigation */
.product-card:focus {
    outline: 3px solid #b18857;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-card {
        border-width: 2px;
    }
    
    .product-card:hover {
        border-width: 3px;
    }
    
    .card-title {
        font-weight: 900;
    }
    
    .card-description {
        font-weight: 600;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .product-card,
    .card-image,
    .product-gallery-header::before {
        transition: none;
        animation: none;
    }
    
    .product-card:hover {
        transform: none;
    }
    
    .product-card:hover .card-image {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --gallery-bg: #1a1a1a;
        --card-bg: #2a2a2a;
        --image-bg: #333333;
        --title-color: #ffffff;
        --description-color: #cccccc;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000000;
        background: #ffffff;
    }
    
    .card-image-wrapper {
        background: #ffffff;
    }
    
    .card-title {
        color: #000000;
    }
    
    .card-description {
        color: #333333;
    }
    
    .product-card::before,
    .product-card::after {
        display: none;
    }
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */
/* Skeleton loading for cards */
.product-card.loading {
    animation: cardSkeleton 1.5s ease-in-out infinite;
}

@keyframes cardSkeleton {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ========================================
   SPECIAL EFFECTS
   ======================================== */
/* Glow effect for premium products */
.product-card.premium {
    box-shadow: 0 8px 32px rgba(177, 136, 87, 0.2);
}

.product-card.premium::before {
    content: 'PREMIUM';
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000000;
}

/* New product indicator */
.product-card.new::after {
    content: 'NEW';
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
    animation: newPulse 2s ease-in-out infinite;
}

@keyframes newPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}
