/* ==========================================================================
   Basel Theme Aesthetic — Inspired by Xtemos Basel WooCommerce Theme
   - Clean, minimalist e-commerce design
   - Crisp Jost & IBM Plex Sans Arabic typography
   - Signature Basel Palette: Dark Charcoal (#111111 / #222222), White (#ffffff),
     Soft Grey (#f8f8f8), Basel Accent Green (#83b735), Promo Red (#e52e2e)
   ========================================================================== */

:root {
    /* Basel Theme Color Tokens */
    --bsl-dark: #111111;
    --bsl-dark-surface: #1a1a1a;
    --bsl-text: #222222;
    --bsl-muted: #777777;
    --bsl-light-muted: #999999;
    --bsl-bg: #ffffff;
    --bsl-surface: #ffffff;
    --bsl-surface-alt: #f8f8f8;
    --bsl-border: #e8e8e8;
    --bsl-border-dark: #333333;
    
    /* Accents */
    --bsl-accent: #83b735; /* Signature Basel Green */
    --bsl-accent-hover: #6e9c2c;
    --bsl-sale: #e52e2e;   /* Basel Promo Red */
    --bsl-hot: #f39c12;
    --bsl-brass: #c09e5a;
    --bsl-cta: #111111;
    --bsl-cta-hover: #2a2a2a;
    
    /* Utility tokens for existing PHP backwards compatibility */
    --cc-bg: #f8f8f8;
    --cc-surface: #ffffff;
    --cc-text: var(--bsl-text);
    --cc-muted: var(--bsl-muted);
    --cc-accent: var(--bsl-accent);
    --cc-accent-2: #6e9c2c;
    --cc-accent-dark: var(--bsl-dark);
    --cc-cta: var(--bsl-cta);
    --cc-cta-dark: #000000;
    --cc-brass: var(--bsl-brass);
    --cc-border: var(--bsl-border);
    --cc-success: var(--bsl-accent);
    --cc-danger: var(--bsl-sale);
    --cc-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --cc-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --cc-radius: 4px;
    --cc-radius-sm: 2px;

    --cc-light: color-mix(in srgb, var(--bsl-accent) 45%, #fff);
    --cc-lighter: #f4f8ee;
    --cc-pop-dark: var(--bsl-dark);
    --cc-cta-light: color-mix(in srgb, var(--bsl-cta) 20%, #fff);
}

/* ==========================================================================
   Dark mode
   - Follows the visitor's system preference by default; the header/admin
     toggle (assets/js/main.js) can force either theme via data-theme on
     <html>, saved to localStorage so the choice sticks across visits.
   - --bsl-dark is deliberately NOT redefined here: throughout this
     stylesheet it also serves as a fixed brand-navy background (promo bar,
     mobile drawer header, footer, step/carousel badges) that should stay a
     stable dark band in both themes. Text/heading/control colors that used
     --bsl-dark for contrast against the (now dark) page were switched to
     --bsl-text at their call sites instead, which IS redefined below.
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bsl-text: #d8d8d8;
        --bsl-muted: #9a9a9a;
        --bsl-light-muted: #6b6b6b;
        --bsl-bg: #121212;
        --bsl-surface: #1a1a1a;
        --bsl-surface-alt: #202020;
        --bsl-border: #333333;
        --bsl-accent: #9ccb4f;
        --bsl-accent-hover: #83b735;
        --bsl-sale: #ff6b6b;
        --bsl-hot: #ffb84c;
        --bsl-brass: #d4b578;
        --cc-bg: var(--bsl-bg);
        --cc-surface: var(--bsl-surface);
        --cc-lighter: #1c2a10;
    }
}
:root[data-theme="dark"] {
    --bsl-text: #d8d8d8;
    --bsl-muted: #9a9a9a;
    --bsl-light-muted: #6b6b6b;
    --bsl-bg: #121212;
    --bsl-surface: #1a1a1a;
    --bsl-surface-alt: #202020;
    --bsl-border: #333333;
    --bsl-accent: #9ccb4f;
    --bsl-accent-hover: #83b735;
    --bsl-sale: #ff6b6b;
    --bsl-hot: #ffb84c;
    --bsl-brass: #d4b578;
    --cc-bg: var(--bsl-bg);
    --cc-surface: var(--bsl-surface);
    --cc-lighter: #1c2a10;
}

/* .btn's default state reads as near-black-on-page in dark mode (both
   --bsl-dark and the page background sit around #111–#121), so its base
   color swaps to the (now brighter) accent green with dark text for
   contrast; hover moves to the deeper accent-hover shade instead. */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .btn {
        background: var(--bsl-accent);
        border-color: var(--bsl-accent);
        color: #111111;
    }
    html:not([data-theme="light"]) .btn:hover {
        background: var(--bsl-accent-hover);
        border-color: var(--bsl-accent-hover);
        color: #111111;
    }
    html:not([data-theme="light"]) .btn.secondary {
        background: var(--bsl-surface);
        color: var(--bsl-text);
        border-color: var(--bsl-text);
    }
    html:not([data-theme="light"]) .btn.secondary:hover {
        background: var(--bsl-text);
        color: #111111;
    }
    html:not([data-theme="light"]) input:focus,
    html:not([data-theme="light"]) select:focus,
    html:not([data-theme="light"]) textarea:focus {
        border-color: var(--bsl-accent);
        box-shadow: 0 0 0 3px rgba(156, 203, 79, 0.25);
    }
}
html[data-theme="dark"] .btn {
    background: var(--bsl-accent);
    border-color: var(--bsl-accent);
    color: #111111;
}
html[data-theme="dark"] .btn:hover {
    background: var(--bsl-accent-hover);
    border-color: var(--bsl-accent-hover);
    color: #111111;
}
html[data-theme="dark"] .btn.secondary {
    background: var(--bsl-surface);
    color: var(--bsl-text);
    border-color: var(--bsl-text);
}
html[data-theme="dark"] .btn.secondary:hover {
    background: var(--bsl-text);
    color: #111111;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
    border-color: var(--bsl-accent);
    box-shadow: 0 0 0 3px rgba(156, 203, 79, 0.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bsl-bg);
    color: var(--bsl-text);
    font-family: 'Jost', 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body { direction: rtl; }

[dir="auto"], .mixed-text { unicode-bidi: plaintext; }

a { color: var(--bsl-text); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--bsl-accent); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6,
.hero h1, .section h2, .card-title, .category-tile-title {
    font-family: 'Jost', 'IBM Plex Sans Arabic', sans-serif;
    font-weight: 600;
    color: var(--bsl-text);
    line-height: 1.25;
    letter-spacing: 0.02em;
}

.container {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   1. Top Announcement Bar & Header (Basel Style)
   ========================================================================== */

/* Top bar: dark charcoal background, crisp text */
.promo-banner {
    background: var(--bsl-dark);
    color: #ffffff;
    overflow: hidden;
    white-space: nowrap;
    padding: 8px 0;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.marquee-content {
    display: inline-block;
    padding-inline-start: 100%;
    animation: bsl-marquee 22s linear infinite;
}
.marquee-content span { margin-inline-end: 60px; }

@keyframes bsl-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
    .marquee-content { animation: none; padding-inline-start: 0; white-space: normal; }
}

/* Header Navbar */
.site-header {
    background: var(--bsl-surface);
    border-bottom: 1px solid var(--bsl-border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.25s ease, background-color 0.25s ease;
}
.site-header.is-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 20px;
}

/* Brand Group */
.site-brand-group {
    display: flex;
    align-items: center;
    gap: 32px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.site-logo-img {
    height: 48px;
    width: 48px;
    object-fit: contain;
    border-radius: var(--bsl-radius-sm);
    background: #ffffff;
    padding: 2px;
    transition: transform 0.25s ease;
}
.site-brand:hover .site-logo-img {
    transform: scale(1.05);
}

.site-brand-text { display: flex; flex-direction: column; }

.site-brand-name {
    font-family: 'Jost', 'IBM Plex Sans Arabic', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--bsl-text);
    line-height: 1;
}

.site-tagline {
    font-size: 0.75rem;
    color: var(--bsl-muted);
    font-weight: 400;
    margin-top: 2px;
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: var(--bsl-border);
    display: inline-block;
}

/* Main Nav Links (Basel Uppercase Tracking Style) */
.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.site-nav a {
    position: relative;
    text-decoration: none;
    color: var(--bsl-text);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-bottom: 4px;
    transition: color 0.2s ease;
}

.site-nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--bsl-accent);
    transition: width 0.25s ease;
}

.site-nav a:hover {
    color: var(--bsl-accent);
}
.site-nav a:hover::after {
    width: 100%;
}

/* Phone CTA Link */
.phone-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--bsl-text);
    background: var(--bsl-surface-alt);
    border: 1px solid var(--bsl-border);
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.phone-link:hover {
    background: var(--bsl-dark);
    color: #ffffff;
    border-color: var(--bsl-dark);
}

