/* SABXI web store — app + Flipkart hybrid */
:root {
  --orange: #FF7A1A;
  --orange-dark: #E86A10;
  --green: #1F9D45;
  --green-dark: #157A35;
  --ink: #10231A;
  --muted: #6B7B72;
  --line: #E7ECE8;
  --bg: #FBFCFB;
  --white: #fff;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --radius: 10px;
  --header-h: 58px;
  --bottom-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Outfit, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-h) + 16px);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
.wrap { width: min(1200px, calc(100% - 20px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.top-strip {
  background: #172337; color: #fff; font-size: 12px; font-weight: 600;
}
.top-strip .wrap {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 8px 0;
}
.top-strip a { color: #fff; opacity: .9; }

.header {
  background: var(--orange);
  position: sticky; top: 0; z-index: 60;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.header-row {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 12px; align-items: center; padding: 8px 0;
}
.logo { display: flex; align-items: center; gap: 8px; color: #fff; }
.logo-only img { width: auto; height: 40px; object-fit: contain; }
.logo-word {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 26px; letter-spacing: .06em; line-height: 1;
}
.logo-sub { display: block; font-size: 10px; opacity: .85; font-weight: 600; }
.social-highlight {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 14px;
  background: #fff; color: var(--orange);
  box-shadow: 0 4px 14px rgba(16, 35, 26, 0.18);
  flex-shrink: 0;
}
.social-highlight svg { display: block; }
.search {
  display: flex; background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow); min-width: 0;
}
.search input {
  flex: 1; border: 0; outline: 0; padding: 11px 12px; min-width: 0;
}
.search button {
  border: 0; background: #fff; color: var(--orange);
  padding: 0 14px; cursor: pointer; font-weight: 800;
}
.header-actions { display: flex; gap: 6px; align-items: center; }
.header-actions a, .header-actions button {
  border: 0; background: transparent; color: #fff;
  font-weight: 700; font-size: 13px; cursor: pointer; padding: 8px 10px;
  white-space: nowrap;
}
.cart-btn {
  position: relative; background: #fff !important; color: var(--orange) !important;
  border-radius: 8px !important; padding: 8px 12px !important;
}
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  background: #172337; color: #fff; font-size: 10px; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: grid; place-items: center; padding: 0 4px;
}

.cat-nav {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: var(--header-h); z-index: 50;
}
.cat-nav .wrap {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.cat-nav .wrap::-webkit-scrollbar { display: none; }
.cat-nav a, .cat-nav button {
  border: 0; background: transparent; cursor: pointer;
  padding: 12px 12px; font-size: 13px; font-weight: 700;
  white-space: nowrap; border-bottom: 3px solid transparent; color: var(--ink);
}
.cat-nav a:hover, .cat-nav a.on, .cat-nav button.on {
  color: var(--orange); border-bottom-color: var(--orange);
}

main { padding: 12px 0 24px; }
.panel {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden;
}

.hero { position: relative; }
.hero-track { display: flex; transition: transform .4s ease; }
.hero-slide {
  min-width: 100%; display: grid; grid-template-columns: 1.2fr .8fr;
  gap: 12px; align-items: center; padding: 22px 24px; min-height: 200px;
  background: linear-gradient(120deg, #fff7f0, #fff 50%, #f3faf4);
}
.hero-slide h1 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin-bottom: 8px; }
.hero-slide p { color: var(--muted); margin-bottom: 12px; max-width: 40ch; font-size: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--orange); color: #fff; font-weight: 800; font-size: 13px;
  padding: 10px 14px; border-radius: 8px; border: 0; cursor: pointer;
}
.btn:hover { background: var(--orange-dark); }
.btn.ghost { background: #fff; color: var(--orange); border: 1px solid var(--orange); }
.btn.block { width: 100%; }
.hero-media {
  width: min(220px, 100%); aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  justify-self: end; background: #fafafa;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; justify-content: center; gap: 6px;
}
.hero-dots button {
  width: 7px; height: 7px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.2); cursor: pointer;
}
.hero-dots button.on { width: 16px; border-radius: 8px; background: var(--orange); }

.circles {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 14px;
  text-align: center;
}
.circle { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; }
.circle:hover, .circle.on { background: #fff7f0; }
.circle .thumb {
  width: 68px; height: 68px; border-radius: 50%; overflow: hidden;
  background: #f7f7f7; border: 1px solid var(--line);
}
.circle .thumb img { width: 100%; height: 100%; object-fit: cover; }
.circle span { font-size: 11px; font-weight: 700; }

.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 14px 14px 6px; flex-wrap: wrap;
}
.sec-head h2 { font-size: 18px; font-weight: 800; }
.sec-head .meta { font-size: 12px; color: var(--muted); font-weight: 600; }

.grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px; padding: 8px 12px 14px;
}
.card {
  border: 1px solid transparent; border-radius: 10px; padding: 8px;
  background: #fff; display: flex; flex-direction: column; min-width: 0;
  transition: box-shadow .15s, border-color .15s;
}
.card:hover { border-color: #e8e8e8; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.card .img {
  aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #fafafa;
  margin-bottom: 8px; position: relative;
}
.card .img img { width: 100%; height: 100%; object-fit: cover; }
.card .sold {
  position: absolute; inset: 0; background: rgba(255,255,255,.72);
  display: grid; place-items: center; font-weight: 800; color: #b71c1c; font-size: 12px;
}
.badge {
  display: inline-block; font-size: 10px; font-weight: 800;
  background: #e8f5e9; color: var(--green); padding: 2px 6px; border-radius: 4px;
  margin-bottom: 4px; width: fit-content;
}
.badge.offer { background: #fff3e8; color: var(--orange-dark); }
.card h3 {
  font-size: 13px; font-weight: 700; line-height: 1.3;
  margin-bottom: 4px; min-height: 2.5em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.price .now { font-size: 15px; font-weight: 800; }
.price .was { font-size: 11px; color: var(--muted); text-decoration: line-through; }
.price .off { font-size: 11px; font-weight: 800; color: var(--green); }
.uom { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.qty-row { display: flex; gap: 6px; margin-top: auto; }
.qty-row .add { flex: 1; }
.stepper {
  display: inline-flex; align-items: center; border: 1px solid var(--orange);
  border-radius: 8px; overflow: hidden;
}
.stepper button {
  width: 28px; height: 32px; border: 0; background: #fff7f0;
  color: var(--orange); font-weight: 800; cursor: pointer;
}
.stepper span { min-width: 22px; text-align: center; font-weight: 800; font-size: 13px; }

.banners {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; margin-bottom: 12px;
}
.banner {
  min-height: 120px; border-radius: var(--radius); padding: 16px; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--shadow);
}
.banner h3 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.banner p { font-size: 12px; opacity: .92; margin-bottom: 8px; }
.banner .chip {
  align-self: flex-start; background: #fff; color: var(--ink);
  font-weight: 800; font-size: 11px; padding: 6px 10px; border-radius: 6px;
}
.b1 { background: linear-gradient(135deg, #ff6b00, #ff9a3c); }
.b2 { background: linear-gradient(135deg, #2e8540, #56b46a); }
.b3 { background: linear-gradient(135deg, #172337, #3a4a66); }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: var(--bottom-h); padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted);
}
.bottom-nav a.on, .bottom-nav a:hover { color: var(--orange); }
.bottom-nav .ico { font-size: 18px; line-height: 1; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--bottom-h) + 16px);
  transform: translateX(-50%) translateY(120%);
  background: #172337; color: #fff; padding: 10px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 700; z-index: 90; max-width: min(420px, calc(100% - 24px));
  transition: transform .2s ease; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

.loading, .empty {
  padding: 28px 16px; text-align: center; color: var(--muted); font-weight: 600;
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #fafafa 50%, #f0f0f0 75%);
  background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px;
}
@keyframes sk { to { background-position: -200% 0; } }

.detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px;
}
.detail-img {
  aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #fafafa;
}
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail h1 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.detail .desc { color: var(--muted); font-size: 14px; margin: 10px 0 16px; }

.cart-layout { display: grid; grid-template-columns: 1.4fr .8fr; gap: 12px; }
.cart-item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 10px;
  padding: 12px; border-bottom: 1px solid var(--line); align-items: center;
}
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: #fafafa; }
.cart-summary { padding: 14px; position: sticky; top: 80px; }
.cart-summary .row {
  display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px;
}
.cart-summary .total { font-size: 18px; font-weight: 800; margin-top: 8px; }

.auth-box { max-width: 420px; margin: 24px auto; padding: 20px; }
.auth-box label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.auth-box input {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px;
  margin-bottom: 12px;
}
.auth-box .hint { font-size: 12px; color: var(--muted); margin-bottom: 12px; }

.checkout-panel { padding: 16px; }
.checkout-title { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.checkout-sub { font-size: 15px; font-weight: 700; margin: 16px 0 10px; }
.checkout-panel label { display: block; font-size: 13px; font-weight: 700; margin: 8px 0 6px; }
.checkout-panel input,
.checkout-panel textarea {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; box-sizing: border-box;
}
.addr-list, .pay-list { display: grid; gap: 8px; }
.addr-card {
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start;
  padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.addr-card.on { border-color: var(--brand, #ff6b00); background: #fff8f3; }
.addr-card input { margin-top: 3px; width: auto; padding: 0; }
.orders-head { margin: 12px 0 16px; }
.orders-head h1 { font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.order-list { display: grid; gap: 10px; }
.order-card {
  display: block; padding: 14px; text-decoration: none; color: inherit;
  transition: border-color .15s;
}
.order-card:hover { border-color: var(--brand, #ff6b00); }
.order-card-top, .order-card-bot {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.order-card-bot { margin-top: 10px; font-weight: 700; }
.pill {
  font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px;
  background: #f0f0f0; color: #333; white-space: nowrap;
}
.pill.ok { background: #e8f7ee; color: #0a7a3a; }
.pill.warn { background: #fff4e5; color: #9a5b00; }
.pill.bad { background: #fdecec; color: #b42318; }
.callout.ok {
  background: #e8f7ee; color: #0a7a3a; padding: 10px 12px; border-radius: 8px;
  font-size: 13px; margin: 0;
}

footer {
  background: #172337; color: #fff; margin-top: 8px; padding: 28px 0 18px; font-size: 12px;
}
.foot-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.foot-grid h4 { color: #878787; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
.foot-grid a { display: block; margin-bottom: 7px; opacity: .9; }
.foot-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 14px; color: rgba(255,255,255,.7);
}

@media (max-width: 980px) {
  .header-row { grid-template-columns: auto 1fr; }
  .header-actions .hide-sm { display: none; }
  .circles { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .banners, .detail, .cart-layout, .foot-grid { grid-template-columns: 1fr; }
  .hero-slide { grid-template-columns: 1fr; }
  .hero-media { justify-self: start; width: min(160px, 50%); }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Half-screen app download sheet */
.app-sheet-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(8, 20, 14, 0.52);
  backdrop-filter: blur(4px);
  animation: appSheetFade 0.28s ease;
}
.app-sheet {
  width: 100%; max-width: 520px;
  min-height: 50vh; max-height: min(85vh, 640px);
  background: var(--white);
  border-radius: 28px 28px 0 0;
  padding: 12px 24px max(20px, env(safe-area-inset-bottom));
  box-shadow: 0 -8px 40px rgba(16, 35, 26, 0.18);
  text-align: center;
  position: relative;
  animation: appSheetUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.app-sheet-handle {
  width: 44px; height: 5px; border-radius: 999px;
  background: var(--line); margin: 0 auto 18px;
}
.app-sheet-close {
  position: absolute; top: 14px; right: 16px;
  width: 36px; height: 36px; border: 0; border-radius: 999px;
  background: #F6F8F6; color: var(--muted); font-size: 20px; cursor: pointer;
}
.app-sheet-kicker {
  margin: 0 0 8px; font-size: 12px; font-weight: 800;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange);
}
.app-sheet h2 {
  margin: 0 0 10px; font-size: clamp(22px, 5vw, 28px);
  line-height: 1.15; font-weight: 800; color: var(--ink);
}
.app-sheet p {
  margin: 0 auto 22px; max-width: 340px;
  font-size: 15px; line-height: 1.5; color: var(--muted);
}
.app-sheet-primary {
  display: block; width: 100%; max-width: 360px; margin: 0 auto 10px;
  padding: 15px 16px; border-radius: 16px;
  background: var(--green); color: #fff; font-weight: 800; font-size: 16px;
  box-shadow: 0 8px 24px rgba(31, 157, 69, 0.28);
}
.app-sheet-stores {
  display: flex; gap: 8px; max-width: 360px; margin: 0 auto;
}
.app-sheet-stores a {
  flex: 1; padding: 12px 10px; border-radius: 14px;
  border: 1px solid var(--line); background: #F6F8F6;
  font-weight: 700; font-size: 13px;
}
.app-sheet-skip {
  display: block; width: 100%; margin-top: 14px;
  border: 0; background: transparent; color: #9AA8A0;
  font-size: 14px; font-weight: 600; padding: 10px; cursor: pointer;
}
@keyframes appSheetUp {
  from { transform: translateY(100%); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes appSheetFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
