/* Wan Da Wholesale Foods storefront — light-green "fresh market" edition.
 * Mobile-first, fresh-produce-market aesthetic.
 * One stylesheet, no dependencies, no external assets. */

:root {
  --red: #2e7d32;
  --red-deep: #1b5e20;
  --red-ink: #14501c;
  --red-soft: #e8f5e9;
  --gold: #aed581;
  --gold-deep: #7cb342;
  --price: #d9232e;
  --ink: #1e2b1e;
  --muted: #5f6f60;
  --faint: #9aa39a;
  --line: #e2ece2;
  --bg: #f4faf4;
  --card: #ffffff;
  --green: #1e8e4e;
  --green-soft: #e3f3e8;
  --amber: #a86a00;
  --amber-soft: #fdf3e0;
  --gray-soft: #eef2ee;
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 560px;
  --shadow: 0 1px 2px rgba(30, 70, 40, .06), 0 4px 14px rgba(30, 70, 40, .07);
  --shadow-lg: 0 2px 6px rgba(30, 70, 40, .08), 0 10px 30px rgba(30, 70, 40, .12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  padding-bottom: 76px; /* bottom nav */
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, textarea {
  font: inherit; width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink);
}
input:focus, textarea:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, .14);
}
::placeholder { color: var(--faint); }

