/* =========================================================================
   Customer Storefront — shared stylesheet
   Jumia-inspired design, English/LTR, responsive (mobile-first).
   Shared by: home, search, category, product, cart, checkout pages.
   ========================================================================= */

:root {
    --bg:           #f7f7fa;
    --surface:      #ffffff;
    --surface-alt:  #fafafa;
    --border:       #e5e5ea;
    --border-2:     #f0f0f3;
    --text:         #1a1a1a;
    --text-soft:    #3a3a3a;
    --text-muted:   #6b7280;

    /* Brand — aligned with admin.css --primary for consistency */
    --primary:      #f68b1e;
    --primary-600:  #e07e10;
    --primary-700:  #c46a08;
    --primary-50:   #fff5e6;
    --accent:       #ac2d00;

    --success:      #10793f;
    --success-bg:   #e7f5ec;
    --warn:         #b45309;
    --warn-bg:      #fef3c7;
    --danger:       #b00020;
    --danger-bg:    #ffecec;

    --radius:       10px;
    --radius-sm:    6px;
    --radius-lg:    14px;
    --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow:       0 4px 14px rgba(0, 0, 0, 0.06);
    --shadow-lg:    0 14px 40px rgba(0, 0, 0, 0.1);

    --font:         'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --header-h:     64px;
    --strip-pad:    14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Utility */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}
.hidden { display: none !important; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =========================================================================
   HEADER
   ========================================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.site-header__bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    height: var(--header-h);
}
.site-header__left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.site-header__logo {
    display: inline-flex; align-items: baseline; gap: 2px;
    font-weight: 900; font-size: 24px; letter-spacing: -0.02em;
    color: #fff;
    padding: 4px 0;
}
.site-header__logo .dot {
    width: 8px; height: 8px; background: #fff; border-radius: 2px;
    display: inline-block; margin-left: 2px;
}
.menu-toggle {
    display: none;
    appearance: none; background: transparent; border: 0;
    color: #fff; padding: 6px;
    font-size: 22px; line-height: 1;
}

