:root {
  --bg: #F0F2F5;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --text: #111827;
  --text-muted: #6B7280;
  --text-faint: #9CA3AF;
  --border: #E5E7EB;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.05);

  --amz: #FF9900;
  --amz-dark: #C47A00;
  --amz-bg: #FFF8ED;
  --amz-text: #7A4700;

  --shp: #EE4D2D;
  --shp-dark: #C23C22;
  --shp-bg: #FFF1EE;
  --shp-text: #7A1F10;

  --ml: #3483FA;
  --ml-dark: #1B5FC7;
  --ml-bg: #EEF4FF;
  --ml-text: #1A3F7A;

  --discount-bg: #DCFCE7;
  --discount-text: #166534;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1012; --surface: #1A1B1E; --surface-2: #222426;
    --text: #F0F1F3; --text-muted: #9CA3AF; --text-faint: #6B7280;
    --border: #2D2F33;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --amz-bg: #2A1E08; --amz-text: #FFB83F; --amz-dark: #FFB83F;
    --shp-bg: #2A1008; --shp-text: #FF8C78; --shp-dark: #FF8C78;
    --ml-bg: #0C1A35; --ml-text: #78AAFF; --ml-dark: #78AAFF;
    --discount-bg: #14532D; --discount-text: #86EFAC;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1012; --surface: #1A1B1E; --surface-2: #222426;
  --text: #F0F1F3; --text-muted: #9CA3AF; --text-faint: #6B7280;
  --border: #2D2F33;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --amz-bg: #2A1E08; --amz-text: #FFB83F; --amz-dark: #FFB83F;
  --shp-bg: #2A1008; --shp-text: #FF8C78; --shp-dark: #FF8C78;
  --ml-bg: #0C1A35; --ml-text: #78AAFF; --ml-dark: #78AAFF;
  --discount-bg: #14532D; --discount-text: #86EFAC;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── HEADER ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px; height: 62px;
  display: flex; align-items: center; gap: 20px;
}
.logo {
  font-weight: 800; font-size: 20px; letter-spacing: -0.5px;
  white-space: nowrap; flex-shrink: 0;
}
.logo span { color: var(--amz); }
.search-wrap { flex: 1; max-width: 480px; position: relative; }
.search-wrap input {
  width: 100%; padding: 9px 16px 9px 40px;
  border: 1.5px solid var(--border); border-radius: 50px;
  background: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: 14px; outline: none;
  transition: border-color 0.2s;
}
.search-wrap input::placeholder { color: var(--text-faint); }
.search-wrap input:focus { border-color: var(--amz); }
.search-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); color: var(--text-faint);
  pointer-events: none; font-size: 15px;
}

/* ── STORE FILTER ── */
.store-bar { background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.store-bar::-webkit-scrollbar { display: none; }
.store-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 10px 24px; display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.store-label { font-size: 11px; font-weight: 700; color: var(--text-faint); letter-spacing: 0.8px; text-transform: uppercase; margin-right: 4px; flex-shrink: 0; }
.store-pill {
  padding: 6px 14px; border-radius: 50px; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--border); background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all 0.18s; display: inline-flex; align-items: center; gap: 6px; font-family: inherit;
}
.store-pill:hover { border-color: var(--text-muted); color: var(--text); }
.store-pill.active { color: #fff; border-color: transparent; }
.store-pill[data-store="all"].active { background: var(--text); }
.store-pill[data-store="amazon"].active { background: var(--amz); color: #1a0800; }
.store-pill[data-store="shopee"].active { background: var(--shp); }
.store-pill[data-store="ml"].active { background: var(--ml); }

/* ── CATEGORY TABS ── */
.cat-bar { background: var(--surface-2); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.cat-bar::-webkit-scrollbar { display: none; }
.cat-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; }
.cat-tab {
  padding: 10px 14px; font-size: 13px; font-weight: 500; color: var(--text-muted);
  border-bottom: 2.5px solid transparent; cursor: pointer; transition: all 0.18s; white-space: nowrap; user-select: none;
}
.cat-tab:hover { color: var(--text); }
.cat-tab.active { color: var(--text); border-bottom-color: var(--amz); font-weight: 700; }

/* ── MAIN ── */
.main { max-width: 1200px; margin: 0 auto; padding: 28px 24px 48px; }

.sec-heading {
  font-size: 15px; font-weight: 700; letter-spacing: -0.2px;
  margin-bottom: 14px; display: flex; align-items: center; gap: 6px;
}

/* ── FEATURED GRID ── */
.featured-section { margin-bottom: 36px; }
.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.featured-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
.featured-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.feat-img {
  height: 140px;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
}
.feat-img.amazon { background: var(--amz-bg); }
.feat-img.shopee  { background: var(--shp-bg); }
.feat-img.ml      { background: var(--ml-bg);  }
.feat-img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; box-sizing: border-box; }

.feat-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }

.feat-store {
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase;
  display: flex; align-items: center; gap: 5px;
}
.feat-store.amazon { color: var(--amz-dark); }
.feat-store.shopee  { color: var(--shp-dark); }
.feat-store.ml      { color: var(--ml-dark);  }

.feat-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.feat-dot.amazon { background: var(--amz); }
.feat-dot.shopee  { background: var(--shp); }
.feat-dot.ml      { background: var(--ml);  }

.feat-title {
  font-size: 14px; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.feat-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

.feat-price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.feat-price {
  font-size: 22px; font-weight: 800; letter-spacing: -0.5px; font-variant-numeric: tabular-nums;
}
.feat-price.amazon { color: var(--amz-dark); }
.feat-price.shopee  { color: var(--shp-dark); }
.feat-price.ml      { color: var(--ml-dark);  }

.price-old { font-size: 12px; color: var(--text-faint); text-decoration: line-through; font-variant-numeric: tabular-nums; }
.discount-badge {
  display: inline-flex; align-items: center;
  background: var(--discount-bg); color: var(--discount-text);
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px;
}

.feat-cta {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  width: 100%; padding: 11px 14px; border: none;
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: filter 0.18s; letter-spacing: 0.1px;
}
.feat-cta.amazon { background: #111111; color: #fff; }
.feat-cta.shopee  { background: var(--shp); color: #fff; }
.feat-cta.ml      { background: #FFE600; color: #1a1200; }
.feat-cta:hover { filter: brightness(1.08); }

/* ── PRODUCT GRID ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex; flex-direction: column;
  cursor: pointer; text-decoration: none; color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* Product image — white background, relative for heart button */
.card-img-wrap {
  height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 70px; flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.card-img-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 10px; box-sizing: border-box; }

/* Heart button */
.card-heart {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px;
  background: none; border: none;
  font-size: 18px; cursor: pointer;
  color: var(--text-faint);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
  padding: 0;
}
.card-heart:hover { color: #E879A0; background: rgba(232,121,160,0.08); }

.card-body { padding: 13px 14px 10px; flex: 1; display: flex; flex-direction: column; gap: 4px; }

.card-name {
  font-size: 13.5px; font-weight: 700; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.card-desc {
  font-size: 12px; color: var(--text-muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.card-price { margin-top: 8px; }
.price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.price-main {
  font-size: 20px; font-weight: 800; letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.price-old-sm { font-size: 12px; color: var(--text-faint); text-decoration: line-through; font-variant-numeric: tabular-nums; }

/* Store logo — below price */
.card-store-logo {
  margin-top: 8px;
  display: flex; align-items: center;
}
.brand-logo {
  display: flex; align-items: center; gap: 7px;
}
.brand-logo svg { flex-shrink: 0; }
.brand-name-amazon {
  font-size: 17px; font-weight: 800; letter-spacing: -0.8px; color: #111;
  line-height: 1; font-family: 'Plus Jakarta Sans', sans-serif;
}
.brand-name-amazon .smile-wrap { display: block; margin-top: 1px; }
.brand-name-shopee {
  font-size: 16px; font-weight: 800; letter-spacing: -0.3px; color: #EE4D2D;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.brand-name-ml {
  display: flex; flex-direction: column; line-height: 1.1;
  font-size: 12px; font-weight: 800; color: #3483FA;
  font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.1px;
}

/* CTA button */
.card-cta {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  width: 100%; padding: 11px 14px; border: none;
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  cursor: pointer; transition: filter 0.18s;
  letter-spacing: 0.1px; margin-top: 10px;
}
.card-cta.amazon { background: #111111; color: #fff; }
.card-cta.shopee  { background: var(--shp); color: #fff; }
.card-cta.ml      { background: #FFE600; color: #1a1200; }
.card-cta:hover { filter: brightness(1.12); }

/* ── TRUST STRIP ── */
.trust-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 24px 40px;
}
.trust-strip-inner {
  max-width: 900px; margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.trust-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.trust-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.trust-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.trust-icon-wrap {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  border: 1.5px solid var(--border);
}
.trust-card-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  line-height: 1.3;
}
.trust-card-desc {
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
}
.trust-signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.trust-signature-text {
  font-family: 'Caveat', cursive;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
}
.trust-signature-heart {
  font-size: 20px;
  color: #E879A0;
}
.trust-signature-row { display: flex; align-items: center; gap: 12px; }
.trust-signature-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
@media (max-width: 780px) {
  .trust-signature {
    flex-direction: row;
    justify-content: center;
  }
  .trust-signature-text { font-size: 22px; }
}
@media (max-width: 580px) {
  .trust-cards {
    grid-template-columns: 1fr;
  }
}

/* ── FOOTER ── */
footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 28px 24px; text-align: center; color: var(--text-faint);
  font-size: 12px; line-height: 1.8;
}
footer strong { color: var(--text-muted); }
.footer-logos { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 12px; flex-wrap: wrap; }
.footer-store-chip { padding: 4px 12px; border-radius: 50px; font-size: 12px; font-weight: 700; }
.footer-store-chip.amazon { background: var(--amz-bg); color: var(--amz-text); }
.footer-store-chip.shopee { background: var(--shp-bg); color: var(--shp-text); }
.footer-store-chip.ml     { background: var(--ml-bg);  color: var(--ml-text);  }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .header-inner { padding: 0 16px; gap: 12px; }
  .store-inner, .main { padding-inline: 16px; }
  .cat-inner { padding: 0 16px; }
  .main { padding: 20px 16px 40px; }
  .featured-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-img-wrap { height: 120px; font-size: 46px; }
  .price-main { font-size: 16px; }
}
@media (max-width: 360px) {
  .product-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .product-card, .featured-card { transition: none; }
}

/* ── HERO BANNER ── */
.hero {
  background: #EDEAF8;
  overflow: hidden;
  border-bottom: 1px solid #D9D4F0;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 230px 264px;
  align-items: center;
  gap: 0;
  min-height: 220px;
}

/* LEFT: text */
.hero-text { padding: 32px 32px 32px 0; }

.hero-h1 {
  font-size: 34px;
  font-weight: 800;
  color: #1C1843;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 10px;
}
.hero-sub {
  font-size: 14px;
  color: #3D3566;
  line-height: 1.55;
  max-width: 340px;
  margin-bottom: 18px;
}
.hero-trust {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  font-size: 11.5px;
  color: #3D3566;
  line-height: 1.35;
  max-width: 110px;
  font-weight: 500;
}
.trust-icon { font-size: 17px; }
.hero-btn {
  padding: 13px 26px;
  background: #5B3AEE;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.hero-btn:hover { opacity: 0.88; }

/* CENTER: photo */
.hero-photo-wrap {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero-photo-placeholder {
  width: 195px;
  height: 210px;
  background: linear-gradient(160deg, #C4BBF8 0%, #A99EE8 100%);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #4A3A9E;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
}
.hero-photo-placeholder span { font-size: 42px; }
.hero-photo-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero-handwritten {
  position: absolute;
  top: 16px;
  left: -8px;
  font-family: 'Caveat', cursive;
  font-size: 19px;
  font-weight: 700;
  color: #3D2EA0;
  line-height: 1.25;
  transform: rotate(-6deg);
  pointer-events: none;
  white-space: nowrap;
}
.hero-arrow {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  transform: rotate(20deg);
}

/* RIGHT: purple card */
.hero-card {
  background: #C4BBF8;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 26px;
  gap: 10px;
}
.hero-card-title {
  font-size: 19px;
  font-weight: 800;
  color: #1C1843;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  line-height: 1.2;
}
.hero-card-hr {
  width: 36px;
  border: none;
  border-top: 2.5px solid #7B6BD4;
}
.hero-card-sub {
  font-family: 'Caveat', cursive;
  font-size: 20px;
  font-weight: 600;
  color: #3D2EA0;
}

/* Hero responsive */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr 180px; }
  .hero-card { display: none; }
  .hero-photo-placeholder { width: 160px; height: 180px; }
}
@media (max-width: 580px) {
  .hero-inner { grid-template-columns: 1fr; min-height: auto; }
  .hero-text { padding: 24px 0 16px; }
  .hero-h1 { font-size: 26px; }
  .hero-photo-wrap { display: none; }
  .hero-btn { width: 100%; justify-content: center; }
}
