/* =========================================================
   Дэлгүүрийн вэбсайт — хар цагаан загвар
   Өнгө: зөвхөн хар, цагаан, саарал. Өнгөтэй нь зөвхөн пүүзний зураг.
   ========================================================= */
:root {
  /* shop.js → colors (shop-apply.js --brand-dark / --brand-light болгож тавина) */
  --black: var(--brand-dark, #0a0a0a);
  --white: var(--brand-light, #ffffff);
  --grey-50: #f5f5f4;     /* дэлгүүрийн хэсгийн дэвсгэр */
  --grey-100: #ececeb;
  --grey-200: #dededc;    /* хүрээ */
  --grey-400: #a3a3a0;
  --grey-450: #767673;    /* идэвхгүй/туслах текст (цагаан дээр 4.5:1) */
  --grey-500: #595956;    /* бүдэг текст (цагаан дээр 7:1, наранд уншигдана) */
  --grey-700: #3f3f3d;
  --error: #a8322d;       /* зөвхөн алдаанд */

  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --r-sm: 12px;           /* товч, оролт */
  --r-md: 16px;           /* карт */
  --r-lg: 24px;           /* цонх */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.05), 0 12px 32px rgba(0, 0, 0, 0.08);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 60px;

  /* Hero (дээд хэсэг) ба түүн дээрх толгой: цагаан загварт цагаан дэвсгэр, хар бичиг */
  --hero-bg: #ffffff;
  --hero-fg: #0a0a0a;
  --hero-fg-rgb: 10, 10, 10;          /* rgba(var(--hero-fg-rgb), 0.5) хэлбэрээр */
  --hero-muted: #595956;
  --glass-bg: rgba(255, 255, 255, 0.62);
  --header-glass: rgba(255, 255, 255, 0.92);
  --footer-bg: #0a0a0a;
  color-scheme: light;
}

/* ===== Бараан загвар (☾ товч эсвэл утасны тохиргоо) ===== */
:root[data-theme="dark"] {
  --black: #f2f2f0;                   /* бичиг, үндсэн товч (цагаан болно) */
  --white: #141414;                   /* карт, цонхны дэвсгэр */
  --grey-50: #0a0a0a;                 /* хуудасны дэвсгэр */
  --grey-100: #1f1f1e;
  --grey-200: #2e2e2c;
  --grey-400: #5c5c59;
  --grey-450: #8f8f8b;
  --grey-500: #a8a8a4;
  --grey-700: #d6d6d2;
  --error: #e0645c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.45), 0 12px 32px rgba(0, 0, 0, 0.5);

  --hero-bg: #000000;
  --hero-fg: #ffffff;
  --hero-fg-rgb: 255, 255, 255;
  --hero-muted: #a3a3a0;
  --glass-bg: rgba(16, 16, 16, 0.5);
  --header-glass: rgba(14, 14, 14, 0.88);
  --footer-bg: #000000;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  background: var(--grey-50);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }

/* ===== Лого ===== */
.logo {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  padding: 5px 11px;
  border-radius: 8px;
  background: var(--hero-fg);           /* hero дээр: эсрэг өнгө */
  color: var(--hero-bg);
  transition: background 0.3s, color 0.3s;
}

/* ===== Толгой: hero дээр тунгалаг, доош гүйлгэхэд цагаан ===== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  color: var(--hero-fg);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.header.is-light {
  background: var(--header-glass);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  color: var(--black);
  box-shadow: 0 1px 0 var(--grey-200);
}
.header.is-light .logo { background: var(--black); color: var(--white); }
.nav { display: none; gap: 18px; font-size: 14px; font-weight: 500; margin-left: auto; }
.nav a { opacity: 0.75; transition: opacity 0.2s; }
.nav a:hover { opacity: 1; }

/* Толгойн дүрс товчнууд (хадгалсан, сагс) */
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s var(--ease);
}
.icon-btn:active { transform: scale(0.9); }
.icon-btn .icon { width: 22px; height: 22px; }
.count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--hero-fg);
  color: var(--hero-bg);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.header.is-light .count { background: var(--black); color: var(--white); }