/* Search */
.site-search {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    padding: 4px;
    padding-inline-start: 14px;
    min-width: 0;
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
}
.site-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    font-size: 14px;
    padding: 8px 4px;
    width: 100%;
    background: transparent;
    color: var(--text);
}
.site-search button {
    appearance: none; border: 0;
    background: var(--primary-700);
    color: #fff; font-weight: 700; font-size: 13px;
    padding: 8px 18px; border-radius: 999px;
    flex: 0 0 auto;
    white-space: nowrap;
    transition: background .12s;
}
.site-search button:hover { background: #8e4a05; }

.site-header__right {
    display: flex; align-items: center; gap: 6px;
    min-width: 0;
}
.hdr-btn {
    appearance: none; background: transparent; border: 0;
    color: #fff; padding: 8px 10px;
    border-radius: 8px;
    font-weight: 600; font-size: 13px;
    display: inline-flex; align-items: center; gap: 6px;
    transition: background .12s;
}
.hdr-btn:hover { background: rgba(255,255,255,0.12); }
.hdr-btn .ic { font-size: 20px; line-height: 1; }
.hdr-btn .label { display: inline; }
.hdr-account .label {
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hdr-account.is-signed-in {
    background: rgba(16, 121, 63, 0.22);
}
.hdr-account.is-signed-in:hover {
    background: rgba(16, 121, 63, 0.34);
}
.hdr-cart { position: relative; }
.cart-badge {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 18px; height: 18px;
    background: #fff; color: var(--primary-700);
    border-radius: 999px;
    font-size: 11px; font-weight: 800;
    display: grid; place-items: center;
    padding: 0 4px;
}
.cart-badge[hidden] { display: none; }

/* Account menu */
.account-wrap { position: relative; }
.account-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff; color: var(--text);
    min-width: 220px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 10px;
    display: none;
    z-index: 40;
}
.account-menu.is-open { display: block; }
.account-menu__title { font-size: 13px; color: var(--text-muted); padding: 4px 8px 10px; border-bottom: 1px solid var(--border-2); }
.account-menu a, .account-menu button {
    display: flex; align-items: center; gap: 10px;
    width: 100%; text-align: left;
    padding: 9px 10px;
    font-size: 13px; font-weight: 600;
    background: transparent; border: 0;
    border-radius: var(--radius-sm);
    color: var(--text-soft);
}
.account-menu a:hover, .account-menu button:hover { background: var(--primary-50); color: var(--primary-700); }

/* =========================================================================
   PAGE SHELL
   ========================================================================= */

.page {
    flex: 1;
    width: 100%;
    padding: 20px 0 48px;
}
.page__title {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.page__sub {
    margin: -10px 0 18px;
    color: var(--text-muted);
    font-size: 14px;
}
.breadcrumbs {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.breadcrumbs a:hover { color: var(--primary-700); }
.breadcrumbs .sep { opacity: .5; }

/* =========================================================================
   HOME — hero row + categories sidebar
   ========================================================================= */

.home-hero {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    margin-top: 16px;
    min-width: 0;
}

/* Sidebar */
.cats-sidebar {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 6px;
    align-self: start;
    max-height: 440px;
    overflow-y: auto;
}
.cats-sidebar__title {
    padding: 10px 12px 8px;
    font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
    color: var(--text-muted);
}
.cat-link {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 14px; font-weight: 600;
    color: var(--text-soft);
    transition: background .12s, color .12s;
}
.cat-link:hover { background: var(--primary-50); color: var(--primary-700); }
.cat-link .chev { font-size: 16px; color: var(--text-muted); }
.cat-link:hover .chev { color: var(--primary-700); }

/* Hero slider */
.hero-slider {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 280px;
    min-width: 0;
    box-shadow: var(--shadow-sm);
}
.hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 6;
}
.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-width: 0;
    opacity: 0;
    transition: opacity .5s ease;
    pointer-events: none;
    cursor: pointer;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide:hover .hero-slide__cta { background: var(--primary-600); }
.hero-slide__body { padding: 28px 32px; min-width: 0; }
.hero-slide__kicker {
    display: inline-block;
    background: var(--primary-50); color: var(--primary-700);
    font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.hero-slide__title {
    font-size: 26px; font-weight: 900; letter-spacing: -0.02em;
    line-height: 1.2; margin: 0 0 10px;
}
.hero-slide__desc {
    color: var(--text-muted); font-size: 14px; margin: 0 0 16px;
    max-width: 340px;
}
.hero-slide__cta {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--primary); color: #fff;
    padding: 10px 18px; border-radius: 8px;
    font-weight: 700; font-size: 13px;
    border: 0;
    transition: background .12s;
}
.hero-slide__cta:hover { background: var(--primary-600); }
.hero-slide__art {
    height: 100%; width: 100%;
    background: var(--surface-alt);
    display: grid; place-items: center;
    position: relative;
    overflow: hidden;
}
.hero-slide__art img { width: 100%; height: 100%; object-fit: cover; }

.hero-dots {
    position: absolute;
    bottom: 12px; left: 32px;
    display: flex; gap: 6px;
    z-index: 2;
}
.hero-dots button {
    appearance: none; border: 0;
    width: 18px; height: 4px;
    border-radius: 999px;
    background: rgba(0,0,0,0.18);
    transition: background .12s, width .12s;
}
.hero-dots button.is-active { background: var(--primary); width: 28px; }

.hero-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #fff; color: var(--text);
    border: 0;
    box-shadow: var(--shadow);
    display: grid; place-items: center;
    font-size: 20px; font-weight: 800;
    z-index: 2;
    transition: background .12s, color .12s;
}
.hero-arrow:hover { background: var(--primary); color: #fff; }
.hero-arrow--prev { left: 10px; }
.hero-arrow--next { right: 10px; }

/* Promo chips row */
.promos {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}
.promo {
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px 10px;
    box-shadow: var(--shadow-sm);
    transition: transform .15s, box-shadow .15s;
}
.promo:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.promo__icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--primary-50); color: var(--primary-700);
    display: grid; place-items: center;
    font-size: 22px; font-weight: 800;
    margin-bottom: 8px;
}
.promo__title { font-size: 12px; font-weight: 800; }
.promo__sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* =========================================================================
   PRODUCT STRIPS (horizontal scrollers) + GRID
   ========================================================================= */

