﻿/* ═══════════════════════════════════════════════════════════
   ROYAL BAGS DZ — LAYOUT STYLESHEET
   ملف خاص بتنسيقات الـ _Layout (Navbar + Footer + Main)
   ═══════════════════════════════════════════════════════════ */

/* ───────────── ROOT VARIABLES ───────────── */
:root {
    --royal-dark: #1a0f08;
    --royal-brown: #2c1810;
    --royal-brown-light: #4a2f20;
    --royal-gold: #c9a961;
    --royal-gold-light: #d4a574;
    --royal-gold-dark: #a88941;
    --royal-cream: #faf7f2;
    --royal-cream-dark: #f5f0ea;
    --royal-white: #ffffff;
    --royal-text: #3a2a1e;
    --royal-text-muted: #8b7a68;
    --royal-gradient: linear-gradient(135deg, var(--royal-brown) 0%, var(--royal-brown-light) 100%);
    --royal-shadow-sm: 0 2px 8px rgba(44, 24, 16, 0.08);
    --royal-shadow-md: 0 4px 16px rgba(44, 24, 16, 0.12);
    --royal-shadow-lg: 0 8px 32px rgba(44, 24, 16, 0.18);
    --royal-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --royal-radius: 8px;
    --royal-radius-full: 50px;
}

/* ───────────── GLOBAL RESET ───────────── */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background-color: var(--royal-cream);
    font-family: 'Segoe UI', 'Tahoma', 'Geneva', sans-serif;
    color: var(--royal-text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ═══════════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════════ */
.royal-main {
    flex: 1;
    padding: 0;
    margin: 0;
    width: 100%;
}

    /* حاوية افتراضية للصفحات العادية */
    .royal-main > .container,
    .royal-main > .container-fluid {
        padding-top: 30px;
        padding-bottom: 60px;
    }

    /* لكن الـ Hero في الصفحة الرئيسية لا يأخذ padding */
    .royal-main > .hero-section,
    .royal-main > section:first-child {
        padding-top: 0;
        padding-bottom: 0;
    }

/* ═══════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════ */
.royal-navbar {
    background: var(--royal-gradient);
    box-shadow: 0 6px 24px rgba(26, 15, 8, 0.25);
    padding: 15px 0;
    transition: var(--royal-transition);
    border-bottom: 1px solid rgba(201, 169, 97, 0.25);
}

    .royal-navbar.container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        padding: 0 30px;
        width: 100%;
    }

.royal-nav-center {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    margin: 0 auto; /* ← يدفعها للمركز */
    padding: 0;
    list-style: none;
}

.royal-nav-actions {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .royal-nav-center .nav-item,
    .royal-nav-actions .nav-item {
        margin: 0;
    }
/* ─── BRAND ─── */
.royal-brand {
    font-family: 'Georgia', serif;
    color: #c9a961 !important;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: var(--royal-transition);
}

    .royal-brand i {
        font-size: 1.4rem;
        filter: drop-shadow(0 2px 4px rgba(201, 169, 97, 0.4));
    }

    .royal-brand:hover {
        color: var(--royal-gold-light) !important;
        transform: scale(1.03);
    }

/* ─── TOGGLER (قائمة الهاتف) ─── */
.royal-toggler {
    border: 2px solid var(--royal-gold);
    padding: 6px 10px;
    border-radius: var(--royal-radius);
    transition: var(--royal-transition);
}

    .royal-toggler:focus {
        box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.3);
    }

    .royal-toggler .navbar-toggler-icon {
        filter: brightness(0) saturate(100%) invert(79%) sepia(48%) saturate(543%) hue-rotate(3deg) brightness(102%) contrast(100%);
    }

/* ─── NAV LINKS ─── */
.royal-nav-list {
    gap: 4px;
    align-items: center;
}