/* Cart Badge (Iconic Basel Pill Counter) */
.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cart-badge {
    background: var(--bsl-accent);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 8px;
    line-height: 1.2;
    margin-inline-start: 4px;
    box-shadow: 0 2px 6px rgba(131, 183, 53, 0.3);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--bsl-border);
    background: var(--bsl-surface);
    border-radius: var(--bsl-radius-sm);
    cursor: pointer;
    flex-shrink: 0;
    color: var(--bsl-text);
    transition: all 0.25s ease;
}
.theme-toggle:hover { border-color: var(--bsl-accent); color: var(--bsl-accent); }
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-toggle-icon-dark { display: none; }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .theme-toggle-icon-light { display: none; }
    html:not([data-theme="light"]) .theme-toggle-icon-dark { display: inline-block; }
}
html[data-theme="dark"] .theme-toggle-icon-light { display: none; }
html[data-theme="dark"] .theme-toggle-icon-dark { display: inline-block; }

/* Mobile Toggle & Off-canvas Drawer */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    border: 1px solid var(--bsl-border);
    background: var(--bsl-surface);
    border-radius: var(--bsl-radius-sm);
    cursor: pointer;
    flex-shrink: 0;
}
.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--bsl-text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.drawer-overlay.is-open { opacity: 1; visibility: visible; }