.strip {
    margin-top: 28px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.strip__head {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--primary);
    color: #fff;
    padding: 10px 16px;
}
.strip__title {
    font-size: 15px; font-weight: 800; letter-spacing: .01em;
    display: flex; align-items: center; gap: 10px;
}
.strip__see-all {
    appearance: none; background: rgba(255,255,255,0.15);
    border: 0; color: #fff;
    padding: 7px 14px; border-radius: 999px;
    font-size: 12px; font-weight: 800;
    display: inline-flex; align-items: center; gap: 6px;
    transition: background .12s;
}
.strip__see-all:hover { background: rgba(255,255,255,0.28); }

.strip__body {
    position: relative;
    padding: var(--strip-pad);
}
.strip__row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px;
}
.strip__row::-webkit-scrollbar { display: none; }
.strip__row > * { flex: 0 0 auto; scroll-snap-align: start; }

/* Horizontal scroll arrows */
.strip__arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: grid; place-items: center;
    font-size: 22px; font-weight: 800;
    color: var(--text);
    z-index: 2;
    transition: background .12s, color .12s, opacity .12s;
}
.strip__arrow:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.strip__arrow[disabled] { opacity: 0; pointer-events: none; }
.strip__arrow--prev { left: 6px; }
.strip__arrow--next { right: 6px; }

/* Product grid (search/category) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

/* Product card */
.card {
    display: flex; flex-direction: column;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border-2);
    overflow: hidden;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    text-align: left;
    width: 100%;
    /* For strip rows only — the grid overrides this */
}
.strip__row .card { width: 200px; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border); }

.card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--surface-alt);
    overflow: hidden;
}
.card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.card:hover .card__media img { transform: scale(1.04); }
.card__media--placeholder {
    display: grid; place-items: center;
    color: var(--text-muted);
    font-size: 12px; font-weight: 700;
}
.card__discount {
    position: absolute;
    top: 8px; left: 8px;
    background: var(--primary-50);
    color: var(--primary-700);
    font-size: 11px; font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
}
.card__body {
    padding: 10px 12px 14px;
    display: grid; gap: 4px;
}
.card__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}
.card__name:hover { color: var(--primary-700); }
.card__price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.card__price { font-size: 15px; font-weight: 800; color: var(--text); }
.card__price-old { font-size: 12px; color: var(--text-muted); text-decoration: line-through; }
.card__add {
    appearance: none;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 9px 10px;
    margin-top: 8px;
    transition: background .12s, opacity .12s;
}
.card__add:hover { background: var(--primary-600); }
.card__add:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}

