/* ==========================================================
   عذبي (Athbi) - التصميم الرئيسي
   Mobile-first, خفيف وسريع بدون فريمورك خارجي
   ========================================================== */

:root {
    --maroon: #7A2020;
    --maroon-dark: #5A1616;
    --rose: #D9A89A;
    --cream: #F0E7D8;
    --cream-light: #FAF5EC;
    --black: #1A1A1A;
    --white: #FFFFFF;
    --green-accent: #8FAE7D;
    --radius: 12px;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
}

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

body {
    font-family: 'Tahoma', 'Segoe UI', Arial, sans-serif;
    background: var(--cream-light);
    color: var(--black);
    direction: rtl;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- الهيدر ----------
 * شريط واحد بلون النبيتي: اللوجو + القائمة + السلة في صف واحد.
 * قبل كده كان شريطين (أبيض فوق نبيتي) بيوكلوا ~120 بكسل من أول الصفحة
 * والنص الأبيض فاضي — دلوقتي البنر بيبان أعلى بكتير.
 */
.site-header {
    background: var(--maroon);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

/**
 * اللوجو فيه كتابة نبيتي غامقة، ولو حطيناها على خلفية نبيتي مش هتبان.
 * الشريحة الكريمي وراه بتحل ده وبتدي إحساس الشعار/الختم.
 */
.logo img {
    height: 44px;
    background: var(--cream);
    border-radius: 10px;
    padding: 3px 7px;
}

.header-actions { display: flex; align-items: center; gap: 14px; }

.cart-icon {
    position: relative;
    font-size: 22px;
    line-height: 1;
}

.cart-badge {
    position: absolute;
    top: -8px;
    left: -10px;
    background: var(--cream);
    color: var(--maroon);
    font-weight: 700;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* min-width:0 مهمة: من غيرها الـ nav مبيرضاش يصغّر تحت عرض محتواه
   وبيدفع اللوجو بره الشاشة على الموبايل الضيق */
nav.main-nav { min-width: 0; }

nav.main-nav ul {
    display: flex;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
}
nav.main-nav a {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    opacity: .9;
}
nav.main-nav a:hover { opacity: 1; }

/**
 * على الموبايل الصف الواحد بيبقى زحمة (لوجو + 4 روابط + سلة)،
 * فالقائمة بتنزل سطر تحت وتاخد العرض كله — بس بنفس اللون فمفيش شريط زيادة.
 */
@media (max-width: 699px) {
    .header-inner {
        flex-wrap: wrap;
        row-gap: 6px;
        padding: 8px 12px;
    }
    .main-nav {
        order: 3;
        flex-basis: 100%;
    }
    nav.main-nav ul {
        gap: 16px;
        padding-top: 6px;
        border-top: 1px solid rgba(255,255,255,.18);
    }
    nav.main-nav a { font-size: 13px; }
    .logo img { height: 38px; }
}

/* ---------- البنرات (Hero Banners) ---------- */
.banner-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--cream);
}
.banner-slide picture { display: block; }

.banner-slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/**
 * البنر على الموبايل:
 * 16:9 على شاشة 390 بكسل بيدي ارتفاع 219 بكسل بس — البنر بيبقى شريط
 * رفيع والموضوع جواه تايه. لو الأدمن رفع نسخة مربعة للموبايل، بنعرضها
 * بنسبة 1:1 عشان تاخد مساحة محترمة.
 *
 * لو مرفعش نسخة موبايل، بنسيب الـ 16:9 عشان نسخة الديسكتوب متتقصّش
 * بشكل وحش لما تتعرض في إطار مربع.
 */
@media (max-width: 699px) {
    .banner-slide.has-mobile img { aspect-ratio: 1/1; }
}

/* ---------- شبكة المنتجات ---------- */
.section-title {
    text-align: center;
    font-size: 22px;
    color: var(--maroon);
    margin: 30px 0 20px;
    font-weight: 800;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 0 16px 30px;
}

@media (min-width: 700px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0 0 40px; }
}
@media (min-width: 1000px) {
    .products-grid { grid-template-columns: repeat(4, 1fr); }
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform .15s ease;
}
.product-card:active { transform: scale(0.98); }

.product-card .img-wrap {
    aspect-ratio: 1/1;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; }

.product-card .info { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.product-card .name { font-size: 14px; font-weight: 700; margin-bottom: 6px; flex: 1; }
.product-card .price { color: var(--maroon); font-weight: 800; font-size: 15px; margin-bottom: 10px; }

.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    transition: opacity .15s;
}
.btn:active { opacity: 0.8; }
.btn-primary { background: var(--maroon); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--maroon); color: var(--maroon); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 13px; }

