@font-face {
    font-family: 'Al-Jazeera-Arabic';
    src: url('/assets/fonts/Al-Jazeera-Arabic-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg: #000000;
    --bg-card: #0A0A0A;
    --bg-elevated: #111111;
    --bg-surface: #161616;
    --accent: #8B5CF6;
    --accent-hover: #7C3AED;
    --accent-glow: rgba(139, 92, 246, 0.2);
    --spec-val: #14b8a6;
    --text: #FFFFFF;
    --text-secondary: #888888;
    --text-muted: #555555;
    --border: #1A1A1A;
    --border-light: #222222;
    --font: 'Al-Jazeera-Arabic', 'Almarai', sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-full: 9999px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --header-h: 60px;
    --bnav-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.accent { color: var(--accent); }

/* ===== HEADER ===== */
#main-header {
    position: fixed; top: 0; width: 100%; height: var(--header-h);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.header-inner {
    max-width: 1120px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
}

.logo {
    font-size: 20px; font-weight: 700; letter-spacing: 3px;
    color: var(--text);
}
[dir="rtl"] .logo { letter-spacing: 0; text-transform: none; }

.header-right { display: flex; align-items: center; gap: 16px; }

.header-icon {
    position: relative;
    background: none; border: none; color: var(--text-secondary);
    font-size: 18px; cursor: pointer; padding: 8px;
    transition: var(--transition);
}

.header-icon:hover { color: var(--accent); }

.header-cart-badge {
    display: none;
    position: absolute; top: 2px; inset-inline-end: 2px;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--accent); color: #fff;
    font-size: 9px; font-weight: 700;
    border-radius: 8px; align-items: center; justify-content: center;
}

.header-cart-badge.visible { display: flex; }

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
    display: none;
    position: fixed; top: var(--header-h); left: 0; right: 0;
    z-index: 999;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
}

.search-overlay.open { display: block; }

.search-overlay-inner {
    max-width: 1120px; margin: 0 auto;
    display: flex; align-items: center; gap: 12px;
}

.search-input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font); font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }

.search-close {
    background: none; border: none; color: var(--text-secondary);
    font-size: 18px; cursor: pointer; padding: 8px;
}

/* ===== HERO SLIDER (AS PER IMAGE) ===== */
.hero-section {
    padding: 20px 0;
    margin-top: var(--header-h);
}

.hero-slider-wrapper {
    position: relative;
    width: 100%;
    height: clamp(300px, 50vw, 500px);
    border-radius: 32px;
    overflow: hidden;
    background: #f8f8fa; /* Light background from image */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero-slider {
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute; inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.hero-slide.active { opacity: 1; z-index: 5; }

.hero-slide-bg {
    position: absolute; inset: 0;
    z-index: 1;
    display: flex; align-items: center; justify-content: center;
}

.hero-slide-bg img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 1; /* Fully opaque as requested */
}

.hero-slide-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.2); /* Very subtle overlay for text contrast */
    z-index: 2;
}

.hero-slide-content {
    position: relative; z-index: 3;
    color: #fff; /* Switch to white text for better visibility on clear images */
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero-sub {
    font-size: 16px;
    color: rgba(255,255,255,0.9);
    max-width: 500px;
}

/* Arrows */
.slider-arrow {
    position: absolute; top: 50%;
    transform: translateY(-50%);
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(0,0,0,0.25);
    border: none; color: #fff;
    cursor: pointer; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}

.slider-arrow:hover { background: var(--accent); }
.slider-arrow.prev { right: 20px; }
.slider-arrow.next { left: 20px; }

/* Dots */
.slider-dots {
    position: absolute; bottom: 20px; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 10;
}

.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active { background: var(--accent); width: 24px; border-radius: 4px; }

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px;
    background: var(--accent); color: #fff;
    font-family: var(--font); font-weight: 600; font-size: 14px;
    border: none; border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 24px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 32px;
    background: transparent; color: var(--text);
    font-family: var(--font); font-weight: 500; font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-outline:hover {
    border-color: var(--accent); color: var(--accent);
}

/* ===== CATEGORY PAGE VIEW ===== */
.category-view {
    margin-bottom: -60px; /* Blend with featured grid */
}

.category-view.hidden { display: none; }

.cat-header {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.cat-header-bg {
    position: absolute; inset: 0;
    z-index: 1;
}

.cat-header-bg img {
    width: 100%; height: 100%; object-fit: cover;
}

.cat-header-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, var(--bg) 0%, rgba(0,0,0,0.4) 100%);
}