.no-results {
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.store-status-banner {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #fed7aa;
    border-radius: var(--radius);
    background: #fff7ed;
    color: #9a3412;
    box-shadow: var(--shadow-sm);
}
.store-status-banner strong { font-weight: 900; }
.store-status-banner span { font-size: 14px; }

/* Pagination (reuses pagination.js — styles copied from admin.css) */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 20px 14px 6px; flex-wrap: wrap; }
.page-btn {
    min-width: 34px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text);
}
.page-btn:hover { background: var(--primary-50); border-color: var(--primary); color: var(--primary-700); }
.page-btn.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: .5; cursor: not-allowed; }
.page-btn:disabled:hover { background: #fff; border-color: var(--border); color: var(--text); }

/* =========================================================================
   PRODUCT DETAIL
   ========================================================================= */

.product-detail {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 28px;
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.product-gallery { display: grid; gap: 10px; }
.product-gallery__main {
    aspect-ratio: 1 / 1;
    background: var(--surface-alt);
    border-radius: var(--radius);
    overflow: hidden;
    display: grid; place-items: center;
}
.product-gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.product-gallery__thumbs {
    display: flex; gap: 8px; flex-wrap: wrap;
}
.product-gallery__thumbs button {
    width: 60px; height: 60px;
    background: var(--surface-alt);
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
}
.product-gallery__thumbs button.is-active { border-color: var(--primary); }
.product-gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-info { display: grid; gap: 14px; align-content: start; }
.product-info__cat {
    display: inline-block;
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--primary-700);
}
.product-info__name {
    margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.01em;
    line-height: 1.25;
}
.product-info__price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.product-info__price { font-size: 26px; font-weight: 900; color: var(--text); }
.product-info__price-old { font-size: 15px; color: var(--text-muted); text-decoration: line-through; }
.product-info__discount {
    background: var(--primary-50); color: var(--primary-700);
    font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 4px;
}
.product-info__stock {
    font-size: 13px; font-weight: 700;
    padding: 4px 10px; border-radius: 999px;
    display: inline-block; width: fit-content;
}
.product-info__stock--in { background: var(--success-bg); color: var(--success); }
.product-info__stock--low { background: var(--warn-bg); color: var(--warn); }
.product-info__stock--out { background: var(--danger-bg); color: var(--danger); }

.product-info__desc {
    color: var(--text-soft); font-size: 14px; line-height: 1.6; white-space: pre-wrap;
}

.qty-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.qty-stepper {
    display: inline-flex; align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.qty-stepper button {
    appearance: none; border: 0; background: #fff;
    width: 34px; height: 36px;
    font-size: 18px; font-weight: 800; color: var(--text-soft);
}
.qty-stepper button:hover { background: var(--primary-50); color: var(--primary-700); }
.qty-stepper input {
    width: 48px; text-align: center;
    border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border);
    height: 36px; font-size: 14px; font-weight: 700;
    outline: 0;
    font-family: inherit;
    -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.btn {
    appearance: none; border: 0; cursor: pointer;
    border-radius: 8px; padding: 12px 20px;
    font-weight: 800; font-size: 14px; font-family: inherit;
    transition: background .12s, transform .05s, opacity .1s;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-600); }
.btn--ghost { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--surface-alt); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--block { display: flex; width: 100%; }
.btn--lg { padding: 14px 24px; font-size: 15px; }

/* =========================================================================
   CART / CHECKOUT
   ========================================================================= */

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}
.cart-items {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.cart-row {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid var(--border-2);
}
.cart-row:last-child { border-bottom: 0; }
.cart-row__img {
    width: 80px; height: 80px;
    border-radius: 8px;
    background: var(--surface-alt);
    overflow: hidden;
}
.cart-row__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-row__name { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.35; }
.cart-row__name:hover { color: var(--primary-700); }
.cart-row__price { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.cart-row__total { font-size: 15px; font-weight: 800; min-width: 80px; text-align: right; }
.cart-row__remove {
    appearance: none; background: transparent; border: 0;
    color: var(--text-muted); font-size: 18px;
    padding: 6px 8px; border-radius: 6px;
}
.cart-row__remove:hover { background: var(--danger-bg); color: var(--danger); }

.cart-summary {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 18px;
    position: sticky;
    top: calc(var(--header-h) + 12px);
    display: grid;
    gap: 12px;
}
.cart-summary h3 { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.cart-summary__row { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-soft); }
.cart-summary__row--total {
    padding-top: 10px; border-top: 1px solid var(--border-2);
    font-size: 17px; font-weight: 900; color: var(--text);
}
.cart-empty {
    background: #fff;
    border-radius: var(--radius);
    padding: 48px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.cart-empty h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.cart-empty p { margin: 0 0 18px; color: var(--text-muted); font-size: 14px; }

/* Checkout */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}
.form-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}
.form-card h3 { margin: 0 0 14px; font-size: 16px; font-weight: 800; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field__label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.field input, .field textarea {
    appearance: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color .12s, box-shadow .12s;
}
.field input:focus, .field textarea:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(246,139,30,0.18);
}
.field textarea { resize: vertical; min-height: 92px; }
.form-error {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}
.form-ok {
    background: var(--success-bg);
    color: var(--success);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

/* Geolocation share block on the checkout form. Sits between the
   shipping address textarea and the submit button. Optional — failures
   degrade silently so the customer can still place the order. */
.geo-share {
    display: grid;
    gap: 10px;
    padding: 14px;
    margin-bottom: 18px;
    background: var(--surface-alt);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}
.geo-share.is-shared {
    background: var(--success-bg);
    border-style: solid;
    border-color: rgba(16,121,63,0.35);
}
.geo-share__copy { display: grid; gap: 4px; font-size: 13px; line-height: 1.45; }
.geo-share__copy strong { font-size: 14px; font-weight: 800; color: var(--text); }
.geo-share__copy span { color: var(--text-muted); }
.geo-share__status {
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-soft);
}
.geo-share__status[data-kind="ok"] {
    background: #fff;
    border-color: rgba(16,121,63,0.35);
    color: var(--success);
    font-weight: 600;
}
.geo-share__status[data-kind="info"] { color: var(--text-muted); }

.payment-methods {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}
.payment-methods__head h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 800;
}
.payment-methods__head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}
.payment-login-note {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-soft);
    font-size: 13px;
    padding: 10px 12px;
}
.payment-login-note a {
    color: var(--primary);
    font-weight: 800;
    text-decoration: underline;
}
.payment-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.payment-option {
    cursor: pointer;
    display: block;
}
.payment-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.payment-option__body {
    display: grid;
    gap: 4px;
    min-height: 86px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    transition: border-color .12s, box-shadow .12s, background .12s;
}
.payment-option__body strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}
.payment-option__body small {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}
.payment-option input:checked + .payment-option__body {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(246,139,30,0.16);
    background: #fffaf4;
}
.payment-wait,
.payment-result {
    text-align: left;
    padding: 32px;
    max-width: 640px;
    margin: 0 auto;
}
.payment-result h3,
.payment-wait h3 {
    text-align: center;
}
.payment-modal-open {
    overflow: hidden;
}
.payment-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.62);
    display: grid;
    place-items: center;
    padding: 18px;
}
.payment-modal__dialog {
    width: min(960px, 100%);
    height: min(760px, 94vh);
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
}
.payment-modal__head,
.payment-modal__foot {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 13px;
}
.payment-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.payment-modal__foot {
    border-top: 1px solid var(--border);
    border-bottom: 0;
    color: var(--text-muted);
}
.payment-modal__close {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}
.payment-modal__frame {
    width: 100%;
    height: 100%;
    border: 0;
}

