:root {
    --oud-teal: #cc9a44;         /* الذهبي الأساسي - لون العود والبخور الفاخر */
    --oud-teal-dark: #a97a2e;    /* ذهبي أغمق (تفاعل/هوفر) */
    --oud-teal-light: #241a10;   /* خلفية بنية دافئة داكنة بدل الفاتحة (للثيم الليلي) */
    --oud-dark: #0c0a10;         /* أسود المتجر - أسود ليلي بلمسة بنفسجية */

    --oud-purple: #3a1f4d;       /* بنفسجي دخاني للمسات السحرية */
    --oud-cream: #f3e6cf;        /* نص كريمي دافئ */
    --oud-card: #17131a;         /* خلفية البطاقات */
    --oud-card-2: #1f1922;       /* خلفية بطاقات ثانوية / حقول */
    --oud-border: rgba(204,154,68,0.25);
    --oud-muted: #b8a98f;
    --oud-glow: 0 0 22px rgba(204,154,68,0.25);
}

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Aref+Ruqaa:wght@400;700&display=swap');

body {
    font-family: "Cairo", "Tahoma", sans-serif;
    background-color: var(--oud-dark);
    background-image:
        radial-gradient(ellipse 900px 500px at 15% -10%, rgba(58,31,77,0.55), transparent 60%),
        radial-gradient(ellipse 700px 500px at 100% 10%, rgba(204,154,68,0.10), transparent 55%),
        radial-gradient(ellipse 800px 600px at 50% 100%, rgba(58,31,77,0.35), transparent 60%);
    background-attachment: fixed;
    color: var(--oud-cream);
    position: relative;
}

a { text-decoration: none; }

h1, h2, h3, h4, .oud-brand-font {
    font-family: "Aref Ruqaa", "Cairo", serif;
}

::selection { background: var(--oud-teal); color: #1a1108; }

/* ---------- Header ---------- */
.oud-header {
    background: linear-gradient(180deg, rgba(23,19,26,0.97), rgba(12,10,16,0.97));
    border-bottom: 1px solid var(--oud-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(6px);
}

.oud-logo-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--oud-teal-light), var(--oud-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid var(--oud-border);
    box-shadow: var(--oud-glow);
}

.oud-brand-name {
    font-family: "Aref Ruqaa", serif;
    font-weight: 700;
    color: var(--oud-teal);
    font-size: 1.3rem;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.oud-brand-tag {
    font-size: 0.68rem;
    color: var(--oud-muted);
}

.oud-nav {
    background: rgba(12,10,16,0.6);
}
.oud-nav a {
    color: var(--oud-cream);
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    transition: color .15s ease;
}
.oud-nav a:hover { color: var(--oud-teal); }

.icon-btn {
    position: relative;
    color: var(--oud-cream);
    font-size: 1.2rem;
    padding: 0.3rem 0.5rem;
}
.icon-btn:hover { color: var(--oud-teal); }

.cart-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    background: var(--oud-teal);
    color: #1a1108;
    font-size: 0.65rem;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ---------- Hero ---------- */
.oud-hero {
    position: relative;
    background:
        radial-gradient(ellipse 600px 260px at 50% 0%, rgba(204,154,68,0.16), transparent 70%),
        linear-gradient(160deg, var(--oud-purple) 0%, var(--oud-dark) 65%);
    padding: 4rem 1rem 3.5rem;
    border-radius: 0 0 32px 32px;
    border-bottom: 1px solid var(--oud-border);
    overflow: hidden;
    text-align: center;
}
.oud-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(243,230,207,0.5) 1px, transparent 1.5px);
    background-size: 46px 46px;
    opacity: 0.06;
    pointer-events: none;
}
.oud-hero h1 {
    color: var(--oud-teal);
    font-weight: 800;
    text-shadow: 0 0 26px rgba(204,154,68,0.35);
    font-size: 2.1rem;
}
.oud-hero p { color: var(--oud-muted); }

.oud-hero .smoke {
    position: absolute;
    bottom: -10px;
    width: 140px;
    height: 220px;
    background: radial-gradient(circle, rgba(243,230,207,0.16), transparent 70%);
    filter: blur(6px);
    animation: oud-rise 9s ease-in-out infinite;
    pointer-events: none;
}
.oud-hero .smoke.s1 { left: 8%; animation-delay: 0s; }
.oud-hero .smoke.s2 { right: 10%; animation-delay: 3s; }
@keyframes oud-rise {
    0%   { transform: translateY(0) scale(1); opacity: 0; }
    20%  { opacity: 0.8; }
    100% { transform: translateY(-160px) scale(1.6); opacity: 0; }
}

