/* ===== Shopee-style mobile storefront ===== */
:root {
  --orange: #ee4d2d;
  --orange-2: #f53d2d;
  --teal: #26aa99;
  --bg: #f5f5f5;
  --text: #222;
  --muted: #757575;
  --line: #efefef;
  --star: #ffce3d;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
  font-family: "Helvetica Neue", Roboto, "Segoe UI", Arial, sans-serif;
  background: #e9e9e9; color: var(--text); font-size: 14px;
}

/* Phone frame: full width on mobile, centered column on desktop */
.phone {
  max-width: 460px; margin: 0 auto; background: var(--bg); min-height: 100vh;
  position: relative; box-shadow: 0 0 24px rgba(0,0,0,.12);
}

/* ---- Hero carousel ---- */
.hero { position: relative; background: #fff; }
.hero-nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; padding: 10px 12px;
}
.nav-right { display: flex; gap: 8px; }
.nav-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.35); color: #fff; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.nav-badge {
  position: absolute; top: -3px; right: -4px; background: var(--orange); color: #fff;
  font-size: 9px; font-weight: 700; border-radius: 8px; padding: 1px 4px; line-height: 1.2;
}
.hero-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.hero-track::-webkit-scrollbar { display: none; }
.hero-track img, .hero-track video {
  width: 100%; flex: 0 0 100%; aspect-ratio: 1/1; object-fit: cover; scroll-snap-align: start;
}
.hero-track video { object-fit: contain; background: #000; }
.hero-count {
  position: absolute; bottom: 44px; right: 12px; z-index: 5;
  background: rgba(0,0,0,.45); color: #fff; font-size: 12px;
  padding: 2px 10px; border-radius: 12px;
}
.campaign { display: flex; align-items: stretch; height: 34px; font-weight: 700; }
.camp-sale {
  background: var(--orange); color: #fff; display: flex; align-items: center;
  padding: 0 14px; font-size: 18px; font-style: italic;
}
.camp-free {
  background: var(--teal); color: #fff; display: flex; align-items: center;
  padding: 0 12px; font-size: 12px; letter-spacing: .5px;
}

/* ---- Cards ---- */
.card { background: #fff; margin-bottom: 8px; padding: 12px 14px; }

/* ---- Variations ---- */
.var-head { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.var-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.var-thumbs::-webkit-scrollbar { display: none; }
.var-thumb {
  flex: 0 0 auto; width: 68px; cursor: pointer; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; padding: 0; position: relative;
}
.var-badge {
  position: absolute; width: 70px; height: auto; right: -34px; bottom: 14px;
  pointer-events: none; filter: drop-shadow(0 1px 3px rgba(0,0,0,.35)); z-index: 2;
}
.var-thumb.active { border-color: var(--orange); }
.var-thumb img:first-of-type { width: 100%; height: 68px; object-fit: cover; display: block; border-radius: 6px 6px 0 0; }
.var-thumb span { display: block; font-size: 10px; color: #555; padding: 3px 2px 0; text-align: center; }
.var-thumb.active span { color: var(--orange); font-weight: 600; }
.var-thumb .var-usage { font-size: 9px; color: #999; font-weight: 400; padding: 0 2px 3px; }
.var-thumb.active .var-usage { color: var(--orange); }
.sheet-var .sv-usage { display: block; font-size: 10px; color: #999; font-weight: 400; margin-top: 2px; }
.sheet-var.active .sv-usage { color: var(--orange); }

/* ---- Price + title ---- */
.price-line { display: flex; align-items: flex-start; justify-content: space-between; }
.price-main { color: var(--orange); font-weight: 700; }
.orig-line { min-height: 16px; }
.orig { color: #999; font-size: 13px; font-weight: 400; text-decoration: line-through; }
.orig:empty { display: none; }
.price-now { display: flex; align-items: baseline; }
.price-main .rm { font-size: 16px; margin-right: 2px; }
.price-main #price { font-size: 30px; }
.disc-badge {
  color: var(--orange); background: #fff0ec; font-size: 12px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px; margin-left: 8px; align-self: center;
}
.disc-badge:empty { display: none; }
.sheet-orig { color: #999; font-size: 13px; text-decoration: line-through; }
.sheet-orig:empty { display: none; }
.wish { border: 0; background: none; font-size: 24px; color: #bbb; cursor: pointer; }
.sold-line { color: var(--muted); font-size: 12px; margin: 4px 0 10px; }
.title { font-size: 16px; font-weight: 500; line-height: 1.45; }
.official-badge {
  display: inline-block; background: var(--orange); color: #fff; font-size: 11px;
  font-weight: 700; padding: 1px 5px; border-radius: 3px; vertical-align: middle;
}

/* ---- Shipping ---- */
.ship-row { display: flex; align-items: center; gap: 10px; }
.truck { font-size: 18px; }
.ship-text { flex: 1; font-size: 13px; }
.ship-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.chev { color: #bbb; font-size: 18px; }

/* ---- Guarantee ---- */
.guarantee { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: #555; }
.guarantee .shield { color: var(--orange); }
.guarantee .dot { color: #ccc; }

/* ---- Ratings ---- */
.ratings { display: flex; align-items: center; gap: 6px; }
.rate-num { color: var(--orange); font-weight: 700; font-size: 16px; }
.rate-star { color: var(--star); }
.rate-label { font-weight: 500; }
.ratings .muted { color: var(--muted); font-size: 13px; }
.ratings .chev { margin-left: auto; }

/* ---- Description ---- */
.details-title {
  font-size: 15px; font-weight: 500; padding-bottom: 10px;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.detail-images img, .detail-images video { width: 100%; display: block; }

/* Description CTA button (same action as Buy Now) */
.desc-cta-wrap { text-align: center; padding: 22px 6px 8px; }
.desc-cta {
  display: inline-block; border: 0; cursor: pointer; font-family: inherit;
  font-size: 18px; font-weight: 800; letter-spacing: .5px; color: #fff; text-transform: uppercase;
  padding: 15px 30px; border-radius: 40px; max-width: 92%;
  background: linear-gradient(180deg, #ffb14b 0%, #ff8a1e 46%, #f97400 100%);
  box-shadow: 0 0 22px rgba(255,140,0,.55), inset 0 2px 3px rgba(255,255,255,.65), inset 0 -3px 7px rgba(180,70,0,.4);
  text-shadow: 0 1px 2px rgba(150,60,0,.5);
  animation: ctaPulse 1.8s ease-in-out infinite;
}
.desc-cta:hover { filter: brightness(1.05); }
.desc-cta:active { transform: translateY(1px); }
@keyframes ctaPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.desc-cta-sub { margin-top: 12px; font-size: 13px; color: #8a4200; font-weight: 600; }

/* ---- Floating WhatsApp button + speech bubble ---- */
.wa-wrap {
  position: fixed; bottom: 66px; right: 16px; z-index: 25;
  display: flex; align-items: center; gap: 8px;
}
@media (min-width: 461px) {
  .wa-wrap { right: calc(50% - 230px + 16px); }
}
.wa-float {
  width: 52px; height: 52px; border-radius: 50%; background: #25d366; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.3); text-decoration: none;
}
.wa-bubble {
  position: relative; background: #fff; color: #222; border: 0; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; white-space: nowrap;
  padding: 9px 13px; border-radius: 18px; box-shadow: 0 2px 10px rgba(0,0,0,.22);
  animation: waPop .35s ease both, waWiggle 1.2s ease 1s 2;
  transition: opacity .4s ease, transform .4s ease;
}
.wa-bubble::after {
  content: ""; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: #fff;
}
.wa-bubble.hide { animation: none; opacity: 0; transform: translateX(8px); pointer-events: none; }
@keyframes waPop { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes waWiggle { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* ---- Bottom action bar ---- */
.bar-spacer { height: 54px; }
.bottombar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 460px; height: 50px; background: #fff;
  border-top: 1px solid var(--line); display: flex; z-index: 20;
}
.bb-side {
  flex: 0 0 72px; border: 0; background: #fff; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10px; color: #555; border-right: 1px solid var(--line);
}
.bb-ic { font-size: 18px; }
.bb-buy {
  flex: 1; border: 0; cursor: pointer; color: #fff; font-size: 16px; font-weight: 600;
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
}

/* ---- Bottom sheet ---- */
.sheet-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 30;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-overlay[hidden] { display: none; }
.sheet {
  width: 100%; max-width: 460px; background: #fff; border-radius: 12px 12px 0 0;
  padding: 16px 16px 20px; position: relative; animation: slideUp .22s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-close { position: absolute; top: 12px; right: 12px; border: 0; background: none; font-size: 18px; color: #999; cursor: pointer; }
.sheet-top { display: flex; gap: 12px; align-items: flex-end; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sheet-img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.sheet-price { color: var(--orange); font-weight: 700; }
.sheet-price .rm { font-size: 14px; }
.sheet-price #sheet-price { font-size: 26px; }
.sheet-save { color: var(--orange); font-size: 12px; }
.sheet-stock { color: var(--muted); font-size: 12px; margin-top: 4px; }
.sheet-section { padding: 14px 0; border-bottom: 1px solid var(--line); }
.sheet-label { font-size: 13px; color: #333; margin-bottom: 10px; }
.sheet-vars { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-var {
  border: 1px solid #ddd; border-radius: 6px; background: #fff; cursor: pointer;
  padding: 8px 12px; font-size: 13px; font-family: inherit; color: #333; position: relative;
}
.sv-badge {
  position: absolute; width: 52px; height: auto; right: -26px; bottom: -20px;
  pointer-events: none; z-index: 3; filter: drop-shadow(0 1px 3px rgba(0,0,0,.35));
}
.sheet-var.active { border-color: var(--orange); background: #fff7f5; color: var(--orange); }
.qty-row { display: flex; align-items: center; justify-content: space-between; }
.qty-row .sheet-label { margin-bottom: 0; }
.stepper { display: flex; align-items: center; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.stepper button { width: 34px; height: 30px; border: 0; background: #f5f5f5; font-size: 18px; cursor: pointer; color: #555; }
.stepper span { width: 46px; text-align: center; border-left: 1px solid #ddd; border-right: 1px solid #ddd; line-height: 30px; }
.sheet-input {
  width: 100%; border: 1px solid #ddd; border-radius: 6px; padding: 11px 12px;
  font-size: 14px; margin-bottom: 10px; outline: none;
}
.sheet-input:last-child { margin-bottom: 0; }
.sheet-input:focus { border-color: var(--orange); }
.sheet-msg { color: var(--orange); font-size: 13px; min-height: 18px; margin: 8px 0 0; }
.sheet-confirm {
  width: 100%; border: 0; border-radius: 6px; padding: 14px; margin-top: 10px;
  background: linear-gradient(180deg, var(--orange-2), var(--orange)); color: #fff;
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.sheet-confirm:disabled { opacity: .6; cursor: not-allowed; }

/* ===== Checkout page ===== */
.co-page { padding-bottom: 0; }
.co-head {
  background: #fff; display: flex; align-items: center; height: 48px; padding: 0 8px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
.co-back { text-decoration: none; color: #333; font-size: 26px; width: 40px; text-align: center; line-height: 1; }
.co-title { font-size: 17px; font-weight: 500; }

/* Address */
.addr-head { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 12px; }
.addr-head .pin { color: var(--orange); }
.co-input {
  width: 100%; border: 1px solid #ddd; border-radius: 6px; padding: 11px 12px;
  font-size: 14px; margin-bottom: 10px; outline: none; font-family: inherit; resize: vertical;
}
.co-input:last-child { margin-bottom: 0; }
.co-input:focus { border-color: var(--orange); }
select.co-input { background: #fff; appearance: none; -webkit-appearance: none; }
.co-row { display: flex; gap: 10px; }
.co-row .co-input { flex: 1; }
.co-input.invalid { border-color: var(--orange); background: #fff7f5; }

/* Order item */
.co-item { display: flex; gap: 12px; }
.ci-img { width: 76px; height: 76px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: 0 0 auto; }
.ci-info { flex: 1; min-width: 0; }
.ci-title { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-variation { color: var(--muted); font-size: 12px; margin: 4px 0; }
.ci-priceline { display: flex; justify-content: space-between; align-items: center; }
.ci-price { color: var(--orange); font-weight: 600; }
.ci-qty { color: var(--muted); font-size: 13px; }

/* Payment method */
.pay-head, .pd-head { font-weight: 600; margin-bottom: 12px; }
.pay-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer;
}
.pay-left { display: flex; align-items: center; gap: 10px; }
.pay-ic { font-size: 22px; }
.pay-name { display: block; font-size: 14px; }
.pay-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.pay-opt input { position: absolute; opacity: 0; }
.pay-opt .radio {
  width: 20px; height: 20px; border: 2px solid #ccc; border-radius: 50%; flex: 0 0 auto; position: relative;
}
.pay-opt input:checked ~ .radio { border-color: var(--orange); }
.pay-opt input:checked ~ .radio::after {
  content: ""; position: absolute; inset: 3px; background: var(--orange); border-radius: 50%;
}

/* Payment details */
.pd-row { display: flex; justify-content: space-between; font-size: 13px; color: #555; padding: 5px 0; }
.pd-discount { color: var(--orange); }
.pd-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 600; color: var(--text); font-size: 14px; }
.pd-total span:last-child { color: var(--orange); }

/* Place order bar */
.co-bottombar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 460px; height: 56px; background: #fff;
  border-top: 1px solid var(--line); display: flex; align-items: center; z-index: 20;
}
.co-bar-total { flex: 1; text-align: right; padding-right: 12px; font-size: 13px; }
.co-bar-amount { color: var(--orange); font-size: 18px; font-weight: 700; }
.co-bar-save { color: var(--muted); font-size: 11px; }
.place-order {
  flex: 0 0 140px; height: 100%; border: 0; cursor: pointer; color: #fff; font-size: 16px; font-weight: 600;
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
}
.place-order:disabled { opacity: .6; cursor: not-allowed; }
.co-msg { position: fixed; bottom: 64px; left: 0; right: 0; text-align: center; color: var(--orange); font-size: 13px; }