.royal-nav-link {
    color: #faf7f2 !important;
    font-weight: 500;
    padding: 8px 16px !important;
    border-radius: var(--royal-radius);
    transition: var(--royal-transition);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

    .royal-nav-link i {
        font-size: 0.9rem;
        color: var(--royal-gold);
        transition: var(--royal-transition);
    }

    .royal-nav-link:hover {
        color: var(--royal-gold) !important;
        background: rgba(201, 169, 97, 0.08);
    }

        .royal-nav-link:hover i {
            transform: scale(1.15);
        }

    .royal-nav-link:hover,
    .royal-nav-link.active {
        color: #c9a961 !important;
        background: rgba(201, 169, 97, 0.10);
    }
    /* شريط ذهبي أسفل الرابط عند المرور */
    .royal-nav-link::after {
        content: '';
        position: absolute;
        bottom: 2px;
        left: 50%;
        transform: translateX(-50%) scaleX(0);
        width: 60%;
        height: 2px;
        background: var(--royal-gold);
        border-radius: 2px;
        transition: transform 0.3s ease;
    }

    .royal-nav-link:hover::after {
        transform: translateX(-50%) scaleX(1);
    }

/* ─── CART BUTTON ─── */
.royal-cart-item {
    margin-inline-start: auto;
}

.royal-cart-btn {
    background: linear-gradient(135deg, #c9a961, #d4a574);
    color: #1a0f08 !important;
    border: none;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: var(--royal-radius-full);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--royal-transition);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
}

    .royal-cart-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(201, 169, 97, 0.45);
        background: linear-gradient(135deg, var(--royal-gold-light) 0%, var(--royal-gold) 100%);
        color: var(--royal-dark) !important;
    }

.royal-cart-badge {
    position: absolute;
    top: -8px;
    inset-inline-end: -8px;
    background: var(--royal-dark);
    color: var(--royal-gold);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid var(--royal-gold);
    animation: royal-pulse 2s infinite;
}

@keyframes royal-pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* ─── MY ORDERS BUTTON ─── */
.royal-orders-item {
    margin-inline-start: 8px;
}

.royal-orders-btn {
    background: transparent;
    color: var(--royal-cream) !important;
    border: 2px solid var(--royal-gold);
    font-weight: 600;
    padding: 8px 18px;
    border-radius: var(--royal-radius-full);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--royal-transition);
}

    .royal-orders-btn:hover {
        background: var(--royal-gold);
        color: var(--royal-dark) !important;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(201, 169, 97, 0.35);
    }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.royal-footer {
    background: var(--royal-gradient);
    color: var(--royal-cream);
    padding: 60px 0 24px;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

    /* لمعة ذهبية في الخلفية */
    .royal-footer::before {
        content: '';
        position: absolute;
        top: -50%;
        inset-inline-end: -10%;
        width: 500px;
        height: 500px;
        background: radial-gradient(circle, rgba(201, 169, 97, 0.08), transparent 70%);
        border-radius: 50%;
        pointer-events: none;
    }

    .royal-footer .container {
        position: relative;
        z-index: 2;
    }

/* ─── FOOTER TITLE ─── */
.royal-footer-title {
    color: var(--royal-gold);
    font-family: 'Georgia', serif;
    font-weight: 500;
    font-size: 1.35rem;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .royal-footer-title i {
        font-size: 1.2rem;
    }

.royal-footer-text {
    font-size: 0.92rem;
    line-height: 1.8;
    color: rgba(250, 247, 242, 0.85);
    margin-bottom: 20px;
}

/* ─── SOCIAL ICONS ─── */
.royal-social {
    display: flex;
    gap: 12px;
}

    .royal-social a {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(201, 169, 97, 0.12);
        border: 1px solid rgba(201, 169, 97, 0.3);
        border-radius: 50%;
        color: var(--royal-gold);
        transition: var(--royal-transition);
        text-decoration: none;
    }

        .royal-social a:hover {
            background: var(--royal-gold);
            color: var(--royal-dark);
            transform: translateY(-4px);
            box-shadow: 0 6px 16px rgba(201, 169, 97, 0.4);
        }

/* ─── FOOTER HEADINGS ─── */
.royal-footer-heading {
    color: var(--royal-gold);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

    .royal-footer-heading::after {
        content: '';
        position: absolute;
        bottom: 0;
        inset-inline-start: 0;
        width: 40px;
        height: 2px;
        background: var(--royal-gold);
        border-radius: 2px;
    }

/* ─── QUICK LINKS ─── */
.royal-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .royal-footer-links li {
        margin-bottom: 10px;
    }

    .royal-footer-links a {
        color: rgba(250, 247, 242, 0.85);
        text-decoration: none;
        font-size: 0.92rem;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        transition: var(--royal-transition);
    }

        .royal-footer-links a i {
            color: var(--royal-gold);
            font-size: 0.7rem;
            transition: var(--royal-transition);
        }

        .royal-footer-links a:hover {
            color: var(--royal-gold);
            transform: translateX(-6px);
        }

            .royal-footer-links a:hover i {
                transform: translateX(-3px);
            }

/* ─── CONTACT ─── */
.royal-footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .royal-footer-contact li {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 14px;
        font-size: 0.92rem;
        color: rgba(250, 247, 242, 0.85);
    }

    .royal-footer-contact i {
        color: var(--royal-gold);
        font-size: 0.95rem;
        width: 20px;
        text-align: center;
    }

    .royal-footer-contact a {
        color: rgba(250, 247, 242, 0.85);
        text-decoration: none;
        transition: var(--royal-transition);
    }

        .royal-footer-contact a:hover {
            color: var(--royal-gold);
        }

/* ─── DIVIDER ─── */
.royal-footer-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 97, 0.5), transparent);
    margin: 40px 0 20px;
}