.count.bump { animation: bump 0.35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ===== Цагаан / бараан товч: цагаан загварт сар (☾), бараан загварт нар (☀) ===== */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ===== MN / EN товч ===== */
.lang-toggle { height: 44px; padding: 0 2px; margin-left: 2px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.lang-pill {
  display: inline-flex;
  padding: 2px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.lang-pill span { padding: 0 6px; height: 22px; line-height: 22px; border-radius: 999px; opacity: 0.6; transition: background 0.2s, color 0.2s, opacity 0.2s; }
.lang-pill span.is-active { opacity: 1; background: var(--hero-fg); color: var(--hero-bg); }
.header.is-light .lang-pill span.is-active,
.header.is-searching .lang-pill span.is-active { background: var(--black); color: var(--white); }

/* ===== Хайлт ===== */
.search { display: none; }
.header.is-searching { background: var(--white); color: var(--black); box-shadow: 0 1px 0 var(--grey-200); }
.header.is-searching .search {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 12px;
  background: var(--white);
}
.search-field { position: relative; flex: 1; min-width: 0; }
.search-field input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 42px;
  font: inherit;
  font-size: 17px;
  color: var(--black);
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: var(--r-sm);
  -webkit-appearance: none;
  appearance: none;
}
.search-field input:focus { outline: none; border-color: var(--black); background: var(--white); }
.search-field input::placeholder { color: var(--grey-450); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--grey-500); pointer-events: none; }
.search-clear {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  background: none;
  color: var(--grey-500);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.search-clear .icon { width: 18px; height: 18px; }
.search-cancel { flex: 0 0 auto; min-height: 44px; padding: 0 8px; border: 0; background: none; font-size: 15px; font-weight: 600; cursor: pointer; }

/* ===== Шүүлтүүрийн товчнууд ===== */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 2px 16px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px 0 16px;
  border: 1px solid var(--grey-200);
  border-radius: 999px;
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.chip:active { transform: scale(0.96); }
.chip .icon { width: 16px; height: 16px; }
.chip.is-active { background: var(--black); color: var(--white); border-color: var(--black); }
.chip-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--white); color: var(--black); font-size: 11px; line-height: 20px; text-align: center; }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin: 6px 0 10px; }
.text-btn { min-height: 44px; padding: 0 4px; border: 0; background: none; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ===== Шүүлтүүрийн цонх (доороос) ===== */
.sheet {
  border: 0;
  padding: 0;
  margin: auto auto 0;
  width: 100%;
  max-width: 100%;
  max-height: 80vh;
  max-height: 80dvh;
  background: var(--white);
  color: var(--black);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet-up 0.3s var(--ease); }
.sheet::backdrop { background: rgba(0, 0, 0, 0.5); animation: fade-in 0.3s; }
/* Агуулгынхаа өндөртэй; сонголт олон бол л багасаж гүйлгэнэ.
   (flex: 1 байхад iPhone Safari энэ хэсгийг 0 өндөртэй болгож байсан) */
.sheet-options {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  padding: 16px 20px 20px;
  overscroll-behavior: contain;
}
.opt {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--grey-200);
  border-radius: 999px;
  background: var(--white);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.opt.is-on { background: var(--black); color: var(--white); border-color: var(--black); }
.opt:disabled { color: var(--grey-450); background: var(--grey-50); border-color: var(--grey-100); cursor: not-allowed; }
.opt-n { font-weight: 500; opacity: 0.7; margin-left: 2px; }
.sheet-foot {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--grey-100);
}
.sheet-foot .btn[hidden] + .btn { grid-column: 1 / -1; }
#no-results { padding-top: 32px; }

/* ===== Нэвтрэх, бүртгэл ===== */
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--grey-100);
  color: var(--black);
  font-weight: 700;
  font-size: 14px;
}
.avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.header .avatar-letter { background: var(--hero-fg); color: var(--hero-bg); }
.header.is-light .avatar-letter, .header.is-searching .avatar-letter { background: var(--black); color: var(--white); }
.sheet-body { padding: 16px 20px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; }
.sheet-body .btn-block { margin-top: 12px; }
.sheet-text { color: var(--grey-700); font-size: 15px; line-height: 1.55; }
.sheet-legal { margin-top: 16px; font-size: 12px; color: var(--grey-500); text-align: center; }
.sheet-legal a { text-decoration: underline; text-underline-offset: 2px; }
.btn.btn-provider { background: var(--white); color: var(--black); border: 1.5px solid var(--black); }
.btn.btn-provider:hover { background: var(--grey-50); }
.account-card { display: flex; align-items: center; gap: 14px; padding: 4px 0 8px; }
.account-name { font-weight: 700; font-size: 17px; }
.account-email { color: var(--grey-500); font-size: 14px; word-break: break-all; }
.danger-link { display: block; margin: 14px auto 0; color: var(--error); }

/* ===== Сэтгэгдэл ===== */
.reviews { margin-top: 28px; padding-top: 4px; border-top: 1px solid var(--grey-100); }
.reviews-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.reviews-avg { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--grey-500); }
.reviews-avg strong { color: var(--black); }
.stars { display: inline-flex; gap: 1px; }
.stars .icon { width: 16px; height: 16px; fill: none; stroke: var(--black); }
.stars .icon.on { fill: var(--black); }
.stars-sm .icon { width: 13px; height: 13px; }
.reviews-empty { color: var(--grey-500); font-size: 14px; margin-top: 8px; }
.reviews-loading {
  height: 64px;
  margin-top: 8px;
  border-radius: var(--r-sm);
  background: linear-gradient(100deg, var(--grey-100) 40%, #f7f7f6 50%, var(--grey-100) 60%) 0 0 / 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
.review-write { margin-top: 12px !important; }
.review-list { list-style: none; margin-top: 12px; display: grid; gap: 14px; }
.review { display: flex; gap: 12px; }
.review-main { min-width: 0; flex: 1; }
.review-meta { font-size: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.review-date { color: var(--grey-500); font-size: 12px; }
.you-tag { font-size: 11px; font-weight: 700; background: var(--black); color: var(--white); border-radius: 999px; padding: 1px 8px; }
.review-text { font-size: 14px; line-height: 1.55; margin-top: 4px; white-space: pre-line; overflow-wrap: anywhere; }
.review-own { display: flex; gap: 16px; }
.review-own .text-btn { min-height: 36px; font-size: 13px; }
.review-form { margin-top: 12px; background: var(--grey-50); border-radius: var(--r-md); padding: 14px; }
.review-form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.review-form-label + textarea, .star-picker + .review-form-label { margin-top: 12px; }
.star-picker { display: flex; gap: 4px; }
.star-btn { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; border-radius: 50%; }
.star-btn .icon { width: 30px; height: 30px; fill: none; stroke: var(--black); transition: fill 0.15s, transform 0.15s var(--ease); }
.star-btn.on .icon { fill: var(--black); }
.star-btn:active .icon { transform: scale(0.85); }
.review-form textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--grey-200);
  border-radius: var(--r-sm);
  background: var(--white);
  resize: vertical;
}
.review-form textarea:focus { outline: none; border-color: var(--black); }
.review-count { font-size: 12px; color: var(--grey-500); text-align: right; margin-top: 4px; }
.review-form-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 8px; }