/* ---------- صفحة المنتج الفردي ---------- */
.product-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 16px 40px;
}
@media (min-width: 800px) {
    .product-detail { grid-template-columns: 1fr 1fr; padding: 40px 0; }
}
.product-detail .img-wrap {
    background: var(--cream);
    border-radius: var(--radius);
    overflow: hidden;
}
.qty-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
}
.qty-selector button {
    width: 36px; height: 36px;
    background: var(--cream);
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
}
.qty-selector input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    height: 36px;
    font-size: 15px;
}

/* ---------- السلة ---------- */
.cart-item {
    display: flex;
    gap: 12px;
    align-items: center;
    background: var(--white);
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}
.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.cart-item .details { flex: 1; }
.cart-summary {
    background: var(--white);
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 16px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
}
.summary-row.total {
    font-weight: 800;
    font-size: 18px;
    color: var(--maroon);
    border-top: 1px dashed #ddd;
    margin-top: 6px;
    padding-top: 12px;
}

/* ---------- صفحة الدفع (Checkout) ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 14px; }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}
.form-hint { font-size: 12px; color: #777; margin-top: 4px; }

/* ---------- Dialog / Modal الدفع عبر IBAN ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: var(--white);
    border-radius: var(--radius);
    max-width: 420px;
    width: 100%;
    padding: 24px;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-box h3 { color: var(--maroon); font-size: 20px; margin-bottom: 6px; }
.modal-total {
    font-size: 26px;
    font-weight: 800;
    color: var(--maroon);
    margin: 14px 0;
}
.iban-box {
    background: var(--cream);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 14px 0;
}
.iban-box .iban-value {
    font-family: monospace;
    font-size: 16px;
    letter-spacing: 1px;
    word-break: break-all;
    text-align: right;
}
.copy-btn {
    background: var(--maroon);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.copy-btn.copied { background: var(--green-accent); }
.bank-name { font-size: 13px; color: #666; margin-bottom: 10px; }

/* ---------- الفوتر ---------- */
.site-footer {
    background: var(--maroon-dark);
    color: #fff;
    text-align: center;
    padding: 30px 16px;
    margin-top: 40px;
    font-size: 13px;
}
.site-footer a { color: var(--rose); }

/* ---------- زر واتساب عائم ---------- */
.whatsapp-float {
    position: fixed;
    bottom: 18px;
    left: 18px;
    background: #25D366;
    color: #fff;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    font-size: 26px;
    z-index: 90;
}

/* ---------- تنبيهات ---------- */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: #E4F3E1; color: #2E6B25; }
.alert-error { background: #FBE4E4; color: #A22; }

/* ---------- Empty state ---------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

/* ==========================================================
   مصيدة البوتات (Honeypot)
   مخفية عن العميل وعن قارئ الشاشة، لكن البوت بيملاها لأنه
   بيقرا الـ HTML مش الـ CSS. مستخدمين إخفاء بالإزاحة مش
   display:none لأن بعض البوتات بتتجاهل الحقول المخفية بالكامل.
   ========================================================== */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ==========================================================
   خط عربي حديث
   بيستخدم خطوط النظام العربية الحديثة قبل ما يرجع لـ Tahoma.
   مفيش تحميل خط خارجي عشان السرعة على الموبايل تفضل كما هي.
   ========================================================== */
body,
button,
input,
select,
textarea {
    font-family: "SF Arabic", "Geeza Pro", "Noto Kufi Arabic", "Dubai",
                 "Segoe UI", "Tahoma", Arial, sans-serif;
}

/* ==========================================================
   شريط مراحل الطلب (صفحة التتبع)
   ========================================================== */
.track-stages {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 0;
}

.track-stage {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    padding: 10px 0;
}

/* الخط الواصل بين المراحل — بيتمد من دايرة لللي بعدها */
.track-stage:not(:last-child)::after {
    content: "";
    position: absolute;
    inset-inline-start: 13px;
    top: 38px;
    bottom: -10px;
    width: 2px;
    background: #E0D6C8;
}

.track-stage.done:not(:last-child)::after {
    background: var(--green-accent);
}

.track-stage .dot {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #E0D6C8;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--white);
    z-index: 1;
}

.track-stage.done .dot {
    background: var(--green-accent);
    border-color: var(--green-accent);
}

.track-stage .label {
    color: #999;
    font-size: 15px;
}

.track-stage.done .label {
    color: var(--black);
    font-weight: 700;
}

/* ==========================================================
   الصورة البديلة (اللوجو) للمنتجات اللي لسه من غير صورة
   بتتعرض كاملة جوه الإطار المربع بدل ما تتقص من الجوانب،
   مع مساحة حوليها عشان متبقاش ملزوقة في الحواف.
   ========================================================== */
.img-placeholder {
    object-fit: contain !important;
    padding: 18%;
    background: var(--cream);
    opacity: .55;
}

.cart-item .img-placeholder { padding: 10%; }
