/* Mega100 Bazaar — Storefront Stylesheet
   Calm, Eye-Friendly Palette • Strong Typography • 100% Mobile/iPhone/Tablet/Desktop Responsive */

:root {
    --bg: #F6F8FA;
    --surface: #FFFFFF;
    --surface-soft: #F1F5F9;
    --border: #E2E8F0;
    --text: #0F172A;
    --text-muted: #475569;
    --text-light: #64748B;

    --primary: #0F766E;
    --primary-hover: #0D645E;
    --primary-soft: #F0FDFA;

    /* 4 Distinct, Gentle, Eye-Friendly Shop Zone Colors */
    --rs100-fg: #B45309;
    --rs100-bg: #FEF3C7;
    --dollar-fg: #15803D;
    --dollar-bg: #DCFCE7;
    --riyal-fg: #0369A1;
    --riyal-bg: #E0F2FE;
    --pound-fg: #4338CA;
    --pound-bg: #E0E7FF;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    padding-bottom: env(safe-area-inset-bottom);
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: inherit; text-decoration: none; }

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

/* Announcement Bar */
.announcement-bar {
    background: #0F172A;
    color: #F8FAFC;
    font-size: 0.84rem;
    font-weight: 500;
    text-align: center;
    padding: 8px 12px;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 68px;
    padding-top: 8px;
    padding-bottom: 8px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    display: grid;
    place-items: center;
}
.brand-text strong {
    display: block;
    font-size: 1.06rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.brand-text small {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.header-search {
    flex: 1;
    position: relative;
    max-width: 480px;
}
.header-search input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 40px;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 0.92rem;
    transition: border-color 0.2s, background 0.2s;
}
.header-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}
.search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-light);
    pointer-events: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-ghost:hover { background: var(--surface-soft); }

.btn-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px;
    border-radius: 11px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.btn-cart:hover { background: var(--primary-hover); }
.btn-cart:active { transform: scale(0.98); }
.cart-badge {
    background: #fff;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding: 0 5px;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 11px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.94rem;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 11px;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
}
.btn-outline:hover { background: var(--surface-soft); }

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 11px;
    border: 1.5px solid #16A34A;
    background: #F0FDF4;
    color: #15803D;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
}
.btn-whatsapp:hover { background: #DCFCE7; }
.btn-full { width: 100%; }

/* Hero Section */
.hero-section { padding: 24px 0 12px; }
.hero-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 1.05fr 1.15fr;
    gap: 28px;
    align-items: center;
}
.hero-pill {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}
.hero-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(1.55rem, 2.8vw, 2.25rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
}
.hero-copy p {
    margin: 0 0 20px;
    color: var(--text-muted);
    font-size: 0.98rem;
}
.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.shop-zones-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.zone-card {
    text-align: left;
    border: 1.5px solid var(--border);
    background: var(--bg);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.zone-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    background: #fff;
}
.zone-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 8px;
}
.zone-rs100 .zone-badge { background: var(--rs100-bg); color: var(--rs100-fg); }
.zone-dollar .zone-badge { background: var(--dollar-bg); color: var(--dollar-fg); }
.zone-riyal .zone-badge { background: var(--riyal-bg); color: var(--riyal-fg); }
.zone-pound .zone-badge { background: var(--pound-bg); color: var(--pound-fg); }

.zone-card h3 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 800; color: var(--text); }
.zone-card p { margin: 0 0 10px; font-size: 0.82rem; color: var(--text-muted); line-height: 1.35; }
.zone-count { font-size: 0.78rem; font-weight: 700; color: var(--primary); }

/* Catalog Section */
.catalog-section { padding: 18px 0 48px; }

.shop-tabs-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 2px 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.shop-tabs-bar::-webkit-scrollbar { display: none; }

.shop-tab {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
}
.shop-tab:hover { border-color: var(--primary); }
.shop-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.tab-num {
    font-size: 0.75rem;
    background: rgba(15, 23, 42, 0.08);
    padding: 2px 7px;
    border-radius: 999px;
}
.shop-tab.active .tab-num {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.filter-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px 0 20px;
}
.category-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cat-pill {
    height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}
.cat-pill.active {
    background: #0F172A;
    border-color: #0F172A;
    color: #fff;
}
.sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    color: var(--text-muted);
    font-weight: 600;
}
.sort-wrap select {
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-weight: 600;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.16s, box-shadow 0.16s;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.prod-img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #F1F5F9;
    overflow: hidden;
    cursor: pointer;
}
.prod-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s;
}
.product-card:hover .prod-img-wrap img { transform: scale(1.04); }

