/* --- KEYFRAMES FOR ANIMATIONS --- */
@keyframes subtleMove {
    0% { transform: translate(0, 0); }
    50% { transform: translate(15px, 15px); }
    100% { transform: translate(0, 0); }
}
@keyframes shineSweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
/* New: Animated gold light across the header */
@keyframes headerShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


:root {
    /* --- DYNAMIC DARK GOLD & CHARCOAL PALETTE --- */
    --primary-dark: #181820; /* Deep Charcoal/Navy */
    --secondary-dark: rgba(30, 30, 40, 0.9); /* Card/Section background */
    --header-bg: rgba(30, 30, 40, 0.85); /* Slightly transparent for the blur effect */
    --accent-color: #FFC300; /* Rich Gold */
    --accent-glow: rgba(255, 195, 0, 0.8); /* Gold Glow effect */
    --text-light: #F5F5F5;
    --text-muted: #B0B0C0;
    --border-dark: rgba(255, 195, 0, 0.15);

    /* Gold Gradient */
    --gold-gradient: linear-gradient(135deg, #d4af37, #f7e48c);
    --shine-gradient: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);

    /* Badge Colors */
    --hot-color: #E74C3C; /* Red */
}

/* Base & Typography */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding-top: 95px; /* IMPORTANT: Offset for fixed header height */
    background-color: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.6;
    scroll-behavior: smooth;
    position: relative;
    overflow-x: hidden;
}

/* Headings use the serif font for luxury */
h3, h4 {
    font-family: 'Cinzel', serif;
    color: var(--text-light);
}

/* Global Background Light Sweep (Makes the background "alive") */
.global-light-sweep {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(255, 195, 0, 0.08) 0%, transparent 35%),
                radial-gradient(circle at 90% 80%, rgba(255, 195, 0, 0.08) 0%, transparent 35%);
    background-repeat: no-repeat;
    animation: subtleMove 45s ease-in-out infinite alternate;
    z-index: -1;
}

/* --- HEADER STYLING (FIXED & BLURRED) --- */
.header {
    background-color: var(--header-bg);

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    padding: 15px 20px;
    height: 65px;

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 999;
    box-shadow: 0 4px 15px rgba(255, 195, 0, 0.15);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    transition: all 0.3s ease;
}

/* HEADER SCROLL EFFECT (Applied by JS) */
.header.scrolled {
    padding: 10px 20px;
    height: 55px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 195, 0, 0.4);
}

/* Animated Gold Shine inside the Header */
.header-shine {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 195, 0, 0.05) 0%, transparent 10%, rgba(255, 195, 0, 0.05) 20%, transparent 30%);
    background-size: 200% 100%;
    animation: headerShine 15s linear infinite;
    z-index: -1;
}

/* LOGO SIZE FIX - HEADER */
.store-logo {
    max-width: 150px;
    height: auto;
    filter: brightness(1.5) drop-shadow(0 0 5px rgba(255, 195, 0, 0.5));
    transition: all 0.3s ease;
}
/* Logo scale slightly when scrolled */
.header.scrolled .store-logo {
    max-width: 130px;
}


/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px 60px;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
    margin-top: 10px;
}

/* Product Card (SCROLL REVEAL INITIAL STATE) */
.product-card {
    background-color: var(--secondary-dark);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.7);
    transition: transform 0.4s, box-shadow 0.4s;

    /* Initial state for JS-controlled scroll reveal */
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    position: relative; /* Needed for absolute badge positioning */
}

/* SCROLL REVEAL FINAL STATE (Applied by JS) */
.product-card.animate-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px var(--accent-glow);
}

.product-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    filter: brightness(0.9);
    transition: transform 0.4s, filter 0.4s;
    position: relative;
    overflow: hidden;
    /* Updated cursor for single-click zoom */
    cursor: pointer;
}

/* Image Light Sweep Effect on Hover */
.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--shine-gradient);
    opacity: 0;
    transition: opacity 0.5s;
}

.product-card:hover .product-image {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.product-card:hover .product-image::after {
    opacity: 1;
    animation: shineSweep 1.5s ease-out;
}

/* --- PRODUCT STATUS BADGES (HOT, NEW, LIMITED) --- */
.product-status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif; /* Keep badge text clean */
}

