/* ==========================================================
   SMART Store — shared tokens + storefront styles (RTL)
   ========================================================== */
:root {
    --green-50: #effaf2;
    --green-100: #d8f3df;
    --green-200: #b2e6c1;
    --green-300: #7fd39b;
    --green-400: #45b86f;
    --green-500: #22a447;
    --green-600: #15873a;
    --green-700: #126c31;
    --green-800: #12562a;
    --green-900: #0f4724;
    --ink: #1c2620;
    --ink-2: #4a5850;
    --muted: #7d8a83;
    --line: #e3ebe6;
    --bg: #f5f8f6;
    --card: #ffffff;
    --red: #e5484d;
    --red-50: #fdecec;
    --amber: #f59e0b;
    --amber-50: #fff6e0;
    --blue: #2f7de1;
    --blue-50: #e8f1fd;
    --purple: #7c5cdb;
    --purple-50: #f0ebfd;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(16, 40, 24, .05), 0 4px 16px rgba(16, 40, 24, .06);
    --shadow-lg: 0 12px 40px rgba(16, 40, 24, .14);
    --logo-accent: var(--green-500);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* The whole site is shown at 90% on laptop/desktop screens. Phones and tablets stay at 100%
   so text and buttons remain easy to read and tap. --zoom lets full-height elements compensate. */
:root { --zoom: 1; }
@media (min-width: 1100px) {
    :root { --zoom: .9; }
    html { zoom: .9; }
}
body {
    margin: 0;
    font-family: 'Cairo', system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
small { font-size: .78em; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.text-green { color: var(--green-600); }
.text-red { color: var(--red); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
    font-weight: 700; font-size: 14px; cursor: pointer; transition: .15s ease; white-space: nowrap;
    background: var(--green-600); color: #fff;
}
.btn:hover { background: var(--green-700); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-light { background: var(--green-50); color: var(--green-700); }
.btn-light:hover { background: var(--green-100); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--green-400); color: var(--green-700); background: #fff; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #c93a3f; }
.btn-ghost-danger { background: var(--red-50); color: var(--red); }
.btn-ghost-danger:hover { background: #fbd5d6; }
.btn-white { background: #fff; color: var(--green-700); }
.btn-white:hover { background: var(--green-50); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.input, .select, .textarea {
    width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--green-400); box-shadow: 0 0 0 3px var(--green-100); }
.textarea { min-height: 96px; resize: vertical; }
.input.is-invalid { border-color: var(--red); }
.error { color: var(--red); font-size: 12.5px; font-weight: 600; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--green-600); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Alerts ---------- */
.alert {
    display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm);
    margin-bottom: 16px; font-weight: 600; font-size: 14px;
}
.alert-success { background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-200); }
.alert-error { background: var(--red-50); color: #a12a2e; border: 1px solid #f6c6c8; }
.alert-info { background: var(--blue-50); color: #1d5aa8; border: 1px solid #c8dcf7; }
.alert ul { margin: 0; padding-inline-start: 18px; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 700; white-space: nowrap; line-height: 1.6;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.st-pending { background: var(--amber-50); color: #b45309; }
.st-processing { background: var(--blue-50); color: var(--blue); }
.st-out_for_delivery { background: var(--purple-50); color: var(--purple); }
.st-delivered { background: var(--green-50); color: var(--green-700); }
.st-cancelled { background: var(--red-50); color: var(--red); }
.pay-paid { background: var(--green-50); color: var(--green-700); }
.pay-pending { background: #f1f3f2; color: var(--ink-2); }
.pay-failed { background: var(--red-50); color: var(--red); }
.pay-refunded { background: var(--purple-50); color: var(--purple); }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--green-800); color: #d9f2e1; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 38px; gap: 16px; }
.topbar a { opacity: .9; } .topbar a:hover { opacity: 1; color: #fff; }
.topbar-links { display: flex; gap: 18px; align-items: center; }
.topbar-links i { margin-inline-end: 4px; }

.header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header .container { display: flex; align-items: center; gap: 18px; height: 78px; }
.header .brand { flex-shrink: 0; color: #2b2f33; display: flex; }
.header .brand .logo { height: 52px; width: auto; }
.cat-toggle { flex-shrink: 0; }
.search { flex: 1; display: flex; position: relative; }
.search input {
    width: 100%; height: 46px; border: 2px solid var(--green-100); border-radius: 12px; padding: 0 18px 0 56px;
    background: var(--green-50); outline: none; transition: .15s;
}
.search input:focus { border-color: var(--green-500); background: #fff; }
.search button {
    position: absolute; left: 5px; top: 5px; height: 36px; width: 44px; border-radius: 9px; border: 0;
    background: var(--green-600); color: #fff; cursor: pointer;
}
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.icon-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; min-width: 46px; padding: 0 14px; border-radius: 12px; background: var(--green-50);
    color: var(--green-700); font-weight: 700; font-size: 14px; border: 0; cursor: pointer;
}
.icon-btn:hover { background: var(--green-100); }
.icon-btn i { font-size: 18px; }
.cart-count {
    position: absolute; top: -6px; left: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
    background: var(--red); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center;
    justify-content: center; border: 2px solid #fff;
}
.cart-count[data-count="0"] { display: none; }

.nav-cats { background: #fff; border-bottom: 1px solid var(--line); }
.nav-cats .container { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 8px; }
.nav-cats .container::-webkit-scrollbar { display: none; }
.nav-cats a {
    flex-shrink: 0; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink-2);
}
.nav-cats a:hover, .nav-cats a.active { background: var(--green-50); color: var(--green-700); }
.nav-cats a.hot { color: var(--red); }

/* Category drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(10, 30, 18, .45); z-index: 90; opacity: 0; pointer-events: none; transition: .2s; }
.drawer {
    position: fixed; top: 0; bottom: 0; right: 0; width: 320px; max-width: 86vw; background: #fff; z-index: 100;
    transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column;
}
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 17px; }
.drawer-body { overflow-y: auto; padding: 10px; }
.drawer-body a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; font-weight: 600; }
.drawer-body a:hover { background: var(--green-50); color: var(--green-700); }
.drawer-body .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--green-50); display: grid; place-items: center; font-size: 19px; }

/* Announcement ticker */
.ticker { background: var(--green-600); color: #fff; overflow: hidden; font-size: 14px; font-weight: 600; }
.ticker-track { display: flex; gap: 60px; width: max-content; padding: 9px 0; animation: ticker 40s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- Hero ---------- */
.hero { padding: 22px 0 8px; }
.hero-grid { display: grid; grid-template-columns: 2.2fr 1fr; gap: 16px; }
.hero-main {
    position: relative; overflow: hidden; border-radius: 22px; min-height: 340px; padding: 44px;
    background: radial-gradient(circle at 15% 85%, rgba(255,255,255,.14) 0 120px, transparent 121px),
                radial-gradient(circle at 8% 15%, rgba(255,255,255,.08) 0 70px, transparent 71px),
                linear-gradient(135deg, var(--green-700), var(--green-500));
    color: #fff; display: flex; flex-direction: column; justify-content: center;
}
.hero-main h1 { font-size: 40px; line-height: 1.25; margin: 10px 0 12px; font-weight: 900; max-width: 560px; }
.hero-main p { font-size: 17px; opacity: .92; max-width: 480px; margin: 0 0 24px; }
.hero-main .pill { align-self: flex-start; background: rgba(255,255,255,.18); padding: 5px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.hero-main .hero-art { position: absolute; left: 30px; bottom: 10px; font-size: 150px; line-height: 1; filter: drop-shadow(0 18px 30px rgba(0,0,0,.25)); }
.hero-main .hero-art span { display: inline-block; transform: rotate(-8deg); }
.hero-side { display: grid; gap: 16px; }
.hero-card {
    border-radius: 22px; padding: 24px; display: flex; flex-direction: column; justify-content: center; gap: 6px;
    position: relative; overflow: hidden; min-height: 162px;
}
.hero-card h3 { margin: 0; font-size: 21px; font-weight: 800; }
.hero-card p { margin: 0 0 8px; font-size: 14px; opacity: .85; }
.hero-card .art { position: absolute; left: 16px; bottom: 8px; font-size: 70px; opacity: .95; }
.hero-card.c1 { background: #fff4d6; color: #7a4a00; }
.hero-card.c2 { background: var(--green-100); color: var(--green-900); }
.hero-card .btn { align-self: flex-start; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 6px; }
.feature { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.feature i { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--green-50); color: var(--green-600); font-size: 19px; flex-shrink: 0; }
.feature b { display: block; font-size: 14.5px; }
.feature span { font-size: 12.5px; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 26px 0 6px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.section-head h2 { margin: 0; font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ''; width: 5px; height: 24px; border-radius: 4px; background: var(--green-500); }
.see-all { color: var(--green-600); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.see-all:hover { color: var(--green-800); }

.cats-row { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 12px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-weight: 700; font-size: 13.5px; }
.cat-tile .ico {
    width: 100%; aspect-ratio: 1; border-radius: 20px; background: #fff; display: grid; place-items: center;
    font-size: 42px; box-shadow: var(--shadow); transition: .2s; border: 2px solid transparent; overflow: hidden;
}
.cat-tile .ico img { width: 100%; height: 100%; object-fit: cover; }
.cat-tile:hover .ico { border-color: var(--green-400); transform: translateY(-3px); }
.cat-tile small { color: var(--muted); font-weight: 600; }

.brands-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.brand-chip {
    flex-shrink: 0; min-width: 130px; height: 70px; border-radius: var(--radius); background: #fff; display: grid; place-items: center;
    font-weight: 800; color: var(--green-800); box-shadow: var(--shadow); border: 2px solid transparent; padding: 0 16px;
}
.brand-chip:hover { border-color: var(--green-300); }

/* ---------- Product cards ---------- */
.products-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 14px) / 5); gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.products-row > * { scroll-snap-align: start; }
.products-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.product-card {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
    display: flex; flex-direction: column; position: relative; transition: .2s; border: 1px solid transparent;
}
.product-card:hover { box-shadow: var(--shadow-lg); border-color: var(--green-200); transform: translateY(-2px); }
.product-media {
    aspect-ratio: 1 / .86; display: grid; place-items: center; background: linear-gradient(160deg, var(--green-50), #fff 70%);
    font-size: 76px; position: relative;
}
.product-media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.product-badge {
    position: absolute; top: 10px; right: 10px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800;
    padding: 3px 10px; border-radius: 999px;
}
.product-badge.out { background: #6b7280; }
.product-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-brand { font-size: 12px; color: var(--green-600); font-weight: 700; }
.product-name { font-weight: 700; font-size: 14.5px; line-height: 1.45; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-name:hover { color: var(--green-700); }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.price { font-size: 18px; font-weight: 900; color: var(--green-700); }
.price small { font-size: 12px; font-weight: 700; }
.old-price { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.product-card form { margin-top: 10px; }
.add-btn { width: 100%; }
.add-btn.added { background: var(--green-800); }

/* ---------- Shop page ---------- */
.page-head { background: linear-gradient(135deg, var(--green-700), var(--green-500)); color: #fff; padding: 28px 0; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 900; }
.crumbs { font-size: 13.5px; opacity: .9; margin-bottom: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { text-decoration: underline; }
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: start; }
.filters { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; position: sticky; top: 96px; }
.filters h4 { margin: 0 0 10px; font-size: 15px; }
.filter-group { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 14px; }
.filter-group:last-child { border: 0; margin: 0; padding: 0; }
.filter-list { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.filter-list a { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.filter-list a:hover, .filter-list a.active { background: var(--green-50); color: var(--green-700); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .select { width: auto; min-width: 190px; padding: 9px 12px; }
.empty {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 54px 20px; text-align: center;
}
.empty .ico { font-size: 60px; margin-bottom: 8px; }
.empty h3 { margin: 0 0 6px; }
.empty p { color: var(--muted); margin: 0 0 16px; }

/* ---------- Product page ---------- */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; background: #fff; border-radius: 20px; padding: 26px; box-shadow: var(--shadow); }
.pdp-media { border-radius: 16px; background: linear-gradient(160deg, var(--green-50), #fff); aspect-ratio: 1; display: grid; place-items: center; font-size: 180px; position: relative; }
.pdp-media img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.pdp h1 { font-size: 26px; margin: 4px 0 10px; line-height: 1.4; }
.pdp .price { font-size: 30px; }
.pdp-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
.pdp-meta div { background: var(--bg); padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.pdp-meta b { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { width: 40px; height: 44px; border: 0; background: var(--green-50); color: var(--green-700); font-size: 18px; cursor: pointer; font-weight: 800; }
.qty button:hover { background: var(--green-100); }
.qty input { width: 54px; height: 44px; border: 0; text-align: center; font-weight: 800; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty.sm button { width: 32px; height: 36px; font-size: 15px; }
.qty.sm input { width: 42px; height: 36px; }
.buy-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.trust div { text-align: center; padding: 12px 8px; border: 1px dashed var(--green-200); border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--green-800); }
.trust i { display: block; font-size: 20px; margin-bottom: 4px; color: var(--green-500); }

/* ---------- Cart / checkout ---------- */
.two-col { display: grid; grid-template-columns: 1fr 380px; gap: 22px; align-items: start; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-title { font-size: 17px; font-weight: 800; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.card-title i { color: var(--green-600); }
.cart-line { display: grid; grid-template-columns: 84px 1fr auto auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border: 0; }
.thumb { width: 84px; height: 84px; border-radius: 12px; background: var(--green-50); display: grid; place-items: center; font-size: 40px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb.sm { width: 52px; height: 52px; font-size: 26px; border-radius: 10px; }
.line-total { font-weight: 800; min-width: 110px; text-align: left; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14.5px; }
.summary-row.total { border-top: 2px dashed var(--line); margin-top: 8px; padding-top: 14px; font-size: 19px; font-weight: 900; color: var(--green-800); }
.free-ship { background: var(--green-50); border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 700; color: var(--green-800); margin-bottom: 10px; }
.progress { height: 7px; background: var(--green-100); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress span { display: block; height: 100%; background: var(--green-500); border-radius: 99px; }
.pay-options { display: grid; gap: 10px; }
.pay-option { display: flex; align-items: center; gap: 12px; border: 2px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; transition: .15s; }
.pay-option:has(input:checked) { border-color: var(--green-500); background: var(--green-50); }
.pay-option input { accent-color: var(--green-600); width: 18px; height: 18px; }
.pay-option .pay-ico { font-size: 22px; color: var(--green-600); width: 28px; text-align: center; }
.pay-option b { display: block; }
.pay-option span { font-size: 12.5px; color: var(--muted); }
.card-brands { display: flex; gap: 6px; margin-inline-start: auto; font-size: 26px; color: #1a1f71; }
.card-brands .fa-cc-mastercard { color: #eb001b; }

/* ---------- Account ---------- */
.account-hero { background: linear-gradient(135deg, var(--green-800), var(--green-600)); color: #fff; border-radius: 20px; padding: 26px; display: flex; align-items: center; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.avatar { width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 30px; font-weight: 900; overflow: hidden; flex-shrink: 0; border: 3px solid rgba(255,255,255,.4); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-hero h1 { margin: 0; font-size: 24px; }
.account-hero p { margin: 2px 0 0; opacity: .85; }
.mini-stats { display: flex; gap: 10px; margin-inline-start: auto; flex-wrap: wrap; }
.mini-stats div { background: rgba(255,255,255,.14); border-radius: 12px; padding: 10px 16px; text-align: center; min-width: 96px; }
.mini-stats b { display: block; font-size: 20px; }
.mini-stats span { font-size: 12px; opacity: .85; }
.tabs { display: flex; gap: 6px; background: #fff; padding: 6px; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 18px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.tabs a.active { background: var(--green-600); color: #fff; }
.order-card { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; transition: .15s; }
.order-card:hover { border-color: var(--green-300); background: #fcfefc; }
.order-card .num { font-weight: 800; font-size: 15.5px; }
.order-card .meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* Tracking steps */
.tracker { display: flex; justify-content: space-between; position: relative; margin: 10px 0 6px; }
.tracker::before { content: ''; position: absolute; top: 21px; right: 40px; left: 40px; height: 4px; background: var(--line); border-radius: 4px; }
.tracker .bar { position: absolute; top: 21px; right: 40px; height: 4px; background: var(--green-500); border-radius: 4px; transition: width .4s; }
.step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.step .dot { width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 3px solid var(--line); display: grid; place-items: center; font-size: 17px; }
.step.done { color: var(--green-700); }
.step.done .dot { background: var(--green-500); border-color: var(--green-500); color: #fff; }
.step.current .dot { box-shadow: 0 0 0 6px var(--green-100); }
.step small { font-weight: 600; color: var(--muted); }
.cancelled-banner { background: var(--red-50); color: var(--red); border-radius: 12px; padding: 14px; text-align: center; font-weight: 800; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 22px 16px 0; border-right: 2px solid var(--line); margin-right: 6px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; right: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--green-500); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--green-200); }
.timeline b { display: block; font-size: 14px; }
.timeline span { font-size: 12.5px; color: var(--muted); }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: right; font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 10px 12px; background: var(--bg); white-space: nowrap; }
.table th:first-child { border-radius: 0 10px 10px 0; }
.table th:last-child { border-radius: 10px 0 0 10px; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafcfb; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh / var(--zoom) - 200px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 960px; display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); }
.auth-side { background: linear-gradient(150deg, var(--green-800), var(--green-500)); color: #fff; padding: 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; --logo-accent: #a7f3c0; }
.auth-side .logo { width: 220px; height: auto; color: #fff; }
.auth-side h2 { font-size: 28px; margin: 0 0 8px; line-height: 1.35; }
.auth-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.auth-side li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.auth-side li i { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.16); display: grid; place-items: center; }
.auth-form { padding: 44px; }
.auth-form h1 { margin: 0 0 4px; font-size: 26px; }
.auth-form > p { margin: 0 0 24px; color: var(--muted); }
.demo-box { margin-top: 20px; background: var(--bg); border-radius: 12px; padding: 12px 14px; font-size: 13px; }
.demo-box b { color: var(--green-700); }
.demo-box button { border: 0; background: #fff; border-radius: 8px; padding: 6px 10px; margin: 4px 0 0 4px; cursor: pointer; font-weight: 700; font-size: 12.5px; box-shadow: var(--shadow); }
.demo-box button:hover { color: var(--green-700); }

/* ---------- Footer ---------- */
.footer { background: #102419; color: #b9cbbf; margin-top: 50px; padding: 46px 0 0; font-size: 14px; --logo-accent: var(--green-400); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 30px; }
.footer .logo { width: 190px; height: auto; color: #fff; margin-bottom: 14px; }
.footer h4 { color: #fff; margin: 0 0 14px; font-size: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer a:hover { color: var(--green-300); }
.footer li i { width: 20px; color: var(--green-400); }
.socials { display: flex; gap: 8px; margin-top: 14px; }
.socials a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); display: grid; place-items: center; }
.socials a:hover { background: var(--green-600); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 36px; padding: 18px 0; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.pay-icons { display: flex; gap: 10px; font-size: 28px; color: #fff; }

/* ---------- Toast ---------- */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 30px); background: var(--green-800); color: #fff;
    padding: 12px 20px; border-radius: 12px; font-weight: 700; box-shadow: var(--shadow-lg); z-index: 200; opacity: 0;
    transition: .25s; display: flex; align-items: center; gap: 10px; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.whatsapp-float { position: fixed; bottom: 22px; right: 22px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; font-size: 30px; box-shadow: var(--shadow-lg); z-index: 60; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 24px 0 0; flex-wrap: wrap; list-style: none; padding: 0; }
.pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow); font-weight: 700; font-size: 14px; }
.pagination .active span { background: var(--green-600); color: #fff; }
.pagination .disabled span { opacity: .45; }
.pagination a:hover { color: var(--green-700); background: var(--green-50); }

/* ---------- Payment sandbox ---------- */
.pay-box { max-width: 520px; margin: 40px auto; }
.fake-card { border-radius: 18px; padding: 24px; color: #fff; background: linear-gradient(135deg, #12562a, #22a447); min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow-lg); margin-bottom: 18px; }
.fake-card .chip { width: 46px; height: 34px; border-radius: 7px; background: linear-gradient(135deg, #f7d774, #c99a2e); }
.fake-card .num { font-size: 22px; letter-spacing: 3px; font-weight: 700; direction: ltr; text-align: left; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .cats-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .products-row { grid-auto-columns: calc((100% - 3 * 14px) / 4); }
    .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .hero-grid, .two-col, .shop-layout, .pdp, .auth-card { grid-template-columns: 1fr; }
    .hero-side { grid-template-columns: 1fr 1fr; }
    .features { grid-template-columns: repeat(2, 1fr); }
    .filters { position: static; }
    .auth-side { display: none; }
    .topbar .hide-sm { display: none; }
}
@media (max-width: 720px) {
    .header .container { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 10px; }
    .header .brand .logo { height: 40px; }
    .search { order: 3; flex-basis: 100%; }
    .header-actions { margin-inline-start: auto; }
    .header-actions .label { display: none; }
    .cat-toggle .label { display: none; }
    .hero-main { padding: 28px 22px; min-height: 280px; }
    .hero-main h1 { font-size: 27px; }
    .hero-main .hero-art { font-size: 90px; opacity: .35; }
    .hero-side { grid-template-columns: 1fr; }
    .products-row { grid-auto-columns: 46%; }
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .cats-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
    .cat-tile .ico { font-size: 30px; border-radius: 16px; }
    .product-media { font-size: 56px; }
    .product-body { padding: 10px; }
    .price { font-size: 16px; }
    .cart-line { grid-template-columns: 64px 1fr auto; }
    .cart-line .thumb { width: 64px; height: 64px; }
    .cart-line .line-total { grid-column: 2; text-align: right; }
    .footer-grid { grid-template-columns: 1fr; }
    .tracker::before, .tracker .bar { top: 17px; }
    .step .dot { width: 38px; height: 38px; font-size: 14px; }
    .step { font-size: 11.5px; }
    .mini-stats { margin: 0; width: 100%; }
    .mini-stats div { flex: 1; }
    .auth-form { padding: 28px 20px; }
    .pdp { padding: 16px; }
    .pdp-media { font-size: 120px; }
    .features { grid-template-columns: 1fr; }
}

/* ---------- Phones & tablets ---------- */
.filters-toggle { display: none; }
@media (max-width: 900px) {
    .filters-toggle { display: flex; margin-bottom: 4px; }
    .filters { display: none; }
    .filters.open { display: block; }
    .two-col > aside.card { position: static !important; }
    .toolbar .select { min-width: 0; flex: 1; }
    .toolbar form { flex: 1; display: flex; justify-content: flex-end; }
}
@media (max-width: 768px) {
    /* 16px stops iPhone Safari from zooming in when a field is focused. */
    .input, .select, .textarea, .search input { font-size: 16px; }
    .section-head h2 { font-size: 19px; }
    .page-head { padding: 20px 0; margin-bottom: 16px; }
    .page-head h1 { font-size: 22px; }
    .card { padding: 16px; }
    .pdp h1 { font-size: 21px; }
    .pdp .price { font-size: 24px; }
    .buy-row .btn { flex: 1 1 100%; }
    .order-card { grid-template-columns: 1fr; }
    .order-card > div:last-child { flex-direction: row !important; justify-content: space-between; align-items: center !important; }
    .account-hero { padding: 20px; }
    .tabs form { margin-inline-start: 0 !important; }
    .whatsapp-float { width: 50px; height: 50px; font-size: 26px; bottom: 16px; right: 16px; }
    .footer { margin-top: 32px; padding-top: 32px; }
}
@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .topbar .container { justify-content: center; }
    .topbar .container > .topbar-links:first-child { display: none; }
    .hero { padding-top: 14px; }
    .hero-main h1 { font-size: 24px; }
    .hero-main p { font-size: 15px; }
    .hero-main .btn-lg { padding: 12px 18px; font-size: 15px; }
    .cats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .product-name { font-size: 13.5px; min-height: 39px; }
    .product-card .add-btn { padding: 8px 6px; font-size: 12.5px; }
    .old-price { font-size: 12px; }
    .summary-row.total { font-size: 17px; }
    .tracker::before, .tracker .bar { right: 20px; left: 20px; }
    .step small { display: none; }
}
/* Tracker steps must be allowed to shrink on narrow screens. */
.step { min-width: 0; }
@media (max-width: 480px) {
    .step { font-size: 11px; line-height: 1.35; }
    .step .dot { width: 34px; height: 34px; font-size: 13px; }
    .tracker::before, .tracker .bar { top: 15px; }
}

.two-col > *, .shop-layout > *, .hero-grid > * { min-width: 0; }
@media (max-width: 768px) { .table td:first-child { min-width: 150px; } }
