:root {
  --blue: #2f5fd3;
  --blue-dark: #1e4bb8;
  --red: #e11d48;
  --red-soft: #fef2f2;
  --purple: #7c3aed;
  --purple-banner: #cdb4ff;
  --gold: #b8860b;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #ffffff;
  --chip: #e0ecff;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --radius: 12px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  background: #f8fafc;
  color: var(--text);
  line-height: 1.35;
  padding-bottom: calc(72px + var(--safe-bottom));
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: none; background: none; }

.page { max-width: 480px; margin: 0 auto; background: var(--bg); min-height: 100vh; box-shadow: var(--shadow); }

/* Top bar */
.top-strip {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 14px 6px; font-size: 11px; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.brand-mini { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--blue); font-size: 13px; }
.brand-mini img { height: 22px; width: auto; }
.location-pill {
  flex: 1; display: flex; align-items: center; gap: 4px; justify-content: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500;
}
.lang-toggle { display: flex; align-items: center; gap: 4px; font-weight: 600; color: var(--text); }
.lang-toggle img { width: 18px; height: 18px; border-radius: 2px; }

/* Search */
.search-wrap { padding: 10px 14px 8px; }
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 11px 14px; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.search-bar svg { flex-shrink: 0; color: var(--muted); }
.search-bar input {
  border: none; outline: none; flex: 1; font-size: 14px; background: transparent;
}