.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 80%;
    max-width: 320px;
    background: var(--bsl-surface);
    z-index: 999;
    direction: rtl;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.mobile-drawer.is-open { transform: translateX(0); }

.mobile-drawer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid var(--bsl-border);
    background: var(--bsl-dark);
    color: #ffffff;
}
.mobile-drawer-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}
.mobile-drawer-name {
    font-family: 'Jost', 'IBM Plex Sans Arabic', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex: 1;
    color: #ffffff;
}
.drawer-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-drawer-nav { display: flex; flex-direction: column; padding: 12px 0; }
.mobile-drawer-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--bsl-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--bsl-surface-alt);
}
.mobile-drawer-nav a:hover { background: var(--bsl-surface-alt); color: var(--bsl-accent); }
.mobile-drawer-nav a .cart-badge { margin-inline-start: auto; }

.mobile-drawer-social {
    display: flex;
    gap: 12px;
    padding: 20px;
    margin-top: auto;
    border-top: 1px solid var(--bsl-border);
    justify-content: center;
}
.mobile-drawer-social .social-icon { background: var(--bsl-surface-alt); color: var(--bsl-text); }
.mobile-drawer-social .social-icon:hover { background: var(--bsl-accent); color: #ffffff; }

/* ==========================================================================
   2. Hero Banner & Search (Basel Style)
   ========================================================================== */

.hero {
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    color: #ffffff;
    padding: 80px 0 70px;
    text-align: center;
    overflow: hidden;
}
.hero.has-bg-image {
    background-size: cover;
    background-position: center;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}

.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ffffff;
    position: relative;
    z-index: 2;
    animation: bsl-fade-up 0.6s ease both;
}
.hero p {
    margin: 0 auto 24px;
    max-width: 680px;
    opacity: 0.9;
    font-size: 1.1rem;
    font-weight: 400;
    position: relative;
    z-index: 2;
    color: #eeeeee;
    animation: bsl-fade-up 0.6s ease both 0.1s;
}

