:root {
  --ink: #1c2022;
  --muted: #66706f;
  --line: #dfe3e2;
  --canvas: #f4f6f5;
  --surface: #ffffff;
  --primary: #9d293b;
  --primary-dark: #761c2c;
  --jade: #1d6c5d;
  --gold: #bc8c3f;
  --warning: #9a5e18;
  --danger: #b4232e;
  --shadow: 0 18px 45px rgba(18, 25, 24, .14);
  --header-height: 76px;
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body.drawer-open,
body:has(dialog[open]) { overflow: hidden; }

button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { color: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(29, 108, 93, .26);
  outline-offset: 2px;
}

img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 1000;
  padding: 10px 14px;
  color: #fff;
  background: var(--jade);
  border-radius: 4px;
}
.skip-link:focus { top: 12px; }

.environment-bar {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 5px 16px;
  color: #fff;
  background: #273230;
  font-size: 12px;
}
.environment-bar span + span::before { content: ""; display: inline-block; width: 1px; height: 10px; margin-right: 18px; background: rgba(255,255,255,.35); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--header-height);
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(1240px, calc(100% - 40px));
  min-height: var(--header-height);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px minmax(280px, 580px) auto;
  align-items: center;
  gap: 28px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.brand-seal {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--primary);
  color: #fff;
  background: var(--primary);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 21px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px rgba(255,255,255,.45);
}

.brand-copy { min-width: 0; display: grid; }
.brand-copy strong { font-size: 18px; line-height: 1.25; white-space: nowrap; }
.brand-copy small { color: var(--muted); font-size: 9px; line-height: 1.2; }