/* HOT Badge Style: Red with Gold Glow */
.hot-badge {
    background-color: var(--hot-color);
    color: var(--text-light);
    box-shadow: 0 0 10px rgba(255, 195, 0, 0.7); /* Gold glow for hot */
    transform: rotate(3deg);
}

/* NEW Badge Style: Gold with Dark Text */
.new-badge {
    background-color: var(--accent-color);
    color: var(--primary-dark);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    top: 15px;
    right: auto; /* Position on the left for variation */
    left: 15px;
    transform: rotate(-3deg);
}

/* LIMITED Badge Style: Dark with Gold Border */
.limited-badge {
    background-color: rgba(30, 30, 40, 0.8);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 8px rgba(255, 195, 0, 0.5);
}


.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.7em;
    color: var(--accent-color);
    text-shadow: 0 0 8px rgba(255, 195, 0, 0.4);
}

.details-row {
    border-top: 1px solid var(--border-dark);
}

/* --- PRODUCT OPTIONS (SIZE & COLOR SWATCHES) --- */
.options {
    /* FIX: Change to column to stack size and color groups */
    display: flex;
    flex-direction: column; 
    align-items: flex-start; /* Align everything to the left */
    gap: 15px; /* Space between the size row and the color row */
    margin-bottom: 20px;
    padding-top: 15px;
}

/* Both groups should now span full width when stacking */
.size-group, .color-group {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%; /* Important: Make them span the full width of .options */
    justify-content: space-between; /* Space out the label and the swatches */
}

.size-group {
    /* Ensure size swatches stay on one line */
    flex-wrap: nowrap;
}

.color-group {
    /* Allow color swatches to wrap if needed */
    flex-wrap: wrap; 
    /* This ensures the color label and swatches are on the same line */
}

/* Style for the size select dropdown (Hiding the old dropdown) */
.size-select {
    display: none !important;
}

/* --- NEW MODERN SIZE SELECT SWATCHES --- */

.size-swatch-container {
    display: flex;
    gap: 8px; /* Space between swatches */
    /* Ensure swatches don't wrap to keep them on one line */
    flex-wrap: nowrap; 
}

.size-swatch {
    /* Base style */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px; /* Fixed width */
    height: 35px; /* Fixed height, keeps it square */
    
    /* Text style */
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 600;
    
    /* Appearance */
    border: 2px solid rgba(255, 255, 255, 0.2); /* Subtle white border */
    border-radius: 6px; /* Slightly rounded corners */
    background-color: var(--primary-dark);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    user-select: none; /* Prevents text selection on tap */
}

/* Hover/Focus effect */
.size-swatch:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(255, 195, 0, 0.5); /* Soft glow */
}

/* Selected state (The most important style) */
.size-swatch.selected {
    background-color: var(--accent-color); /* Gold fill for selection */
    color: var(--primary-dark); /* Dark text on gold */
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
    transform: scale(1.05); /* Slight pop effect */
}

/* Color Swatch Container */
.color-swatch-container {
    display: flex;
    /* FIX: Crucial for wrapping on tight desktop cards */
    flex-wrap: wrap; 
    gap: 8px;
    /* FIX: Let the swatches align to the right side of the container */
    justify-content: flex-end;
}

/* Base Swatch Style */
.color-swatch {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    outline: 1px solid var(--border-dark); /* Subtle outline for shape on dark bg */
}