.shop-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 9px;
    border-radius: 7px;
}
.shop-tag.rs100 { background: var(--rs100-bg); color: var(--rs100-fg); }
.shop-tag.dollar { background: var(--dollar-bg); color: var(--dollar-fg); }
.shop-tag.riyal { background: var(--riyal-bg); color: var(--riyal-fg); }
.shop-tag.pound { background: var(--pound-bg); color: var(--pound-fg); }

.save-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #0F172A;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 6px;
}

.prod-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.prod-cat {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 4px;
}
.prod-title {
    margin: 0 0 8px;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
    cursor: pointer;
}
.prod-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 12px;
}
.prod-price {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--primary);
}
.prod-compare {
    font-size: 0.84rem;
    color: var(--text-light);
    text-decoration: line-through;
}
.prod-stock-out {
    font-size: 0.76rem;
    color: #DC2626;
    font-weight: 700;
    margin-left: auto;
}
.btn-add {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-add:hover { background: var(--primary-hover); }
.btn-add:disabled { background: #CBD5E1; color: #64748B; cursor: not-allowed; }

.loading-state, .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
}

/* Trust Strip */
.trust-strip {
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 28px 0;
}
.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.trust-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-soft);
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.trust-item strong { display: block; font-size: 0.94rem; }
.trust-item p { margin: 2px 0 0; font-size: 0.82rem; color: var(--text-muted); }

/* Footer */
.site-footer {
    background: #0F172A;
    color: #CBD5E1;
    padding: 40px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 28px;
    margin-bottom: 28px;
}
.footer-brand { font-size: 1.2rem; color: #fff; display: block; margin-bottom: 8px; }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: 0.95rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-meta { font-size: 0.86rem; color: #94A3B8; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 18px;
    font-size: 0.84rem;
    color: #94A3B8;
}

/* Cart Drawer */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 100vw);
    background: #fff;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -8px 0 30px rgba(15, 23, 42, 0.15);
}
.cart-drawer.open { transform: translateX(0); }
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}
.drawer-header h3 { margin: 0; font-size: 1.1rem; font-weight: 800; }
.icon-close {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: none;
    background: var(--surface-soft);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text);
}
.free-ship-bar {
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.84rem;
    font-weight: 700;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border);
}
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cart-row {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.cart-row img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--surface-soft);
}
.cart-row-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.cart-row-meta { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 8px; }
.qty-ctrl {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.qty-ctrl button {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--surface-soft);
    font-weight: 800;
    cursor: pointer;
}
.qty-ctrl span { padding: 0 10px; font-weight: 700; font-size: 0.88rem; }
.cart-remove {
    background: none;
    border: none;
    color: #DC2626;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
    cursor: pointer;
}
.drawer-footer {
    padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: #F8FAFC;
    display: grid;
    gap: 10px;
}
.cart-totals { display: grid; gap: 6px; font-size: 0.92rem; }
.total-row { display: flex; justify-content: space-between; }
.total-row.grand {
    font-size: 1.08rem;
    padding-top: 6px;
    border-top: 1px solid var(--border);
    color: var(--primary);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal-box {
    background: #fff;
    border-radius: 18px;
    width: min(600px, 100%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}
.modal-sm { width: min(420px, 100%); }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; font-size: 1.1rem; font-weight: 800; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 0.84rem; font-weight: 700; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 0.94rem;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.payment-info-box {
    background: var(--primary-soft);
    border: 1px solid #99F6E4;
    border-radius: 10px;
    padding: 12px;
    font-size: 0.88rem;
    color: #115E59;
    font-weight: 600;
}
.checkout-summary {
    margin-top: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    font-size: 0.9rem;
}
.text-center { text-align: center; }
.success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #DCFCE7;
    color: #15803D;
    font-size: 2rem;
    font-weight: 800;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
}
.order-id-pill {
    display: inline-block;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 1.05rem;
    margin: 10px 0;
}
.muted-small { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 18px; }

.track-form { display: flex; gap: 8px; margin-bottom: 16px; }
.track-form input {
    flex: 1;
    height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
}
.track-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    background: var(--bg);
}
.status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: var(--primary-soft);
    color: var(--primary);
}

.qv-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
.qv-layout img { border-radius: 12px; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

/* Toast */
.toast {
    position: fixed;
    left: 50%;
    bottom: 84px;
    transform: translateX(-50%) translateY(20px);
    background: #0F172A;
    color: #fff;
    padding: 11px 18px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 200;
    white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--border);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(4, 1fr);
}
.mnav-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 0;
}
.mnav-btn svg { width: 22px; height: 22px; }
.mnav-btn.active { color: var(--primary); }
.mnav-cart-wrap { position: relative; display: inline-flex; }
.mnav-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: var(--primary);
    color: #fff;
    font-size: 0.68rem;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding: 0 4px;
}

