/* ===== زيت وزيتون — marketplace style ===== */
:root {
  /* taken from the البادية logo: deep green banner + gold lettering */
  --brand: #1f4a14;
  --brand-2: #14310b;
  --brand-soft: #e8f0df;
  --accent: #f5c33b;
  --accent-2: #e2ab17;
  --bg: #f3f4f6;
  --white: #fff;
  --text: #1f2328;
  --text-2: #4b5160;
  --muted: #7e8494;
  --line: #e3e5ea;
  --green: #138a36;
  --red: #d0261b;
  --blue: #1a5fd0;
  --r: 10px;
  --r-lg: 14px;
  --sh: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --sh-hover: 0 10px 24px rgba(16, 24, 40, .12);
  --font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); font-size: 15px; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.35; font-weight: 700; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
button { font-family: inherit; }

.wrap, .container { max-width: 1320px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 480px; margin: 2rem auto; }
.page { padding-top: 1rem; padding-bottom: 3rem; min-height: 60vh; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.empty { background: var(--white); border-radius: var(--r-lg); padding: 2.5rem 1rem; text-align: center; color: var(--muted); box-shadow: var(--sh); }

/* ===== header ===== */
.hdr { position: sticky; top: 0; z-index: 30; box-shadow: 0 1px 0 var(--line); }
.hdr-main { background: var(--brand); color: #fff; }
.hdr-row { display: flex; align-items: center; gap: 1.25rem; height: 68px; }
.logo { display: flex; align-items: center; gap: .5rem; color: #fff; font-weight: 700; font-size: 1.35rem; flex: none; }
.logo:hover { text-decoration: none; }
.logo img { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.logo span { font-size: 1.25rem; }
.deliver-to { display: flex; align-items: center; gap: .4rem; flex: none; color: #e8ebd6; }
.deliver-to small, .hdr-link small { display: block; font-size: .72rem; color: #c8ceac; line-height: 1.2; }
.deliver-to b, .hdr-link b { display: block; font-size: .88rem; line-height: 1.3; font-weight: 600; }
.search { flex: 1; display: flex; height: 44px; background: #fff; border-radius: 8px; overflow: hidden; border: 2px solid transparent; transition: border-color .15s; }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; border: 0; padding: 0 1rem; font: inherit; font-size: .95rem; outline: none; min-width: 0; color: var(--text); background: transparent; }
.search button { width: 54px; border: 0; background: var(--accent); color: var(--brand-2); cursor: pointer; display: grid; place-items: center; }
.search button:hover { background: var(--accent-2); }
.hdr-link { display: flex; align-items: center; gap: .45rem; color: #fff; flex: none; }
.hdr-link:hover { text-decoration: none; color: var(--accent); }
.cart-ico { position: relative; display: inline-flex; }
.cart-ico i { position: absolute; top: -7px; left: -9px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--brand-2); font-style: normal; font-size: .72rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--brand); }
.hdr-cats { background: var(--white); border-bottom: 1px solid var(--line); }
.hdr-cats .wrap { display: flex; gap: 1.6rem; overflow-x: auto; scrollbar-width: none; height: 44px; align-items: center; }
.hdr-cats a { color: var(--text); font-weight: 500; font-size: .92rem; white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; }
.hdr-cats a:hover { color: var(--brand); text-decoration: none; }
.hdr-cats .all { font-weight: 700; }
.hdr-cats .deals { color: var(--red); font-weight: 700; }
.hdr-cats .track-link { margin-inline-start: auto; color: var(--brand); font-weight: 700; }
.hdr-cats .ws-link { color: #128c4a; font-weight: 700; margin-inline-start: auto; }

/* ===== hero ===== */
.hero-grid { display: grid; grid-template-columns: 1fr 300px; gap: 12px; margin-bottom: 1.25rem; }
.slider { position: relative; overflow: hidden; border-radius: var(--r-lg); height: 320px; }
.slides { display: flex; height: 100%; transition: transform .6s cubic-bezier(.65, 0, .35, 1); }
.slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 3.5rem; color: var(--text); overflow: hidden; }
.slide:hover { text-decoration: none; }
.slide img { height: 112%; width: auto; margin-bottom: -6%; align-self: flex-end; mix-blend-mode: multiply; }
.slide-text { max-width: 30rem; }
.slide .kicker { display: inline-block; font-size: .8rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px; margin-bottom: .8rem; }
.slide h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); margin-bottom: .5rem; line-height: 1.2; }
.slide p { margin: 0 0 1.25rem; font-size: 1.05rem; }
.slide .cta { display: inline-block; font-weight: 700; padding: .65rem 1.4rem; border-radius: 8px; }
.t-gold { background: linear-gradient(110deg, #fff6d6 0%, #f8de85 100%); }
.t-gold .kicker { background: var(--red); color: #fff; }
.t-gold h2 { color: var(--brand-2); }
.t-gold .cta { background: var(--brand-2); color: #fff; }
.t-olive { background: linear-gradient(110deg, #e9eed2 0%, #cdd8a2 100%); }
.t-olive .kicker { background: var(--brand); color: #fff; }
.t-olive h2 { color: var(--brand-2); }
.t-olive .cta { background: var(--brand); color: #fff; }
.t-cream { background: linear-gradient(110deg, #fbf3e6 0%, #f1dfbf 100%); }
.t-cream .kicker { background: #8a5a12; color: #fff; }
.t-cream .cta { background: #8a5a12; color: #fff; }
/* fixed ad banner (owner's artwork) */
.hero-banner { display: block; border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 6px 24px rgba(20, 49, 11, .18); margin-bottom: 12px; background: var(--brand); }
.hero-banner img { width: 100%; height: auto; aspect-ratio: 1940 / 808; object-fit: cover; transition: transform .6s ease; }
.hero-banner:hover img { transform: scale(1.01); }
.perk-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); background: var(--white); border-radius: var(--r-lg); box-shadow: var(--sh); margin-bottom: 1.25rem; overflow: hidden; }
.perk-strip > * { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem; color: var(--text); border-inline-start: 1px solid var(--line); }
.perk-strip > *:first-child { border-inline-start: 0; }
.perk-strip a:hover { text-decoration: none; background: #f1faf4; }
.perk-strip svg { width: 40px; height: 40px; flex: none; padding: 8px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.perk-strip a svg { background: #e3f7ea; color: #128c4a; }
.perk-strip b { display: block; font-size: .95rem; }
.perk-strip small { display: block; color: var(--muted); font-size: .8rem; }
.dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; background: rgba(0, 0, 0, .25); cursor: pointer; padding: 0; transition: width .3s; }
.dots button.on { width: 24px; background: var(--brand-2); }
.side-banners { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; }
.side { border-radius: var(--r-lg); padding: 1.25rem 1.4rem; display: flex; flex-direction: column; justify-content: center; gap: .25rem; color: var(--text); }
.side:hover { text-decoration: none; filter: brightness(.98); }
.side .kicker { font-size: .78rem; font-weight: 700; opacity: .8; }
.side b { font-size: 1.25rem; line-height: 1.35; }
.side small { font-size: .85rem; opacity: .85; }
.side.t-dark { background: var(--brand-2); color: #fff; }
.side.t-dark .kicker { color: var(--accent); opacity: 1; }
.side.t-light { background: var(--white); box-shadow: var(--sh); }
.side.t-light .kicker { color: var(--green); opacity: 1; }

/* ===== category circles ===== */
.circles { display: flex; gap: 1.5rem; overflow-x: auto; scrollbar-width: none; background: var(--white); border-radius: var(--r-lg); padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--sh); }
.circles a { display: flex; flex-direction: column; align-items: center; gap: .45rem; color: var(--text); flex: none; width: 96px; text-align: center; }
.circles a:hover { text-decoration: none; color: var(--brand); }
.circles span { width: 84px; height: 84px; border-radius: 50%; background: #f5f6f0; overflow: hidden; display: grid; place-items: center; border: 2px solid transparent; transition: border-color .15s; }
.circles a:hover span { border-color: var(--brand); }
.circles img { width: 100%; height: 100%; object-fit: cover; }
.circles b { font-size: .88rem; font-weight: 600; }
.deal-circle { background: var(--red) !important; color: #fff; font-size: 1.8rem; font-weight: 700; }

/* ===== product rails ===== */
.rail { background: var(--white); border-radius: var(--r-lg); padding: 1rem 1.1rem 1.2rem; margin-bottom: 1.25rem; box-shadow: var(--sh); }
.rail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.rail-head h2 { margin: 0; font-size: 1.25rem; }
.rail-ctl { display: flex; align-items: center; gap: .4rem; }
.rail-ctl .more { font-weight: 600; font-size: .9rem; margin-left: .5rem; }
.rail-ctl button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--text-2); display: grid; place-items: center; padding-bottom: 3px; }
.rail-ctl button:hover { background: var(--bg); }
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 12px) / 6); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track .pc { scroll-snap-align: start; }

/* ===== product card ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pc { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, border-color .2s; }
.pc:hover { box-shadow: var(--sh-hover); border-color: transparent; }
.pc-img { display: block; aspect-ratio: 1; background: #fff; padding: 10px; position: relative; }
.pc-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s; }
.pc:hover .pc-img img { transform: scale(1.04); }
.pc.out .pc-img img { opacity: .45; }
.flag { position: absolute; top: 8px; right: 8px; font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 4px; }
.flag.best { background: #fdf0d0; color: #8a5a00; }
.flag.pick { background: var(--brand-soft); color: var(--brand); }
.flag.gray { background: #eceef2; color: var(--text-2); }
.flag.ws { background: var(--brand); color: #fff; }
.pc-ws { font-weight: 700; color: var(--brand); font-size: .95rem; }
.wa-txt { color: #128c4a; }
.pc-per { font-size: .78rem; color: var(--muted); margin-top: 1px; }
.pdp-ws { font-size: 1.15rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: .7rem 1rem; border-radius: 8px; }
.bb-ws-title { font-size: 1.1rem; }
.btn.wa-btn { background: #25d366; border-color: #25d366; color: #fff; }
.btn.wa-btn:hover { background: #1ebe5a; }
.flag.off { background: var(--red); color: #fff; font-size: .85rem; top: 14px; right: 14px; }
.pc-media { position: relative; }
.pc-add { position: absolute; left: 8px; bottom: 8px; margin: 0; }
.pc-add button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); color: var(--brand); cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); transition: background .15s, color .15s; }
.pc-add button:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.pc-wa { position: absolute; left: 8px; bottom: 8px; width: 40px; height: 40px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 3px 10px rgba(37, 211, 102, .45); transition: transform .15s; }
.pc-wa:hover { transform: scale(1.08); color: #fff; }
.pc-body { padding: .2rem .8rem .8rem; color: var(--text); display: flex; flex-direction: column; flex: 1; }
.pc-body:hover { text-decoration: none; }
.pc-body h3 { font-size: .92rem; font-weight: 500; line-height: 1.45; margin: 0 0 .4rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.pc-body h3 span { color: var(--muted); }
.pc-price { display: flex; align-items: baseline; gap: 3px; direction: rtl; }
.cur { font-size: .72rem; font-weight: 600; color: var(--text-2); }
.amt { font-size: 1.25rem; font-weight: 700; letter-spacing: -.3px; }
.dec { font-size: .8rem; font-weight: 600; }
.pc-was { font-size: .8rem; margin-top: 1px; }
.pc-was s { color: var(--muted); }
.pc-was b { color: var(--green); font-weight: 700; }
.pc-meta { margin-top: auto; padding-top: .45rem; font-size: .78rem; font-weight: 600; min-height: 1.6em; }
.pc-meta .low { color: var(--red); }
.pc-meta .free { color: var(--green); }
.pc-meta .sold { color: var(--muted); font-weight: 500; }

/* ===== listing ===== */
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .8rem; }
.crumbs a { color: var(--text-2); }
.listing { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.filters { background: var(--white); border-radius: var(--r-lg); padding: 1rem; box-shadow: var(--sh); position: sticky; top: 128px; }
.fblock { border-bottom: 1px solid var(--line); padding-bottom: .9rem; margin-bottom: .9rem; display: flex; flex-direction: column; gap: .15rem; }
.fblock h4 { font-size: .95rem; margin-bottom: .4rem; }
.fblock a { color: var(--text-2); padding: .25rem .5rem; border-radius: 6px; font-size: .92rem; }
.fblock a:hover { background: var(--bg); text-decoration: none; }
.fblock a.on { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.price-range { display: flex; gap: .5rem; }
.price-range input { height: 38px; padding: 0 .6rem; }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--white); border-radius: var(--r-lg); padding: .8rem 1.1rem; margin-bottom: 12px; box-shadow: var(--sh); }
.results-head h1 { font-size: 1.25rem; margin: 0; }
.results-head .muted { font-size: .85rem; }
.sort { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; font-size: .9rem; flex: none; white-space: nowrap; }
.sort select { height: 38px; padding: 0 .6rem; width: auto; }

.cat-intro { border-inline-start: 4px solid var(--accent); }
.cat-intro h3 { margin: 0 0 .5rem; font-size: 1.1rem; color: var(--brand); }
.cat-intro ul { margin: 0 0 .4rem; padding-right: 1.2rem; display: grid; gap: .35rem; }
.cat-intro p { margin: .3rem 0; color: var(--text-2); }
.desc ul { margin: .3rem 0 .6rem; padding-right: 1.2rem; }

/* ===== product page ===== */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 300px; gap: 16px; background: var(--white); border-radius: var(--r-lg); padding: 1.25rem; box-shadow: var(--sh); margin-bottom: 1.25rem; align-items: start; }
.pdp-media { position: relative; border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; background: #fff; position: sticky; top: 128px; }
.pdp-media img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.brandline { font-size: .88rem; font-weight: 600; }
.pdp-info h1 { font-size: 1.45rem; font-weight: 600; margin: .2rem 0 .3rem; }
.pdp-price { display: flex; align-items: baseline; gap: 4px; }
.pdp-price .cur { font-size: .9rem; }
.pdp-price .amt { font-size: 2rem; }
.pdp-was { font-size: .92rem; margin: .2rem 0; }
.pdp-was s { color: var(--muted); }
.pdp-was b { color: var(--green); }
.pdp-info h3 { margin-top: 1.25rem; font-size: 1rem; }
.hl { margin: 0; padding-right: 1.1rem; color: var(--text-2); }
.hl li { margin-bottom: .3rem; }
.desc p { margin: 0 0 .5rem; color: var(--text-2); }
.buybox { border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; display: flex; flex-direction: column; gap: .9rem; position: sticky; top: 128px; }
.small-price .amt { font-size: 1.6rem; }
.bb-row { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; }
.bb-row svg { flex: none; color: var(--text-2); margin-top: 2px; }
.ok { color: var(--green); }
.stock { font-weight: 700; font-size: .95rem; }
.stock.ok { color: var(--green); }
.stock.low { color: var(--red); }
.bb-form { display: flex; flex-direction: column; gap: .6rem; }
.qty-sel { flex-direction: row; align-items: center; justify-content: space-between; font-weight: 500; }
.qty-sel select { width: 90px; height: 38px; }
.bb-trust { list-style: none; margin: 0; padding: .8rem 0 0; border-top: 1px solid var(--line); font-size: .85rem; color: var(--text-2); display: grid; gap: .3rem; }
.bb-trust li::before { content: "✓"; color: var(--green); font-weight: 700; margin-left: .4rem; }

/* ===== cart + order form ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.cart-page { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; align-items: start; }
.cart-items { padding: 0; }
.ci { display: grid; grid-template-columns: 96px 1fr auto; gap: 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); align-items: center; }
.ci-img img { width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ci-name { color: var(--text); font-weight: 600; display: block; margin-bottom: .2rem; }
.ci-price { color: var(--muted); font-size: .88rem; margin-bottom: .5rem; }
.ci-actions { display: flex; align-items: center; gap: 1rem; }
.ci-actions form { margin: 0; }
.ci-sub { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper form { display: contents; }
.stepper button { width: 34px; height: 34px; border: 0; background: var(--bg); font-size: 1.1rem; cursor: pointer; color: var(--text); }
.stepper button:hover:not(:disabled) { background: var(--brand-soft); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper span { min-width: 38px; text-align: center; font-weight: 700; }
.checkout { position: sticky; top: 128px; }
.checkout h2 { font-size: 1.2rem; }
.checkout .row > label { flex: 1 1 150px; min-width: 0; }
.summary { background: var(--bg); border-radius: 10px; padding: .9rem 1rem; display: grid; gap: .45rem; font-size: .95rem; }
.total-row { border-top: 1px solid var(--line); padding-top: .5rem; font-size: 1.1rem; }
.free-hint { font-size: .82rem; color: var(--green); background: #e8f5ec; border-radius: 6px; padding: .3rem .6rem; }

/* ===== customer order page ===== */
.ord-page { max-width: 1000px; margin: 0 auto; display: grid; gap: 1rem; }
.ord-page .card { margin-bottom: 0; }
.ord-success { text-align: center; border-top: 4px solid var(--green); }
.ord-success h1 { font-size: 1.5rem; margin: .6rem 0 .3rem; }
.ord-success p { margin: .3rem 0; }
.ok-mark { width: 72px; height: 72px; margin: .3rem auto 0; border-radius: 50%; background: var(--green); color: #fff; font-size: 2.4rem; display: grid; place-items: center; box-shadow: 0 0 0 10px #e8f5ec; animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.ord-no { font-size: 1.3rem; color: var(--brand); }
.ord-success .row { margin-top: 1rem; }
.step-hint { background: var(--brand-soft); color: var(--brand-2); border-radius: 8px; padding: .65rem .9rem; margin: 1rem 0 .5rem; font-weight: 500; }
.track-box { display: grid; gap: .35rem; margin-top: .8rem; }
.track-box .row input { flex: 1; font-size: .85rem; background: var(--bg); }
.track-page { text-align: center; }
.track-page .form { text-align: right; }
.track-ico { font-size: 2.6rem; }

/* ===== admin analytics ===== */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding: .5rem 0 0; }
.bars div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.bars i { display: block; width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars i.u { background: var(--accent); position: absolute; bottom: 0; left: 0; right: 0; border-radius: 4px 4px 0 0; }
.bars span { font-size: .62rem; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.legend { display: flex; gap: 1rem; font-size: .82rem; color: var(--muted); }
.legend b { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: .3rem; vertical-align: middle; }
.meter { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; min-width: 80px; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.acc-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.acc-hero > div { display: flex; flex-direction: column; gap: .15rem; }
.acc-hero strong { font-size: 1.6rem; }
.acc-hero strong.ok { color: var(--green); }
.profit-card { background: var(--brand) !important; color: #fff; }
.profit-card .muted { color: #cfe0c3; }
.profit-card.neg { background: var(--red) !important; }
.profit-calc { max-width: 720px; display: grid; gap: .45rem; }
.profit-calc .sub { border-top: 1px dashed var(--line); padding-top: .4rem; }
.profit-calc .ok { color: var(--green); }
.acc-status { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.acc-card { display: flex; flex-direction: column; gap: .5rem; color: var(--text); border-inline-start: 4px solid var(--line); }
.acc-card:hover { text-decoration: none; box-shadow: var(--sh-hover); }
.acc-card.t-ok { border-inline-start-color: var(--green); }
.acc-card.t-blue { border-inline-start-color: #1d4e9e; }
.acc-card.t-red { border-inline-start-color: var(--red); }
.acc-card.t-amber { border-inline-start-color: #e0ad12; }
.acc-card.t-gray { opacity: .75; }
.acc-card .status { align-self: flex-start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* ===== shared UI ===== */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 1rem; overflow-x: auto; box-shadow: var(--sh); }
.pad { padding: 1.1rem 1.25rem; }
.row { display: flex; gap: .75rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.two { display: grid; grid-template-columns: 3fr 2fr; gap: 1rem; align-items: start; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 42px; padding: 0 1.2rem; border-radius: 8px; border: 1px solid var(--line); background: var(--white); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; background: var(--bg); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.gold { background: var(--accent); border-color: var(--accent); color: var(--brand-2); }
.btn.gold:hover { background: var(--accent-2); }
.btn.block { width: 100%; }
.btn.lg { height: 48px; font-size: 1rem; }
.btn.small { height: 32px; padding: 0 .8rem; font-size: .85rem; }
.link { background: none; border: 0; color: var(--blue); cursor: pointer; font: inherit; padding: 0; }
.danger { color: var(--red); }

.form { display: flex; flex-direction: column; gap: .9rem; }
.form h3 { margin: .4rem 0 0; }
label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .9rem; flex: 1; }
label.radio { flex-direction: row; align-items: center; gap: .6rem; font-weight: 500; flex: none; border: 1px solid var(--line); border-radius: 8px; padding: .65rem .9rem; cursor: pointer; }
label.radio:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
input, select, textarea { font: inherit; font-weight: 400; padding: .55rem .8rem; border: 1px solid #cfd3db; border-radius: 8px; background: #fff; color: var(--text); width: 100%; }
input[type=radio], input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(62, 74, 24, .15); }
.qty { width: 80px; flex: none; text-align: center; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .75rem .9rem; text-align: right; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: #f8f9fb; font-weight: 600; font-size: .85rem; color: var(--text-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.thumb { width: 50px; height: 50px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.thumb.big { width: 120px; height: 120px; }
.total { font-size: 1.1rem; }

.alert { padding: .75rem 1rem; border-radius: 8px; background: #e8f5ec; border: 1px solid #bfe3ca; margin-bottom: 1rem; color: #155d2b; font-weight: 500; }
.alert.err { background: #fdecea; border-color: #f5c2bd; color: var(--red); }
.tag { display: inline-block; padding: .05rem .6rem; border-radius: 999px; background: #eef0f3; font-size: .8rem; font-weight: 600; }
.tag.ok { background: #e8f5ec; color: var(--green); }
.tag.err { background: #fdecea; color: var(--red); }
.chip { padding: .3rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--text); font-size: .88rem; }
.chip:hover { text-decoration: none; }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.status { display: inline-block; padding: .1rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.s-new { background: #fff4d6; color: #8a6200; }
.s-confirmed { background: #e3ecfb; color: #1d4e9e; }
.s-shipped { background: #ede4fb; color: #5b2a9e; }
.s-delivered { background: #e8f5ec; color: var(--green); }
.s-cancelled { background: #eef0f3; color: #6b7280; }
.s-returned { background: #fdecea; color: var(--red); }
.copy { user-select: all; direction: ltr; display: inline-block; background: var(--bg); padding: 0 .5rem; border-radius: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 1.7rem; color: var(--brand); }

/* ===== footer ===== */
.ft-perks { background: var(--white); border-top: 1px solid var(--line); }
.ft-perks .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.ft-perks div { display: flex; align-items: center; gap: .7rem; justify-content: center; font-size: .92rem; }
.ft-perks svg { width: 30px; height: 30px; color: var(--brand); flex: none; }
.ft { background: var(--brand-2); color: #cfd4bb; }
.ft-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; padding-top: 2.25rem; padding-bottom: 2rem; }
.ft-grid > div { display: flex; flex-direction: column; gap: .4rem; }
.ft-brand { font-size: 1.3rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: .75rem; margin-bottom: .3rem; }
.ft-brand img { width: 64px; height: 64px; border-radius: 50%; }
.ft-addr { display: flex; align-items: center; gap: .4rem; color: var(--accent); }
.ft-grid p { margin: 0 0 .5rem; font-size: .92rem; }
.ft-grid h4 { color: #fff; font-size: .98rem; margin-bottom: .3rem; }
.ft-grid a { color: #cfd4bb; font-size: .92rem; }
.ft-grid a:hover { color: #fff; }
.pay-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.pay-chips span { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); padding: .2rem .65rem; border-radius: 6px; font-size: .82rem; }
.wa { display: inline-flex !important; align-items: center; gap: .4rem; align-self: flex-start; background: #25d366; color: #0b3b1c !important; font-weight: 700; padding: .45rem 1rem; border-radius: 8px; }
.ft-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: .9rem 0; font-size: .82rem; color: #9aa085; }
.tabbar { display: none; }

/* ===== admin: order status buttons + steps ===== */
.qa-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.qa { margin: 0; }
.btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.btn.success:hover { background: #0f7a2f; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover { background: #b21f15; }
.btn.ghost-danger { color: var(--red); border-color: #f2c4bf; background: #fff; }
.btn.ghost-danger:hover { background: #fdecea; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.steps li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .25rem; position: relative; z-index: 1; color: var(--muted); }
.steps li::before { content: ""; position: absolute; top: 17px; right: -50%; left: auto; width: 100%; height: 3px; background: var(--line); z-index: -1; }
.steps li:first-child::before { display: none; }
.steps .dot { width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 3px solid var(--line); display: grid; place-items: center; font-weight: 700; }
.steps li.done { color: var(--green); }
.steps li.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.steps li.done::before { background: var(--green); }
.steps li.now { color: var(--text); }
.steps li.now .dot { border-color: var(--accent); background: #fff8df; box-shadow: 0 0 0 5px rgba(245, 195, 59, .25); }
.steps li.now::before { background: var(--green); }
.steps b { font-size: .92rem; }
.steps small { font-size: .72rem; color: var(--muted); }
.void-note { padding: .6rem .9rem; border-radius: 8px; margin-bottom: 1rem; font-weight: 600; }
td .qa-row { flex-wrap: nowrap; }
.card:has(> .steps) { overflow: hidden; }

/* order tables become cards on phones */
@media (max-width: 720px) {
  .table.ord thead { display: none; }
  .table.ord, .table.ord tbody { display: block; }
  .table.ord tr { display: grid; grid-template-columns: auto 1fr auto; gap: .35rem .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); align-items: center; }
  .table.ord td { display: block; border: 0; padding: 0; }
  .table.ord td:first-child { grid-row: span 2; align-self: start; }
  .table.ord td.ord-actions { grid-column: 1 / -1; }
  .table.ord td.ord-actions .qa-row, .table.ord td.ord-actions.row { flex-wrap: wrap; }
  .table.ord td.ord-hide-sm { display: none; }
  .table.ord .btn.small { height: 38px; padding: 0 1rem; }
  .steps b { font-size: .78rem; }
  .steps small { display: none; }
}

.maint-bar { display: block; background: var(--red); color: #fff; text-align: center; padding: .6rem 1rem; font-weight: 600; }
.maint-bar:hover { color: #fff; text-decoration: none; filter: brightness(1.05); }
.maint-card { border-inline-start: 4px solid var(--green); }
.maint-card.is-on { border-inline-start-color: var(--red); background: #fff7f6; }
.maint-card .btn { align-self: flex-start; }
.notif-opt { display: flex; flex-direction: column; gap: .4rem; background: var(--bg); border-radius: 10px; padding: .85rem 1rem; align-items: flex-start; }
.notif-opt label { width: 100%; }
.order-toast { position: fixed; bottom: 20px; left: 20px; z-index: 100; background: #fff; border: 2px solid var(--accent); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .2); padding: .9rem 1.1rem; display: flex; align-items: center; gap: .8rem; max-width: calc(100vw - 40px); animation: toastIn .3s ease; }
.order-toast[hidden] { display: none; }
.order-toast b { color: var(--brand); white-space: nowrap; }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 720px) { .order-toast { left: 10px; right: 10px; bottom: 10px; flex-wrap: wrap; } }

/* ===== admin: sidebar layout ===== */
.admin { background: #f4f5f2; }
.nav-toggle { display: none; }
.adm { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.adm-side { background: var(--brand-2); color: #dfe6d3; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; }
.adm-brand { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.1rem 1rem; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.adm-brand:hover { text-decoration: none; }
.adm-brand img { width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.adm-brand b { display: block; font-size: .98rem; line-height: 1.3; }
.adm-brand small { display: block; color: var(--accent); font-size: .76rem; }
.adm-nav { padding: .6rem .7rem; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.adm-group { font-size: .72rem; font-weight: 700; color: #8fa07e; padding: .9rem .7rem .35rem; letter-spacing: .3px; }
.adm-nav a, .adm-foot a { display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; border-radius: 10px; color: #dfe6d3; font-weight: 500; font-size: .95rem; position: relative; transition: background .15s, color .15s; }
.adm-nav a:hover, .adm-foot a:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.adm-nav a.on { background: var(--accent); color: var(--brand-2); font-weight: 700; }
.adm-nav a.on svg { stroke: var(--brand-2); }
.adm-nav svg, .adm-foot svg { flex: none; opacity: .9; }
.adm-badge { margin-inline-start: auto; background: var(--red); color: #fff; font-style: normal; font-size: .72rem; font-weight: 700; min-width: 22px; height: 22px; border-radius: 99px; display: grid; place-items: center; padding: 0 6px; }
.adm-nav a.on .adm-badge { background: var(--brand-2); color: #fff; }
.adm-foot { padding: .7rem; border-top: 1px solid rgba(255, 255, 255, .08); display: grid; gap: 2px; }
.adm-body { min-width: 0; display: flex; flex-direction: column; }
.adm-top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 1rem; padding: .7rem 1.6rem; min-height: 62px; }
.adm-hello b { display: block; font-size: 1rem; }
.adm-hello small { color: var(--muted); font-size: .8rem; }
.adm-user { margin-inline-start: auto; display: flex; align-items: center; gap: .8rem; }
.adm-bell { position: relative; color: var(--text); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg); }
.adm-bell i { position: absolute; top: -2px; left: -2px; background: var(--red); color: #fff; font-style: normal; font-size: .7rem; font-weight: 700; min-width: 19px; height: 19px; border-radius: 99px; display: grid; place-items: center; padding: 0 5px; border: 2px solid #fff; }
.adm-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
.adm-burger { display: none; cursor: pointer; width: 40px; height: 40px; border-radius: 10px; background: var(--bg); place-items: center; }
.adm-scrim { display: none; }
.adm-main { padding: 1.5rem 1.6rem 3rem; max-width: 1400px; width: 100%; }
.adm-main > h1:first-child, .adm-main > .row:first-child h1 { font-size: 1.45rem; }
.admin .card { box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.admin .stat strong { font-size: 1.65rem; }
.admin .search { max-width: 280px; height: 38px; border: 1px solid var(--line); }

@media (max-width: 960px) {
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: fixed; top: 0; bottom: 0; right: 0; width: 270px; z-index: 60; transform: translateX(100%); transition: transform .25s ease; box-shadow: -8px 0 30px rgba(0, 0, 0, .25); }
  .nav-toggle:checked ~ .adm .adm-side { transform: none; }
  .nav-toggle:checked ~ .adm .adm-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 55; }
  .adm-burger { display: grid; }
  .adm-top { padding: .6rem 1rem; }
  .adm-main { padding: 1rem 1rem 3rem; }
}

/* ===== responsive ===== */
@media (max-width: 1200px) { .rail-track { grid-auto-columns: calc((100% - 4 * 12px) / 5); } }
@media (max-width: 1024px) {
  .deliver-to { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .side-banners { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .rail-track { grid-auto-columns: calc((100% - 3 * 12px) / 4); }
  .pdp { grid-template-columns: 1fr 1fr; }
  .buybox { grid-column: 1 / -1; position: static; }
  .listing { grid-template-columns: 1fr; }
  .cart-page { grid-template-columns: 1fr; }
  .checkout { position: static; }
  .filters { position: static; }
  .filters form { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
  .filters .fblock:first-child { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .ft-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 14px; padding-bottom: 64px; }
  .hdr-row { flex-wrap: wrap; height: auto; padding-top: .6rem; padding-bottom: .6rem; gap: .6rem; }
  .search { order: 3; flex-basis: 100%; height: 42px; }
  .acct div { display: none; }
  .hdr-link.acct { margin-inline-start: auto; }
  .hdr-link.cart b { display: none; }
  .hdr-cats .wrap { gap: 1.2rem; height: 40px; }
  .logo img { width: 44px; height: 44px; }
  .logo span { font-size: 1.1rem; }
  .slider { height: 200px; border-radius: var(--r); }
  .slide { padding: 0 1.25rem; }
  .slide h2 { font-size: 1.4rem; }
  .slide p { display: none; }
  .slide .cta { padding: .45rem .9rem; font-size: .85rem; }
  .slide img { height: 92%; max-width: 42%; object-fit: contain; margin-bottom: 0; align-self: center; flex: none; }
  .hero-banner { border-radius: var(--r); margin-left: -6px; margin-right: -6px; }
  .perk-strip { grid-template-columns: 1fr 1fr; border-radius: var(--r); }
  .perk-strip > * { padding: .75rem; gap: .5rem; border-inline-start: 0; border-top: 1px solid var(--line); }
  .perk-strip > *:nth-child(-n+2) { border-top: 0; }
  .perk-strip > *:nth-child(even) { border-inline-start: 1px solid var(--line); }
  .perk-strip svg { width: 32px; height: 32px; padding: 6px; }
  .perk-strip b { font-size: .82rem; }
  .perk-strip small { font-size: .72rem; }
  .slide-text { min-width: 0; flex: 1; }
  .slide .kicker { font-size: .72rem; }
  .side-banners { grid-template-columns: 1fr 1fr; }
  .side { padding: .9rem; }
  .side b { font-size: 1rem; }
  .side small { display: none; }
  .circles { gap: .9rem; padding: .9rem; }
  .circles a { width: 72px; }
  .circles span { width: 64px; height: 64px; }
  .rail { padding: .8rem .7rem 1rem; border-radius: var(--r); }
  .rail-ctl button { display: none; }
  .rail-track { grid-auto-columns: 44%; gap: 8px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .pc-body { padding: .1rem .6rem .6rem; }
  .amt { font-size: 1.1rem; }
  .pdp { grid-template-columns: 1fr; padding: .9rem; }
  .ci { grid-template-columns: 72px 1fr; gap: .75rem; padding: .8rem; }
  .ci-img img { width: 72px; height: 72px; }
  .ci-sub { grid-column: 2; font-size: .95rem; }
  .pdp-media { position: static; }
  .two { grid-template-columns: 1fr; }
  .results-head { flex-wrap: wrap; }
  .ft-perks .wrap { grid-template-columns: 1fr; gap: .6rem; }
  .ft-perks div { justify-content: flex-start; }
  .ft-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--white); border-top: 1px solid var(--line); height: 60px; box-shadow: 0 -2px 10px rgba(0, 0, 0, .05); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: .72rem; font-weight: 600; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.on { color: var(--brand); }
  .tabbar .cart-ico i { border-color: var(--white); }
}

@media print {
  .hdr, .ft, .ft-perks, .tabbar, .topbar, form, .btn { display: none !important; }
  .two { grid-template-columns: 1fr; }
  body { background: #fff; }
}
