:root {
    --gold-primary: #C89F5C;
    --gold-light: #EBD49B;
    --gold-dark: #8F6A35;
    --bg-dark: #0A0A0A;
    --bg-panel: rgba(20, 20, 20, 0.85);
    --text-main: #FFFFFF;
    --text-muted: #A0A0A0;
    --border-gold: rgba(200, 159, 92, 0.3);
    
    --font-heading: 'Amiri', serif;
    --font-body: 'Tajawal', sans-serif;
    --font-accent: 'Cairo', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Background Animation */
.background-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -2; overflow: hidden; }
.bg-image {
    width: 110%; height: 110%;
    background-image: url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?q=80&w=1920&auto=format&fit=crop');
    background-size: cover; background-position: center; background-repeat: no-repeat;
    animation: slow-pan 40s linear infinite alternate;
}
.bg-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(10,10,10,0.6) 0%, rgba(10,10,10,0.85) 50%, rgba(10,10,10,0.95) 100%);
}
@keyframes slow-pan { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(-3%, -2%) scale(1.05); } }

/* Canvas Particles */
#particles-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }

/* Main Content Wrapper */
.menu-content { max-width: 1200px; margin: 0 auto; padding: 2rem 0; position: relative; z-index: 1; }

/* Header */
.header { text-align: center; margin-bottom: 3rem; position: relative; padding: 0 1rem; }
.logo-icon { width: 120px; height: 120px; margin: 0 auto 1rem; filter: drop-shadow(0 0 15px rgba(200, 159, 92, 0.5)); }
.lion-logo { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-family: var(--font-heading); font-size: 3rem; color: var(--gold-primary); margin-bottom: 0.2rem; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.brand-name-en { font-family: var(--font-accent); font-size: 1.2rem; letter-spacing: 3px; color: var(--gold-light); margin-bottom: 1rem; }
.tagline { font-size: 1.1rem; color: var(--text-muted); font-family: var(--font-body); }

/* Music Button */
.music-btn {
    position: absolute; top: 0; left: 1rem;
    background: rgba(0,0,0,0.5); border: 1px solid var(--gold-primary); color: var(--gold-primary);
    width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease; backdrop-filter: blur(5px); z-index: 50;
}
.music-btn:hover { background: var(--gold-primary); color: var(--bg-dark); box-shadow: 0 0 15px var(--gold-dark); }

/* 1. السلايدر الرئيسي (المنتجات المميزة) */
.featured-section { margin-bottom: 3rem; position: relative; width: 100%; overflow: hidden; padding-bottom: 1rem; }
.featured-carousel-container { display: flex; align-items: center; justify-content: center; position: relative; width: 100%; height: 380px; }

.carousel-btn {
    background: rgba(0,0,0,0.7); border: 1px solid var(--gold-primary); color: var(--gold-primary);
    width: 45px; height: 45px; border-radius: 50%; cursor: pointer; z-index: 10;
    display: flex; align-items: center; justify-content: center; transition: all 0.3s ease;
    position: absolute; top: 50%; transform: translateY(-50%); box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.carousel-btn:hover { background: var(--gold-primary); color: var(--bg-dark); }
.f-prev-btn { right: 20px; }
.f-next-btn { left: 20px; }

.featured-carousel-viewport { 
    width: 100%; max-width: 850px; height: 100%; 
    position: relative; 
    perspective: 1000px;
}

.f-card {
    position: absolute; 
    top: 50%; left: 50%; 
    transform: translate(-50%, -50%);
    background: #000; overflow: hidden; border: 1px solid rgba(200, 159, 92, 0.2);
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.8);
    opacity: 0; pointer-events: none; z-index: 0;
    border-radius: 8px;
}

/* حالات البطاقات الثلاثة المرئية */
/* المنتصف (الأكبر والمربع) */
.f-card.pos-center {
    width: 360px; height: 360px; 
    transform: translate(-50%, -50%) scale(1);
    z-index: 5; opacity: 1; pointer-events: auto;
    border: 1px solid var(--gold-primary);
    box-shadow: 0 0 30px rgba(200, 159, 92, 0.2);
}

/* اليمين (أصغر ومستطيل وملاصق للمنتصف بتداخل خفيف) */
.f-card.pos-right {
    width: 240px; height: 300px;
    transform: translate(120px, -50%); 
    z-index: 3; opacity: 1; pointer-events: auto;
    filter: brightness(0.6);
}

/* اليسار (أصغر ومستطيل وملاصق للمنتصف بتداخل خفيف) */
.f-card.pos-left {
    width: 240px; height: 300px;
    transform: translate(-360px, -50%); 
    z-index: 3; opacity: 1; pointer-events: auto;
    filter: brightness(0.6);
}

.f-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.f-card.pos-center:hover .f-bg { transform: scale(1.05); }

/* التدرج اللوني فوق الصورة للوصف */
.f-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 3rem 1.5rem 1.5rem; text-align: center;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    display: flex; flex-direction: column; align-items: center;
}