.cat-header-content {
    position: relative; z-index: 2;
    max-width: 700px;
}

.cat-header-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800; letter-spacing: -2px;
    margin-bottom: 12px;
}

.cat-header-content p {
    font-size: 16px; color: var(--text-secondary);
    margin-bottom: 32px; line-height: 1.6;
}

.btn-back-home {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--accent);
    text-transform: uppercase;
    transition: var(--transition);
}

.btn-back-home:hover { transform: translateX(-4px); color: #fff; }

/* View Switching Logic */
body.view-category #hero,
body.view-category #categories {
    display: none;
}

body.view-category #featured {
    padding-top: 40px;
}

/* ===== SECTIONS ===== */
.section {
    padding: 100px 0;
}

.section-label {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 12px;
}

.section-number {
    font-size: 11px; font-weight: 600; letter-spacing: 3px;
    color: var(--accent);
}

.section-name {
    font-size: 11px; font-weight: 500; letter-spacing: 2px;
    text-transform: uppercase; color: var(--text-muted);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700; letter-spacing: -1.5px;
    margin-bottom: 12px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 48px;
}

/* ===== CATEGORY SLIDER (AS PER IMAGE) ===== */
.category-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 10px 0 30px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-grid::-webkit-scrollbar { display: none; }

.cat-card {
    flex: 0 0 160px;
    scroll-snap-align: start;
    height: 180px;
    background: #111112;
    border: 1px solid #1f1f23;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .cat-card {
        flex: 0 0 220px;
        height: 240px;
    }
}

.cat-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    background: #161618;
}

.cat-card img {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
    margin-bottom: 16px;
    transition: var(--transition);
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
}

@media (min-width: 768px) {
    .cat-card img {
        max-width: 140px;
        max-height: 140px;
    }
}

.cat-info {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cat-info h3 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}
@media (min-width: 768px) {
    .cat-info h3 { font-size: 16px; }
}

.cat-info i {
    font-size: 16px;
    color: var(--text-secondary);
}

.cat-info p { display: none; } /* Hide desc on card as per image */

/* ===== PRODUCT GRID ===== */
.view-toggle-btn {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition);
}
.view-toggle-btn:hover { color: var(--text); border-color: var(--text-muted); }
.view-toggle-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* List View Overrides */
.product-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}


.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0; transform: translateY(20px);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent; /* Remove mobile tap blue box */
}

.product-grid.list-view .product-card {
    flex-direction: row;
    align-items: center;
    height: 160px;
}

.product-card.visible {
    opacity: 1; transform: translateY(0);
}

.product-card:hover {
    border-color: var(--border-light);
    /* Removed transform and shadow for a stable look */
}

.product-grid.list-view .product-card:hover {
    transform: translateX(-4px);
}
[dir="rtl"] .product-grid.list-view .product-card:hover {
    transform: translateX(4px);
}

.product-card-img {
    height: 260px; /* Slightly taller */
    display: flex; align-items: center; justify-content: center;
    background: #111113;
    padding: 0; /* Remove padding for "Full" look */
    overflow: hidden;
    position: relative;
}