/* ─── BOTTOM BAR ─── */
.royal-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: rgba(250, 247, 242, 0.7);
}

    .royal-footer-bottom p {
        margin: 0;
    }

    .royal-footer-bottom strong {
        color: var(--royal-gold);
        font-weight: 600;
    }

    .royal-footer-bottom a {
        color: var(--royal-gold);
        text-decoration: none;
        transition: var(--royal-transition);
    }

        .royal-footer-bottom a:hover {
            color: var(--royal-gold-light);
            text-decoration: underline;
        }

.royal-navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 10px;
    gap: 20px;
    padding: 0 30px;
    width: 100%;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 991px) {

    .royal-navbar .container {
        flex-wrap: wrap;
    }

    .royal-navbar-container {
        flex-wrap: wrap;
        padding: 0 16px;
    }

    .royal-nav-list {
        padding-top: 16px;
        gap: 8px;
        align-items: stretch !important;
    }

    .royal-nav-link {
        justify-content: flex-start;
        width: 100%;
    }





    .royal-footer {
        padding: 40px 0 20px;
        text-align: center;
    }

    .royal-footer-heading::after {
        inset-inline-start: 50%;
        transform: translateX(-50%);
    }

    .royal-social {
        justify-content: center;
    }

    .royal-footer-links a {
        justify-content: center;
    }

    .royal-footer-contact li {
        justify-content: center;
    }

    .royal-footer-bottom {
        justify-content: center;
        text-align: center;
    }

    .royal-nav-center,
    .royal-nav-actions {
        flex-direction: column;
        width: 100%;
        margin: 0;
        gap: 8px;
        padding-top: 16px;
    }

        .royal-nav-center .nav-item,
        .royal-nav-actions .nav-item {
            width: 100%;
        }

        .royal-nav-center .nav-link,
        .royal-nav-actions .btn {
            width: 100%;
            justify-content: center;
            text-align: center;
        }
}

@media (max-width: 575px) {

    .royal-brand {
        font-size: 1.25rem;
    }

        .royal-brand i {
            font-size: 1.1rem;
        }

    .royal-footer-title {
        font-size: 1.15rem;
    }

    .royal-footer-heading {
        font-size: 1rem;
    }

    .royal-footer-links a:hover {
        transform: none;
    }
}

/* ═══════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════ */
@media print {
    .royal-navbar,
    .royal-footer,
    .royal-toggler {
        display: none !important;
    }

    .royal-main {
        padding: 0;
    }

    body {
        background: white;
    }
}