/* Specific Color Definitions */
.color-swatch.black { background-color: #000000; }
.color-swatch.navy { background-color: #000080; }
.color-swatch.ash-grey { background-color: #A9A9A9; }
.color-swatch.dark-wash { background-color: #1F364D; }
/* Rainbow multicolor swatch */
.color-swatch.rainbow {
  background: conic-gradient(
    red,
    orange,
    yellow,
    green,
    blue,
    indigo,
    violet,
    red
  );
  border: 2px solid white; /* helps it pop on dark background */
  animation: spinRainbow 6s linear infinite;
}

/* Optional animation: slow rotation for a lively effect */
@keyframes spinRainbow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Optional: glowing border when selected */
.color-swatch.rainbow.selected {
  box-shadow: 0 0 0 3px var(--primary-dark),
              0 0 15px rgba(255, 255, 255, 0.8),
              0 0 25px rgba(255, 195, 0, 0.8);
  transform: scale(1.15);
}

.color-swatch.beige { background-color: #c3b091; }
.color-swatch.green { background-color: #4EE35A; }
.color-swatch.dp { background-color: #DE3163; }
.color-swatch.brown { background-color: #B87333; }
.color-swatch.pink { background-color: #FF10F0; }
.color-swatch.red { background-color: #ff0000; }
.color-swatch.yellow { background-color: #FFEA00; }
.color-swatch.orange { background-color: #FF4B33; }
.color-swatch.purple { background-color: #800080; }
.color-swatch.white { background-color: #E9DCC9; }
.color-swatch.light-blue { background-color: #AEC6CF; }

.color-swatch:hover {
    transform: scale(1.1);
}

/* Style for the Selected Swatch */
.color-swatch.selected {
    border-color: var(--accent-color); /* Gold border for selected color */
    box-shadow: 0 0 0 3px var(--primary-dark), 0 0 0 5px var(--accent-color);
    transform: scale(1.1);
}

/* WhatsApp Button (Shine Effect) */
.whatsapp-btn {
    width: 100%;
    padding: 16px;
    background: var(--gold-gradient);
    color: var(--primary-dark);
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 10px rgba(255, 195, 0, 0.4);
    position: relative;
    overflow: hidden;
}

/* Button Shine/Ripple Effect */
.whatsapp-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: transform 0.5s ease;
}

.whatsapp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(255, 195, 0, 0.6), 0 0 10px var(--accent-glow);
}

.whatsapp-btn:hover::after {
    transform: translateX(300%);
}

.whatsapp-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(255, 195, 0, 0.5);
}

/* --- NEW ADDITION: WHATSAPP FLOATING BUTTON STYLES --- */
.floating-whatsapp-btn {
    position: fixed;
    bottom: 30px;
    /* Position on the left side for RTL */
    left: 30px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E); /* Classic WhatsApp colors */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(37, 211, 102, 0.8);
    transition: transform 0.3s, box-shadow 0.3s, background 0.5s;
}

.floating-whatsapp-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 25px rgba(37, 211, 102, 1);
}
/* --- END NEW ADDITION --- */

/* --- FOOTER STYLES (SINGLE COLUMN & CENTERED) --- */
.main-footer {
    background: radial-gradient(circle at 50% 10%, rgba(255, 195, 0, 0.05), var(--primary-dark) 40%);

    color: var(--text-light);
    padding: 60px 20px 20px;

    /* Single column grid setup */
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;

    max-width: 1300px;
    margin: 0 auto;

    position: relative;
    z-index: 10;

    clip-path: polygon(0 20px, 100% 0, 100% 100%, 0% 100%);
    box-shadow: 0 -5px 20px rgba(255, 195, 0, 0.2);
}

/* Center the branding column's content */
.footer-column.footer-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 450px;
    margin: 0 auto;
}

/* LOGO SIZE FIX - FOOTER */
.main-footer .footer-logo {
    max-width: 150px;
    margin-bottom: 15px;
    filter: brightness(1.5);
}

/* Social Icons (Enhanced Glow) */
.social-icons a {
    color: var(--accent-color);
    font-size: 1.4em;
    text-shadow: 0 0 8px rgba(255, 195, 0, 0.5);
    transition: transform 0.3s, text-shadow 0.3s;
}

.social-icons a:hover {
    transform: scale(1.3);
    text-shadow: 0 0 25px var(--accent-glow);
}

/* Footer Bottom */
.footer-bottom {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border-dark);
    padding-top: 20px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
}

.footer-legal-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 15px;
    transition: color 0.2s;
}

.footer-legal-links a:hover {
    color: var(--accent-color);
}


/* --- IMAGE ZOOM MODAL STYLES --- */

/* The Modal Overlay (Hidden by default) */
#image-zoom-modal {
    display: none; /* Hidden by default - controlled by JS */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95); /* Nearly black, highly opaque background */

    /* Perfect Centering with Flexbox */
    display: flex;
    align-items: center;
    justify-content: center;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Add fade-in transition */
    opacity: 0;
    transition: opacity 0.3s ease;
}
/* When JS sets display to flex, opacity is set to 1 */
#image-zoom-modal[style*="display: flex"] {
    opacity: 1;
}

/* Modal Content Container for Zoom (holds image and close button) */
.modal-content-zoom {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;

    /* --- ENHANCED DESIGN CHANGES --- */
    /* Add a sleek, dark background frame with border/shadow */
    background-color: rgba(30, 30, 40, 0.9); /* Same as secondary-dark, but slightly more opaque */
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 195, 0, 0.3); /* Subtle gold border */
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 195, 0, 0.2); /* Deep shadow with subtle glow */
}

/* The Zoomed Image */
#zoomed-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px; /* Slightly smaller radius than the container */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    cursor: default;
}

/* The Close Button for Zoom Modal (Moved inside the modal for better alignment) */
.close-btn-zoom {
    color: var(--text-light);
    font-size: 40px;
    font-weight: bold;
    position: absolute;
    top: 5px;   /* Position it inside the top-right corner of the new frame */
    right: 15px;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s, transform 0.3s;
    text-shadow: 0 0 15px var(--accent-color);
}

.close-btn-zoom:hover,
.close-btn-zoom:focus {
    color: var(--accent-color);
    transform: scale(1.1);
}

/* --- RESPONSIVENESS (MOBILE OPTIMIZATIONS) --- */

@media (max-width: 600px) {
    /* Smaller padding and height for mobile header */
    .header {
        padding: 10px 15px;
        height: 45px;
    }
    .header.scrolled {
        padding: 8px 15px;
        height: 40px;
    }
    .store-logo, .main-footer .footer-logo {
        max-width: 130px;
    }
    .main-footer {
        clip-path: polygon(0 10px, 100% 0, 100% 100%, 0% 100%);
    }

    /* Ensure legal links stack nicely on small screens */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-bottom p {
        margin-bottom: 10px;
    }
    .footer-legal-links a {
        margin: 0 5px;
    }

    /* Center and stack options better on small screens */
    /* This overrides the desktop column direction, making it column again but explicitly */
    .options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    /* Ensure both groups take full width when stacked vertically on mobile */
    .size-group, .color-group {
        width: 100%; 
        justify-content: space-between; /* Space out the label and swatches */
        flex-wrap: wrap; 
    }

    /* Align swatches to the right of the color label */
    .color-swatch-container {
        justify-content: flex-end; 
    }

    /* Mobile adjustment for close button of the zoom modal */
    .close-btn-zoom {
        top: 20px;
        right: 20px;
        font-size: 30px;
        text-shadow: 0 0 10px var(--accent-color);
    }

    /* === MOBILE INTERACTIVITY OPTIMIZATIONS === */

    /* 1. Remove all hover transforms on the card/image to prevent jankiness on tap */
    .product-card:hover {
        transform: translateY(0) scale(1.0);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.7);
    }
    .product-card:hover .product-image {
        transform: scale(1.0);
        filter: brightness(0.9);
    }
    .product-card:hover .product-image::after {
        animation: none;
        opacity: 0;
    }

    /* 2. Enlarge and adjust color swatches for better tap targets (25px -> 35px) */
    .color-swatch {
        width: 35px;
        height: 35px;
        outline: 2px solid var(--border-dark); /* Slightly thicker outline */
    }

    .color-swatch:hover {
        transform: scale(1.0); /* Disable the scale effect on touch */
    }

    /* Mobile adjustments for the NEW SIZE SWATCHES */
    .size-swatch {
        width: 40px; /* Slightly larger tap target on mobile */
        height: 40px;
        font-size: 0.9rem;
    }

    /* 4. Improve WhatsApp button tap consistency */
    .whatsapp-btn:hover {
        transform: translateY(0); /* Disable hover transform */
        box-shadow: 0 4px 10px rgba(255, 195, 0, 0.4); /* Use standard shadow */
    }
    .whatsapp-btn:hover::after {
        transform: translateX(0); /* Disable shine effect on mobile hover */
    }
    

    /* Floating WhatsApp Button */
    .floating-whatsapp-btn {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}