/* Responsive Breakpoints (Tablet, Mobile, iPhone) */
@media (max-width: 1024px) {
    .hero-card { grid-template-columns: 1fr; padding: 22px; }
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
    .header-inner { flex-wrap: wrap; gap: 10px; }
    .header-search { order: 3; flex-basis: 100%; max-width: 100%; }
    .hide-sm { display: none !important; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .footer-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .qv-layout { grid-template-columns: 1fr; }
    .mobile-bottom-nav { display: grid; }
}

@media (max-width: 480px) {
    .hide-xs { display: none !important; }
    .hero-card { padding: 16px; border-radius: 16px; }
    .shop-zones-grid { gap: 8px; }
    .zone-card { padding: 12px; }
    .zone-card h3 { font-size: 0.94rem; }
    .prod-body { padding: 10px; }
    .prod-title { font-size: 0.88rem; }
    .prod-price { font-size: 1.05rem; }
    .trust-grid { grid-template-columns: 1fr; }
}

.brand-logo-img { width: 42px; height: 42px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--border); padding: 2px; flex-shrink: 0; }

/* === 10/10 STOREFRONT MODAL SCROLLING & UNIVERSAL DEVICE POLISH === */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
body.modal-open {
    overflow: hidden;
}
.cart-drawer {
    height: 100vh;
    height: 100dvh;
}
.modal-backdrop {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.modal-box {
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin: auto;
}
.modal-box > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.modal-header, .modal-footer {
    flex-shrink: 0;
}
.modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important; /* Prevents iPhone Safari zoom on focus */
    }
    .modal-backdrop {
        padding: 10px;
        align-items: flex-end;
    }
    .modal-box {
        max-height: calc(100dvh - 20px);
    }
}

/* === 10/10 REAL-SHOP 3D ANIMATED SHOWCASE & INTERACTIVE TILT === */
.hero-card {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 24px;
}
.shop-zones-grid {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 4px;
}

/* 3D Boutique Floating Pedestal Stage */
.shop-3d-stage {
    position: relative;
    background: linear-gradient(160deg, #F8FAFC 0%, #EEF2F6 52%, #E6F4F1 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 1000px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 12px 30px rgba(15, 23, 42, 0.07);
}
.stage-spotlight {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    height: 180px;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.14) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}
.stage-header-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
}
.stage-aisle-pill {
    font-size: 0.74rem;
    font-weight: 800;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--rs100-bg);
    color: var(--rs100-fg);
    letter-spacing: 0.02em;
}
.stage-aisle-pill.rs100 { background: var(--rs100-bg); color: var(--rs100-fg); }
.stage-aisle-pill.dollar { background: var(--dollar-bg); color: var(--dollar-fg); }
.stage-aisle-pill.riyal { background: var(--riyal-bg); color: var(--riyal-fg); }
.stage-aisle-pill.pound { background: var(--pound-bg); color: var(--pound-fg); }

.stage-nav-btns { display: flex; gap: 6px; }
.stage-arrow {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.9);
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.stage-arrow:hover { background: #fff; transform: scale(1.06); }

.stage-object-wrap {
    position: relative;
    width: 190px;
    height: 190px;
    margin: 10px 0 6px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transform-style: preserve-3d;
    animation: float3d 3.8s ease-in-out infinite;
    z-index: 2;
}
.stage-object-wrap.switching {
    animation: stagePopIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.stage-object-wrap img {
    width: 176px;
    height: 176px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 22px 34px -10px rgba(15, 23, 42, 0.24), 0 0 0 4px rgba(255,255,255,0.85);
    transition: transform 0.3s ease;
}
.stage-object-wrap:hover img {
    transform: scale(1.04) rotateY(-8deg) rotateX(5deg);
}
.stage-price-tag {
    position: absolute;
    right: -8px;
    bottom: 10px;
    background: #0F172A;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.25);
    transform: translateZ(30px);
}
.stage-pedestal {
    width: 160px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.22) 0%, rgba(15, 23, 42, 0.05) 55%, rgba(15, 23, 42, 0) 75%);
    margin-bottom: 12px;
    animation: shadowPulse 3.8s ease-in-out infinite;
}
.stage-footer-row {
    width: 100%;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index: 2;
}
.stage-info { min-width: 0; }
.stage-info strong {
    display: block;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stage-info small { font-size: 0.75rem; color: var(--text-muted); }
.stage-add-btn { min-height: 36px; padding: 0 14px; font-size: 0.84rem; flex-shrink: 0; }

.stage-dots {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    z-index: 2;
}
.stage-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    border: none;
    padding: 0;
    background: #CBD5E1;
    cursor: pointer;
    transition: width 0.2s, background 0.2s;
}
.stage-dot.active { width: 20px; background: var(--primary); }