/* ===== Зүрх (хадгалах) ===== */
.heart-icon { fill: none; stroke: currentColor; }
.is-saved .heart-icon { fill: currentColor; }
.heart-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0a0a0a;                        /* зураг дээр: үргэлж цагаан дугуй, хар зүрх */
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s var(--ease);
}
.heart-btn .icon { width: 19px; height: 19px; }
.heart-btn:active { transform: scale(0.88); }
.heart-btn.pop .icon { animation: heart-pop 0.4s var(--ease); }
@keyframes heart-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  65% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.card .heart-btn { position: absolute; top: 8px; right: 8px; }
.heart-btn-lg { width: 46px; height: 46px; flex: 0 0 46px; background: var(--grey-50); color: var(--black); box-shadow: none; }   /* зураг дээр биш → загварыг дагана */
.heart-btn-lg .icon { width: 23px; height: 23px; }
.detail-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-title .heart-btn-lg { margin-right: 40px; }   /* хаах товчны доор орохгүй */

/* ===== Товч ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--black); color: var(--white); }
.btn-primary:hover { background: var(--grey-700); }
.btn-light { background: var(--white); color: var(--black); }
.btn-light:hover { background: var(--grey-100); }
.btn-ghost { background: var(--grey-100); color: var(--black); }
.btn-block { display: flex; width: 100%; }
.btn:disabled { background: var(--grey-100); color: var(--grey-500); cursor: not-allowed; transform: none; }
.btn-link {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  background: none;
  border: 0;
  color: var(--grey-500);
  font-size: 14px;
  cursor: pointer;
}

/* =========================================================
   HERO — том гарчиг + онцлох пүүз
   Утсан дээр: гарчиг → пүүз → товч + тоолуур (дээрээс доош)
   Компьютер дээр: зүүн 40% текст, баруун 60% пүүз
   ========================================================= */
.hero {
  position: relative;
  background: transparent;              /* ар талын гэрлийн туяа харагдана (өнгө нь хуудасны дэвсгэр) */
  color: var(--hero-fg);
  /* --scroll = пүүз солигдох / эргэх гүйлгэлтийн хэмжээ (дэлгэцийн 80%-иар) */
  height: calc(100vh + var(--scroll, 0) * 80vh);
  height: calc(100svh + var(--scroll, 0) * 80svh);
}
.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "head head" "visual visual" "cta counter";
  column-gap: 12px;
  row-gap: 8px;
  padding: calc(var(--header-h) + 8px) 16px calc(16px + env(safe-area-inset-bottom));
}

/* Ар талын бүдэг том брэнд үг */
.hero-brand {
  position: absolute;
  left: -3vw;
  top: calc(var(--header-h) - 2vw);
  z-index: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34vw;
  line-height: 0.8;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(var(--hero-fg-rgb), 0.045);
  pointer-events: none;
  user-select: none;
  transition: opacity 0.5s var(--ease);
}
.hero-brand.is-changing { opacity: 0; }

/* Гэрлийн туяа: дэлгэцэнд бэхлэгдсэн → доош гүйлгэхэд хамт явна. Бүх контентын ард (z-index -1). */
.page-rays { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.side-rays { overflow: hidden; pointer-events: none; }
.side-rays__canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

/* Зүүн тал (утсан дээр хэсэг бүр өөрийн мөрөнд) */
.hero-copy { display: contents; }
.hero-headline {
  grid-area: head;
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 12vw, 64px);
  line-height: 0.88;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.hero-headline span { display: block; white-space: nowrap; }
.hero-headline .is-grey { color: var(--grey-500); }
.hero-headline .is-indent { padding-left: 1.2em; }
.hero-text { display: none; }

.hero-cta {
  grid-area: cta;
  justify-self: start;
  align-self: center;
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 18px 0 5px;
  border-radius: 999px;
  background: var(--hero-fg);
  color: var(--hero-bg);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.2s;
}
.hero-cta:active { transform: scale(0.97); }
.hero-cta-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--hero-bg);
  color: var(--hero-fg);
  display: grid;
  place-items: center;
}
.hero-cta-dot .icon { width: 18px; height: 18px; }
.hero-cta-arrow { transition: transform 0.2s var(--ease); }
@media (hover: hover) {
  .hero-cta:hover { opacity: 0.88; }
  .hero-cta:hover .hero-cta-arrow { transform: translateX(3px); }
}

/* Баруун тал: пүүзний талбай. Дөрвөлжин нь талбайдаа багтах хамгийн том хэмжээтэй. */
.hero-visual {
  grid-area: visual;
  position: relative;
  min-height: 0;
  z-index: 1;
  container-type: size;
  touch-action: pan-y;          /* дээш доош гүйлгэлт хэвийн, хажуу тийш чирэхэд эргэнэ */
}
.hero-square {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 100%;
  height: 100%;
}
@supports (width: 1cqw) {
  .hero-square { width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); }
}
.hero-ring {
  position: absolute;
  inset: -4%;                   /* тавцангийн гадуур нимгэн цагираг */
  border-radius: 50%;
  border: 1px solid rgba(var(--hero-fg-rgb), 0.14);
  pointer-events: none;
}

.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translate3d(10%, 0, 0);
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease);
  pointer-events: none;
}
.hero-slide.is-before { transform: translate3d(-10%, 0, 0); }
.hero-slide.is-active { opacity: 1; transform: none; pointer-events: auto; }

/* Пүүз дугуй тавцан дээр (зургийн дэвсгэр ямар ч өнгөтэй байсан тойрог болж харагдана).
   Хар дэвсгэр дээр авсан 360 зураг бол тавцан харагдахгүй, пүүз агаарт хөвнө. */