.hero-search {
    position: relative;
    z-index: 2;
    display: flex;
    max-width: 520px;
    margin: 28px auto 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    border-radius: var(--bsl-radius);
    overflow: hidden;
    animation: bsl-fade-up 0.6s ease both 0.18s;
}
.hero-search input {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 15px 20px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bsl-surface);
    color: var(--bsl-text);
    border-radius: 0;
}
.hero-search input:focus { outline: none; }
.hero-search button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    flex-shrink: 0;
    border: none;
    background: var(--bsl-accent);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease;
}
.hero-search button:hover { background: var(--bsl-accent-hover); }
.hero-search button svg { width: 22px; height: 22px; }

/* Feature tags in Hero */
.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    position: relative;
    z-index: 2;
    margin-top: 20px;
}
.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* ==========================================================================
   3. Trust Strip (Wilayas & Stats - Basel Style Grid)
   ========================================================================== */

.trust-strip {
    background: var(--bsl-surface-alt);
    border-top: 1px solid var(--bsl-border);
    border-bottom: 1px solid var(--bsl-border);
    padding: 26px 0;
}
.trust-strip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}
.trust-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    border-inline-end: 1px solid var(--bsl-border);
}
.trust-stat:last-child { border-inline-end: none; }

.trust-stat-num {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--bsl-text);
    line-height: 1;
}
.trust-stat-unit { font-size: 1rem; color: var(--bsl-accent); margin-inline-start: 2px; }
.trust-stat-label { font-size: 0.82rem; color: var(--bsl-muted); text-transform: uppercase; letter-spacing: 0.03em; }

@media (max-width: 768px) {
    .trust-strip-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .trust-stat { border-inline-end: none; }
}

/* ==========================================================================
   4. Sections & Headers
   ========================================================================== */

.section { padding: 50px 0; }
.section h2 {
    margin: 0 0 28px;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    text-align: center;
}
.section h2::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background: var(--bsl-accent);
    margin: 10px auto 0;
}

/* Category Grid */
.category-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.category-tile {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: var(--bsl-radius);
    overflow: hidden;
    background: var(--bsl-dark);
    text-decoration: none;
    box-shadow: var(--bsl-shadow);
}
.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.88;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
}
.category-tile:hover img {
    transform: scale(1.06);
    opacity: 0.75;
}

.category-tile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ffffff;
    background: linear-gradient(135deg, #2c3e50, #1a252f);
}

.category-tile-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.1) 60%, transparent 100%);
    color: #ffffff;
}
.category-tile-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.category-tile-count { font-size: 0.82rem; opacity: 0.85; margin-top: 2px; }

/* ==========================================================================
   5. Product Grid & Cards (Signature Basel Product Card)
   ========================================================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 26px;
}

.showcase-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 24px;
}
.showcase-card {
    background: var(--bsl-surface);
    border: 1px solid var(--bsl-border);
    border-radius: var(--cc-radius);
    padding: 12px;
    box-shadow: var(--cc-shadow);
}
.showcase-caption {
    margin: 10px 4px 2px;
    font-size: 0.9rem;
    color: var(--bsl-muted);
}

.card {
    background: var(--bsl-surface);
    border: 1px solid var(--bsl-border);
    border-radius: var(--bsl-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: #dddddd;
}

.card .thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--bsl-surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bsl-muted);
    font-size: 2.2rem;
    overflow: hidden;
}

.card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.card:hover .thumb img {
    transform: scale(1.05);
}

/* Basel Stock & Promo Badges */
.stock-badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    background: var(--bsl-accent);
    color: #ffffff;
    padding: 3px 10px;
    border-radius: var(--bsl-radius-sm);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    z-index: 2;
}

.category-badge {
    display: inline-block;
    color: var(--bsl-muted);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card .card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card .card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--bsl-text);
    transition: color 0.2s ease;
}
.card:hover .card-title {
    color: var(--bsl-accent);
}

.card .card-price {
    font-family: 'Jost', 'IBM Plex Sans Arabic', sans-serif;
    color: var(--bsl-text);
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.old-price {
    text-decoration: line-through;
    color: var(--bsl-light-muted);
    font-weight: 400;
    font-size: 0.88rem;
}

.promo-badge {
    background: var(--bsl-sale);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--bsl-radius-sm);
    line-height: 1.2;
}