.product-grid.list-view .product-card-img {
    width: 160px;
    height: 100%;
    padding: 0;
    border-inline-end: 1px solid var(--border);
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.product-card-img img.hover-img {
    position: absolute;
    top: 0; left: 0;
    opacity: 0;
}

.product-card:hover .product-card-img img.main-img {
    opacity: 0;
}

.product-card:hover .product-card-img img.hover-img {
    opacity: 1;
}

.product-card:hover .product-card-img img { transform: none; }

.product-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card-cat {
    font-size: 11px; font-weight: 500;
    color: var(--accent);
    margin-bottom: 8px;
    opacity: 0.8;
}

.product-card-title {
    font-size: 16px; font-weight: 700; margin-bottom: 16px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em; /* Force consistent height for 2 lines */
}

.product-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.product-card-price {
    font-size: 16px; font-weight: 800; color: #fff;
}

.product-card-btn {
    padding: 8px 16px;
    background: var(--accent); color: #fff;
    font-family: var(--font); font-weight: 700; font-size: 13px;
    border: none; border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.product-card-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

/* ===== PRODUCT VIEW (Standalone SEO-friendly) ===== */
.product-view {
    display: none;
    padding: 40px 0 80px;
    margin-top: var(--header-h);
}

.product-view:not(.hidden) { display: block; }

body.view-product .hero-section,
body.view-product #categories,
body.view-product #featured,
body.view-product .category-view {
    display: none;
}

.pv-back {
    margin-bottom: 24px;
}

.pv-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.pv-image {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    min-height: 400px;
}

.pv-image img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.pv-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pv-category {
    font-size: 11px; font-weight: 500; letter-spacing: 1px;
    color: var(--accent); text-transform: uppercase;
}

.pv-price {
    font-size: 28px; font-weight: 700; color: var(--accent);
}

.pv-name {
    font-size: 32px; font-weight: 700; letter-spacing: -0.5px;
    margin-bottom: 16px; line-height: 1.2;
}

.pv-desc {
    font-size: 15px; color: var(--text-secondary);
    line-height: 1.7; margin-bottom: 32px;
}

.pv-specs {
    margin-bottom: 28px;
}

.pv-specs h4 {
    font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-muted);
    margin-bottom: 16px;
}

.pv-specs-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.pv-spec-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    line-height: 1.6;
}

.pv-spec-item:last-child { border-bottom: none; }

.pv-spec-item::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    top: -0.1em;
}

.pv-spec-key {
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}

.pv-spec-key::after {
    content: ':';
    color: var(--text-muted);
    margin-right: 2px;
}

.pv-spec-val {
    color: var(--spec-val);
}

[dir="rtl"] .pv-spec-key::after {
    content: ':';
    margin-right: 2px;
    margin-left: 0;
}

/* Expand / Collapse */
.pv-specs-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 0;
    background: none;
    border: none;
    color: var(--accent);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.pv-specs-toggle:hover {
    color: var(--accent-hover);
    gap: 10px;
}

.pv-specs-toggle i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.pv-specs-toggle.expanded i {
    transform: rotate(180deg);
}

.pv-spec-item.pv-spec-hidden {
    display: none;
}

.pv-custom {
    margin-bottom: 28px;
}

.pv-custom h4 {
    font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-muted);
    margin-bottom: 12px;
}

.custom-group {
    margin-bottom: 12px;
}

.custom-group-label {
    display: block; font-size: 13px; color: var(--text-secondary);
    margin-bottom: 8px;
}

.custom-opts {
    display: flex; flex-wrap: wrap; gap: 8px;
}