/* ---------- Hero video background ---------- */
.oud-hero-video {
    padding: 0;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.oud-hero-video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.oud-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 260px at 50% 0%, rgba(204,154,68,0.12), transparent 70%),
        linear-gradient(180deg, rgba(12,10,16,0.55) 0%, rgba(12,10,16,0.78) 60%, rgba(12,10,16,0.92) 100%);
    z-index: 1;
}
.oud-hero-content {
    position: relative;
    z-index: 2;
    padding: 4rem 1rem 3.5rem;
    width: 100%;
}
.oud-hero-content h1 {
    color: var(--oud-teal);
    font-weight: 800;
    text-shadow: 0 2px 20px rgba(0,0,0,0.7), 0 0 26px rgba(204,154,68,0.35);
    font-size: 2.1rem;
}
.oud-hero-content p {
    color: var(--oud-cream);
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
@media (max-width: 576px) {
    .oud-hero-video { min-height: 340px; }
    .oud-hero-content { padding: 2.5rem 1rem 2.5rem; }
}

/* ---------- Buttons ---------- */
.btn-oud {
    background: linear-gradient(135deg, var(--oud-teal), var(--oud-teal-dark));
    border: none;
    color: #1a1108;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(204,154,68,0.25);
}
.btn-oud:hover { background: var(--oud-teal-dark); color: #1a1108; box-shadow: 0 6px 18px rgba(204,154,68,0.4); }

.btn-outline-oud {
    border: 1.5px solid var(--oud-teal);
    color: var(--oud-teal);
    font-weight: 600;
    background: transparent;
}
.btn-outline-oud:hover { background: var(--oud-teal); color: #1a1108; }

/* ---------- Cards ---------- */
.category-card {
    border-radius: 18px;
    overflow: hidden;
    text-align: center;
    background: linear-gradient(160deg, var(--oud-card), var(--oud-card-2));
    border: 1px solid var(--oud-border);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    padding: 1rem 0.5rem;
}
.category-card:hover { transform: translateY(-5px); box-shadow: var(--oud-glow); border-color: var(--oud-teal); }
.category-card img, .category-card .placeholder-icon {
    width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 14px; margin: 0 auto 0.5rem;
    background: var(--oud-teal-light);
    display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
}
.category-card p { color: var(--oud-cream); }

.product-card {
    border-radius: 18px;
    border: 1px solid var(--oud-border);
    overflow: hidden;
    background: linear-gradient(160deg, var(--oud-card), var(--oud-card-2));
    height: 100%;
    transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
    color: var(--oud-cream);
}
.product-card:hover { box-shadow: var(--oud-glow); border-color: var(--oud-teal); transform: translateY(-3px); }
.product-card .img-wrap {
    aspect-ratio: 1/1;
    background: var(--oud-teal-light);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.product-card img { width: 100%; height: 100%; object-fit: cover; }
.product-card .price { color: var(--oud-teal); font-weight: 700; }
.product-card .old-price { text-decoration: line-through; color: #8a7f6d; font-size: 0.85rem; }
.product-card .card-body, .product-card h6, .product-card .fw-bold { color: var(--oud-cream); }

.badge-out {
    background: #7a3535;
}

/* ---------- Generic Bootstrap overrides for the night theme ---------- */
.card {
    background: var(--oud-card);
    border: 1px solid var(--oud-border);
    color: var(--oud-cream);
}
.text-muted { color: var(--oud-muted) !important; }
.table { color: var(--oud-cream); }
.table > :not(caption) > * > * { background: transparent; color: var(--oud-cream); border-color: var(--oud-border); }
.modal-content, .dropdown-menu { background: var(--oud-card); color: var(--oud-cream); border: 1px solid var(--oud-border); }
.dropdown-item { color: var(--oud-cream); }
.dropdown-item:hover { background: var(--oud-teal-light); color: var(--oud-teal); }

/* ---------- Checkout form ---------- */
.checkout-card {
    background: linear-gradient(160deg, var(--oud-card), var(--oud-card-2));
    border-radius: 20px;
    border: 1px solid var(--oud-border);
    padding: 1.5rem;
    color: var(--oud-cream);
}
.form-control, .form-select {
    border-radius: 12px;
    padding: 0.7rem 1rem;
    border: 1px solid var(--oud-border);
    background: var(--oud-card-2);
    color: var(--oud-cream);
}
.form-control::placeholder { color: var(--oud-muted); }
.form-control:focus, .form-select:focus {
    border-color: var(--oud-teal);
    box-shadow: 0 0 0 0.2rem rgba(204,154,68,0.18);
    background: var(--oud-card-2);
    color: var(--oud-cream);
}
.form-select option { background: var(--oud-card-2); color: var(--oud-cream); }
label, .form-label { color: var(--oud-cream); }

/* ---------- Cart quantity stepper (mobile-friendly +/-) ---------- */
.qty-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--oud-border);
    border-radius: 10px;
    overflow: hidden;
    width: fit-content;
}
.qty-step-btn {
    background: var(--oud-teal-light);
    border: none;
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--oud-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    touch-action: manipulation;
}
.qty-step-btn:active { background: var(--oud-teal); color: #1a1108; }
.qty-stepper .cart-qty-input {
    width: 48px;
    text-align: center;
    border: none;
    background: var(--oud-card-2);
    color: var(--oud-cream);
    border-right: 1px solid var(--oud-border);
    border-left: 1px solid var(--oud-border);
    border-radius: 0;
    padding: 0.35rem 0.25rem;
    -moz-appearance: textfield;
}
.qty-stepper .cart-qty-input::-webkit-outer-spin-button,
.qty-stepper .cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.payment-option {
    border: 1.5px solid var(--oud-border);
    border-radius: 14px;
    padding: 1rem;
    cursor: pointer;
    background: var(--oud-card-2);
}
.payment-option.selected {
    border-color: var(--oud-teal);
    background: var(--oud-teal-light);
}

/* ---------- Footer ---------- */
.oud-footer {
    background: linear-gradient(180deg, var(--oud-purple), var(--oud-dark));
    color: var(--oud-muted);
    padding: 2.5rem 0 1rem;
    margin-top: 3rem;
    border-top: 1px solid var(--oud-border);
}
.oud-footer h5, .oud-footer h6 { color: var(--oud-teal) !important; }
.oud-footer a { color: var(--oud-muted); }
.oud-footer a:hover { color: var(--oud-teal); }

.footer-social-link {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(204,154,68,0.1);
    border: 1px solid var(--oud-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--oud-cream) !important;
    transition: background .15s ease, transform .15s ease;
}
.footer-social-link:hover {
    background: var(--oud-teal);
    color: #1a1108 !important;
    transform: translateY(-3px);
}

/* ---------- Notification banner ---------- */
.notification-banner {
    background: linear-gradient(90deg, var(--oud-purple), var(--oud-dark));
    color: var(--oud-cream);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--oud-border);
}
.notification-banner a { color: var(--oud-teal) !important; }

/* ---------- Push notification prompt ---------- */
.push-prompt {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--oud-card);
    color: var(--oud-cream);
    border-top: 1px solid var(--oud-border);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
    padding: 0.75rem 1rem;
    z-index: 1300;
}

/* ---------- WhatsApp float ---------- */
.whatsapp-float {
    position: fixed;
    bottom: 22px;
    left: 22px;
    background: #25D366;
    color: #fff !important;
    border-radius: 30px;
    padding: 0.7rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.4);
    z-index: 1200;
    font-weight: 600;
}

/* ---------- Mobile menu button ---------- */
.menu-toggle-btn {
    background: var(--oud-teal-light);
    color: var(--oud-teal);
    border: 1px solid var(--oud-border);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.menu-toggle-btn:hover { background: var(--oud-teal); color: #1a1108; }

/* ---------- Offcanvas mobile menu ---------- */
.offcanvas { max-width: 320px; background: var(--oud-card); color: var(--oud-cream); }
.offcanvas-header { border-bottom: 1px solid var(--oud-border) !important; }
.mobile-menu-tabs { border-bottom: 1px solid var(--oud-border); }
.mobile-menu-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--oud-muted);
    font-weight: 600;
    border-radius: 0;
    background: transparent;
}
.mobile-menu-tabs .nav-link.active {
    color: var(--oud-teal);
    border-bottom-color: var(--oud-teal);
    background: transparent;
}
.mobile-menu-link {
    display: block;
    padding: 0.7rem 0.25rem;
    color: var(--oud-cream);
    border-bottom: 1px solid var(--oud-border);
    font-weight: 500;
}
.mobile-menu-link:hover { color: var(--oud-teal); }

.mobile-category-tile { display: block; text-align: center; }
.mobile-category-thumb {
    aspect-ratio: 1/1;
    background: var(--oud-teal-light);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}
.mobile-category-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mobile-category-tile p { color: var(--oud-cream); }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 400px) {
    .oud-brand-tag { display: none; }
    .oud-logo-circle { width: 42px; height: 42px; font-size: 1.3rem; }
}