.hero-shoe {
  position: absolute;
  inset: 0;
  cursor: pointer;
  -webkit-mask-image: radial-gradient(circle closest-side at 50% 50%, #000 97%, transparent 100%);
  mask-image: radial-gradient(circle closest-side at 50% 50%, #000 97%, transparent 100%);
}
/* Хар дэвсгэртэй hero зураг: тавцан харагдахгүй, ойрын зургийн зах зөөлөн уусна */
.hero-shoe.is-cutout {
  -webkit-mask-image: radial-gradient(circle closest-side at 50% 50%, #000 70%, transparent 100%);
  mask-image: radial-gradient(circle closest-side at 50% 50%, #000 70%, transparent 100%);
}
/* Цагаан загварт цагаан пүүз дэвсгэрт уусахгүйн тулд зөөлөн сүүдэр */
:root:not([data-theme="dark"]) .hero-shoe.is-cutout img { filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.16)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.12)); }
.hero-shoe img,
.hero-shoe canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.hero-shoe.is-spin { cursor: grab; }
.hero-shoe.is-spin:active { cursor: grabbing; }

/* 360 зураггүй пүүз: зөөлөн хөвөх + (компьютер дээр) хулганаар хазайх */
.hero-float { position: absolute; inset: 0; animation: hero-float 6s ease-in-out infinite; }
.hero-tilt {
  position: absolute;
  inset: 0;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ease);
}
@keyframes hero-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
  50% { transform: translate3d(0, -3%, 0) rotate(1deg); }
}

