:root {
    --green-1: #e8fbf0;
    --green-2: #dff6e8;
    --accent: #14b8a6;
    --gold-1: #f6d27a;
    --gold-2: #d6a63e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Inter', sans-serif; 
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Loading Screen Styles */
#splash-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at top, var(--green-1), var(--green-2));
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#splash-loader.hide { opacity: 0; transform: scale(0.95); pointer-events: none; }
.loader-content { text-align: center; transform-style: preserve-3d; animation: loaderEntrance 1s ease-out; }
@keyframes loaderEntrance { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.loader-logo {
    width: 120px; height: 120px; margin: 0 auto 2rem; border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    backdrop-filter: blur(20px); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 20px 60px rgba(20, 184, 166, 0.3); animation: float 3s ease-in-out infinite; position: relative;
}
.loader-logo::before {
    content: ''; position: absolute; inset: -4px; border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, var(--accent) 90deg, var(--gold-1) 180deg, transparent 270deg);
    animation: rotate 2s linear infinite; z-index: -1; filter: blur(8px);
}
@keyframes float { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-15px) scale(1.05); } }
@keyframes rotate { to { transform: rotate(360deg); } }
.loader-logo img { width: 70px; height: auto; animation: logoSpin 4s ease-in-out infinite; }
@keyframes logoSpin { 0%, 100% { transform: rotateY(0deg); } 50% { transform: rotateY(180deg); } }
.loader-progress { width: 200px; height: 6px; background: rgba(255, 255, 255, 0.3); border-radius: 10px; margin: 0 auto; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }
.loader-progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold-1), var(--accent)); background-size: 200% 100%; border-radius: 10px; width: 0%; animation: progress 2.5s ease-in-out forwards, shimmer 1.5s linear infinite; }
@keyframes progress { to { width: 100%; } }
@keyframes shimmer { to { background-position: 200% 0; } }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes spin { to { transform: rotate(360deg); } }

.view { display: none; }
.view.active { display: block; animation: fadeInUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* Header & Nav */
.logo-main { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1)); transition: transform 0.3s ease; }
.logo-main:hover { transform: scale(1.05); }

/* Bottom Nav Active State */
.nav-link.active i { color: #0d9488; filter: drop-shadow(0 0 8px rgba(20, 184, 166, 0.4)); }
.nav-link.active span { color: #0f766e; }

/* Language Switcher */
.lang-btn.active { 
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); 
    color: white; 
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4); 
    transform: scale(1.05); 
}

/* Category Chips */
.category-chip { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); background: white; border: 2px solid #e2e8f0; font-weight: 600; font-size: 0.85rem; padding: 0.5rem 1.25rem; }
.category-chip:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08); border-color: #14b8a6; }
.category-chip.active { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); color: white; border-color: #14b8a6; box-shadow: 0 6px 16px rgba(20, 184, 166, 0.4); transform: translateY(-2px); }