/* رأس الدرج (الشعار + زر الإغلاق) — عنصر خاص بدرج الجوال فقط،
   يبقى مخفياً افتراضياً على الديسكتوب حتى لا يتكرر مع شعار الشريط العادي.
   يُعاد إظهاره داخل @media (max-width: 991px) أدناه. */
.royal-drawer-header {
    display: none;
}

/* ═══════════════════════════════════════════════
   📱 MOBILE NAVBAR — نمط MOYA
   هامبرغر (يسار) + الشعار (وسط) + سلة سريعة مع شارة (يمين)
   ملاحظة: تستخدم مواضع فعلية (left/right) بدل inline-start/end
   لضمان نفس الترتيب البصري بغض النظر عن اتجاه RTL
   ═══════════════════════════════════════════════ */
@media (max-width: 991px) {

    /* ─── الحاوية الرئيسية ─── */
    .royal-navbar-container {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        padding: 12px 16px;
        min-height: 64px;
    }

    /* ─── 1. زر القائمة (الهامبرغر) — يسار ─── */
    .royal-toggler {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        order: initial;
        margin: 0 !important;
        z-index: 5;
        background: transparent;
        border: 1.5px solid var(--royal-gold);
        padding: 6px 10px;
        border-radius: 8px;
    }

    /* ─── 2. الشعار — الوسط تماماً ─── */
    .royal-brand {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0 !important;
        white-space: nowrap;
        font-size: 1.2rem;
        letter-spacing: 1.5px;
        z-index: 4;
        display: flex;
        align-items: center;
        gap: 6px;
        color: var(--royal-gold) !important;
    }

        .royal-brand i {
            font-size: 1rem;
        }

    /* ─── 3. أيقونة السلة السريعة — يمين (نمط MOYA) ─── */
    .royal-cart-quick {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        color: var(--royal-gold) !important;
        text-decoration: none;
        transition: background-color 0.25s ease, transform 0.15s ease;
        z-index: 5;
    }

        .royal-cart-quick:active {
            background: rgba(201, 169, 97, 0.12);
            transform: translateY(-50%) scale(0.92);
        }

        .royal-cart-quick i {
            font-size: 1.4rem;
            color: var(--royal-gold);
            filter: drop-shadow(0 2px 4px rgba(201, 169, 97, 0.35));
        }

    /* ─── شارة العدد — أعلى يمين الأيقونة دائماً ─── */
    .royal-cart-quick__badge {
        position: absolute;
        top: -2px;
        right: -4px;
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        background: linear-gradient(135deg, #c9a961, #a88945);
        color: #1a0f08;
        border: 2px solid var(--royal-brown);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.68rem;
        font-weight: 800;
        line-height: 1;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
        animation: royalBadgePop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    @keyframes royalBadgePop {
        0% {
            transform: scale(0);
        }

        60% {
            transform: scale(1.2);
        }

        100% {
            transform: scale(1);
        }
    }

    /* ─── 4. زر "طلباتي" يبقى ظاهراً داخل الدرج على الجوال ─── */

    /* ─── 5. الدرج (Drawer) — ينزلق من اليسار عند فتح الهامبرغر ─── */
    #navbarNav.navbar-collapse {
        display: block !important; /* تجاوز إخفاء Bootstrap الافتراضي (display:none) */
        position: fixed;
        top: 0;
        left: 0;
        width: min(300px, 82vw);
        max-width: 320px;
        height: 100vh !important;
        height: 100dvh !important;
        margin: 0 !important;
        background: var(--royal-gradient);
        box-shadow: 10px 0 34px rgba(10, 6, 3, 0.4);
        padding: 20px 20px 30px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1050;
    }

        #navbarNav.navbar-collapse.show {
            transform: translateX(0);
        }

    /* رأس الدرج: الشعار + زر الإغلاق */
    .royal-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 16px;
        margin-bottom: 12px;
        border-bottom: 1px solid rgba(201, 169, 97, 0.25);
    }

    .royal-drawer-brand {
        font-family: 'Georgia', serif;
        color: var(--royal-gold) !important;
        font-size: 1.15rem;
        font-weight: 700;
        letter-spacing: 1px;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .royal-drawer-close {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: 1.5px solid var(--royal-gold);
        border-radius: 50%;
        color: var(--royal-gold);
        font-size: 1rem;
        cursor: pointer;
        transition: var(--royal-transition);
        flex-shrink: 0;
    }

        .royal-drawer-close:hover,
        .royal-drawer-close:active {
            background: rgba(201, 169, 97, 0.15);
        }

    /* الطبقة المعتمة خلف الدرج */
    .royal-drawer-overlay {
        position: fixed;
        inset: 0;
        background: rgba(10, 6, 3, 0.55);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s ease;
        z-index: 1040;
    }

    #navbarNav.navbar-collapse.show ~ .royal-drawer-overlay {
        opacity: 1;
        visibility: visible;
    }

    .royal-nav-center,
    .royal-nav-actions {
        flex-direction: column !important;
        gap: 8px !important;
        padding: 8px 0 4px !important;
        width: 100%;
        align-items: stretch !important;
        margin: 0 !important;
    }

        .royal-nav-center .nav-item,
        .royal-nav-actions .nav-item {
            width: 100%;
        }

    .royal-nav-link {
        justify-content: flex-start !important;
        width: 100% !important;
        padding: 12px 16px !important;
        border-radius: 10px;
    }

    /* زر "السلة" الكامل داخل الدرج (نصي، وليس أيقونة فقط) */
    .royal-cart-btn {
        width: 100% !important;
        height: auto !important;
        padding: 13px 20px !important;
        border-radius: 12px !important;
        background: linear-gradient(135deg, #c9a961, #d4a574) !important;
        color: #1a0f08 !important;
        border: none !important;
        box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3) !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 10px;
        font-weight: 700;
        font-size: 0.95rem;
    }

        .royal-cart-btn i {
            font-size: 1.05rem;
            color: #1a0f08 !important;
        }

        .royal-cart-btn > span,
        .royal-cart-btn > strong {
            display: inline !important;
            color: #1a0f08 !important;
        }

    .royal-cart-badge {
        position: static !important;
        margin-inline-start: 6px;
        background: var(--royal-dark) !important;
        color: var(--royal-gold) !important;
        border-color: var(--royal-gold) !important;
        animation: none !important;
    }
}