/* ---------- Admin login page ---------- */
.login-page-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top, var(--oud-purple) 0%, var(--oud-dark) 65%);
}
.login-card {
    background: var(--oud-card);
    color: var(--oud-cream);
    border: 1px solid var(--oud-border);
    border-radius: 22px;
    padding: 2rem 1.5rem;
    box-shadow: 0 15px 50px rgba(0,0,0,0.55);
}
.login-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--oud-teal-light);
    box-shadow: 0 0 0 3px var(--oud-teal);
}
@media (min-width: 576px) {
    .login-card { padding: 2.5rem 2rem; }
}


.admin-sidebar {
    background: linear-gradient(180deg, var(--oud-purple), var(--oud-dark));
    min-height: 100vh;
    color: #fff;
}
.admin-sidebar a {
    color: var(--oud-muted);
    display: block;
    padding: 0.65rem 1.2rem;
    border-radius: 10px;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
    background: var(--oud-teal);
    color: #1a1108;
}
.stat-card {
    border-radius: 18px;
    border: 1px solid var(--oud-border);
    padding: 1.25rem;
    background: linear-gradient(160deg, var(--oud-card), var(--oud-card-2));
    color: var(--oud-cream);
}
.stat-card .value { font-size: 1.7rem; font-weight: 800; color: var(--oud-teal); }

.status-badge {
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