.custom-opt {
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-family: var(--font); font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.custom-opt:hover { border-color: var(--accent); color: var(--text); }

.custom-opt.selected {
    background: var(--accent); border-color: var(--accent);
    color: #fff;
}

.pv-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.pv-add { width: 100%; justify-content: center; }
.pv-whatsapp { width: 100%; }

@media (max-width: 768px) {
    .pv-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .pv-image {
        min-height: 280px;
        padding: 32px;
    }
    .pv-image img {
        max-width: 70%;
        max-height: 70%;
    }
    .pv-name {
        font-size: 24px;
    }
    .pv-price {
        font-size: 22px;
    }
    .pv-desc {
        font-size: 14px;
        margin-bottom: 24px;
    }
    .product-view {
        padding: 24px 0 60px;
    }
    .pv-back {
        margin-bottom: 16px;
    }
    .pv-specs h4 {
        margin-bottom: 12px;
    }
    .pv-spec-item {
        padding: 7px 0;
        font-size: 13px;
    }
    .pv-actions {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .pv-image {
        min-height: 220px;
        padding: 24px;
    }
    .pv-image img {
        max-width: 65%;
        max-height: 65%;
    }
    .pv-name {
        font-size: 20px;
    }
    .pv-price {
        font-size: 18px;
    }
    .pv-desc {
        font-size: 13px;
    }
    .pv-spec-item {
        font-size: 12px;
        padding: 6px 0;
    }
}

/* ===== DRAWER OVERLAY ===== */
.drawer-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    opacity: 0;
    transition: opacity var(--transition);
}

.drawer-overlay.open { display: block; opacity: 1; }

.drawer {
    position: fixed; top: 0; bottom: 0;
    inset-inline-end: 0;
    width: 400px; max-width: 100vw;
    background: var(--bg);
    border-inline-start: 1px solid var(--border);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
}

[dir="rtl"] .drawer { transform: translateX(-100%); }

.drawer-overlay.open .drawer { transform: translateX(0); }

.drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.drawer-header h2 {
    font-size: 18px; font-weight: 600;
}

.drawer-close {
    background: none; border: none; color: var(--text-secondary);
    font-size: 18px; cursor: pointer; padding: 8px;
    transition: var(--transition);
}

.drawer-close:hover { color: var(--text); }

.drawer-body {
    flex: 1; overflow-y: auto;
    padding: 16px 24px;
}

.drawer-footer {
    flex-shrink: 0;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

/* ===== CART ===== */
.cart-empty {
    display: flex; flex-direction: column; align-items: center;
    padding: 60px 20px; text-align: center;
}

.cart-empty i { font-size: 40px; color: var(--text-muted); margin-bottom: 16px; }
.cart-empty p { color: var(--text-secondary); font-size: 15px; }

.cart-item {
    display: flex; gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-img {
    width: 64px; height: 64px; flex-shrink: 0;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    padding: 8px;
}

.cart-item-img img { max-width: 100%; max-height: 100%; object-fit: contain; }

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
    font-size: 14px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 4px;
}

.cart-item-specs {
    font-size: 11px; color: var(--text-muted);
    margin-bottom: 8px;
}

.cart-item-bottom {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
}

.cart-item-price {
    font-size: 14px; font-weight: 700; color: var(--accent);
}

.cart-qty {
    display: flex; align-items: center;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    overflow: hidden;
}

.cart-qty button {
    width: 30px; height: 30px;
    background: var(--bg-elevated); border: none;
    color: var(--text); font-size: 14px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}

.cart-qty button:hover { background: var(--bg-surface); color: var(--accent); }

.cart-qty span {
    width: 32px; text-align: center;
    font-size: 13px; font-weight: 600;
}

.cart-item-remove {
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    font-size: 14px; padding: 4px;
    transition: var(--transition);
}

.cart-item-remove:hover { color: #ff4444; }

.cart-total-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; font-size: 14px; color: var(--text-secondary);
}

.cart-total-value {
    font-size: 20px; font-weight: 700; color: var(--accent);
}

#cart-checkout { width: 100%; justify-content: center; }

/* ===== CHECKOUT ===== */
#checkout-form {
    display: flex; flex-direction: column; gap: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
    font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--text-secondary);
}

.form-input {
    width: 100%; height: 46px;
    padding: 0 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font); font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-input:focus { border-color: var(--accent); }

.form-input.error { border-color: #ff4444; }

.form-textarea {
    height: 70px; padding: 12px 14px;
    resize: vertical; min-height: 50px;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: left 14px center;
    padding-inline-end: 40px; padding-inline-start: 14px;
    cursor: pointer;
}

[dir="rtl"] select.form-input {
    background-position: right 14px center;
    padding-inline-end: 14px;
    padding-inline-start: 40px;
}

select.form-input option { background: var(--bg); color: var(--text); }

.form-hint { font-size: 11px; color: var(--text-muted); }

.form-error {
    display: none; padding: 10px 14px;
    background: rgba(255,68,68,0.1); border: 1px solid rgba(255,68,68,0.2);
    border-radius: var(--radius-sm); font-size: 13px; color: #ff4444;
}

.form-error.visible { display: block; }

.checkout-submit { width: 100%; justify-content: center; }

/* ===== SUCCESS ===== */
.success-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 4000;
    align-items: center; justify-content: center;
}

.success-overlay.visible { display: flex; }

.success-modal { text-align: center; }

.checkmark { width: 64px; height: 64px; margin-bottom: 20px; }