/* ================= header ================= */
#hdr {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(27, 94, 32, .35);
}
#hdr::after {
  content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, var(--gold), #dcedc8 50%, var(--gold));
}
.hdr-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px;
}
.logo { display: flex; align-items: center; gap: 10px; color: #fff; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px;
  background: linear-gradient(135deg, #fff 0%, #e8f5e9 100%);
  color: var(--red-deep); font-weight: 900; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-weight: 800; font-size: 16.5px; letter-spacing: .2px; }
.logo-sub { font-size: 10.5px; opacity: .85; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
.hdr-actions { display: flex; gap: 8px; align-items: center; }
.lang-toggle {
  background: rgba(255,255,255,.16); color: #fff;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 20px; padding: 6px 14px; font-size: 13px; font-weight: 700;
  backdrop-filter: blur(4px);
}
.lang-toggle:active { background: rgba(255,255,255,.3); }
.ws-badge {
  background: linear-gradient(135deg, var(--gold), #dcedc8);
  color: #33691e; font-weight: 800; font-size: 11.5px;
  border-radius: 8px; padding: 5px 10px; text-transform: uppercase; letter-spacing: .5px;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.sync-banner {
  background: #f1f8e9; color: #33691e; font-size: 13px; font-weight: 600;
  text-align: center; padding: 9px 14px;
}

/* Header search pill (T&T-style): tap to jump into the shop search. */
.hdr-search { max-width: var(--maxw); margin: 0 auto; padding: 1px 16px 9px; }
.hdr-search-pill {
  width: 100%; border: none; border-radius: 24px; text-align: left;
  padding: 11px 16px 11px 42px; font-size: 14px; color: var(--faint);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239aa39a' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center;
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
}
/* Delivery / Pickup pill toggle + store line, like the big chains. */
.hdr-fulfill {
  max-width: var(--maxw); margin: 0 auto; padding: 0 16px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.ff-toggle { display: flex; background: rgba(0,0,0,.25); border-radius: 20px; padding: 3px; }
.ff-toggle button {
  border: none; background: transparent; color: #fff;
  padding: 6px 16px; border-radius: 16px; font-weight: 700; font-size: 13px;
}
.ff-toggle button.active { background: #fff; color: var(--red-deep); font-weight: 800; }
.ff-store { font-size: 12px; font-weight: 600; opacity: .92; white-space: nowrap; }
/* Category nav strip inside the green header. */
.cat-nav {
  max-width: var(--maxw); margin: 0 auto; padding: 0 12px 11px;
  display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav a {
  flex: 0 0 auto; color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 6px 13px; border-radius: 16px; background: rgba(255,255,255,.15);
}
.cat-nav a.active { background: #fff; color: var(--red-deep); font-weight: 800; }

/* ================= main ================= */
#app { max-width: var(--maxw); margin: 0 auto; min-height: 60vh; }
.section { padding: 18px 16px 6px; }
.section-head {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 0 14px;
}
.section-head::before {
  content: ""; width: 5px; height: 22px; border-radius: 3px; flex: 0 0 5px;
  background: linear-gradient(180deg, var(--red), var(--red-deep));
}
.section-head h2, .section h2 {
  font-size: 19px; margin: 0; font-weight: 800; letter-spacing: .2px;
}
.section-red .section-head::before { background: linear-gradient(180deg, var(--gold), var(--gold-deep)); }
.center { text-align: center; }
.muted { color: var(--muted); }
.loading, .error-box { padding: 40px 16px; text-align: center; color: var(--muted); }
.error-box {
  margin: 16px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.clamp1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clamp2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.9em;
}

/* ================= hero banner carousel ================= */
.banner-carousel {
  position: relative;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}
.banner-slide {
  display: none;
  position: relative; overflow: hidden;
  background:
    radial-gradient(520px 260px at 85% -40px, rgba(220, 237, 200, .4), transparent 60%),
    radial-gradient(420px 300px at 8% 120%, rgba(255, 255, 255, .14), transparent 55%),
    linear-gradient(115deg, var(--red-deep) 0%, var(--red) 55%, #43a047 100%);
  color: #fff; padding: 44px 24px 52px; text-align: center;
}
.banner-slide.active { display: block; animation: fadeUp .45s ease; }
.banner-slide::before, .banner-slide::after {
  content: ""; position: absolute; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .16);
}
.banner-slide::before { width: 190px; height: 190px; right: -60px; top: -70px; }
.banner-slide::after { width: 120px; height: 120px; left: -40px; bottom: -50px; border-color: rgba(220,237,200,.45); }
.banner-kicker {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--gold);
  border: 1px solid rgba(220, 237, 200, .6); border-radius: 20px;
  padding: 4px 14px; margin-bottom: 12px;
  background: rgba(0, 0, 0, .12);
}
.banner-title {
  position: relative; z-index: 1;
  font-size: 27px; font-weight: 900; letter-spacing: .3px; line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0,0,0,.25);
  max-width: 640px; margin: 0 auto;
}
.banner-sub {
  position: relative; z-index: 1;
  font-size: 14.5px; opacity: .94; margin-top: 8px; font-weight: 500;
  max-width: 520px; margin-left: auto; margin-right: auto;
}
.banner-cta {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; font-size: 14px; font-weight: 800;
  background: #fff; color: var(--red-deep);
  padding: 9px 20px; border-radius: 24px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.banner-dots { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; z-index: 2; }
.banner-dots .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 5px;
  background: rgba(255,255,255,.4); margin: 0 4px; transition: all .3s;
}
.banner-dots .dot.active { background: #fff; width: 26px; }
@keyframes fadeUp { from { opacity: .3; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ================= category tiles ================= */
.cat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.cat-tile {
  background: transparent; border-radius: var(--radius); box-shadow: none;
  padding: 10px 4px 8px; text-align: center; display: flex;
  flex-direction: column; align-items: center; gap: 8px;
  border: none;
  transition: transform .15s ease;
}
.cat-tile:active { transform: scale(.96); }
.cat-initial {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--red-soft), #c8e6c9); color: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 21px;
  box-shadow: inset 0 0 0 1px rgba(46, 125, 50, .1);
}
.cat-tile:nth-child(4n+2) .cat-initial { background: linear-gradient(135deg, #f1f8e9, #dcedc8); color: #558b2f; box-shadow: inset 0 0 0 1px rgba(124,179,66,.18); }
.cat-tile:nth-child(4n+3) .cat-initial { background: linear-gradient(135deg, #e5f4ec, #c4e9d4); color: #0f6e3c; box-shadow: inset 0 0 0 1px rgba(23,138,76,.12); }
.cat-tile:nth-child(4n+4) .cat-initial { background: linear-gradient(135deg, #e0f2f1, #b2dfdb); color: #00796b; box-shadow: inset 0 0 0 1px rgba(0,121,107,.12); }
.cat-name { font-size: 12px; font-weight: 600; color: var(--ink); }
.cat-all .cat-initial { background: linear-gradient(135deg, var(--red), var(--red-deep)); color: #fff; box-shadow: 0 4px 10px rgba(46,125,50,.35); }

/* ================= product cards ================= */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  border: 1px solid rgba(236, 229, 224, .7);
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.card:active { transform: scale(.98); }
.card-tile {
  position: relative; aspect-ratio: 1 / .82;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card-tile::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.5) 1.2px, transparent 1.2px);
  background-size: 18px 18px; opacity: .35; pointer-events: none;
}
/* Product photo overlay: covers the gradient tile; tiles keep the gradient
 * as the fallback underneath (img removes itself onerror if missing). */
.tile-photo {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;
}
.card-initial {
  font-size: 46px; font-weight: 900; color: rgba(255,255,255,.92);
  text-shadow: 0 2px 12px rgba(0,0,0,.18);
  width: 84px; height: 84px; border-radius: 50%;
  background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.5);
  backdrop-filter: blur(2px);
}
.sale-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: linear-gradient(135deg, #e60012, #c4000f);
  color: #fff; font-size: 13px; font-weight: 900;
  padding: 3px 9px; border-radius: 7px;
  letter-spacing: .2px;
  box-shadow: 0 3px 8px rgba(196,0,15,.4);
}
.card-body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-name { font-size: 13.5px; font-weight: 700; line-height: 1.35; }
.card-unit { font-size: 12px; color: var(--muted); }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-now { color: var(--price); font-weight: 900; font-size: 19px; letter-spacing: -.2px; }
.price-now.big { font-size: 28px; }
.price-was { color: var(--faint); text-decoration: line-through; font-size: 13px; font-weight: 500; }
.stock-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 5px;
}
.stock-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock-in { background: var(--green-soft); color: var(--green); }
.stock-low { background: var(--amber-soft); color: var(--amber); }
.stock-out { background: var(--gray-soft); color: var(--faint); }
.card-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.storage-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 5px;
}
.storage-badge.st-F { background: #dbeafe; color: #1d4ed8; }
.storage-badge.st-D { background: #fef3c7; color: #92400e; }
.storage-badge.st-C { background: #dcfce7; color: #15803d; }
.storage-badge.st-R { background: #e0e7ff; color: #4338ca; }
.btn-add { margin-top: auto; }
/* T&T-style card foot: price on the left, round green + button on the right. */
.card-foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 8px; margin-top: auto; padding-top: 2px;
}
.add-circle {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
  border: none; color: #fff; font-size: 27px; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, #43a047, var(--red-deep));
  box-shadow: 0 4px 10px rgba(46,125,50,.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s ease;
}
.add-circle:active { transform: scale(.9); }
.add-circle:disabled { background: #cfd8cf; box-shadow: none; cursor: not-allowed; }

/* ================= horizontal promo rows ================= */
.hrow {
  display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.hrow::-webkit-scrollbar { display: none; }
.promo-card {
  flex: 0 0 168px; background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); padding-bottom: 10px;
  border: 1px solid rgba(236, 229, 224, .7);
  border-top: 3px solid var(--gold);
  cursor: pointer;
}
.promo-card .card-name { font-size: 12.5px; padding: 8px 10px 0; font-weight: 700; }
.promo-card .price-row { padding: 2px 10px 0; }
.promo-card .price-now { font-size: 17px; }
.tile-sm { aspect-ratio: 1 / .72; }
.tile-sm .card-initial { font-size: 30px; width: 62px; height: 62px; }
.promo-note { font-size: 11px; color: var(--muted); padding: 4px 10px 0; line-height: 1.4; }
.min-qty {
  display: inline-block; margin: 6px 10px 0; font-size: 11px; font-weight: 800;
  color: var(--red-deep); background: var(--red-soft);
  border: 1px dashed rgba(46,125,50,.4); border-radius: 8px; padding: 2px 9px;
}

/* ================= buttons ================= */
.btn {
  border: none; border-radius: 12px; padding: 13px 18px;
  font-weight: 800; font-size: 15px; letter-spacing: .2px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #43a047, var(--red-deep));
  color: #fff; box-shadow: 0 4px 12px rgba(46,125,50,.32);
}
.btn-primary:active { transform: scale(.98); box-shadow: 0 2px 6px rgba(46,125,50,.3); }
.btn-primary:disabled { background: #d5dbd5; color: #fff; box-shadow: none; cursor: not-allowed; }
.btn-outline { background: #fff; border: 1.5px solid var(--red); color: var(--red); }
.btn-block { width: 100%; display: block; }
.btn-lg { padding: 15px 18px; font-size: 16px; border-radius: 14px; }
.link-danger { background: none; border: none; color: var(--red); font-size: 13px; font-weight: 600; padding: 6px; }

/* ================= search ================= */
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 7px; align-items: center; }
.crumbs a { color: var(--red); font-weight: 700; }
.crumb-sep { color: var(--faint); }
.search-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.search-head h2 { font-size: 21px; }
.sort-row { display: flex; align-items: center; gap: 9px; margin: 2px 0 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.sort-sel {
  width: auto; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
}
.search-wrap { position: relative; margin-bottom: 12px; }
.search-input {
  margin-bottom: 0; padding-left: 42px; border-radius: 24px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239aa39a' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center;
  box-shadow: var(--shadow);
}
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 12px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; background: #fff; border: 1.5px solid var(--line);
  border-radius: 20px; padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--muted);
}
.chip.active {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  border-color: transparent; color: #fff; font-weight: 800;
  box-shadow: 0 3px 8px rgba(46,125,50,.3);
}

/* ================= steppers ================= */
.stepper {
  display: inline-flex; align-items: center; border: 1.5px solid var(--line);
  border-radius: 12px; overflow: hidden; background: #fff;
}
.stepper-btn {
  background: var(--red-soft); border: none; width: 42px; height: 42px;
  font-size: 20px; font-weight: 800; color: var(--red);
}
.stepper-btn:active { background: #c8e6c9; }
.stepper-input {
  width: 58px; text-align: center; border: none; border-left: 1px solid var(--line);
  border-right: 1px solid var(--line); border-radius: 0; padding: 8px 4px; font-weight: 800;
}
.stepper-val { min-width: 46px; text-align: center; font-weight: 800; font-size: 16px; }
.stepper-sm .stepper-btn { width: 34px; height: 34px; font-size: 18px; }

/* ================= product detail ================= */
.detail { background: #fff; }
.detail-hero { position: relative; }
.back-btn {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.92); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.2);
}
.back-btn svg { width: 20px; height: 20px; }
.detail-tile {
  position: relative; height: 250px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.detail-tile::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.5) 1.4px, transparent 1.4px);
  background-size: 22px 22px; opacity: .3; pointer-events: none;
}
.detail-initial {
  font-size: 92px; font-weight: 900; color: rgba(255,255,255,.95);
  width: 150px; height: 150px; border-radius: 50%;
  background: rgba(255,255,255,.2); border: 3px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  text-shadow: 0 4px 18px rgba(0,0,0,.2);
}
.detail-tile .sale-badge { top: 16px; left: 0; font-size: 13px; }
.detail-body { padding: 20px 18px 26px; background: #fff; border-radius: 22px 22px 0 0; margin-top: -22px; position: relative; z-index: 2; }
.detail-name { font-size: 21px; margin: 8px 0 10px; font-weight: 800; line-height: 1.35; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.detail-prices {
  display: flex; gap: 16px; margin: 14px 0;
  background: var(--bg); border-radius: var(--radius); padding: 14px 16px;
}
.dprice { display: flex; flex-direction: column; gap: 3px; }
.dlabel { font-size: 11.5px; color: var(--muted); text-transform: uppercase; font-weight: 800; letter-spacing: 1px; }
.detail-buy { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
.detail-buy label { font-weight: 800; display: block; margin-bottom: 10px; font-size: 14px; }
.buy-row { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.unit-toggle { display: flex; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); padding: 3px; gap: 3px; }
.unit-btn { background: transparent; border: none; padding: 9px 20px; font-weight: 700; color: var(--muted); border-radius: 9px; }
.unit-btn.active { background: #fff; color: var(--red); box-shadow: var(--shadow); }

/* ================= cart ================= */
.cart-lines { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.cart-line {
  display: flex; gap: 12px; background: #fff; border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow); align-items: center;
  border: 1px solid rgba(236, 229, 224, .7);
}
.tile-cart { width: 66px; height: 66px; border-radius: 12px; flex: 0 0 66px; overflow: hidden; }
.tile-cart .card-initial { font-size: 26px; width: 44px; height: 44px; border-width: 1.5px; }
.cart-info { flex: 1; min-width: 0; }
.cart-info .card-name { font-size: 13px; }
.cart-unit { font-size: 12px; color: var(--muted); margin: 3px 0 8px; }
.cart-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cart-line-total { font-weight: 900; color: var(--price); white-space: nowrap; font-size: 16px; }
.cart-summary {
  background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  border: 1px solid rgba(236, 229, 224, .7);
}
.sum-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14.5px; }
.sum-row.grand { font-weight: 900; font-size: 19px; border-top: 1.5px dashed var(--line); margin-top: 10px; padding-top: 12px; }
.sum-row.grand span:last-child { color: var(--price); }
.sum-row.grand.inline { border-top: none; margin-top: 0; }
.cart-summary .btn { margin-top: 12px; }
.empty { padding: 48px 20px; }
.empty-icon { margin-bottom: 10px; display: flex; justify-content: center; }
.empty h2 { font-size: 20px; margin: 0 0 8px; }

/* ================= checkout ================= */
.fulfill-toggle {
  display: flex; border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden;
  margin-bottom: 16px; background: #fff; padding: 4px; gap: 4px; box-shadow: var(--shadow);
}
.ft-btn {
  flex: 1; background: transparent; border: none; padding: 13px 8px;
  font-weight: 800; color: var(--muted); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14.5px;
}
.ft-btn svg { width: 19px; height: 19px; }
.ft-btn.active {
  background: linear-gradient(135deg, var(--red), var(--red-deep)); color: #fff;
  box-shadow: 0 4px 10px rgba(46,125,50,.35);
}
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 800; margin-bottom: 7px; font-size: 14px; }
.section h3 { font-size: 16px; margin: 20px 0 10px; font-weight: 800; }
.summary-lines {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 6px; box-shadow: var(--shadow);
}
.pay-note {
  background: linear-gradient(135deg, #f1f8e9, #dcedc8);
  color: #33691e; border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 13.5px; font-weight: 700; border: 1px solid #c5e1a5;
  display: flex; align-items: center; gap: 10px;
}
.pay-note svg { flex: 0 0 22px; width: 22px; height: 22px; }

/* ================= confirmation / wholesale ================= */
.confirm { padding-top: 36px; }
.confirm-check {
  width: 78px; height: 78px; border-radius: 50%;
  background: linear-gradient(135deg, #1ea34f, #0f6e3c); color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; box-shadow: 0 8px 22px rgba(23,138,76,.4);
  animation: pop .45s cubic-bezier(.2, 1.4, .4, 1);
}
.confirm-check svg { width: 38px; height: 38px; }
.confirm-check.ws { background: linear-gradient(135deg, var(--red), var(--red-deep)); box-shadow: 0 8px 22px rgba(46,125,50,.4); }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confirm-num {
  background: #fff; border: 1.5px dashed var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin: 14px 0; display: flex; justify-content: space-between; align-items: center;
  box-shadow: var(--shadow);
}
.ws-panel {
  background:
    radial-gradient(300px 160px at 90% -30px, rgba(220,237,200,.3), transparent 60%),
    linear-gradient(135deg, var(--red-deep), var(--red) 70%);
  color: #fff; border-radius: 20px; padding: 26px 20px; margin-bottom: 16px;
  box-shadow: var(--shadow-lg); text-align: center; position: relative; overflow: hidden;
}
.ws-panel::before {
  content: ""; position: absolute; width: 170px; height: 170px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.15); right: -55px; top: -60px;
}
.ws-panel h2 { margin: 0 0 6px; font-size: 20px; }
.ws-panel p { margin: 6px 0; opacity: .92; font-size: 14px; }
.ws-form .btn { margin-top: 8px; }
.ws-card {
  background: #fff; border-radius: 20px; padding: 22px 18px; box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--gold);
}

/* ================= bottom nav ================= */
#bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 18px rgba(30, 70, 40, .06);
}
.nav-inner { max-width: var(--maxw); margin: 0 auto; display: flex; }
.nav-item {
  flex: 1; text-align: center; padding: 9px 4px 7px; font-size: 11.5px; font-weight: 700;
  color: var(--faint); position: relative; display: flex; flex-direction: column;
  align-items: center; gap: 3px;
}
.nav-item svg { width: 23px; height: 23px; }
.nav-item.active { color: var(--red); }
.nav-count {
  position: absolute; top: 2px; right: calc(50% - 26px);
  background: linear-gradient(135deg, var(--red), var(--red-deep)); color: #fff;
  font-size: 10px; font-weight: 800;
  min-width: 19px; height: 19px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(46,125,50,.4);
}

/* ================= site footer ================= */
#site-footer {
  max-width: var(--maxw); margin: 26px auto 0; padding: 22px 18px 10px;
  text-align: center; color: var(--muted); font-size: 12.5px;
}
#site-footer .f-name { font-weight: 800; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
#site-footer .f-addr { margin-bottom: 8px; }
#site-footer .f-note {
  display: inline-block; background: var(--red-soft); color: var(--red-deep);
  border-radius: 20px; padding: 5px 14px; font-weight: 700; font-size: 12px;
}

/* ================= toast ================= */
#toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(20px);
  background: rgba(28, 20, 20, .92); color: #fff; padding: 12px 22px; border-radius: 28px;
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: all .25s; z-index: 100; max-width: 90vw; text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================= wider screens ================= */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(8, 1fr); }
  .banner-title { font-size: 34px; }
  .banner-slide { padding: 56px 24px 64px; }
}
@media (min-width: 960px) {
  :root { --maxw: 1060px; }
  body { font-size: 15.5px; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .section { padding: 24px 20px 8px; }
  .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
  .cat-tile:hover { transform: translateY(-3px); }
  .detail { border-radius: 20px; overflow: hidden; margin: 18px 0; box-shadow: var(--shadow-lg); }
}
@media (min-width: 1200px) {
  :root { --maxw: 1180px; }
  .grid { grid-template-columns: repeat(5, 1fr); }
}