/* Scrollbar */
.custom-scrollbar::-webkit-scrollbar { height: 0px; display: none; } 
.custom-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Product Card - UPDATED FOR 3 COLUMNS */
.product-card { transition: all 0.2s ease-in-out; cursor: pointer; background: white; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08); border-color: #2dd4bf; }
.product-card:active { transform: translateY(-1px); }
.product-image { background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.product-card:hover .product-image { transform: scale(1.08); }
.product-price { font-size: 0.95rem; font-weight: 800; background: linear-gradient(135deg, #14b8a6, #06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Buttons */
.btn-primary { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); color: white; font-weight: 700; transition: all 0.3s ease; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20, 184, 166, 0.4); }
.btn-primary:active { transform: translateY(0); }

/* Variant Selector */
.variant-selector { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.variant-option { padding: 0.75rem; border: 2px solid #e2e8f0; border-radius: 0.75rem; text-align: center; cursor: pointer; transition: all 0.2s ease; background: white; }
.variant-option:hover { border-color: #14b8a6; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(20, 184, 166, 0.15); }
.variant-option.selected { border-color: #14b8a6; background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%); box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3); }
.variant-name { font-weight: 700; color: #0f766e; font-size: 0.9rem; }
.variant-price { font-size: 0.8rem; font-weight: 800; color: #0d9488; }

/* Modal & Cart */
/* Optimized animation to prevent lag */
.modal-panel { transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease; }
#cart-panel { box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15); }
.cart-item { background: white; border: 1px solid #e2e8f0; transition: all 0.3s ease; animation: slideInRight 0.3s ease; border-radius: 1rem; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.order-card { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); background: white; border: 2px solid #e2e8f0; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); }

/* Spinner */
.spinner { width: 32px; height: 32px; border: 4px solid #e2e8f0; border-top-color: #14b8a6; border-radius: 50%; animation: spin 0.8s linear infinite; }

/* Slideshow */
.slideshow-container { width: 100%; height: 220px; border-radius: 1.5rem; margin-bottom: 1.5rem; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-content { background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); }

@media (max-width: 640px) {
    .product-image { height: 120px; } /* Reduced height for 3-col grid */
    .slideshow-container { height: 180px; }
    .product-card { padding: 0.5rem; border-radius: 0.75rem; }
    .product-card h3 { font-size: 1.0rem; }
    .product-price { font-size: 0.85rem; }
    #quantity-panel { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
}


.slide {
    position: absolute; /* Stacks slides on top of each other */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.8s ease-in-out; /* Smooth fade */
    z-index: 0;
}

.slide.active-slide { 
    opacity: 1; /* Shows the active slide */
    z-index: 1;
}

.slide img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    z-index: 2;
}

.slide-content h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.slide-content p {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Indicators (Dots) */
.slide-indicators {
    position: absolute;
    bottom: 1rem;
    right: 1.5rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active-indicator {
    background: white;
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(255,255,255,0.5);
}

/* Hide arrows on mobile to save space, show on desktop */
.slide-arrows { display: none; }

@media (min-width: 640px) {
    .slideshow-container { height: 300px; }
    .slide-arrows {
        position: absolute;
        top: 50%;
        width: 100%;
        display: flex;
        justify-content: space-between;
        padding: 0 1rem;
        transform: translateY(-50%);
        z-index: 10;
    }
    .slide-arrow {
        background: rgba(255,255,255,0.2);
        backdrop-filter: blur(4px);
        border: none;
        border-radius: 50%;
        width: 40px; height: 40px;
        display: flex; align-items: center; justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
    }
    .slide-arrow:hover { background: white; color: black; }
}
/* --- Category Section & Scrollspy Styles --- */

/* Offset for scrolling so headers don't hide behind the sticky top bar */
.category-section {
    scroll-margin-top: 170px; /* Adjust based on your header height */
    margin-bottom: 2.5rem;
    position: relative;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-left: 0.25rem;
}

.category-header h3 {
    font-size: 1.25rem;
    font-weight: 900;
    color: #1e293b;
    letter-spacing: -0.025em;
}

.category-header::before {
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background: linear-gradient(to bottom, #14b8a6, #0d9488);
    border-radius: 4px;
}

.category-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}
/* Ensure proper stacking for the new layout */
.category-section {
    display: block;
    width: 100%;
    margin-bottom: 2rem;
    scroll-margin-top: 180px; /* Ensures header doesn't cover title when scrolling */
}

/* Fix product card squashing */
.product-card {
    min-width: 0; /* Prevents flexbox overflow issues */
    width: 100%;
}

/* Better grid for the products INSIDE the sections */
.category-section .grid {
    /* Ensures at least 100px width per card to prevent text squashing */
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); 
}

@media (min-width: 640px) {
    .category-section .grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}
/* --- Category Section & Scrollspy Styles --- */

/* FIXED: Increased offset to 190px to account for Header + Search + Sticky Nav */
.category-section {
    display: block;
    width: 100%;
    margin-bottom: 2rem;
    scroll-margin-top: 190px; 
}

/* Fix product card squashing */
.product-card {
    min-width: 0;
    width: 100%;
}

/* Category Headers inside the section (Optional, since we have the main nav) */
.category-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 0.25rem;
}

.category-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #334155;
}

/* Better grid for the products INSIDE the sections */
.category-section .grid {
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns on mobile */
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .category-section .grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
}

html {
    scroll-behavior: smooth;
}
//retry