.checkmark-circle {
    stroke-dasharray: 166; stroke-dashoffset: 166;
    stroke-width: 2; stroke: var(--accent); fill: none;
    animation: stroke 0.5s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48; stroke-dashoffset: 48;
    stroke: var(--accent); stroke-width: 4;
    fill: none; stroke-linecap: round; stroke-linejoin: round;
    animation: stroke 0.3s 0.3s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

@keyframes stroke { 100% { stroke-dashoffset: 0; } }

.success-modal h3 {
    font-size: 20px; font-weight: 700; margin-bottom: 8px;
    animation: fadeUp 0.4s 0.4s both;
}

.success-modal p {
    color: var(--text-secondary); font-size: 14px;
    animation: fadeUp 0.4s 0.5s both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== LOADING SPINNER ===== */
.loading-container {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 80px 20px; text-align: center;
}

.spinner {
    width: 32px; height: 32px;
    border: 2px solid var(--border); border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-container p { color: var(--text-muted); font-size: 14px; }

/* ===== EMPTY STATE ===== */
.empty-state {
    display: flex; flex-direction: column; align-items: center;
    padding: 60px 20px; text-align: center;
}

.empty-state i { font-size: 36px; color: var(--text-muted); margin-bottom: 16px; }

.empty-state h3 {
    font-size: 18px; font-weight: 600; margin-bottom: 8px;
}

.empty-state p { color: var(--text-secondary); font-size: 14px; }

/* ===== NAV LINKS (Manual) ===== */
.nav-links {
    display: flex; align-items: center; gap: 4px;
}

.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-link:hover { color: var(--text); background: var(--bg-elevated); }
.nav-link.active { color: var(--accent); background: rgba(139, 92, 246, 0.1); }

/* ===== FLOATING BOTTOM NAV ===== */
.bottom-nav {
    display: none;
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    z-index: 900;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 6px;
    gap: 4px;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.bnav-item {
    position: relative;
    display: flex; align-items: center; gap: 6px;
    background: none; border: none;
    color: var(--text-muted);
    font-family: var(--font); font-size: 12px; font-weight: 500;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    transition: var(--transition);
    min-height: 40px;
}

.bnav-item i { font-size: 16px; }

.bnav-item.active {
    background: var(--accent);
    color: #fff;
}

.bnav-item:hover:not(.active) { color: var(--text-secondary); }

.bnav-badge {
    display: none;
    position: absolute; top: 2px; inset-inline-end: 6px;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--accent); color: #fff;
    font-size: 9px; font-weight: 700;
    border-radius: 8px; align-items: center; justify-content: center;
}

.bnav-badge.visible { display: flex; }

/* ===== FOOTER ===== */
#footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 60px;
}

.footer-inner {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 20px;
}

.footer-logo {
    font-size: 16px; font-weight: 700; letter-spacing: 2px;
    display: block; margin-bottom: 4px;
}
[dir="rtl"] .footer-logo { letter-spacing: 0; text-transform: none; }

.footer-brand p { font-size: 13px; color: var(--text-muted); }

.footer-links { display: flex; gap: 20px; }

.footer-links a {
    font-size: 13px; color: var(--text-secondary);
    transition: var(--transition);
}

.footer-links a:hover { color: var(--accent); }

.footer-copy { font-size: 12px; color: var(--text-muted); }

/* ===== FADE-IN OBSERVER ===== */
.fade-section {
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-section.visible {
    opacity: 1; transform: translateY(0);
}

[dir="rtl"] .section-number,
[dir="rtl"] .section-name,
[dir="rtl"] .product-card-cat,
[dir="rtl"] .pv-specs h4,
[dir="rtl"] .pv-custom h4,
[dir="rtl"] .form-group label,
[dir="rtl"] .badge { letter-spacing: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .header-inner { padding: 0 16px; }
    .nav-links { display: none; }

    .bottom-nav { display: flex; }
    .bnav-item { padding: 10px 14px; }
    .bnav-item span { display: none; }
    .bnav-item i { font-size: 18px; }

    .section { padding: 60px 0; }

    .category-grid { grid-template-columns: 1fr; gap: 12px; }
    .cat-card { height: 220px; }

    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card-img { height: 160px; padding: 16px; }
    .product-card-body { padding: 12px 14px 16px; }
    .product-card-title { font-size: 14px; margin-bottom: 8px; }
    .product-card-price { font-size: 14px; }
    .product-card-btn { padding: 6px 12px; font-size: 10px; }

    .drawer { width: 100vw; }
    .drawer-header { padding: 16px; }
    .drawer-body { padding: 12px 16px; }
    .drawer-footer { padding: 16px; }

    #footer { margin-top: 40px; padding: 32px 0; }
    .footer-inner { flex-direction: column; text-align: center; gap: 16px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.6rem; letter-spacing: -1px; }
    .product-card-img { height: 140px; padding: 12px; }
    .product-card-body { padding: 10px 12px 14px; }
    .product-card-title { font-size: 13px; }
    .product-card-price { font-size: 13px; }
    .product-card-btn { padding: 5px 10px; font-size: 9px; }
}