/* ==========================================================================
   6. How It Works (Order Steps)
   ========================================================================== */

.how-it-works {
    background: var(--bsl-surface-alt);
    border-top: 1px solid var(--bsl-border);
    border-bottom: 1px solid var(--bsl-border);
    padding: 50px 0;
    margin-top: 40px;
}

.steps-list {
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.step {
    background: var(--bsl-surface);
    border: 1px solid var(--bsl-border);
    border-radius: var(--bsl-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--bsl-shadow);
    transition: transform 0.25s ease;
}
.step:hover { transform: translateY(-3px); }

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffffff;
    background: var(--bsl-dark);
    border-radius: var(--bsl-radius-sm);
}
.step-body h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 600; }
.step-body p { margin: 0; font-size: 0.88rem; color: var(--bsl-muted); line-height: 1.5; }

@media (max-width: 840px) {
    .steps-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .steps-list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   7. Product Detail Page
   ========================================================================== */

.product-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 20px 0;
}
@media (min-width: 768px) {
    .product-detail { grid-template-columns: 1fr 1fr; }
}

.product-image {
    background: var(--bsl-surface-alt);
    border: 1px solid var(--bsl-border);
    border-radius: var(--bsl-radius);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bsl-muted);
    font-size: 3.5rem;
    overflow: hidden;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }

.product-carousel {
    position: relative;
    background: var(--bsl-surface-alt);
    border: 1px solid var(--bsl-border);
    border-radius: var(--bsl-radius);
    aspect-ratio: 1 / 1;
    overflow: hidden;
}
.product-carousel-track {
    direction: ltr;
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform .3s ease;
}
.product-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bsl-muted);
    font-size: 3.5rem;
}
.product-carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.product-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--bsl-border);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bsl-dark);
}
.product-carousel-arrow:hover { background: #fff; }
.product-carousel-arrow.prev { inset-inline-start: 10px; }
.product-carousel-arrow.next { inset-inline-end: 10px; }
.product-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}
.product-carousel-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .7);
    border: 1px solid rgba(0, 0, 0, .15);
    cursor: pointer;
}
.product-carousel-dot.is-active { background: var(--bsl-dark); border-color: var(--bsl-dark); }

.price-tag {
    font-family: 'Jost', 'IBM Plex Sans Arabic', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--bsl-text);
    margin: 14px 0;
}

.buy-box {
    background: var(--bsl-surface);
    border: 1px solid var(--bsl-border);
    border-radius: var(--bsl-radius);
    padding: 24px;
    margin-top: 14px;
    box-shadow: var(--bsl-shadow);
}

.info-card {
    background: var(--bsl-surface-alt);
    border: 1px solid var(--bsl-border);
    border-radius: var(--bsl-radius);
    padding: 16px 20px;
    margin-bottom: 16px;
}

/* Lightbox: click any .zoomable image (or trigger cc-zoom-canvas) to enlarge it. */
.zoomable { cursor: zoom-in; }
.cc-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    padding: 24px;
}
.cc-lightbox.is-open { opacity: 1; visibility: visible; }
.cc-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}
.cc-lightbox-close {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}
.cc-lightbox-close:hover { background: rgba(255, 255, 255, .28); }

.delivery-options { display: flex; gap: 12px; flex-wrap: wrap; }
.delivery-option {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 180px;
    border: 1px solid var(--bsl-border);
    border-radius: var(--bsl-radius-sm);
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--bsl-surface);
    transition: all 0.2s ease;
}
.delivery-option input { width: auto; margin: 0; accent-color: var(--bsl-accent); }
.delivery-option small { font-weight: 400; color: var(--bsl-muted); }
.delivery-option-icon { font-size: 1.3rem; }
.delivery-option:has(input:checked) {
    border-color: var(--bsl-accent);
    background: var(--cc-lighter);
}

.qty-stepper {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--bsl-border);
    border-radius: var(--bsl-radius-sm);
    overflow: hidden;
    background: var(--bsl-surface);
}
.qty-stepper input {
    width: 60px;
    text-align: center;
    border: none;
    border-inline: 1px solid var(--bsl-border);
    border-radius: 0;
    font-weight: 600;
}
.qty-stepper input:focus { outline: none; box-shadow: none; }
.qty-btn {
    background: var(--bsl-surface-alt);
    border: none;
    width: 40px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bsl-text);
    cursor: pointer;
    transition: background 0.15s ease;
}
.qty-btn:hover { background: var(--bsl-border); }