@keyframes float3d {
    0%, 100% { transform: translateY(0px) rotateY(-4deg) rotateX(2deg); }
    50%      { transform: translateY(-9px) rotateY(5deg) rotateX(-2deg); }
}
@keyframes shadowPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50%      { transform: scale(0.84); opacity: 0.55; }
}
@keyframes stagePopIn {
    0%   { opacity: 0; transform: scale(0.88) rotateY(-18deg) translateY(12px); }
    100% { opacity: 1; transform: scale(1) rotateY(0deg) translateY(0); }
}

/* Interactive 3D Real-Shop Shelf Cards */
.products-grid {
    perspective: 1200px;
}
.product-card {
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.2s ease;
    box-shadow: 0 6px 16px -6px rgba(15, 23, 42, 0.08), 0 3px 0 0 #E2E8F0;
}
.product-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255,255,255,0.42), rgba(255,255,255,0) 62%);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
    z-index: 3;
}
.product-card:hover::after { opacity: 1; }
.product-card:hover {
    border-color: #99F6E4;
    box-shadow: 0 22px 36px -14px rgba(15, 118, 110, 0.22), 0 5px 0 0 #CCFBF1;
}
.product-card .prod-img-wrap {
    transform: translateZ(12px);
    background: radial-gradient(circle at 50% 45%, #FFFFFF 0%, #EEF2F6 100%);
}
.product-card .prod-img-wrap img {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-card:hover .prod-img-wrap img {
    transform: scale(1.07) translateY(-3px);
}
.product-card .shop-tag,
.product-card .save-tag {
    transform: translateZ(24px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

/* Smooth 3D Scroll Entrance */
.card-reveal {
    opacity: 0;
    transform: translateY(22px) rotateX(8deg) scale(0.97);
}
.card-reveal.visible {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
    transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 3D Interactive Quick-View Pedestal */
.qv-3d-stage {
    position: relative;
    background: radial-gradient(circle at 50% 40%, #FFFFFF 0%, #EEF2F6 78%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 900px;
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
}
.qv-3d-stage:active { cursor: grabbing; }
.qv-3d-stage img {
    width: 100%;
    max-width: 240px;
    border-radius: 16px;
    box-shadow: 0 24px 36px -12px rgba(15, 23, 42, 0.26);
    transition: transform 0.12s ease-out;
    will-change: transform;
}
.qv-3d-hint {
    margin-top: 10px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 4px 10px;
    border-radius: 999px;
}

/* Cart Pop Pulse on Add */
@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    40%      { transform: scale(1.14); }
    70%      { transform: scale(0.95); }
}
.cart-pulse { animation: cartBounce 0.38s ease; }

@media (max-width: 1024px) {
    .hero-card { grid-template-columns: 1fr; }
    .shop-zones-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .stage-object-wrap { width: 162px; height: 162px; }
    .stage-object-wrap img { width: 150px; height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
    .stage-object-wrap, .stage-pedestal { animation: none !important; }
    .card-reveal { opacity: 1 !important; transform: none !important; }
}

/* === CLEAN, CRISP, ROCK-STEADY 2D STOREFRONT (ZERO WOBBLE / ZERO TILT) === */
.stage-object-wrap, .stage-pedestal {
    animation: none !important;
    transform: none !important;
}
.stage-object-wrap:hover img {
    transform: scale(1.02) !important;
}
.product-card {
    transform-style: flat !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease !important;
}
.product-card::after { display: none !important; }
.product-card:hover {
    transform: translateY(-2px) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.09) !important;
}
.product-card .prod-img-wrap {
    transform: none !important;
    background: #F8FAFC !important;
}
.product-card .prod-img-wrap img {
    object-fit: cover !important;
    padding: 0 !important;
}
.product-card:hover .prod-img-wrap img {
    transform: scale(1.03) !important;
}
.card-reveal {
    opacity: 1 !important;
    transform: none !important;
}
.qv-3d-stage {
    cursor: default !important;
    background: #F8FAFC !important;
}
.qv-3d-hint { display: none !important; }

/* ============================================================
   DPRMart v10.0 — Flagship Zero-Overlap Luxury Redesign
   ============================================================ */
body { background: #F7F5F0 !important; }

.utility-topbar {
    background: #0B191E;
    color: #E2E8F0;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(201, 164, 92, 0.35);
}
.utility-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 7px 0; flex-wrap: wrap;
}
.utility-msg { font-weight: 600; color: #F6D37B; }
.utility-links { display: flex; align-items: center; gap: 14px; }
.utility-links a, .utility-links button {
    background: none; border: none; padding: 0; color: #F8FAFC;
    font-family: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer;
    text-decoration: none; white-space: nowrap; transition: color 0.15s;
}
.utility-links a:hover, .utility-links button:hover { color: #00F5D4; }

.site-header {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #E5E0D5 !important;
}
.header-inner { gap: 14px !important; }
.brand-logo-img { border-radius: 11px !important; box-shadow: 0 4px 12px rgba(11, 25, 30, 0.18); }

.header-search { position: relative; }
.header-search input { padding-right: 44px !important; background: #F8FAFC !important; border-color: #CBD5E1 !important; }
.voice-btn {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; border-radius: 8px; border: none;
    background: transparent; cursor: pointer; font-size: 0.95rem;
    display: grid; place-items: center; transition: background 0.15s;
}
.voice-btn:hover { background: #E2E8F0; }
.voice-btn.listening { background: #FEE2E2; animation: pulseMic 1s infinite; }
@keyframes pulseMic { 0%,100% { transform: translateY(-50%) scale(1); } 50% { transform: translateY(-50%) scale(1.12); } }

.btn-3d-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #0B191E, #153842);
    color: #00F5D4 !important; border: 1px solid rgba(0, 245, 212, 0.45);
    padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 0.84rem;
    text-decoration: none; white-space: nowrap;
    box-shadow: 0 6px 16px rgba(11, 25, 30, 0.18);
}
.btn-3d-pill:hover { filter: brightness(1.12); }

.hero-card {
    background: linear-gradient(135deg, #0B191E 0%, #122E36 58%, #0F2329 100%) !important;
    border: 1px solid rgba(201, 164, 92, 0.45) !important;
    color: #FFFFFF !important;
}
.hero-card h1 { color: #FFFFFF !important; }
.hero-card p { color: #CBD5E1 !important; }
.hero-pill {
    background: rgba(201, 164, 92, 0.18) !important;
    color: #F6D37B !important;
    border: 1px solid rgba(201, 164, 92, 0.45) !important;
}
.hero-cta-row .btn-outline {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #00F5D4 !important;
    border-color: rgba(0, 245, 212, 0.55) !important;
}

/* Smart Budget Auto-Fill Strip */
.smart-budget-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    background: linear-gradient(135deg, #0B191E, #14323B);
    color: #FFFFFF; border: 1px solid rgba(201, 164, 92, 0.45);
    border-radius: 16px; padding: 14px 18px; margin-bottom: 18px;
    box-shadow: 0 10px 26px rgba(11, 25, 30, 0.14);
}
.sb-copy { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.86rem; }
.sb-tag {
    background: rgba(0, 245, 212, 0.16); color: #00F5D4; border: 1px solid rgba(0, 245, 212, 0.4);
    padding: 3px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 800;
}
.sb-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sb-btns button {
    border: 1px solid rgba(255,255,255,0.22); background: rgba(255,255,255,0.10); color: #FFFFFF;
    padding: 8px 13px; border-radius: 10px; font-family: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer;
}
.sb-btns button:hover { background: #0F766E; border-color: #0F766E; }
.sb-btns button.sb-gold { background: #C9A45C; color: #0B191E; border-color: #C9A45C; }

/* Product Card Compare Button */
.btn-compare-mini {
    position: absolute; bottom: 8px; right: 8px; z-index: 4;
    background: rgba(11, 25, 30, 0.84); color: #F6D37B; border: 1px solid rgba(201, 164, 92, 0.5);
    border-radius: 8px; padding: 4px 8px; font-size: 0.72rem; font-weight: 700; cursor: pointer;
}
.btn-compare-mini.selected { background: #0F766E; color: #FFFFFF; border-color: #00F5D4; }

.compare-float-bar {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 42;
    background: #0B191E; color: #FFFFFF; border: 1px solid #C9A45C;
    border-radius: 999px; padding: 8px 16px; display: none; align-items: center; gap: 14px;
    box-shadow: 0 16px 36px rgba(0,0,0,0.32); font-size: 0.84rem; font-weight: 700;
}
.compare-float-bar.show { display: flex; }

@media (max-width: 720px) {
    .utility-msg { display: none; }
    .utility-inner { justify-content: center; }
    .btn-3d-pill span { display: none; }
    .smart-budget-bar { padding: 12px 14px; }
    .compare-float-bar { bottom: 72px; width: calc(100vw - 24px); justify-content: space-between; border-radius: 14px; }
}