.mini-items { display: grid; gap: 10px; margin-bottom: 12px; }
.mini-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.mini-item__img { width: 48px; height: 48px; border-radius: 6px; background: var(--surface-alt); overflow: hidden; }
.mini-item__img img { width: 100%; height: 100%; object-fit: cover; }
.mini-item__name { font-weight: 600; color: var(--text-soft); line-height: 1.35; }
.mini-item__qty { color: var(--text-muted); font-size: 12px; }
.mini-item__total { font-weight: 800; }

/* Toast */
.toast {
    position: fixed;
    bottom: 24px; left: 50%; transform: translateX(-50%);
    background: #1a1a1a; color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13px; font-weight: 700;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}
.toast.is-show {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}
.toast.is-error { background: var(--danger); }
.toast.is-success { background: var(--success); }

/* Skeletons */
.skeleton {
    background: linear-gradient(90deg, #ececec 0%, #f5f5f5 50%, #ececec 100%);
    background-size: 200% 100%;
    animation: shine 1.4s linear infinite;
    border-radius: 6px;
}
@keyframes shine { to { background-position: -200% 0; } }
.skel-card { height: 260px; }

/* Footer */
.site-footer {
    background: #1e1e22;
    color: #c9c9d1;
    margin-top: 40px;
    padding: 28px 0 20px;
    font-size: 13px;
}
.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 24px;
}
.site-footer h4 {
    color: #fff;
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a:hover { color: var(--primary); }
.site-footer__copy {
    margin-top: 24px; padding-top: 16px;
    border-top: 1px solid #2a2a30;
    color: #8a8a96;
    font-size: 12px;
    text-align: center;
}

/* Category drawer (mobile) */
.drawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 49;
    display: none;
}
.drawer-backdrop.is-open { display: block; }
.drawer {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 280px; max-width: 85vw;
    background: #fff;
    z-index: 50;
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%);
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.drawer__title { font-weight: 800; }
.drawer__close { appearance: none; background: transparent; border: 0; font-size: 22px; color: var(--text-muted); }
.drawer__body { padding: 10px; overflow-y: auto; flex: 1; }

/* =========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================= */

/* Tablet-desktop (< 1200): 4-up strips (handled by min-width card). */

@media (max-width: 1024px) {
    .home-hero { grid-template-columns: 220px 1fr; }
    .promos { grid-template-columns: repeat(4, 1fr); }
    .product-detail { grid-template-columns: 1fr; }
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .checkout-layout { grid-template-columns: 1fr; }
    .payment-options { grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .strip__row .card { width: 180px; }
}

@media (max-width: 840px) {
    .menu-toggle { display: inline-flex; }
    .home-hero { grid-template-columns: 1fr; }
    .cats-sidebar { display: none; }
    .hdr-btn .label { display: none; }
    .site-header__bar { grid-template-columns: auto 1fr auto; }
    .hero-slider { min-height: 260px; }
    .hero-slides { aspect-ratio: auto; min-height: inherit; }
    .hero-slide { grid-template-columns: 1fr; }
    .hero-slide__art { position: absolute; inset: 0; z-index: 0; opacity: .42; }
    .hero-slide__art img { object-position: center; }
    .hero-slide__body {
        position: relative;
        z-index: 1;
        padding: 24px;
        width: 100%;
        max-width: 430px;
    }
    .strip__arrow { display: none; }
    .strip__row .card { width: 160px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .cart-row {
        grid-template-columns: 60px 1fr auto;
        grid-template-areas:
            "img name remove"
            "img qty  total";
        row-gap: 10px;
    }
    .cart-row__img       { grid-area: img; width: 60px; height: 60px; }
    .cart-row__name-wrap { grid-area: name; }
    .cart-row__qty       { grid-area: qty; }
    .cart-row__total     { grid-area: total; align-self: end; }
    .cart-row__remove    { grid-area: remove; align-self: start; justify-self: end; }
}

@media (max-width: 560px) {
    :root { --header-h: 56px; }
    .site-header__bar {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "left right"
            "search search";
        height: auto;
        min-height: var(--header-h);
        gap: 8px;
        padding-top: 8px;
        padding-bottom: 8px;
    }
    .site-header__left { grid-area: left; }
    .site-search {
        grid-area: search;
        max-width: none;
        margin: 0;
        padding-inline-start: 12px;
    }
    .site-search input {
        min-height: 36px;
        padding: 8px 6px;
    }
    .site-search button {
        min-height: 36px;
        max-width: 42%;
        padding: 7px 12px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .site-header__right {
        grid-area: right;
        justify-self: end;
    }
    .site-header__logo { font-size: 20px; }
    .site-search button { font-size: 12px; }
    .promos { grid-template-columns: repeat(3, 1fr); }
    .home-hero {
        display: block;
        margin-top: 12px;
    }
    .hero-slider {
        width: 100%;
        min-height: 240px;
        border-radius: 8px;
    }
    .hero-slide__body {
        padding: 20px;
        max-width: none;
    }
    .hero-slide__desc {
        max-width: 100%;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .hero-slide__cta {
        padding: 9px 14px;
    }
    .hero-slide__title { font-size: 20px; }
    .strip__title { font-size: 13px; }
    .strip__row .card { width: 150px; }
    .grid { grid-template-columns: repeat(2, 1fr); }
    .site-footer__grid { grid-template-columns: 1fr; }
    .page { padding: 12px 0 36px; }
    .page__title { font-size: 18px; }
    .form-card { padding: 16px; }
    .payment-option__body { min-height: auto; }
    .payment-modal { padding: 0; }
    .payment-modal__dialog {
        width: 100%;
        height: 100dvh;
        border-radius: 0;
    }
    .payment-modal__head,
    .payment-modal__foot {
        padding: 10px 12px;
    }
    .card__body { padding: 8px 10px 12px; }
    .card__name { font-size: 12px; min-height: 2.6em; }
    .card__price { font-size: 14px; }
}

/* =========================================================================
   Offers Page Styles
   ========================================================================= */

.offers-page {}

.offers-hero {
    background: linear-gradient(135deg, var(--primary-50) 0%, #fff 100%);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    text-align: center;
}

.offers-hero__title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--text);
}

.offers-hero__subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0;
}

.offers-section {
    margin-bottom: 32px;
}

.offers-section__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.offers-section__title .badge {
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.offer-card {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease;
}

.offer-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.offer-card__image {
    position: relative;
    aspect-ratio: 1;
    background: var(--surface-alt);
}

.offer-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.offer-card__discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
}

.offer-card__body {
    padding: 14px;
}

.offer-card__name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.offer-card__prices {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.offer-card__price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-700);
}

.offer-card__original {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.offer-card__savings {
    font-size: 12px;
    color: var(--success);
    font-weight: 600;
}

.admin-replace-btn {
    width: 100%;
    padding: 8px 12px;
    background: var(--surface-alt);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all .15s ease;
}

.admin-replace-btn:hover {
    background: var(--primary-50);
    border-color: var(--primary);
    color: var(--primary-700);
}

@media (max-width: 840px) {
    .offers-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .offers-hero { padding: 24px; }
    .offers-hero__title { font-size: 24px; }
}

@media (max-width: 560px) {
    .offers-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .offers-hero { padding: 20px; }
    .offers-hero__title { font-size: 20px; }
    .offer-card__body { padding: 10px; }
    .offer-card__name { font-size: 12px; }
}

/* =========================================================================
   Weighted Products — weight selector
   ========================================================================= */

.weight-selector {
    margin: 16px 0;
}

.weight-selector__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-soft);
}

.weight-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.weight-btn {
    appearance: none;
    background: var(--surface-alt);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all .15s ease;
}

.weight-btn:hover {
    border-color: var(--primary);
    background: var(--primary-50);
}

.weight-btn.is-active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.product-info__price-note {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 8px;
}

/* =========================================================================
   Weighted Products — Product Card Dropdown
   ========================================================================= */

.card__weighted-badge {
    display: inline-block;
    font-size: 11px;
    color: var(--primary-700);
    background: var(--primary-50);
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 8px;
    font-weight: 500;
}

.card__weight-select {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    margin-bottom: 8px;
    cursor: pointer;
}

.card__weight-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* =========================================================================
   RTL Support for Arabic
   ========================================================================= */

/* NOTE: The following components need manual RTL review:
   - Dropdown menus (account menu) - may need left/right positioning swap
   - Modals (payment modal, wallet modal, replace modal) - generally center, OK
   - Toast notifications - position is centered, OK
   - Slider arrows - need visual review in RTL mode
   - Strip scroll arrows - direction logic works but visual review needed
   - Pagination arrows - direction logic works
   - Breadcrumb separators - may need to swap direction
*/

[dir="rtl"] {
    text-align: right;
}

/* Header - reverse the layout for RTL */
[dir="rtl"] .site-header__bar {
    /* Keep logo on right side in RTL */
}

[dir="rtl"] .site-header__left {
    order: 2;
}

[dir="rtl"] .site-header__right {
    order: 0;
}

[dir="rtl"] .site-search {
    order: 1;
}

/* Breadcrumbs */
[dir="rtl"] .breadcrumbs {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

[dir="rtl"] .breadcrumbs .sep {
    transform: rotate(180deg);
}

/* Home hero - put categories sidebar on right in RTL */
[dir="rtl"] .home-hero {
    grid-template-columns: 1fr 240px;
}

[dir="rtl"] .cats-sidebar {
    order: 2;
}

[dir="rtl"] .hero-slider {
    order: 1;
}

@media (max-width: 840px) {
    [dir="rtl"] .home-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    [dir="rtl"] .home-hero {
        display: block;
    }
}

/* Category link chevrons point the other way in RTL */
[dir="rtl"] .cat-link .chev {
    transform: rotate(180deg);
}

/* Input fields should be right-aligned in RTL */
[dir="rtl"] input,
[dir="rtl"] textarea {
    text-align: right;
}

/* Cart rows - RTL adjustments */
[dir="rtl"] .cart-row {
    direction: rtl;
}

[dir="rtl"] .cart-row__name-wrap {
    text-align: right;
}

/* Order card adjustments */
[dir="rtl"] .order-card__head {
    direction: rtl;
}

/* Strip headers */
[dir="rtl"] .strip__head {
    direction: rtl;
}

[dir="rtl"] .strip__see-all {
    direction: ltr;
}

/* Promos section */
[dir="rtl"] .promos {
    direction: rtl;
}

/* Product info */
[dir="rtl"] .product-info {
    text-align: right;
}

[dir="rtl"] .product-info__price-row {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

/* Payment options */
[dir="rtl"] .payment-options {
    direction: rtl;
}

/* Cart summary */
[dir="rtl"] .cart-summary {
    text-align: right;
}

/* Form card */
[dir="rtl"] .form-card {
    text-align: right;
}

[dir="rtl"] .field input,
[dir="rtl"] .field textarea {
    text-align: right;
}

/* Auth card */
[dir="rtl"] .auth-card {
    text-align: right;
}

/* Footer */
[dir="rtl"] .site-footer__grid {
    direction: rtl;
}

[dir="rtl"] .site-footer__copy {
    direction: rtl;
}

/* Offers page */
[dir="rtl"] .offers-hero,
[dir="rtl"] .offers-section {
    text-align: right;
}

[dir="rtl"] .offers-section__title {
    flex-direction: row-reverse;
}

/* Order detail */
[dir="rtl"] .order-detail {
    text-align: right;
}

[dir="rtl"] .order-detail__grid {
    direction: rtl;
}

/* Mini items in checkout */
[dir="rtl"] .mini-item {
    direction: rtl;
}

/* Geo share block */
[dir="rtl"] .geo-share {
    text-align: right;
}

/* Quantity stepper */
[dir="rtl"] .qty-stepper {
    direction: ltr; /* Keep numbers LTR */
}

/* Weight buttons */
[dir="rtl"] .weight-buttons {
    direction: rtl;
}

/* Modal content */
[dir="rtl"] .payment-modal__dialog {
    text-align: right;
}

/* Weight selector */
[dir="rtl"] .weight-selector {
    text-align: right;
}
