* {
    font-family: 'Cairo', sans-serif;
}

/* لتنسيق العناوين بشكل أوضح وأثقل */
h1, h2, h3 {
    font-weight: 700; /* تجعل الخط عريضاً وجذاباً */
    letter-spacing: 0; /* الخط العربي لا يحتاج مسافات بين الحروف */
}
:root {
    --gold: #d4af37;
    --dark: #0a0a0a;
    --card: #141414;
    --white: #ffffff;
    --broin: 
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body { background: var(--dark); color: var(--white); font-family: 'Segoe UI', sans-serif; overflow-x: hidden; }
body.loading { overflow: hidden; }

/* --- شاشة التحميل --- */

.loader-logo { font-size: 2.8rem; margin-bottom: 15px; }
.loader-logo span { color: var(--gold); }
.loader-line { width: 100px; height: 2px; background: var(--gold); animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { opacity: 0.2; width: 50px; } 50% { opacity: 1; width: 120px; } 100% { opacity: 0.2; width: 50px; } }

/* --- الهيدر والبانر --- */
.main-wrapper { max-width: 1200px; margin: 0 auto; padding: 15px; }
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 20px 0; }
.brand-name { font-size: 1.8rem; font-weight: bold; color: #fff; letter-spacing: 2px; display: flex;  }
.menu-trigger { font-size: 1.6rem; color: var(--gold); cursor: pointer; }

.hero-banner {
    width: 100%; height: 180px; border: 1px solid #222;
    background:  url('https://i.ibb.co/HTrhx2zG/Gemini-Generated-Image-1extot1extot1ext-kopya.png') center/cover;
    border-radius: 20px; display: flex; align-items: center; justify-content: center; text-align: center; margin-bottom: 25px;
}

.hero-banner span{
  color: #ffffff;
}
.hero-content h2 { font-size: 1.8rem; margin-bottom: 5px; color: var(--white); }
.hero-content h2 span { color: var(--gold); }
.hero-content p { color: #ccc; font-size: 1rem; }

/* --- تصميم بطاقة المنتج --- */
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.product-card { background: var(--card); border-radius: 20px; padding: 15px; text-align: center; border: 1px solid #1f1f1f; }
.product-card h3 { font-size: 1rem; margin-bottom: 5px; color: var(--white); }
.product-card .price { color: var(--gold); font-weight: bold; display: block; margin-bottom: 12px; }

.product-image {
    width: 100%; height: 130px; object-fit: cover; border-radius: 12px;
    background: #1a1a1a; cursor: pointer; transition: 0.3s;
}
.product-image:active { transform: scale(0.95); } /* تأثير جميل عند الضغط على الصورة */

/* --- القائمة الجانبية --- */
.sidebar { position: fixed; top: 0; right: -280px; width: 280px; height: 100%; background: #111; z-index: 2000; transition: 0.4s; padding: 40px 20px; }
.sidebar.active { right: 0; }
.sidebar-nav button { display: block; width: 100%; background: none; border: none; color: #fff; text-align: right; padding: 15px; font-size: 1.1rem; border-bottom: 1px solid #1f1f1f; cursor: pointer; }
.close-btn { font-size: 2.5rem; color: var(--gold); cursor: pointer; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 1500; display: none; }

/* --- النافذة المنبثقة (Modal) للتفاصيل --- */
.modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 3000;
    display: none; justify-content: center; align-items: center; padding: 20px;
    opacity: 0; transition: opacity 0.3s ease;
}
.modal.show { display: flex; opacity: 1; }
.modal-content {
    background: var(--card); border: 1px solid var(--gold); border-radius: 20px;
    padding: 20px; max-width: 350px; width: 100%; text-align: center; position: relative;
}
.modal-content img { width: 100%; height: 180px; object-fit: cover; border-radius: 12px; margin-bottom: 15px; }
.modal-content h3 { font-size: 1.5rem; color: var(--gold); margin-bottom: 5px; }
.modal-content .price { font-size: 1.2rem; font-weight: bold; margin-bottom: 15px; }
.modal-content .description { color: #ddd; font-size: 0.95rem; line-height: 1.6; }
.close-modal {
    position: absolute; top: 10px; right: 15px; font-size: 2rem; color: #fff; cursor: pointer;
}

@media (min-width: 768px) {
    .products-grid { grid-template-columns: repeat(4, 1fr); }
}
/* أضف أو عدل هذه السطور في ملفك */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--dark);
    position: sticky; /* يجعله ثابتاً عند التمرير */
    top: 0;
    z-index: 1000; /* يضمن ظهوره فوق كل شيء */
    border-bottom: 1px solid #1a1a1a;
}

.menu-trigger {
    font-size: 1.8rem;
    color: var(--gold);
    cursor: pointer;
}

/* تأكد أن اللودر يختفي فعلياً */

/* هذا السطر هو المسؤول عن تحريك القائمة للداخل */


/* أيقونة القهوة التي تدور */

.loading-text {
    color: #888;
    font-size: 0.9rem;
    margin-top: 10px;
    letter-spacing: 1px;
}

/* حركة الدوران 360 درجة */
@keyframes rotateCoffee {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* تعديل اللوجو تحت الأيقونة */
.loader-logo {
    font-size: 2.5rem;
    color: #fff;
}
.loader-logo span {
    color: var(--gold);
}

/* --- تصميم شريط الأقسام المطابق للصورة --- */

/* الحاوية التي تسحب */
.category-slider {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 15px 10px;
    background-color: transparent; /* لكي يأخذ لون خلفية الموقع */
    margin-top: -20px; /* سحب بسيط للأعلى ليتداخل مع البانر بشكل أنيق إذا أردت */
    position: relative;
    z-index: 10;
}

/* تأكد من أن البانر لا يغطي الأقسام */
.hero-banner {
    width: 100%;
    height: 180px; /* يمكنك تعديل الطول حسب رغبتك */
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* إخفاء شريط التمرير المزعج */
.category-slider::-webkit-scrollbar {
    display: none;
}

/* تصميم المربع الواحد (الرمادي) */
.cat-item {
    flex: 0 0 auto; /* سر السحب: يمنع انكماش المربع */
    width: 85px;
    height: 95px;
    background-color: #1a1a1a; /* لون رمادي غامق */
    border-radius: 12px; /* حواف دائرية بسيطة */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff; /* لون الأيقونة والنص أبيض */
    cursor: pointer;
    transition: 0.3s ease;
}

/* تكبير الأيقونة والنص داخل المربع */
.cat-item i {
    font-size: 30px;
    margin-bottom: 8px;
}
.cat-item span {
    font-size: 14px;
    font-weight: bold;
}

/* تصميم المربع عند الضغط عليه (الأصفر) */
.cat-item.active {
    background-color: #ffd700; /* اللون الأصفر/الذهبي */
    color: #000; /* تحويل لون الأيقونة والنص للأسود */
    transform: translateY(-5px); /* يرتفع للأعلى قليلاً ليعطي شكل زر حقيقي */
}
/* خلفية الشاشة */
#loader {
    position: fixed;
    inset: 0;
    background: #0a0a0a; /* خلفية سوداء فخمة */
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.5s ease-out;
}

.explosion-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* تنسيق صور حبات البن الحقيقية */
.bean-real {
    position: absolute;
    width: 50px; /* حجم الحبة الأولية */
    height: auto;
    /* تبدأ الحركة فوراً وتستمر 1.8 ثانية */
    animation: explodeWithRealBeans 1.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    opacity: 0; /* تبدأ مخفية ثم تظهر فجأة */
}

/* حركة الانفجار الديناميكية */
@keyframes explodeWithRealBeans {
    0% {
        /* تبدأ من المركز، صغيرة جداً */
        transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
        opacity: 1;
        left: 50%;
        top: 50%;
    }
    100% {
        /* تنطلق للخارج لمسافة 250px وتدور وتكبر ثم تتلاشى */
        transform: translate(calc(var(--x) * 250px - 50%), calc(var(--y) * 250px - 50%)) 
                   scale(1.2) rotate(var(--r));
        opacity: 0;
    }
}

/* حاوية اللوجو في المنتصف */
.loader-logo-container {
    position: absolute;
    text-align: center;
    z-index: 10;
    opacity: 0;
    /* يظهر اللوجو بعد 0.5 ثانية من بدء انفجار الحبات */
    animation: fadeInLogo 1s ease-out forwards 0.5s;
}

.loader-logo {
    font-size: 3.5rem;
    color: #fff;
    margin: 0;
    line-height: 1;
    font-weight: 800;
}

.loader-logo span {
    color: #6F4E37; /* الذهبي */
}

.logo-icon-small {
    color: #6F4E37;
    font-size: 1.5rem;
    margin-top: 10px;
}

/* حركة ظهور اللوجو */
@keyframes fadeInLogo {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}
html, body {
    overflow-y: auto !important; /* إجبار مؤشر النزول على الظهور */
    height: auto !important;
    position: relative !important;
}

/* التأكد من أن النافذة المنبثقة لا تغطي الشاشة وهي مخفية */
#productModal {
    display: none; /* تأكد أنها مخفية تماماً */
}/* حاوية السلايدر */
.myBannerSwiper {
    width: 100%;
    /* ارتفاع مناسب للموبايل ليظهر المنيو تحته مباشرة */
    height: 180px; 
    margin: 0;
    padding: 0;
}

/* ضبط الصور داخل السلايدر */
.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* لقص الزوائد والحفاظ على الأبعاد */
}

/* كود خاص للشاشات الكبيرة (إذا فتحت من كمبيوتر) */
@media (min-width: 768px) {
    .myBannerSwiper {
        height: 350px; /* يكبر الارتفاع في الشاشات الكبيرة */
    }
}