/* شارة الأكثر طلباً (أعلى اليسار للمنتج المركزي فقط) */
.f-badge {
    position: absolute; top: 15px; left: 15px;
    background: var(--gold-primary); color: var(--bg-dark); 
    padding: 0.3rem 0.8rem; border-radius: 4px;
    font-family: var(--font-accent); font-size: 0.85rem; font-weight: bold;
    z-index: 10;
    display: none; /* مخفي افتراضياً */
}
.f-card.pos-center .f-badge { display: block; } /* يظهر فقط للمنتج بالمنتصف */

.f-title { font-family: var(--font-heading); font-size: 1.6rem; color: var(--gold-light); margin-bottom: 0.3rem; }
.f-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.3; margin-bottom: 0.5rem; }

/* Swipe Hint (Hidden on Desktop) */
.swipe-hint { display: none; }

/* 2. شريط الكبسولة (Capsule Nav) */
.capsule-nav-container {
    position: sticky; top: 10px; z-index: 100; margin: 0 auto 3rem auto;
    width: 98%; max-width: 1150px;
    /* NOTE: overflow must NOT be set here — it breaks position:sticky */
    display: flex; justify-content: flex-start;
}

.capsule-nav {
    display: flex; align-items: center; justify-content: flex-start; gap: 0.5rem;
    background: transparent;
    border: 1px solid rgba(200, 159, 92, 0.4); border-radius: 50px; padding: 0.3rem 1rem;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    margin: 0 auto; min-width: max-content;
    /* Scroll on the nav itself — compatible with sticky on parent */
    overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.capsule-nav::-webkit-scrollbar { display: none; }

.cap-item {
    display: flex; align-items: center; gap: 0.5rem; text-decoration: none;
    color: var(--gold-primary); padding: 0.6rem 1rem; position: relative; transition: all 0.3s ease;
}
.cap-icon { width: 20px; height: 20px; transition: all 0.3s ease; stroke: var(--gold-primary); }
.cap-text { font-family: var(--font-accent); font-size: 1rem; font-weight: 600; white-space: nowrap; transition: all 0.3s ease; }

.cap-item:hover, .cap-item.active { 
    color: #F6C56A;
    text-shadow: 0 0 8px rgba(246, 197, 106, 0.5);
}
.cap-item:hover .cap-icon, .cap-item.active .cap-icon { 
    stroke: #F6C56A; 
    transform: scale(1.1); filter: drop-shadow(0 0 5px rgba(246, 197, 106, 0.6)); 
}

/* خط مضيء أسفل القسم النشط */
.cap-item::after {
    content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%) scale(0);
    width: 24px; height: 3px; border-radius: 2px; background: #F6C56A;
    box-shadow: 0 0 8px #F6C56A; transition: transform 0.3s ease;
}
.cap-item.active::after { transform: translateX(-50%) scale(1); }

/* 3. سلايدرات الأقسام */
.category-section { margin-bottom: 5rem; scroll-margin-top: 120px; padding: 0 1rem; overflow: hidden;}
.section-header { 
    display: flex; align-items: center; justify-content: center; gap: 1rem; 
    margin-bottom: 2rem; padding-bottom: 1rem;
}
.decor-line { height: 1px; width: 50px; background: var(--gold-primary); opacity: 0.5; }
.section-title { font-family: var(--font-heading); font-size: 2rem; color: var(--gold-primary); text-align: center; }

.category-slider-container { display: flex; align-items: center; position: relative; width: 100%; justify-content: center; }

.sec-btn {
    background: rgba(0,0,0,0.6); border: 1px solid var(--border-gold); color: var(--gold-primary);
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer; 
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease; z-index: 10; margin: 0 10px;
    flex-shrink: 0;
}
.sec-btn:hover { background: var(--gold-primary); color: var(--bg-dark); }

.section-slider-viewport { 
    width: 100%; max-width: 1060px; overflow: hidden; position: relative; padding: 1rem 0; 
}
.section-track { 
    display: flex; align-items: center; gap: 1.5rem; transition: transform 0.5s ease;
}