.search-form {
  height: 44px;
  display: grid;
  grid-template-columns: 20px 1fr 34px;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 14px;
  background: #f1f3f2;
  border: 1px solid transparent;
  border-radius: 6px;
}
.search-form:focus-within { background: #fff; border-color: var(--jade); box-shadow: 0 0 0 3px rgba(29,108,93,.09); }
.search-form svg { width: 18px; color: var(--muted); }
.search-form input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-form input::placeholder { color: #8b9392; }

.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.icon-button:hover { background: #eef1f0; border-color: #e2e6e5; }
.icon-button svg { width: 20px; height: 20px; }

.badge {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 9px;
  color: #fff;
  background: var(--primary);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.hero {
  position: relative;
  height: 330px;
  overflow: hidden;
  color: #fff;
  background: #16211f;
}
.hero > img { width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,12,13,.62), rgba(7,12,13,.12) 65%, transparent); }
.hero-content {
  position: absolute;
  inset: 0;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.hero-kicker, .section-label { margin-bottom: 6px; color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 0; }
.hero h1 { margin-bottom: 8px; font-family: "STKaiti", "KaiTi", serif; font-size: 46px; line-height: 1.1; font-weight: 600; }
.hero p:not(.hero-kicker) { margin-bottom: 22px; color: rgba(255,255,255,.82); font-size: 16px; }

.primary-button, .secondary-button, .quiet-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 5px;
  font-weight: 700;
  cursor: pointer;
}
.primary-button { border: 1px solid var(--primary); color: #fff; background: var(--primary); }
.primary-button:hover { border-color: var(--primary-dark); background: var(--primary-dark); }
.primary-button:disabled, .secondary-button:disabled { opacity: .48; cursor: not-allowed; }
.primary-button svg, .secondary-button svg { width: 17px; height: 17px; }
.secondary-button { border: 1px solid #c9cfcd; color: var(--ink); background: #fff; }
.secondary-button:hover { border-color: #959f9c; background: #f8f9f9; }
.quiet-button { min-height: 36px; padding: 7px 11px; border: 0; color: var(--jade); background: transparent; }
.quiet-button:hover { background: rgba(29,108,93,.08); }
.full-button { width: 100%; }

.catalog-section { padding: 0 0 72px; }
.section-inner { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.category-scroller {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.category-scroller::-webkit-scrollbar { display: none; }
.category-tab {
  height: 38px;
  flex: 0 0 auto;
  padding: 0 17px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
}
.category-tab:hover { background: #eaeeec; color: var(--ink); }
.category-tab.active { color: #fff; background: var(--jade); }

.catalog-toolbar {
  min-height: 112px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 20px;
}
.catalog-toolbar h2 { margin: 0; font-size: 27px; line-height: 1.2; }
.toolbar-controls { display: flex; align-items: center; gap: 16px; }
.result-count { color: var(--muted); font-size: 13px; }
.select-control { position: relative; display: inline-flex; align-items: center; }
.select-control select {
  height: 40px;
  appearance: none;
  padding: 0 38px 0 13px;
  border: 1px solid #ccd2d0;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.select-control svg { position: absolute; right: 12px; width: 16px; pointer-events: none; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.product-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.product-card:hover { transform: translateY(-3px); border-color: #c7cdcb; box-shadow: 0 12px 28px rgba(18,25,24,.09); }
.product-image-button { position: relative; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: #e9eceb; cursor: pointer; overflow: hidden; }
.product-image-button img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-image-button img { transform: scale(1.025); }
.stock-flag { position: absolute; left: 10px; top: 10px; padding: 4px 8px; border-radius: 4px; color: #fff; background: rgba(28,32,34,.84); font-size: 11px; }
.stock-flag.sold-out { background: rgba(98,104,104,.9); }
.product-info { padding: 15px 15px 14px; }
.product-category { margin-bottom: 5px; color: var(--jade); font-size: 11px; font-weight: 700; }
.product-name-button { width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.product-name { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 700; overflow-wrap: anywhere; }
.product-subtitle { min-height: 39px; margin: 5px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.55; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-meta { display: flex; align-items: end; justify-content: space-between; gap: 8px; }
.price-block { min-width: 0; }
.price { color: var(--primary); font-size: 19px; font-weight: 800; }
.price small { font-size: 12px; }
.original-price { margin-left: 4px; color: #969d9b; font-size: 11px; text-decoration: line-through; }
.add-cart-button { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; padding: 0; border: 1px solid #c9cfcd; border-radius: 50%; color: var(--ink); background: #fff; cursor: pointer; }
.add-cart-button:hover { border-color: var(--primary); color: #fff; background: var(--primary); }
.add-cart-button:disabled { border-color: #d9dddc; color: #a4aaa8; background: #f1f3f2; cursor: not-allowed; }
.add-cart-button svg { width: 18px; height: 18px; }

.product-skeleton { aspect-ratio: .72; border-radius: 7px; background: linear-gradient(100deg, #e6e9e8 20%, #f1f3f2 40%, #e6e9e8 60%); background-size: 240% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position-x: -240%; } }

.empty-state { min-height: 320px; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; color: var(--muted); }
.empty-state svg { width: 38px; height: 38px; }
.empty-state h3 { margin: 0 0 8px; color: var(--ink); font-size: 18px; }

.site-footer { border-top: 1px solid #d6dbd9; background: #e9edeb; }
.footer-inner { width: min(1240px, calc(100% - 40px)); min-height: 132px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand div { display: grid; }
.footer-brand small, .site-footer p { color: var(--muted); font-size: 12px; }
.site-footer p { margin: 0; }

.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(12, 17, 17, .42); backdrop-filter: blur(2px); }
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 80;
  width: min(460px, 100%);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  background: #fff;
  box-shadow: -18px 0 46px rgba(11, 18, 17, .18);
  transform: translateX(105%);
  transition: transform .25s ease;
}
.drawer.open { transform: translateX(0); }
.drawer-header { min-height: 83px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 15px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { margin: 0; font-size: 23px; }
.drawer-header .section-label { margin-bottom: 2px; }
.drawer-content { min-height: 0; overflow-y: auto; padding: 18px 20px 28px; }
.drawer-footer { padding: 15px 20px max(18px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.total-line { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.total-line span { color: var(--muted); }
.total-line strong { color: var(--primary); font-size: 22px; }
.drawer-tabs { display: flex; gap: 4px; padding: 12px 16px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.drawer-tabs button { flex: 0 0 auto; min-height: 34px; padding: 5px 11px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; cursor: pointer; }
.drawer-tabs button.active { color: var(--jade); background: rgba(29,108,93,.09); font-weight: 700; }

.drawer-empty { min-height: 280px; display: grid; align-content: center; justify-items: center; gap: 9px; color: var(--muted); text-align: center; }
.drawer-empty svg { width: 36px; height: 36px; }
.drawer-empty h3 { margin: 0; color: var(--ink); font-size: 17px; }

.cart-item { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item:first-child { padding-top: 0; }
.cart-thumb { width: 88px; aspect-ratio: 1; object-fit: cover; border-radius: 5px; background: #e9eceb; }
.cart-item-main { min-width: 0; }
.cart-item-title { margin: 0 0 3px; font-size: 14px; line-height: 1.4; }
.cart-sku { margin: 0 0 9px; color: var(--muted); font-size: 12px; }
.cart-item-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cart-price { color: var(--primary); font-weight: 800; }
.quantity-control { display: grid; grid-template-columns: 30px 32px 30px; align-items: center; height: 30px; border: 1px solid #cdd2d0; border-radius: 4px; overflow: hidden; }
.quantity-control button { height: 100%; display: grid; place-items: center; padding: 0; border: 0; background: #f4f6f5; cursor: pointer; }
.quantity-control button:disabled { color: #a7aeac; cursor: not-allowed; }
.quantity-control svg { width: 14px; height: 14px; }
.quantity-control span { text-align: center; font-size: 12px; font-weight: 700; }
.cart-remove { margin-top: 8px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 12px; cursor: pointer; }
.cart-remove:hover { color: var(--danger); }

.account-profile { display: flex; align-items: center; gap: 13px; padding: 4px 0 24px; border-bottom: 1px solid var(--line); }
.avatar { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--jade); font-size: 20px; font-weight: 700; }
.account-profile h3 { margin: 0 0 2px; font-size: 18px; }
.account-profile p { margin: 0; color: var(--muted); font-size: 13px; }
.account-menu { display: grid; padding-top: 12px; }
.menu-row { min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 3px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
.menu-row > svg { width: 19px; color: var(--jade); }
.menu-row span { flex: 1; }
.menu-row .chevron { width: 17px; color: #a0a8a6; }
.logout-button { margin-top: 22px; color: var(--danger); }

.order-item { padding: 15px 0 18px; border-bottom: 1px solid var(--line); }
.order-item:first-child { padding-top: 0; }
.order-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.order-heading code { color: var(--muted); font-family: inherit; font-size: 11px; overflow-wrap: anywhere; }
.order-status { flex: 0 0 auto; color: var(--primary); font-size: 12px; font-weight: 700; }
.order-product { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.order-product img { width: 64px; aspect-ratio: 1; border-radius: 4px; object-fit: cover; }
.order-product h4 { margin: 0 0 3px; font-size: 13px; }
.order-product p { margin: 0; color: var(--muted); font-size: 11px; }
.order-product strong { font-size: 12px; }
.order-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; }
.order-summary p { margin: 0; color: var(--muted); font-size: 12px; }
.order-summary strong { color: var(--primary); font-size: 16px; }
.order-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.order-actions button { min-height: 34px; padding: 6px 11px; font-size: 12px; }

dialog { color: var(--ink); }
dialog::backdrop { background: rgba(12,17,17,.48); backdrop-filter: blur(3px); }
.modal {
  position: relative;
  width: min(920px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.compact-modal { width: min(500px, calc(100% - 32px)); padding: 28px; }
.modal-close { position: sticky; float: right; top: 12px; right: 12px; z-index: 3; margin: 12px 12px -52px 0; background: rgba(255,255,255,.9); }
.modal-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding-right: 45px; }
.modal-heading h2 { margin: 0; font-size: 24px; }
.modal-heading .section-label { margin: 0; }

.product-detail { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(330px, .94fr); min-height: 590px; }
.product-detail-image { min-height: 590px; background: #e9eceb; }
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-info { padding: 54px 38px 34px; }
.detail-category { color: var(--jade); font-size: 12px; font-weight: 700; }
.product-detail-info h2 { margin: 5px 0 8px; font-size: 27px; line-height: 1.25; }
.detail-subtitle { margin-bottom: 18px; color: var(--muted); font-size: 14px; }
.detail-price { margin-bottom: 22px; color: var(--primary); font-size: 28px; font-weight: 800; }
.detail-price small { font-size: 15px; }
.detail-price del { margin-left: 8px; color: #9ba3a1; font-size: 13px; font-weight: 400; }
.field-title { display: flex; justify-content: space-between; margin-bottom: 9px; font-size: 13px; font-weight: 700; }
.field-title span { color: var(--muted); font-size: 12px; font-weight: 400; }
.sku-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
.sku-option { min-height: 46px; padding: 7px 10px; border: 1px solid #ccd2d0; border-radius: 5px; background: #fff; cursor: pointer; text-align: left; }
.sku-option.active { border-color: var(--primary); color: var(--primary); background: rgba(157,41,59,.055); box-shadow: inset 0 0 0 1px var(--primary); }
.sku-option:disabled { color: #9ba3a1; background: #f1f3f2; cursor: not-allowed; }
.sku-option strong { display: block; font-size: 13px; }
.sku-option small { color: inherit; font-size: 11px; }
.detail-buy-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-bottom: 24px; }
.detail-buy-row .quantity-control { height: 44px; grid-template-columns: 38px 42px 38px; }
.attributes { border-top: 1px solid var(--line); }
.attribute-row { min-height: 42px; display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
.attribute-row span:first-child { color: var(--muted); }

.stack-form { display: grid; gap: 16px; }
.stack-form label:not(.check-label) { display: grid; gap: 6px; }
.stack-form label > span { font-size: 13px; font-weight: 700; }
.stack-form input, .stack-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #cbd1cf;
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
  resize: vertical;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check-label input { width: 17px; height: 17px; accent-color: var(--jade); }
.sms-field { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.sms-field .secondary-button { min-width: 112px; }

.address-list { display: grid; gap: 8px; margin-bottom: 18px; }
.address-option { position: relative; display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: start; padding: 13px; border: 1px solid #ccd2d0; border-radius: 6px; cursor: pointer; }
.address-option.selected { border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }
.address-option input { margin-top: 3px; accent-color: var(--jade); }
.address-option h4 { margin: 0 0 4px; font-size: 14px; }
.address-option p { margin: 0; color: var(--muted); font-size: 12px; }
.default-tag { display: inline-block; margin-left: 5px; padding: 1px 5px; border-radius: 3px; color: var(--jade); background: rgba(29,108,93,.09); font-size: 10px; }
.checkout-summary { margin: 18px 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 5px 0; color: var(--muted); font-size: 13px; }
.summary-row.total { margin-top: 10px; color: var(--ink); }
.summary-row.total strong { color: var(--primary); font-size: 20px; }

.payment-options { display: grid; gap: 10px; margin-bottom: 18px; }
.payment-option { min-height: 64px; display: grid; grid-template-columns: 42px 1fr 20px; align-items: center; gap: 12px; padding: 10px 13px; border: 1px solid #ccd2d0; border-radius: 6px; background: #fff; cursor: pointer; text-align: left; }
.payment-option.active { border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }
.payment-logo { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; }
.payment-logo.wechat { background: #1aad19; }
.payment-logo.alipay { background: #1677ff; }
.payment-logo svg { width: 21px; }
.payment-option strong { display: block; font-size: 14px; }
.payment-option small { color: var(--muted); font-size: 11px; }
.payment-option > svg { width: 17px; color: var(--jade); opacity: 0; }
.payment-option.active > svg { opacity: 1; }
.payment-qr-state { min-height: 340px; }
.payment-qr { width: min(224px, 100%); aspect-ratio: 1; padding: 8px; background: #fff; }
.payment-qr svg { display: block; width: 100%; height: 100%; }

.toast-region { position: fixed; z-index: 200; right: 18px; bottom: 18px; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 260px; max-width: min(380px, calc(100vw - 36px)); display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid #d9dddc; border-radius: 6px; color: var(--ink); background: #fff; box-shadow: 0 12px 30px rgba(12,17,17,.16); animation: toast-in .2s ease; }
.toast svg { width: 18px; flex: 0 0 18px; color: var(--jade); }
.toast.error svg { color: var(--danger); }
.toast p { margin: 0; font-size: 13px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.mobile-nav { display: none; }

@media (max-width: 980px) {
  .header-inner { grid-template-columns: 210px 1fr auto; gap: 16px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-detail { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --header-height: 64px; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .environment-bar { gap: 10px; font-size: 11px; }
  .environment-bar span + span::before { margin-right: 10px; }
  .header-inner { width: calc(100% - 24px); grid-template-columns: auto 1fr auto; gap: 10px; }
  .brand-copy { display: none; }
  .brand-seal { width: 35px; height: 35px; flex-basis: 35px; font-size: 19px; }
  .search-form { height: 40px; padding-left: 11px; grid-template-columns: 18px 1fr 30px; }
  .search-form input { font-size: 14px; }
  .desktop-action { display: none; }
  .header-actions { gap: 0; }
  .header-actions .cart-button { display: none; }
  .hero { height: 240px; }
  .hero > img { object-position: 64% center; }
  .hero-shade { background: linear-gradient(90deg, rgba(7,12,13,.78), rgba(7,12,13,.2)); }
  .hero-content { width: calc(100% - 32px); }
  .hero h1 { font-size: 35px; }
  .hero p:not(.hero-kicker) { width: 58%; margin-bottom: 16px; font-size: 13px; }
  .hero-button { min-height: 38px; padding: 7px 14px; font-size: 13px; }
  .section-inner { width: calc(100% - 24px); }
  .category-scroller { min-height: 61px; margin: 0 -12px; padding: 0 12px; }
  .category-tab { height: 36px; padding: 0 14px; font-size: 13px; }
  .catalog-toolbar { min-height: 94px; align-items: center; padding: 21px 0 14px; }
  .catalog-toolbar h2 { font-size: 22px; }
  .result-count { display: none; }
  .select-control select { max-width: 130px; height: 38px; font-size: 12px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-info { padding: 11px 10px 10px; }
  .product-category { font-size: 10px; }
  .product-name-button { min-height: 39px; }
  .product-name { font-size: 14px; }
  .product-subtitle { display: none; }
  .product-meta { margin-top: 9px; }
  .price { font-size: 16px; }
  .original-price { display: none; }
  .add-cart-button { width: 34px; height: 34px; flex-basis: 34px; }
  .catalog-section { padding-bottom: 48px; }
  .site-footer { display: none; }
  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 55;
    height: calc(64px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
    padding: 7px 6px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(10px);
  }
  .mobile-nav-item { min-width: 0; height: 50px; display: grid; place-items: center; align-content: center; gap: 2px; padding: 0; border: 0; color: #65706e; background: transparent; font-size: 10px; cursor: pointer; }
  .mobile-nav-item svg { width: 20px; height: 20px; }
  .mobile-nav-item.active { color: var(--primary); }
  .mobile-icon-wrap { position: relative; display: inline-grid; place-items: center; }
  .mobile-icon-wrap .badge { top: -8px; right: -12px; }
  .drawer { bottom: calc(64px + env(safe-area-inset-bottom)); width: 100%; }
  .drawer-header { min-height: 74px; padding: 14px 16px 11px; }
  .drawer-content { padding: 16px 16px 24px; }
  .drawer-footer { padding: 12px 16px 16px; }
  .toast-region { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast { width: 100%; min-width: 0; max-width: none; }
  .modal { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .compact-modal { padding: 24px 18px 20px; }
  .product-modal { width: 100%; max-width: none; height: 100dvh; max-height: none; border-radius: 0; }
  .product-detail { display: block; min-height: 0; }
  .product-detail-image { min-height: 0; aspect-ratio: 1; }
  .product-detail-info { padding: 25px 18px 30px; }
  .product-detail-info h2 { font-size: 23px; }
  .detail-price { font-size: 25px; }
  .sku-options { grid-template-columns: 1fr; }
  .modal-close { position: fixed; top: 12px; right: 10px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .header-inner { width: calc(100% - 16px); gap: 6px; }
  .hero-content { width: calc(100% - 24px); }
  .hero p:not(.hero-kicker) { width: 68%; }
  .toolbar-controls { gap: 7px; }
  .select-control select { width: 118px; padding-left: 9px; }
  .product-grid { gap: 8px; }
  .product-info { padding: 10px 8px; }
  .product-name { font-size: 13px; }
  .price { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