/* Quick services */
.services-scroll {
  display: flex; gap: 10px; overflow-x: auto; padding: 6px 14px 12px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.services-scroll::-webkit-scrollbar { display: none; }
.service-card {
  flex: 0 0 88px; scroll-snap-align: start; text-align: center;
}
.service-card .icon {
  width: 88px; height: 78px; border-radius: 14px; background: #f1f5f9;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  margin-bottom: 6px; border: 1px solid var(--border);
}
.service-card .icon img { width: 100%; height: 100%; object-fit: cover; }
.service-card strong { display: block; font-size: 11px; font-weight: 700; }
.service-card span { font-size: 9px; color: var(--muted); }

/* App promo */
.app-promo {
  margin: 0 14px 12px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(90deg, #a855f7, #9333ea); color: #fef08a;
  display: flex; align-items: center; justify-content: space-between; padding: 10px 12px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.02em;
}
.app-promo .qr { width: 54px; height: 54px; background: #fff; border-radius: 8px; padding: 4px; }
.app-promo small { display: block; color: #fff; font-weight: 600; font-size: 8px; margin-top: 2px; }

/* Hero carousel */
.hero { padding: 0 14px 8px; }
.hero-viewport { position: relative; border-radius: 16px; overflow: hidden; }
.hero-slide { display: none; position: relative; }
.hero-slide.active { display: block; }
.hero-slide img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.hero-caption {
  position: absolute; inset: auto 12px 12px 12px; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.45);
}
.hero-caption h2 { font-size: 20px; font-weight: 800; }
.hero-caption p { font-size: 12px; opacity: 0.95; }
.hero-cta {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 6px;
  background: #111; color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.hero-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.hero-dots button {
  width: 6px; height: 6px; border-radius: 999px; background: #cbd5e1;
}
.hero-dots button.active { width: 18px; background: var(--blue); }

/* Section headers */
.section { padding: 14px 14px 6px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.section-head h2 { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; text-transform: uppercase; }
.section-head h3 { font-size: 18px; font-weight: 800; }
.section-head p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.link-all { color: var(--blue); font-size: 13px; font-weight: 700; white-space: nowrap; }

/* Exclusive deals grid */
.deals-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px 14px;
}
.deal-tile {
  border-radius: 14px; overflow: hidden; position: relative; min-height: 128px;
  border: 1px solid var(--border); background: #ecfccb;
}
.deal-tile img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.deal-tile .overlay {
  position: relative; z-index: 1; padding: 10px; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
}
.deal-tile h4 { font-size: 16px; font-weight: 900; }
.deal-badge {
  align-self: flex-start; background: var(--red); color: #fff; font-size: 11px; font-weight: 800;
  padding: 4px 8px; border-radius: 999px;
}

/* Horizontal product rail */
.product-rail {
  display: flex; gap: 10px; overflow-x: auto; padding: 0 14px 16px;
  scroll-snap-type: x mandatory;
}
.product-rail::-webkit-scrollbar { display: none; }
.product-card {
  flex: 0 0 158px; scroll-snap-align: start; border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; background: #fff; position: relative;
}
.product-card .thumb { position: relative; background: #f8fafc; padding: 10px; min-height: 132px; display: flex; align-items: center; justify-content: center; }
.product-card .thumb img { max-height: 110px; object-fit: contain; }
.product-badge-off {
  position: absolute; top: 0; left: 0; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 800; padding: 4px 8px; border-bottom-right-radius: 10px;
}
.product-badge-best {
  position: absolute; top: 34px; left: 0; background: #fb923c; color: #fff;
  font-size: 9px; font-weight: 800; padding: 3px 7px; border-bottom-right-radius: 8px;
}
.btn-add {
  position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px;
  border-radius: 10px; background: var(--blue); color: #fff; font-size: 22px; font-weight: 400;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.product-body { padding: 8px 10px 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.chip { background: var(--chip); color: var(--blue); font-size: 9px; font-weight: 700; padding: 3px 6px; border-radius: 999px; }
.product-body h4 { font-size: 11px; font-weight: 700; line-height: 1.25; min-height: 42px; }
.stars { color: #f59e0b; font-size: 11px; margin: 4px 0; }
.delivery { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.delivery img { width: 14px; }
.price-row { display: flex; align-items: baseline; gap: 6px; }
.price-now { color: var(--red); font-weight: 900; font-size: 15px; }
.price-was { color: var(--blue); font-size: 11px; text-decoration: line-through; font-weight: 600; }

.btn-explore {
  margin: 0 14px 18px; display: flex; align-items: center; justify-content: center; gap: 8px;
  width: calc(100% - 28px); padding: 12px; border-radius: 999px; background: #dc2626; color: #fff;
  font-weight: 800; font-size: 14px;
}

/* Promo banners */
.promo-stack { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.promo-card {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--border); position: relative;
  min-height: 150px; background: #ede9fe;
}
.promo-card img.cover { width: 100%; height: 170px; object-fit: cover; }
.promo-card .info { padding: 12px; }
.promo-card h4 { font-size: 18px; font-weight: 900; }
.promo-card p { font-size: 12px; color: var(--muted); }
.btn-view { margin-top: 8px; display: inline-block; background: var(--purple); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; }

/* Category scroll (K-beauty) */
.category-pills {
  display: flex; gap: 10px; overflow-x: auto; padding: 0 14px 12px;
}
.category-pill {
  flex: 0 0 118px; border-radius: 14px; background: linear-gradient(180deg, #fef3c7, #fde68a);
  border: 1px solid #fcd34d; padding: 8px; text-align: center;
}
.category-pill img { height: 72px; margin: 0 auto 6px; object-fit: contain; }
.category-pill strong { font-size: 12px; }

/* Shop by category icons */
.shop-cats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0 14px 20px;
}
.shop-cat { text-align: center; font-size: 10px; font-weight: 700; color: var(--text); }
.shop-cat .ico {
  width: 62px; height: 62px; margin: 0 auto 6px; border-radius: 16px; background: #eff6ff;
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.shop-cat .ico img { width: 46px; height: 46px; object-fit: contain; }

/* Assistance + footer */
.assist {
  margin: 8px 14px 16px; background: #e8f1f9; border-radius: 16px; padding: 16px;
}
.assist h2 { font-size: 17px; font-weight: 900; margin-bottom: 8px; }
.assist p { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.assist-grid { display: grid; gap: 10px; }
.assist-card {
  background: #fff; border-radius: 12px; padding: 12px; border: 1px solid var(--border);
  display: flex; gap: 10px; align-items: center;
}
.assist-card strong { font-size: 13px; display: block; }
.assist-card span { font-size: 12px; color: var(--blue); font-weight: 700; }

.site-footer {
  padding: 18px 14px 24px; background: #0f172a; color: #cbd5e1; font-size: 12px;
}
.site-footer .logo-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.site-footer .logo-row img { height: 28px; filter: brightness(0) invert(1); }
.site-footer h3 { color: #fff; font-size: 13px; margin: 12px 0 6px; }
.site-footer ul { list-style: none; }
.site-footer li { padding: 4px 0; }
.site-footer a:hover { color: #fff; }

/* Bottom nav */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px;
  background: #fff; border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(6px + var(--safe-bottom));
  z-index: 50;
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 9px; font-weight: 600; color: var(--muted); padding: 4px;
}
.bottom-nav a.active { color: var(--blue); }
.bottom-nav svg { width: 22px; height: 22px; }
.cart-badge {
  position: absolute; margin-top: -4px; margin-left: 14px; background: var(--blue); color: #fff;
  font-size: 9px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}
.nav-item { position: relative; display: flex; flex-direction: column; align-items: center; }

.scroll-top {
  position: fixed; right: max(14px, calc(50% - 220px)); bottom: 78px;
  width: 42px; height: 42px; border-radius: 999px; background: var(--blue-dark); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }

@media (min-width: 520px) {
  body { background: #e2e8f0; padding-top: 12px; }
}