/* منع تمرير الخلفية أثناء فتح الدرج على الجوال */
body.royal-drawer-open {
    overflow: hidden;
}

/* ─── الديسكتوب (≥992px): نفس نقطة التحول المستخدمة أعلاه بالضبط،
   بدل الاعتماد على navbar-expand-md الخاص ببووتستراب (768px) الذي كان
   يسبب تعارضاً وتراكب القوائم بين 768px و991px ─── */
@media (min-width: 992px) {
    .royal-cart-quick {
        display: none;
    }

    .royal-toggler {
        display: none !important;
    }

    .royal-navbar-container .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        width: auto;
    }
}

/* ─── ديسكتوب ضيّق (992–1150px تقريباً): تقليص التباعد قليلاً
   حتى لا تتزاحم روابط القائمة مع زرّي "طلباتي" و"السلة" ─── */
@media (min-width: 992px) and (max-width: 1150px) {
    .royal-navbar-container {
        padding: 0 16px;
        gap: 10px;
    }

    .royal-nav-center {
        gap: 2px;
    }

    .royal-nav-actions {
        gap: 8px;
    }

    .royal-nav-link {
        padding: 8px 10px !important;
        font-size: 0.9rem;
    }

    .royal-orders-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .royal-cart-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .royal-brand {
        font-size: 1.25rem;
    }
}

/* ═══ شاشات صغيرة جداً (< 380px) ═══ */
@media (max-width: 380px) {
    .royal-brand {
        font-size: 1rem;
        letter-spacing: 1px;
    }

        .royal-brand i {
            font-size: 0.85rem;
        }

    .royal-cart-quick {
        width: 38px;
        height: 38px;
    }

        .royal-cart-quick i {
            font-size: 1.2rem;
        }

    .royal-cart-quick__badge {
        min-width: 18px;
        height: 18px;
        font-size: 0.62rem;
    }
}