/* Buttons & Inputs */
label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; color: var(--bsl-text); }

input[type="text"], input[type="tel"], input[type="number"], input[type="password"], select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--bsl-border);
    border-radius: var(--bsl-radius-sm);
    background: var(--bsl-surface);
    color: var(--bsl-text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--bsl-text);
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.field { margin-bottom: 18px; }

/* Primary Button (.btn-basel Signature) */
.btn {
    display: inline-block;
    background: var(--bsl-dark);
    color: #ffffff;
    border: 2px solid var(--bsl-dark);
    padding: 12px 28px;
    border-radius: var(--bsl-radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    text-align: center;
}
.btn:hover {
    background: var(--bsl-accent);
    border-color: var(--bsl-accent);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(131, 183, 53, 0.25);
}
.btn:active { transform: translateY(0); }
.btn.secondary {
    background: #ffffff;
    color: var(--bsl-dark);
    border: 2px solid var(--bsl-dark);
}
.btn.secondary:hover {
    background: var(--bsl-dark);
    color: #ffffff;
}
.btn.danger {
    background: var(--bsl-sale);
    border-color: var(--bsl-sale);
}
.btn.danger:hover {
    background: #c02222;
    border-color: #c02222;
}

/* ==========================================================================
   8. Cart & Checkout Page Tables & Layout
   ========================================================================== */

.cart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
    padding: 20px 0;
}
@media (min-width: 820px) {
    .cart-layout { grid-template-columns: 2fr 1fr; }
    .cart-summary { position: sticky; top: 90px; }
}

.cart-list { display: flex; flex-direction: column; gap: 14px; }

.cart-row {
    display: grid;
    grid-template-columns: 70px 1fr auto auto auto;
    align-items: center;
    gap: 16px;
    background: var(--bsl-surface);
    border: 1px solid var(--bsl-border);
    border-radius: var(--bsl-radius);
    padding: 14px;
    box-shadow: var(--bsl-shadow);
}

.cart-row-thumb {
    width: 70px;
    height: 70px;
    border-radius: var(--bsl-radius-sm);
    overflow: hidden;
    background: var(--bsl-surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.cart-row-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cart-row-info { min-width: 0; }
.cart-row-title { display: block; font-weight: 600; color: var(--bsl-text); text-decoration: none; }
.cart-row-title:hover { color: var(--bsl-accent); }
.cart-row-size { font-size: 0.85rem; color: var(--bsl-muted); margin-top: 2px; }
.cart-row-unit-price { font-size: 0.82rem; color: var(--bsl-muted); margin-top: 2px; }

.cart-row-total { font-weight: 700; color: var(--bsl-text); white-space: nowrap; font-size: 1.05rem; }

.cart-row-remove {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--bsl-light-muted);
    padding: 6px;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}
.cart-row-remove:hover { color: var(--bsl-sale); background: #fde8e8; }

.totals-box {
    background: var(--bsl-surface);
    border: 1px solid var(--bsl-border);
    border-radius: var(--bsl-radius);
    padding: 24px;
    box-shadow: var(--bsl-shadow);
}
.totals-box .row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--bsl-text); }
.totals-box .row.grand {
    font-weight: 700;
    font-size: 1.2rem;
    border-top: 1px solid var(--bsl-border);
    margin-top: 10px;
    padding-top: 16px;
    color: var(--bsl-text);
}