/* Шилэн мэдээллийн картууд (зөвхөн Sheet-ийн бодит мэдээлэл) */
.hero-cards { position: absolute; inset: 0; z-index: 3; pointer-events: none; transition: opacity 0.35s var(--ease); }
.hero-cards.is-changing { opacity: 0; }
.hero-card {
  position: absolute;
  max-width: 48%;
  padding: 7px 11px 8px;
  border-radius: 14px;
  background: var(--glass-bg);               /* шил: загварын өнгөнд тааруулна */
  border: 1px solid rgba(var(--hero-fg-rgb), 0.16);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  color: var(--hero-fg);
  pointer-events: auto;
}
.hero-card small { display: block; font-size: 10px; line-height: 1.3; color: rgba(var(--hero-fg-rgb), 0.62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-card strong { display: block; font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-card-price { top: 2%; right: 0; cursor: pointer; }
.hero-card-sizes { bottom: 2%; right: 0; }
.hero-card-tag { bottom: 2%; left: 0; }
.hero-card:only-child { max-width: 80%; }   /* ганц карт (жишээ нь 3D пүүз) бол бүтэн хаяг харагдана */

.hero-drag {
  position: absolute;
  top: 3%;
  left: 0;
  z-index: 3;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(var(--hero-fg-rgb), 0.08);
  font-size: 11px;
  color: rgba(var(--hero-fg-rgb), 0.7);
  pointer-events: none;
  transition: opacity 0.6s;
}
.hero-drag.is-faded { opacity: 0; }

/* 01 —— 04 */
.hero-counter {
  grid-area: counter;
  align-self: center;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.hero-counter[hidden] { display: none; }
#hero-counter-total { color: var(--grey-500); }
.hero-counter-line { position: relative; width: 48px; height: 1px; background: rgba(var(--hero-fg-rgb), 0.25); overflow: hidden; }
#hero-counter-fill { position: absolute; inset: 0; background: var(--hero-fg); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* Баруун доод булан (компьютер дээр) */
.hero-corner { display: none; }

/* Ачаалж байх үед: пүүзний оронд зөөлөн гэрэл */
.hero-loading .hero-slides::before {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--hero-fg-rgb), 0.08), transparent);
  animation: shimmer 1.2s linear infinite;
}

/* Маш жижиг утас (360px хүртэл) */
@media (max-width: 360px) {
  .hero-headline { font-size: 37px; }
  .hero-cta { height: 44px; font-size: 14px; padding-right: 14px; }
  .hero-cta-dot { width: 34px; height: 34px; }
  .hero-counter-line { width: 32px; }
}

/* =========================================================
   ДЭЛГҮҮРИЙН ХЭСЭГ (цайвар)
   ========================================================= */
.section { padding: 56px 16px; max-width: 1200px; margin: 0 auto; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 7vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.section-count { color: var(--grey-500); font-size: 14px; }

/* ===== Саяхан үзсэн: хажуу тийш гүйлгэдэг мөр ===== */
.section-rail { padding-top: 40px; padding-bottom: 0; }
.section-title-sm { font-size: 22px; margin-bottom: 14px; }
.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  margin: 0 -16px;
  padding: 4px 16px 12px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail-item {
  flex: 0 0 136px;
  scroll-snap-align: start;
  text-align: left;
  background: var(--white);
  border: 0;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s var(--ease);
}
.rail-item:active { transform: scale(0.96); }
.rail-item img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; background: var(--grey-100); }
.rail-item.sold-out img { filter: grayscale(1); opacity: 0.55; }
.rail-text { display: block; padding: 8px 10px 10px; }
.rail-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.rail-price { display: block; font-family: var(--font-display); font-size: 14px; font-weight: 700; margin-top: 2px; }
.rail-sm .rail-item { flex-basis: 112px; background: var(--grey-50); box-shadow: none; }
.detail-recent { margin-top: 28px; padding-top: 4px; border-top: 1px solid var(--grey-100); }
.detail-body .rail { margin: 0 -20px; padding: 4px 20px 4px; scroll-padding: 0 20px; }

/* ===== Барааны карт ===== */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card {
  background: var(--white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:active { transform: scale(0.98); }
.card-img { position: relative; aspect-ratio: 1 / 1; background: var(--grey-100); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.card.sold-out .card-img img { filter: grayscale(1); opacity: 0.55; }
.card-body { padding: 12px 14px 14px; }
.card-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.card-price { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-top: 4px; letter-spacing: -0.01em; }
.card-sizes { font-size: 12px; color: var(--grey-500); margin-top: 4px; }
.card.sold-out .card-price { color: var(--grey-450); }

@media (hover: hover) {
  .card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
  .card:hover .card-img img { transform: scale(1.04); }
}

/* ===== Шошго (өнгөгүй) ===== */
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.badge-solid { background: var(--black); color: var(--white); }
.badge-outline { background: rgba(255, 255, 255, 0.92); color: #0a0a0a; box-shadow: inset 0 0 0 1.5px #0a0a0a; }
.badge-soldout { background: var(--grey-200); color: var(--grey-500); }

/* Ачаалж байх үеийн саарал хайрцаг */
.skeleton {
  aspect-ratio: 3 / 4;
  cursor: default;
  box-shadow: none;
  background: linear-gradient(100deg, var(--grey-100) 40%, #f7f7f6 50%, var(--grey-100) 60%) 0 0 / 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== Хэрхэн захиалах ===== */
.steps { list-style: none; display: grid; gap: 10px; counter-reset: step; }
.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}
.step-num {
  flex: 0 0 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.step h3 { font-size: 16px; font-weight: 600; }
.step p { color: var(--grey-500); font-size: 14px; margin-top: 2px; }

/* ===== Холбоо барих ===== */
.contact { display: grid; gap: 10px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  transition: box-shadow 0.3s var(--ease), transform 0.15s var(--ease);
}
.contact-item:active { transform: scale(0.98); }
.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grey-100);
  display: grid;
  place-items: center;
}
.contact-item small { display: block; color: var(--grey-500); font-size: 12px; }
.contact-item strong { font-size: 16px; font-weight: 600; }
@media (hover: hover) { .contact-item:hover { box-shadow: var(--shadow-md); } }

/* =========================================================
   БАРААНЫ ДЭЛГЭРЭНГҮЙ (цагаан, утсан дээр доороос гарна)
   ========================================================= */
.detail {
  border: 0;
  padding: 0;
  margin: auto auto 0;
  width: 100%;
  max-width: 100%;
  max-height: 94vh;
  max-height: 94dvh;
  background: var(--white);
  color: var(--black);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.detail[open] { animation: sheet-up 0.35s var(--ease); }
.detail::backdrop { background: rgba(0, 0, 0, 0.5); animation: fade-in 0.3s; }
@keyframes sheet-up { from { transform: translateY(60px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }

/* Хаах товч: 0 өндөртэй "наалддаг" мөрөнд байрлана → доош гүйлгэхэд дээд буланд үлдэнэ */
.detail-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 0;
  display: flex;
  justify-content: flex-end;
  grid-column: 1 / -1;          /* компьютер дээрх 2 баганын аль алинд */
}
.detail-close {
  position: relative;
  top: 12px;
  right: 12px;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--white);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.gallery { position: relative; background: var(--grey-100); }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img { flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; scroll-snap-align: start; }
.gallery-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.gallery-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); }
.gallery-dots span.active { background: var(--white); }

.detail-body { padding: 22px 20px 28px; }
.detail-name { font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.detail-price { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-top: 6px; }
.detail-label { font-size: 14px; font-weight: 600; margin: 24px 0 10px; }

.sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.size {
  min-height: 48px;
  border-radius: var(--r-sm);
  border: 1px solid var(--grey-200);
  background: var(--white);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
}
.size:active { transform: scale(0.95); }
.size:hover { border-color: var(--black); }
.size.selected { background: var(--black); color: var(--white); border-color: var(--black); }
.size:disabled {
  color: var(--grey-450);
  border-color: var(--grey-100);
  background: var(--grey-50);
  text-decoration: line-through;
  cursor: not-allowed;
  transform: none;
}
.sizes-legend { font-size: 12px; color: var(--grey-500); margin-top: 10px; }
.sizes-legend s { color: var(--grey-450); }

.detail-body .btn-block { margin-top: 22px; }
.detail-note { font-size: 13px; color: var(--grey-500); text-align: center; margin-top: 12px; }

body.no-scroll { overflow: hidden; }

/* ===== Захиалгын маягт ===== */
.order-summary { margin: 16px 0 4px; color: var(--grey-500); }
.order-summary strong { color: var(--black); }
.order-form label { display: block; font-size: 14px; font-weight: 600; margin: 16px 0 6px; }
.optional { color: var(--grey-500); font-weight: 400; }
.order-form input,
.order-form textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;           /* 16px-ээс бага бол iPhone томруулдаг */
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--r-sm);
  padding: 13px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.order-form input::placeholder,
.order-form textarea::placeholder { color: var(--grey-450); }
.order-form input:focus,
.order-form textarea:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px var(--grey-100); }
.order-form input.invalid { border-color: var(--error); }
.form-error { color: var(--error); font-size: 14px; min-height: 1em; margin-top: 10px; }

.order-done { text-align: center; padding-top: 8px; }
.done-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  display: grid;
  place-items: center;
}
.order-done h3 { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.order-done > p { color: var(--grey-500); margin-top: 6px; }
.done-box {
  text-align: left;
  background: var(--grey-50);
  border-radius: var(--r-md);
  padding: 16px;
  margin-top: 18px;
  font-size: 14px;
  display: grid;
  gap: 6px;
}
.done-test { font-size: 13px; color: var(--grey-500); margin-top: 12px; }
.order-done .btn { margin-top: 16px; }

/* =========================================================
   ХАЖУУ ЦОНХ (хадгалсан, дараа нь сагс)
   ========================================================= */
.drawer {
  border: 0;
  padding: 0;
  margin: 0 0 0 auto;
  width: min(420px, 92vw);
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  background: var(--white);
  color: var(--black);
  border-radius: var(--r-lg) 0 0 var(--r-lg);
}
.drawer[open] { display: flex; flex-direction: column; animation: drawer-in 0.35s var(--ease); }
.drawer::backdrop { background: rgba(0, 0, 0, 0.5); animation: fade-in 0.3s; }
@keyframes drawer-in { from { transform: translateX(48px); opacity: 0; } }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 14px 20px;
  border-bottom: 1px solid var(--grey-100);
}
.drawer-title { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.drawer-title small { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--grey-500); margin-left: 6px; letter-spacing: 0; }
.drawer-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 10px calc(16px + env(safe-area-inset-bottom)); }

.list-item {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.2s;
}
.list-item:active { background: var(--grey-50); }
@media (hover: hover) { .list-item:hover { background: var(--grey-50); } }
.list-item img { width: 76px; height: 76px; border-radius: var(--r-sm); object-fit: cover; background: var(--grey-100); }
.list-item.sold-out img { filter: grayscale(1); opacity: 0.55; }
.list-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.list-price { font-family: var(--font-display); font-weight: 700; margin-top: 2px; }
.list-note { font-size: 12px; color: var(--grey-500); margin-top: 2px; }
.list-item .heart-btn { box-shadow: none; background: var(--grey-50); color: var(--black); }

/* ===== Сагс ===== */
.drawer-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.drawer-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px calc(24px + env(safe-area-inset-bottom)); }
.drawer-foot {
  border-top: 1px solid var(--grey-100);
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  background: var(--white);
}
.total-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.total-row strong { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.drawer-foot .btn { margin-top: 14px; }
.drawer-foot .form-error { margin-top: 8px; }
.foot-note { font-size: 12px; color: var(--grey-500); text-align: center; margin-top: 10px; }

/* ===== Жижиг зураг (сагс, захиалга) =====
   Ачаалж байхад саарал гялбаа → зураг зөөлөн гарна. Алдаа гарвал саарал хоосон хайрцаг. */
.thumb {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--grey-100);
}
.thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--grey-100) 40%, #f7f7f6 50%, var(--grey-100) 60%) 0 0 / 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
.thumb.is-loaded::before,
.thumb.is-missing::before { display: none; }
.thumb img { position: relative; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.25s; }
.thumb.is-loaded img { opacity: 1; }
.thumb-sm { width: 40px; height: 40px; border-radius: 10px; }
.thumb-btn { padding: 0; border: 0; background: none; border-radius: var(--r-sm); cursor: pointer; transition: transform 0.15s var(--ease); }
.thumb-btn:active { transform: scale(0.95); }
.name-btn { display: block; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }

.cart-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--grey-100);
}
.cart-line:last-child { border-bottom: 0; }
.cart-line.has-problem .thumb img { filter: grayscale(1); opacity: 0.55; }
.cart-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; margin-top: 8px; }
.line-warn { color: var(--error); font-size: 12px; margin-top: 6px; }
.line-remove { width: 36px; height: 36px; margin: -6px -6px 0 0; color: var(--grey-500); }
.line-remove .icon { width: 18px; height: 18px; }

.stepper { display: inline-flex; align-items: center; background: var(--grey-50); border-radius: 999px; }
.stepper button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: none;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.stepper button:active { background: var(--grey-100); }
.stepper button:disabled { color: var(--grey-450); cursor: not-allowed; }
.stepper .icon { width: 16px; height: 16px; }
.stepper span { min-width: 22px; text-align: center; font-weight: 600; font-size: 14px; }

/* Пүүзний хуудасны сагсны товч */
.btn.is-added { background: var(--grey-700); }
.cart-go { margin-top: 10px !important; }

/* Захиалгын маягт */
.back-link { width: auto; margin: -4px 0 8px; padding: 8px 0; text-align: left; }
.checkout-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--grey-50);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 13px;
}
/* Давхарласан жижиг зургууд: 3 хүртэл, дараа нь "+N" */
.thumb-stack { display: flex; align-items: center; min-width: 0; }
.thumb-stack > * { box-shadow: 0 0 0 2px var(--grey-50); }
.thumb-stack > * + * { margin-left: -10px; }
.thumb-more {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--black);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
}
.summary-total { text-align: right; line-height: 1.2; white-space: nowrap; }
.summary-total strong { display: block; font-family: var(--font-display); font-size: 18px; }
.summary-total span { color: var(--grey-500); }
.field-row { display: grid; grid-template-columns: 1fr; column-gap: 10px; }
@media (min-width: 440px) { .field-row { grid-template-columns: 1.3fr 1fr; } }
.order-form select {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--black);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737370' stroke-width='2'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center / 18px;
  border: 1px solid var(--grey-200);
  border-radius: var(--r-sm);
  padding: 13px 34px 13px 14px;
  -webkit-appearance: none;
  appearance: none;
}
.order-form select:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px var(--grey-100); }
/* ===== Хүргэлт: авах арга, хаяг, төлбөр ===== */
.method-choice { border: 0; margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.method-choice legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.method-option {
  position: relative;
  display: grid;
  gap: 4px;
  margin: 0 !important;
  padding: 14px 14px 13px;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--r-md);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.method-option input { position: absolute; opacity: 0; pointer-events: none; }
.method-option.is-selected { border-color: var(--black); box-shadow: inset 0 0 0 1px var(--black); }
.method-option:has(input:focus-visible) { outline: 2px solid var(--black); outline-offset: 2px; }
.order-form .method-option { display: grid; align-content: start; }   /* ерөнхий label-ийн "block"-ыг дарна */
.method-title { display: block; font-size: 15px; font-weight: 700; }
.method-sub { display: block; font-size: 12px; font-weight: 400; color: var(--grey-500); line-height: 1.35; }
.fee-lines { margin-top: 10px; padding: 12px 16px; border-radius: var(--r-md); background: var(--grey-50); font-size: 14px; display: grid; gap: 4px; }
.fee-lines > div { display: flex; justify-content: space-between; gap: 12px; }
.fee-lines .fee-total { padding-top: 6px; margin-top: 2px; border-top: 1px solid var(--grey-200); }
.done-box .fee-lines { padding: 0; background: none; margin: 0 0 6px; }
.address-box { border: 0; margin-top: 18px; padding: 14px 14px 16px; border-radius: var(--r-md); background: var(--grey-50); }
.address-box legend { float: left; width: 100%; font-size: 15px; font-weight: 700; padding: 0; }
.address-box legend + label { clear: both; margin-top: 10px; }
.field-row-2 { grid-template-columns: 0.7fr 1.3fr !important; }
.field-row-3 { grid-template-columns: repeat(3, 1fr) !important; }
.not-served { margin-top: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--white); border: 1px solid var(--error); font-size: 14px; display: grid; gap: 10px; justify-items: start; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.locate-row { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; }
.locate-row .icon { width: 18px; height: 18px; }
.locate-ok { font-weight: 600; }
.inline-link { display: inline; width: auto; margin: 0; padding: 4px; text-decoration: underline; }
.locate-error { width: 100%; font-size: 13px; color: var(--grey-500); }
.bank-box { margin-top: 12px; }

.info-box { background: var(--grey-50); border-radius: var(--r-md); padding: 14px 16px; margin-top: 18px; font-size: 13px; color: var(--grey-700); display: grid; gap: 6px; }
.info-box strong { color: var(--black); }
.order-form .btn-block { margin-top: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Баталгаа */
.order-no { background: var(--black); color: var(--white); border-radius: var(--r-md); padding: 16px; margin-top: 18px; }
.order-no small { display: block; font-size: 12px; color: var(--grey-400); }
.order-no strong { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: 0.02em; }
.done-items { list-style: none; display: grid; gap: 6px; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--grey-200); }
.done-items { gap: 10px; }
.done-items li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.done-items li > span:last-child { white-space: nowrap; font-weight: 600; }

.empty { text-align: center; padding: 64px 24px; color: var(--grey-500); }
.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--grey-50);
  color: var(--black);
  display: grid;
  place-items: center;
}
.empty-icon .icon { width: 28px; height: 28px; }
.empty h3 { color: var(--black); font-size: 17px; font-weight: 600; }
.empty p { font-size: 14px; margin-top: 6px; }
.empty .btn { margin-top: 20px; }