.product-card {
    position: relative; border-radius: 8px; overflow: hidden; width: 240px; height: 340px; flex-shrink: 0;
    border: 1px solid rgba(200, 159, 92, 0.3); display: flex; flex-direction: column; justify-content: flex-end;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); transition: all 0.5s ease; background: #000;
}
.product-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: transform 0.5s ease; }
.product-card:hover .product-bg { transform: scale(1.05); }

.card-content-overlay {
    position: relative; z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 40%, transparent 100%);
    padding: 3rem 1.2rem 1.2rem; text-align: right; pointer-events: none;
}
.product-title { font-family: var(--font-heading); font-size: 1.4rem; color: var(--gold-light); margin-bottom: 0.3rem; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.product-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; line-height: 1.4; }
.price-action { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(200, 159, 92, 0.3); padding-top: 0.8rem; pointer-events: auto; }
.price { font-family: var(--font-accent); font-size: 1.1rem; font-weight: bold; color: var(--gold-primary); }
.currency { font-size: 0.75rem; font-weight: normal; }
.add-btn {
    background: rgba(0,0,0,0.5); border: 1px solid var(--gold-primary); color: var(--gold-primary);
    width: 32px; height: 32px; border-radius: 50%; font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s ease;
}
.add-btn:hover { background: var(--gold-primary); color: var(--bg-dark); }

/* Footer */
.footer { text-align: center; padding: 3rem 0; color: var(--text-muted); font-family: var(--font-accent); }

/* Responsive */

/* ---- Tablet (≤900px) ---- */
@media (max-width: 900px) {
    .f-card.pos-center { width: 300px; height: 300px; }
    .f-card.pos-right { transform: translate(80px, -50%); width: 200px; height: 250px; }
    .f-card.pos-left  { transform: translate(-290px, -50%); width: 200px; height: 250px; }
    .featured-carousel-container { height: 330px; }
    .product-card { width: 210px; height: 310px; }
}