.alert {
    padding: 14px 18px;
    border-radius: var(--bsl-radius-sm);
    margin-bottom: 20px;
    font-weight: 500;
}
.alert.error { background: #fde8e8; color: var(--bsl-sale); border: 1px solid #f8baba; }
.alert.success { background: #f0f7e6; color: var(--bsl-accent-hover); border: 1px solid #cce5a3; }

.empty-state {
    text-align: center;
    padding: 70px 20px;
    background: var(--bsl-surface);
    border: 1px dashed var(--bsl-border);
    border-radius: var(--bsl-radius);
}
.empty-state-icon { font-size: 3.5rem; margin-bottom: 14px; opacity: 0.5; }
.empty-state p { color: var(--bsl-muted); margin-bottom: 22px; font-size: 1.05rem; }

/* ==========================================================================
   9. Footer (Dark Basel Style)
   ========================================================================== */

.site-footer {
    background: var(--bsl-dark);
    color: #b0b0b0;
    padding: 60px 0 0;
    margin-top: 60px;
    font-size: 0.9rem;
}
.site-footer a { color: #cccccc; text-decoration: none; transition: color 0.2s ease; }
.site-footer a:hover { color: #ffffff; }

.site-footer strong {
    color: #ffffff;
    font-size: 1.4rem;
    font-family: 'Jost', 'IBM Plex Sans Arabic', sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.site-footer h4 {
    position: relative;
    color: #ffffff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 20px;
    padding-bottom: 10px;
    font-weight: 600;
}
.site-footer h4::after {
    content: "";
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 32px;
    height: 2px;
    background: var(--bsl-accent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: var(--bsl-radius-sm);
    padding: 3px;
}
.footer-brand p { margin: 8px 0 0; font-size: 0.88rem; line-height: 1.6; max-width: 36ch; color: #999999; }

.footer-col { display: flex; flex-direction: column; gap: 12px; }

.footer-contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-contact-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--bsl-accent);
}

.footer-social { display: flex; gap: 10px; margin-top: 12px; }
.social-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: background 0.2s ease, transform 0.2s ease;
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon:hover { background: var(--bsl-accent); transform: translateY(-2px); color: #ffffff; }

.play-store-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.15s, transform 0.15s;
}
.play-store-badge:hover { background: var(--bsl-accent); transform: translateY(-2px); }
.play-store-badge svg { flex-shrink: 0; }
.play-store-badge span { display: flex; flex-direction: column; line-height: 1.25; }
.play-store-badge small { font-size: 0.68rem; color: #cccccc; }
.play-store-badge strong { font-size: 0.95rem; }

.footer-bottom {
    text-align: center;
    padding: 22px 0;
    font-size: 0.85rem;
    color: #888888;
    background: rgba(0, 0, 0, 0.2);
}

/* Order Status Badges */
.badge-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}
.badge-status.new { background: #eaf1fb; color: #1a4d8f; }
.badge-status.confirmed { background: #fdf3d9; color: #8a6d1a; }
.badge-status.shipped { background: #e6ecfd; color: #3c4fae; }
.badge-status.delivered { background: #e9f5ec; color: var(--bsl-accent-hover); }
.badge-status.cancelled { background: #fde8e8; color: var(--bsl-sale); }

/* Keyframes & Scroll Animations */
@keyframes bsl-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   10. Responsive Tweaks
   ========================================================================== */

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .site-header .container {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .site-brand-group, .site-nav { display: contents; }
    .site-brand { order: 2; flex: 1; justify-content: center; }
    .site-brand-text { display: none; }
    .nav-divider { display: none; }
    .site-logo-img { height: 40px; width: 40px; }
    .site-nav a:not(.cart-link) { display: none; }
    .cart-link { order: 1; }
    .cart-link .cart-link-label { display: none; }
    .menu-toggle { order: 3; }
    .phone-link { display: none; }

    .hero { padding: 45px 0; }
    .hero h1 { font-size: 1.6rem; }
    .section { padding: 32px 0; }
    .section h2 { font-size: 1.3rem; }

    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .card .card-body { padding: 12px; gap: 4px; }
    .card .card-title { font-size: 0.88rem; }
    .card .card-price { font-size: 0.95rem; }
    .category-badge, .stock-badge { font-size: 0.65rem; padding: 2px 7px; }

    .footer-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }
    .footer-brand { flex-direction: column; align-items: center; }
    .footer-contact-link { justify-content: center; }
    .footer-social { justify-content: center; }
    .site-footer h4::after { inset-inline-start: 50%; transform: translateX(-50%); }
    html[dir="rtl"] .site-footer h4::after { transform: translateX(50%); }
}