/* ===== Хууль эрх зүйн хуудас (Нууцлал, Нөхцөл) ===== */
.legal-page { background: var(--white); }
.legal-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 16px;
  background: var(--footer-bg);          /* хоёр загварт хар */
  color: #ffffff;
}
.legal-header .logo { background: #ffffff; color: #0a0a0a; }
.legal-lang { font-size: 14px; color: #a3a3a0; }
.legal-lang a { color: #ffffff; }
.legal { max-width: 720px; margin: 0 auto; padding: 32px 20px 64px; line-height: 1.65; }
.legal h1 { font-family: var(--font-display); font-size: clamp(28px, 7vw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.legal h2 { font-size: 18px; font-weight: 700; margin: 28px 0 8px; }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 20px; margin-top: 6px; }
.legal li + li { margin-top: 4px; }
.legal a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; }
.legal-date { color: var(--grey-500); font-size: 14px; margin-top: 6px; }
.legal article + article { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--grey-200); }
.legal mark { background: none; color: inherit; font-weight: 700; border-bottom: 2px dotted var(--black); }
.legal mark.is-filled { font-weight: inherit; border-bottom: 0; }   /* shop.js-д бөглөсөн бол энгийн текст */
.legal-note { border: 1.5px dashed var(--black); border-radius: var(--r-sm); padding: 12px 14px; font-size: 13px; margin-bottom: 28px; }
.legal-back { margin-top: 48px; }

/* ===== 404 хуудас ===== */
.notfound-page { background: #0a0a0a; color: #ffffff; }   /* хоёр загварт хар */
.notfound-page .logo, .notfound-page .btn-light { background: #ffffff; color: #0a0a0a; }
.notfound {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
}
.notfound-code { font-family: var(--font-display); font-size: clamp(96px, 30vw, 180px); font-weight: 800; line-height: 1; letter-spacing: -0.05em; margin-top: 32px; }
.notfound h1 { font-family: var(--font-display); font-size: 26px; font-weight: 800; margin-top: 8px; }
.notfound p { color: var(--grey-400); margin-top: 8px; max-width: 360px; }
.notfound-en { font-size: 14px; }
.notfound .notfound-code { color: var(--white); }
.notfound .btn { margin-top: 28px; }

/* ===== Хөл (хар) ===== */
.footer {
  background: var(--footer-bg);          /* хоёр загварт хар */
  color: #a3a3a0;
  text-align: center;
  padding: 48px 16px calc(48px + env(safe-area-inset-bottom));
  font-size: 13px;
  margin-top: 24px;
}
.footer p { margin-top: 12px; }
.footer-links a { color: #ffffff; }
.footer .logo { background: #ffffff; color: #0a0a0a; }

/* ===== Гүйлгэхэд аажмаар гарч ирэх ===== */
.reveal { opacity: 0; transform: translate3d(0, 16px, 0); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
/* Пүүзний карт: гүйлгэлттэй зэрэг доороос гулсаж, бага зэрэг томорч, тодорно (--p = 0…1, JS) */
.card.card-scroll {
  opacity: var(--p, 0);
  transform: translate3d(0, calc((1 - var(--p, 0)) * 60px), 0) scale(calc(0.92 + 0.08 * var(--p, 0)));
  transition: box-shadow 0.3s var(--ease);
  will-change: transform, opacity;
}
@media (hover: hover) { .card.reveal.visible:hover { transform: translateY(-2px); } }

/* ===== Жижиг утас ===== */
/* Толгойд 5 товч байх үед жижиг утсанд багтаана */
/* Толгойд 6 товч (хайлт, хадгалсан, сагс, нэвтрэх, загвар, хэл) утсанд багтана */
@media (max-width: 440px) {
  .header { padding: 0 8px 0 12px; gap: 6px; }
  .header-actions { gap: 0; }
  .header-actions .icon-btn { width: 38px; }
  .header-actions .icon-btn .icon { width: 21px; height: 21px; }
  .lang-toggle { margin-left: 0; }
  .lang-pill span { padding: 0 5px; }
}
@media (max-width: 380px) {
  .header { padding: 0 6px 0 10px; }
  .header-actions .icon-btn { width: 34px; }
  .header-actions .icon-btn .icon { width: 20px; height: 20px; }
  .logo { font-size: 14px; padding: 4px 8px; }
}

@media (max-width: 360px) {
  .nav { gap: 12px; font-size: 13px; }
}

/* ===== Таблет, компьютер ===== */
@media (min-width: 700px) {
  .header { padding: 0 32px; }
  .header-actions { margin-left: 16px; }
  .section { padding: 80px 32px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: repeat(3, 1fr); }

  .detail { margin: auto; max-width: 920px; border-radius: var(--r-lg); display: none; }
  .detail[open] { display: grid; grid-template-columns: 1fr 1fr; }
  .detail-body { padding: 36px 32px; }
  .sizes { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .search {
    display: flex;
    align-items: center;
    flex: 0 1 340px;
    margin-left: 24px;
  }
  .header.is-searching .search { position: static; padding: 0; background: none; }
  .header.is-searching { background: var(--header-glass); }
  .search-cancel, .search-open { display: none; }
  .search-field input { height: 40px; font-size: 15px; }
  .header:not(.is-light):not(.is-searching) .search-field input {
    background: rgba(var(--hero-fg-rgb), 0.08);
    border-color: transparent;
    color: var(--hero-fg);
  }
  .header:not(.is-light):not(.is-searching) .search-field input::placeholder { color: rgba(var(--hero-fg-rgb), 0.6); }
  .header:not(.is-light):not(.is-searching) .search-icon,
  .header:not(.is-light):not(.is-searching) .search-clear { color: rgba(var(--hero-fg-rgb), 0.75); }
  .sheet { margin: auto; max-width: 520px; border-radius: var(--r-lg); }

  /* ----- HERO: зүүн 40% текст, баруун 60% пүүз ----- */
  .hero-stage {
    grid-template-columns: 40% 60%;
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "copy visual";
    column-gap: 0;
    padding: var(--header-h) 5vw 0;
  }
  .hero-brand { font-size: 23vw; top: 50%; left: 1vw; transform: translateY(-58%); }
  .hero-copy {
    grid-area: copy;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    z-index: 2;
    padding-bottom: 8vh;
  }
  .hero-headline { font-size: clamp(60px, 7.2vw, 132px); line-height: 0.86; }
  .hero-text {
    display: block;
    max-width: 34ch;
    margin-top: 28px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--hero-muted);
  }
  .hero-cta { align-self: flex-start; margin-top: 28px; height: 54px; padding-right: 22px; font-size: 16px; }
  .hero-cta-dot { width: 42px; height: 42px; }
  .hero-visual { margin-left: -9%; }                   /* текст рүү бага зэрэг орно */
  @supports (width: 1cqw) {
    .hero-square { width: calc(min(100cqw, 100cqh) * 0.9); height: calc(min(100cqw, 100cqh) * 0.9); }
  }
  .hero-card { padding: 11px 16px 12px; border-radius: 18px; max-width: 40%; animation: hero-card-float 7s ease-in-out infinite; }
  .hero-card small { font-size: 12px; }
  .hero-card strong { font-size: 19px; }
  .hero-card-price { top: 9%; right: 2%; }
  .hero-card-sizes { top: auto; bottom: 11%; right: 2%; animation-delay: -2.3s; }   /* пүүзний доор — хамрахгүй */
  .hero-card-tag { bottom: 11%; left: 2%; animation-delay: -4.6s; }
  .hero-drag { top: auto; bottom: 3%; left: 50%; transform: translateX(-50%); }
  .hero-counter { position: absolute; left: 5vw; bottom: 32px; }
  .hero-counter-line { width: 64px; }
  .hero-corner {
    display: block;
    position: absolute;
    right: 5vw;
    bottom: 28px;
    z-index: 2;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 20px;
    line-height: 1;
    letter-spacing: -0.01em;
    text-align: right;
    text-transform: uppercase;
  }
  .hero-corner span { display: block; }
  @keyframes hero-card-float { 50% { transform: translate3d(0, -6px, 0); } }
}

@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== "Хөдөлгөөн багасгах" тохиргоотой хүмүүст ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .card.card-scroll { opacity: 1; transform: none; }
  .hero { height: 100vh; height: 100svh; }       /* гүйлгэхэд солигдохгүй, эргэхгүй */
  .hero-float, .hero-card { animation: none; }
  .hero-counter { display: none; }
}

@media (min-width: 1100px) {
  .nav { display: flex; gap: 28px; font-size: 15px; }
}