/* ---- Mobile (≤768px) ---- */
@media (max-width: 768px) {

    /* Header */
    .brand-name { font-size: 2.2rem; }
    .brand-name-en { font-size: 1rem; letter-spacing: 2px; }
    .tagline { font-size: 0.95rem; }
    .logo-icon { width: 100px; height: 100px; }

    /* Featured Carousel */
    .featured-carousel-container { height: 280px; }
    .f-card.pos-center { width: 240px; height: 240px; }
    .f-card.pos-right { transform: translate(65px, -50%); width: 160px; height: 200px; }
    .f-card.pos-left  { transform: translate(-220px, -50%); width: 160px; height: 200px; }

    /* Badge size on mobile */
    .f-badge { font-size: 0.7rem; padding: 0.2rem 0.5rem; top: 10px; left: 10px; background: rgba(200, 159, 92, 0.9); }

    /* Fix overlay text covering the image */
    .f-overlay { padding: 1.5rem 0.5rem 0.5rem; }
    .f-title { font-size: 1.3rem; margin-bottom: 0.1rem; }
    .f-desc { display: none; } /* Hide long description on mobile so image is visible */

    /* Capsule Nav — KEY FIX:
       The sticky+overflow-x:auto conflict is solved by making the outer
       container sticky (no overflow), and the inner nav scrollable. */
    .capsule-nav-container {
        position: sticky;
        top: 0;
        z-index: 200;
        width: 100%;
        max-width: 100%;
        /* Remove overflow from outer — put it on inner nav instead */
        overflow-x: visible;
        overflow-y: visible;
        display: block;
        margin-bottom: 2rem;
        background: rgba(10, 10, 10, 0.85);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(200, 159, 92, 0.25);
        padding: 0.3rem 0;
    }

    /* Swipe hint text styling */
    .swipe-hint {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        font-family: var(--font-accent);
        font-size: 0.75rem;
        color: var(--gold-light);
        opacity: 0.7;
        margin-bottom: 0.8rem;
        animation: pulseHint 2.5s ease-in-out infinite;
    }
    .swipe-icon {
        opacity: 0.6;
        animation: slideIcon 2.5s ease-in-out infinite;
    }
    
    @keyframes pulseHint {
        0%, 100% { opacity: 0.4; }
        50% { opacity: 0.9; }
    }
    @keyframes slideIcon {
        0%, 100% { transform: translateX(0); }
        25% { transform: translateX(-3px); }
        75% { transform: translateX(3px); }
    }

    .capsule-nav {
        /* Restored horizontal scroll as requested for better spacing */
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        border: none;
        border-radius: 0;
        padding: 0.4rem 0.5rem;
        gap: 0.2rem;
        min-width: 100%;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .capsule-nav::-webkit-scrollbar { display: none; }

    .cap-item { padding: 0.5rem 0.75rem; border: none; border-radius: 30px; }
    .cap-text { font-size: 0.85rem; }
    .cap-icon { width: 17px; height: 17px; }


    /* Section sliders — show scrollable rows, hide arrows */
    .category-section { scroll-margin-top: 70px; padding: 0 0.5rem; }

    /* Make viewport scrollable horizontally on mobile */
    .section-slider-viewport {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 0.75rem 0.5rem;
        max-width: 100%;
    }
    .section-slider-viewport::-webkit-scrollbar { display: none; }

    /* Disable JS transform animations on mobile — let native scroll handle it */
    .section-track {
        transition: none !important;
        transform: none !important;
        gap: 0.85rem;
    }

    /* Product cards — hide description on mobile */
    .product-card { width: 170px; height: 260px; cursor: pointer; }
    .product-desc { display: none; }
    .product-title { font-size: 1.1rem; }

    /* Keep arrows hidden on mobile — native scroll is used */
    .sec-btn { display: none; }
}

/* ---- Small phones (≤480px) ---- */
@media (max-width: 480px) {
    .brand-name { font-size: 1.9rem; }
    .logo-icon { width: 85px; height: 85px; }
    .f-card.pos-center { width: 200px; height: 200px; }
    .f-card.pos-right { transform: translate(52px, -50%); width: 135px; height: 170px; }
    .f-card.pos-left  { transform: translate(-188px, -50%); width: 135px; height: 170px; }
    .featured-carousel-container { height: 235px; }
    .product-card { width: 165px; height: 255px; }
    .product-title { font-size: 1.1rem; }
    .product-desc { font-size: 0.78rem; }
    
    /* Overlay fix for small phones */
    .f-overlay { padding: 1rem 0.5rem 0.5rem; }
    .product-desc { display: none; }
}

/* 4. Modal (Product Details Popup) */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.45); /* أخف لكي تظهر الخلفية بشكل شفاف */
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 9999; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-content {
    background: var(--bg-dark);
    width: 90%; max-width: 450px;
    border-radius: 12px; border: 1px solid var(--gold-primary);
    overflow: hidden; position: relative;
    transform: translateY(30px); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 35px rgba(0,0,0,0.8);
}
.modal-overlay.active .modal-content { transform: translateY(0); }

.modal-close {
    position: absolute; top: 15px; right: 15px; z-index: 10;
    background: rgba(0,0,0,0.5); border: 1px solid var(--gold-primary); color: var(--gold-light);
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s ease;
}
.modal-close:hover { background: var(--gold-primary); color: var(--bg-dark); }

.modal-img-container { width: 100%; height: 300px; overflow: hidden; position: relative; border-bottom: 1px solid var(--border-gold); }
#modalImg { width: 100%; height: 100%; object-fit: cover; }

.modal-details { padding: 1.5rem; text-align: center; }
.modal-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed rgba(200, 159, 92, 0.2);
}

.product-card { cursor: pointer; }
.f-card { cursor: pointer; }

/* 5. Splash Screen (Intro Animation) */
#splash-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at center, #1a1510 0%, #050403 100%);
    z-index: 999999; 
    display: flex; justify-content: center; align-items: center;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s ease;
}
#splash-screen.hidden { opacity: 0; visibility: hidden; }

.splash-logo-container {
    position: relative; width: 250px; height: 250px;
    display: flex; justify-content: center; align-items: center;
    /* Cinematic reveal: fade in, un-blur, and drift slightly upward */
    animation: cinematicReveal 2.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.splash-logo { 
    width: 100%; height: auto; 
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.2));
}

@keyframes cinematicReveal {
    0% { transform: scale(0.9) translateY(20px); opacity: 0; filter: blur(10px); }
    100% { transform: scale(1) translateY(0); opacity: 1; filter: blur(0); }
}

@media (max-width: 480px) {
    .splash-logo-container { width: 180px; height: 180px; }
}

/* Mobile Hero Image */
@media (max-width: 768px) {
    .bg-image {
        background-image: url('images/hero-mobile-new.jpg') !important;
    }
}
