/* Win88 H5 storefront — mobile-first, no external fonts or CDNs. */
:root {
  --bg: #fff8f1;
  --bg-2: #fdf1e5;
  --card: #ffffff;
  --ink: #25160e;
  --ink-2: #4c372c;
  --muted: #947e6f;
  --line: #f0e1d3;
  --line-strong: #e5d1be;
  --brand: #ef5b2a;
  --brand-strong: #d94719;
  --brand-soft: #fff0e7;
  --amber: #ffb23e;
  --dark: #21130c;
  --dark-2: #332016;
  --green: #2f8f5b;
  --green-soft: #e9f7ef;
  --red: #c93d31;
  --red-soft: #fdecea;
  --blue: #2f6f9f;
  --blue-soft: #ebf4fb;
  --shadow: 0 18px 50px rgba(61, 31, 12, 0.12);
  --shadow-soft: 0 8px 24px rgba(61, 31, 12, 0.08);
  --radius: 22px;
  --nav-height: 70px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(239, 91, 42, 0.24), transparent 27rem),
    radial-gradient(circle at 84% 86%, rgba(255, 178, 62, 0.16), transparent 30rem),
    #1c100a;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(10px);
  z-index: 0;
}

.ambient-a {
  width: 320px;
  height: 320px;
  top: -120px;
  right: -80px;
  background: rgba(255, 145, 68, 0.12);
}

.ambient-b {
  width: 380px;
  height: 380px;
  left: -160px;
  bottom: -180px;
  background: rgba(243, 82, 36, 0.1);
}

.app-shell {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow-x: clip;
  box-shadow: 0 0 90px rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.page-root {
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 74px);
  min-height: 100dvh;
}

/* Category page: the left rail and right product list scroll independently. */
.page-root.catalogue-mode {
  height: calc(100dvh - var(--nav-height) - var(--safe-bottom));
  min-height: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.page-root.no-nav {
  padding-bottom: calc(var(--safe-bottom) + 96px);
}

.page-root.no-pad {
  padding-bottom: 0;
}

/* ---------- Shared typography / buttons ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--brand);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  margin: 28px 0 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.section-head p {
  margin: 5px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.section-link {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 800;
  padding: 6px 0;
}

.muted {
  color: var(--muted);
}

.btn {
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14.5px;
  background: var(--brand);
  color: #fff;
  transition: transform 0.16s ease, filter 0.16s ease, background 0.16s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.975);
}

.btn:hover {
  filter: brightness(1.03);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn.secondary {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn.dark {
  background: var(--dark);
}

.btn.small {
  min-height: 36px;
  font-size: 12px;
  padding: 0 14px;
}

.btn.wide {
  width: 100%;
}

.btn.icon-only {
  padding: 0;
  width: 42px;
  height: 42px;
  min-height: 42px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 800;
  font-size: 13px;
  padding: 4px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  display: inline-block;
}

.icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.card {
  background: var(--card);
  border: 1px solid rgba(230, 211, 194, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(239, 91, 42, 0.22);
  border-top-color: var(--brand);
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton {
  background: linear-gradient(100deg, #f6eadf 20%, #fff7f0 38%, #f6eadf 56%);
  background-size: 220% 100%;
  animation: shimmer 1.3s infinite linear;
  border-radius: 14px;
}

@keyframes shimmer {
  to {
    background-position-x: -220%;
  }
}

/* ---------- Top bar / page header ---------- */
.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  box-shadow: 0 6px 16px rgba(218, 76, 29, 0.23);
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-copy span {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 143, 91, 0.13);
}

.status-dot.closed {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(201, 61, 49, 0.13);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.round-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  position: relative;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(13px + env(safe-area-inset-top)) 16px 13px;
  background: rgba(255, 248, 241, 0.88);
  border-bottom: 1px solid rgba(236, 218, 201, 0.6);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}

.page-header h1 {
  margin: 0;
  flex: 1;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.back-btn {
  border: 0;
  background: #fff;
  border-radius: 13px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  flex: none;
}

.lang-mini {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: #efe1d4;
  gap: 2px;
}

.lang-mini button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--muted);
}

.lang-mini button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(50, 25, 10, 0.1);
}

/* ---------- Decoration components ---------- */
.deco-wrap {
  padding: 14px 14px 0;
}

.deco-language {
  display: flex;
  padding: 4px 18px 0;
}

.deco-language.align-left {
  justify-content: flex-start;
}

.deco-language.align-center {
  justify-content: center;
}

.deco-language.align-right {
  justify-content: flex-end;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.lang-switch button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  min-height: 29px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.lang-switch button.active {
  background: var(--dark);
  color: #fff;
}

.deco-hero {
  position: relative;
  margin: 14px;
  min-height: 214px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 142, 55, 0.28), transparent 45%),
    linear-gradient(132deg, #1a0e08, #3a2115 62%, #5b2c19);
  color: #fff;
  display: flex;
  isolation: isolate;
  box-shadow: 0 20px 40px rgba(45, 20, 5, 0.19);
}

.deco-hero.no-image::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  right: -80px;
  bottom: -100px;
  background: radial-gradient(circle at 35% 35%, #ffb45d, #d64b23 60%, transparent 72%);
  opacity: 0.5;
  z-index: -1;
}

.deco-hero-img {
  position: absolute;
  inset: auto -4% -2% auto;
  width: 76%;
  max-height: 100%;
  object-fit: contain;
  object-position: bottom right;
  z-index: -1;
  filter: saturate(1.04);
}

.deco-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(22, 12, 7, 0.95) 4%, rgba(22, 12, 7, 0.72) 45%, transparent 84%);
  z-index: -1;
}

.hero-copy {
  position: relative;
  padding: 25px 22px;
  width: 69%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
}

.hero-copy .kicker {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffc27b;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(28px, 8.2vw, 38px);
  line-height: 0.99;
  letter-spacing: -0.055em;
  white-space: pre-line;
  font-weight: 850;
}

.hero-copy p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 247, 238, 0.72);
  max-width: 235px;
}

.hero-cta {
  margin-top: 4px;
  min-height: 40px;
  border-radius: 999px;
  border: 0;
  padding: 0 17px;
  background: var(--amber);
  color: #2b170d;
  font-size: 12.5px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-cta .icon {
  width: 15px;
  height: 15px;
}

.deco-notice {
  margin: 12px 16px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(100deg, #fff3df, #fff9f0);
  border: 1px solid #f2ddbd;
  color: #6f4b27;
  font-size: 12px;
  line-height: 1.5;
}

.deco-notice .icon {
  width: 17px;
  height: 17px;
  color: #d88a26;
  margin-top: 1px;
}

.deco-text {
  margin: 18px 16px 0;
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
}

.deco-text h3 {
  margin: 5px 0 7px;
  font-size: 21px;
  letter-spacing: -0.04em;
}

.deco-text p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.deco-text.align-center {
  text-align: center;
}

.deco-text.align-right {
  text-align: right;
}

.deco-image {
  margin: 16px;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  display: block;
  background: var(--dark);
}

.deco-image img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.deco-image figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 16px 14px;
  background: linear-gradient(transparent, rgba(20, 10, 5, 0.86));
  color: #fff;
  font-size: 12px;
}

.deco-category-block {
  padding: 18px 0 0;
}

.deco-category-head {
  padding: 0 18px;
}

.deco-category-head h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.category-rail {
  display: flex;
  gap: 10px;
  padding: 14px 18px 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  cursor: grab;
}

.category-rail.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.category-rail::-webkit-scrollbar {
  display: none;
}

.category-tile {
  scroll-snap-align: start;
}

.category-tile {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  flex: 0 0 102px;
  padding: 7px;
  text-align: left;
  transition: transform 0.15s ease;
}

.category-tile:active {
  transform: scale(0.97);
}

.category-art {
  height: 72px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 25px;
  font-weight: 900;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 7px;
}

.category-art::after {
  content: "";
  position: absolute;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  right: -16px;
  bottom: -18px;
}

.category-tile strong {
  display: block;
  font-size: 12px;
  padding: 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-tile span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  padding: 2px 3px 4px;
}

/* ---------- Supermarket category + search layout ---------- */
.shop-search-wrap {
  padding: 11px 16px 1px;
}

.shop-search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(63, 32, 14, 0.05);
}

.shop-search > .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex: none;
}

.shop-search-input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13.5px;
}

.shop-search-input::placeholder {
  color: #ab9788;
}

.shop-search-clear {
  border: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f3e7db;
  color: var(--muted);
  display: grid;
  place-items: center;
  flex: none;
}

.shop-search-clear .icon {
  width: 12px;
  height: 12px;
}

.shop-min-order {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 3px 0;
  font-size: 9.5px;
  color: #9b7548;
}

.shop-min-order .icon {
  width: 12px;
  height: 12px;
}

.shop-page {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shop-page > .page-header,
.shop-page > .shop-search-wrap,
.shop-page > .store-banner-closed,
.shop-page > .deco-wrap,
.shop-page > .deco-notice,
.shop-page > .deco-text,
.shop-page > .deco-image,
.shop-page > .deco-category-block,
.shop-page > .deco-groupbuy {
  flex: none;
}

.shop-layout {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 10px 12px 8px;
}

.shop-categories {
  position: static;
  background: #f8eee3;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 5px;
  height: 100%;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.shop-categories::-webkit-scrollbar {
  display: none;
}

.shop-cat {
  width: 100%;
  min-height: 48px;
  padding: 7px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-2);
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  font-size: 10.5px;
  line-height: 1.25;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.shop-cat span {
  display: block;
  overflow-wrap: anywhere;
}

.shop-cat small {
  display: block;
  font-size: 8px;
  font-weight: 600;
  color: var(--muted);
}

.shop-cat.active {
  background: #fff;
  color: var(--brand-strong);
  box-shadow: 0 4px 12px rgba(77, 40, 18, 0.1);
}

.shop-cat.active small {
  color: var(--brand);
}

.shop-products {
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: #d8bda5 transparent;
}

.shop-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 3px 9px;
}

.shop-results-head h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.shop-results-head span {
  flex: none;
  font-size: 9px;
  color: var(--muted);
}

.shop-product-list {
  padding: 0;
  gap: 8px;
}

.shop-product-list .product-row {
  padding: 7px;
  gap: 9px;
  border-radius: 15px;
}

.shop-product-list .product-row-media {
  width: 66px;
  height: 66px;
  border-radius: 11px;
}

.shop-product-list .product-row-body h3 {
  font-size: 12px;
  line-height: 1.3;
}

.shop-product-list .product-row-body p {
  margin: 3px 0 5px;
  font-size: 9px;
  -webkit-line-clamp: 2;
}

.shop-product-list .product-row-foot .price {
  font-size: 14px;
}

.shop-product-list .product-row .add-btn {
  width: 29px;
  height: 29px;
  border-radius: 9px;
}

.shop-product-list .points-price-line {
  margin-top: 1px;
  font-size: 8.5px;
}

.shop-product-list .discount-badge {
  top: 5px;
  left: 5px;
  padding: 3px 5px;
  font-size: 7.5px;
  border-radius: 5px;
}

.shop-empty {
  padding: 38px 8px;
}

.shop-empty .empty-art {
  width: 70px;
  height: 70px;
  font-size: 26px;
  border-radius: 23px;
}

.shop-empty h3 {
  font-size: 14px;
}

.shop-empty p {
  font-size: 10.5px;
}

@media (max-width: 360px) {
  .shop-layout {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 8px;
    padding-left: 9px;
    padding-right: 9px;
  }

  .shop-product-list .product-row-media {
    width: 58px;
    height: 58px;
  }

  .shop-cat {
    font-size: 9.5px;
  }
}

/* ---------- Product cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px;
}

.product-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(233, 213, 195, 0.75);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow: 0 8px 26px rgba(63, 32, 14, 0.06);
  transition: transform 0.16s ease;
  cursor: pointer;
}

.product-card:active {
  transform: scale(0.985);
}

.product-card-media {
  position: relative;
  aspect-ratio: 1 / 0.92;
  overflow: hidden;
  background: #f5e7d9;
}

.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card-media img {
  transform: scale(1.025);
}

.discount-badge {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 10px rgba(201, 56, 18, 0.24);
}

.points-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.94);
  color: #9b6715;
  display: grid;
  place-items: center;
  font-size: 15px;
  box-shadow: 0 3px 10px rgba(52, 27, 9, 0.14);
}

.product-card-body {
  padding: 10px 11px 11px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.product-card-body h3 {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.35;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.product-card-desc {
  margin: 5px 0 0;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-foot {
  margin-top: auto;
  padding-top: 9px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
}

.price {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--ink);
  white-space: nowrap;
}

.price small {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  margin-right: 1px;
}

.price .was {
  margin-left: 4px;
  color: #b3a294;
  font-weight: 600;
  font-size: 10.5px;
  text-decoration: line-through;
  letter-spacing: 0;
}

.add-btn {
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 11px;
  background: var(--dark);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
  transition: transform 0.14s ease, background 0.14s ease;
}

.add-btn:hover {
  background: var(--brand);
}

.add-btn:active {
  transform: scale(0.88);
}

.add-btn .icon {
  width: 16px;
  height: 16px;
}

.points-price-line {
  margin-top: 6px;
  font-size: 9.5px;
  color: #9b6715;
  font-weight: 750;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px;
}

.product-row {
  display: flex;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 9px;
  box-shadow: 0 6px 18px rgba(63, 32, 14, 0.045);
}

.product-row-media {
  width: 100px;
  height: 100px;
  flex: none;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.product-row-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-row-body h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
}

.product-row-body p {
  margin: 4px 0 7px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-row-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-row .points-price-line {
  margin-top: 3px;
}

/* ---------- Category page ---------- */
.category-page-head {
  padding: 8px 18px 14px;
}

.category-page-head h1 {
  margin: 4px 0 4px;
  font-size: 28px;
  letter-spacing: -0.05em;
}

.category-tabs-scroll {
  position: sticky;
  top: calc(67px + env(safe-area-inset-top));
  z-index: 30;
  background: linear-gradient(var(--bg) 72%, rgba(255, 248, 241, 0));
  padding: 8px 0 10px;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  flex: none;
}

.category-tab.active {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}

.category-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 18px 12px;
}

.category-intro h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.category-intro span {
  font-size: 11px;
  color: var(--muted);
}

.store-banner-closed {
  margin: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--red-soft);
  border: 1px solid #f4cbc6;
  color: #8d2d25;
  font-size: 11.5px;
  line-height: 1.5;
}

.store-banner-closed .icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ---------- Empty / loading ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 52px 28px 42px;
}

.empty-art {
  width: 88px;
  height: 88px;
  border-radius: 30px;
  background: linear-gradient(145deg, #fff, #f9e8d9);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 34px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
  transform: rotate(-4deg);
}

.empty-state h3 {
  margin: 0 0 6px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.empty-state p {
  margin: 0 0 18px;
  max-width: 260px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.loading-screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 18px;
}

.loading-screen .skeleton:nth-child(1) {
  height: 210px;
  border-radius: 26px;
}

.loading-screen .skeleton:nth-child(2) {
  height: 24px;
  width: 55%;
}

.loading-screen .skeleton:nth-child(3) {
  height: 180px;
}

.inline-error {
  margin: 16px;
  padding: 14px;
  border-radius: 16px;
  background: var(--red-soft);
  color: #8a2f27;
  font-size: 12px;
  border: 1px solid #f0c9c4;
}

/* ---------- Group buy ---------- */
.deco-groupbuy {
  margin: 16px;
  padding: 16px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 179, 89, 0.35), transparent 35%),
    linear-gradient(135deg, #2d1d13, #63311d 62%, #8a4324);
  color: #fff;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.deco-groupbuy-img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  grid-row: span 2;
}

.deco-groupbuy-art {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  grid-row: span 2;
}

.deco-groupbuy-art svg {
  width: 36px;
  height: 36px;
}

.deco-groupbuy-copy {
  min-width: 0;
}

.deco-groupbuy-copy .eyebrow {
  color: #ffc78c;
  font-size: 9px;
}

.deco-groupbuy-copy h2 {
  margin: 3px 0 2px;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.deco-groupbuy-copy p {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.deco-groupbuy .hero-cta {
  grid-column: 2;
  justify-self: start;
  width: auto;
  margin-top: 3px;
  padding: 8px 12px;
  font-size: 11px;
}

.group-page,
.group-order-detail {
  padding-bottom: calc(var(--safe-bottom) + 110px);
}

.group-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px 2px;
  scrollbar-width: none;
}

.group-tabs::-webkit-scrollbar {
  display: none;
}

.group-tab {
  flex: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 9px 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--ink);
}

.group-tab strong {
  font-size: 11px;
}

.group-tab.active {
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(239, 93, 41, 0.14);
}

.group-hero {
  margin: 12px 16px 0;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff7ed, #ffe8d1);
  border: 1px solid #f0d8bd;
}

.group-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.group-hero h2 {
  margin: 8px 0 8px;
  font-size: 23px;
  letter-spacing: -0.035em;
}

.group-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #785d49;
  font-size: 10.5px;
}

.group-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.group-meta .icon {
  width: 13px;
  height: 13px;
}

.group-state {
  border-radius: 99px;
  padding: 3px 8px;
  font-size: 9px;
  font-weight: 800;
  background: #f1e3d3;
  color: #7f5e44;
  white-space: nowrap;
}

.group-state.open {
  background: #ddf1df;
  color: #2d6a3b;
}

.group-state.upcoming {
  background: #fff0cf;
  color: #8a611c;
}

.group-state.ended,
.group-state.inactive {
  background: #eee8e2;
  color: #7f7168;
}

.group-notice {
  margin: 10px 16px 0;
  padding: 11px 13px;
  border-radius: 13px;
  background: #fff8e8;
  border: 1px solid #efd9ad;
  color: #7d5b1f;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}

.group-notice .icon {
  width: 14px;
  height: 14px;
  flex: none;
}

.group-items {
  padding: 18px 16px 0;
}

.group-items > h3 {
  margin: 0 0 9px;
  font-size: 16px;
}

.group-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  margin-bottom: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.group-item-media {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: #f7ede3;
}

.group-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.group-unavailable {
  position: absolute;
  inset: auto 0 0;
  background: rgba(40, 24, 16, 0.7);
  color: #fff;
  font-size: 8px;
  text-align: center;
  padding: 3px;
}

.group-item-copy {
  min-width: 0;
}

.group-item-copy h3 {
  margin: 0 0 3px;
  font-size: 13px;
  letter-spacing: -0.02em;
}

.group-item-copy p {
  margin: 0 0 4px;
  font-size: 9.5px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.group-item-price {
  color: var(--brand-strong);
  font-size: 14px;
}

.group-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.group-add {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  display: grid;
  place-items: center;
}

.group-add svg,
.group-step svg {
  width: 15px;
  height: 15px;
}

.group-add:disabled,
.group-step:disabled {
  opacity: 0.4;
}

.group-qty {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f7ede3;
  border-radius: 99px;
  padding: 3px;
}

.group-qty-value {
  min-width: 18px;
  text-align: center;
  font-size: 12px;
}

.group-step {
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
}

.group-links {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 18px 0;
}

.group-page-spacer {
  height: 96px;
}

.group-bar {
  position: fixed;
  z-index: 85;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 12px);
  transform: translateX(-50%);
  width: min(448px, calc(100vw - 24px));
  min-height: 62px;
  border-radius: 20px;
  background: var(--dark);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px 8px 14px;
  box-shadow: 0 16px 38px rgba(31, 15, 5, 0.35);
}

.group-bar-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.group-bar-copy strong {
  font-size: 13px;
}

.group-bar-copy span {
  font-size: 9.5px;
  color: #e9cfc0;
}

.group-bar-btn {
  width: auto;
  min-width: 112px;
  padding: 0 14px;
  height: 44px;
}

.group-delivery-preview {
  background: #fff8ed;
}

.group-delivery-fixed {
  display: flex;
  align-items: center;
  gap: 9px;
}

.group-delivery-fixed .icon {
  width: 22px;
  height: 22px;
  color: var(--brand);
}

.group-delivery-fixed div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.group-delivery-fixed span {
  font-size: 9.5px;
  color: var(--muted);
}

.delivery-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 12px 0;
}

.delivery-slot {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 15px;
  padding: 13px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--ink);
}

.delivery-slot span {
  font-size: 9.5px;
  color: var(--muted);
}

.delivery-slot.active {
  border-color: var(--brand);
  background: #fff1e7;
  box-shadow: 0 5px 16px rgba(239, 93, 41, 0.12);
}

.group-fixed-date {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: #f7efe7;
  margin: 10px 0;
}

.group-fixed-date .icon {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.group-fixed-date span {
  margin-left: auto;
  font-size: 9px;
  color: var(--muted);
}

.group-min-banner {
  background: #fff8e8;
  border-color: #efd9ad;
  color: #7d5b1f;
}

.group-empty {
  padding-top: 60px;
}

.group-order-card {
  width: calc(100% - 32px);
  margin: 12px 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 17px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--ink);
}

.group-order-top,
.group-order-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.group-order-card p {
  margin: 0;
  font-size: 10px;
  color: var(--muted);
}

.group-order-hero {
  margin: 14px 16px;
  padding: 18px;
  border-radius: 21px;
  background: linear-gradient(145deg, #fff8ef, #ffe8d3);
  border: 1px solid #f0d8bd;
}

.group-order-hero h2 {
  margin: 6px 0 8px;
  font-size: 24px;
}

.group-order-hero p {
  margin: 4px 0;
  font-size: 10.5px;
  color: #785d49;
}

.group-order-badges {
  margin: 4px 0;
}

.profile-address-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.profile-address-item:last-child {
  border-bottom: 0;
}

.profile-address-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-address-copy strong {
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

.profile-address-copy span {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.address-delete-btn {
  flex: none;
  border: 1px solid #f0c9c4;
  background: #fff7f5;
  color: #a63d32;
  border-radius: 10px;
  padding: 7px 9px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 700;
}

.address-delete-btn .icon {
  width: 12px;
  height: 12px;
}

.address-delete-btn:active {
  background: #ffebe7;
}

.referral-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 14px 0;
}

.referral-mini-stats > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.referral-mini-stats span {
  font-size: 8.5px;
  color: var(--muted);
}

.referral-mini-stats strong {
  font-size: 15px;
}

.referral-direct-list {
  border-top: 1px solid var(--line);
  margin-bottom: 14px;
}

.referral-direct-list .detail-info-row {
  border-bottom: 1px solid var(--line);
}

.group-order-detail > .btn.wide {
  width: calc(100% - 32px);
  margin: 16px;
}

/* ---------- Bottom nav / cart ---------- */
.bottom-nav {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding: 7px 12px calc(6px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: rgba(255, 252, 248, 0.94);
  border-top: 1px solid rgba(234, 215, 197, 0.8);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.nav-item {
  border: 0;
  background: transparent;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #9b8678;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease;
}

.nav-item.active {
  color: var(--brand);
}

.nav-icon {
  width: 23px;
  height: 23px;
  display: block;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
}

.nav-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.nav-item.active .nav-icon {
  transform: translateY(-1px);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand);
}

.cart-widget {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 9px);
  transform: translateX(-50%);
  width: min(448px, calc(100vw - 24px));
  pointer-events: none;
}

.cart-widget > * {
  pointer-events: auto;
}

.cart-bar {
  height: 58px;
  border-radius: 19px;
  background: var(--dark);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px 8px 12px;
  box-shadow: 0 14px 36px rgba(31, 15, 5, 0.32);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-icon-wrap {
  position: relative;
  width: 39px;
  height: 39px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  flex: none;
}

.cart-icon-wrap .icon {
  width: 20px;
  height: 20px;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
  display: grid;
  place-items: center;
  border: 2px solid var(--dark);
}

.cart-total {
  flex: 1;
  min-width: 0;
}

.cart-total strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.cart-total span {
  display: block;
  font-size: 9.5px;
  color: rgba(255, 245, 235, 0.58);
  margin-top: 2px;
}

.cart-checkout {
  border: 0;
  border-radius: 13px;
  min-height: 40px;
  padding: 0 16px;
  background: var(--brand);
  color: #fff;
  font-size: 12.5px;
  font-weight: 850;
  flex: none;
}

.cart-expanded {
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(51, 25, 10, 0.2);
  overflow: hidden;
  animation: cartIn 0.2s ease both;
}

@keyframes cartIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.cart-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px 10px;
}

.cart-panel-head strong {
  font-size: 13px;
}

.cart-lines {
  max-height: 282px;
  overflow-y: auto;
  padding: 0 15px;
}

.cart-line {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #f5e9dd;
  align-items: center;
}

.cart-line:first-child {
  border-top: 0;
}

.cart-line-img {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  object-fit: cover;
  flex: none;
}

.cart-line-copy {
  flex: 1;
  min-width: 0;
}

.cart-line-copy strong {
  display: block;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-line-copy span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.cart-line-copy .redeem-tag {
  color: #a06c18;
  font-weight: 750;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}

.qty-stepper button {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.qty-stepper button.plus {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}

.qty-stepper span {
  min-width: 18px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.cart-panel-foot {
  padding: 12px 15px 15px;
  background: #fffaf5;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
}

.cart-panel-total {
  flex: 1;
  font-size: 11px;
  color: var(--muted);
}

.cart-panel-total strong {
  display: block;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.03em;
}

/* ---------- Sheets / modals / toasts ---------- */
.overlay-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(23, 11, 5, 0.51);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fadeIn 0.16s ease both;
}

.overlay-layer.center {
  align-items: center;
  padding: 18px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

.sheet {
  width: 100%;
  max-width: 480px;
  max-height: 91dvh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  padding: 8px 18px calc(22px + var(--safe-bottom));
  animation: sheetIn 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  overscroll-behavior: contain;
}

@keyframes sheetIn {
  from {
    transform: translateY(36px);
    opacity: 0.4;
  }
}

.sheet-grip {
  width: 38px;
  height: 4px;
  border-radius: 4px;
  background: #d8c3b1;
  margin: 3px auto 15px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.sheet-close {
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #efe1d4;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
}

.modal-card {
  width: 100%;
  max-width: 390px;
  background: #fff;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 24px 70px rgba(25, 11, 3, 0.3);
  animation: modalIn 0.2s ease both;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h2 {
  margin: 2px 0 0;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.modal-head + p {
  margin-top: 8px;
}

@keyframes modalIn {
  from {
    transform: translateY(12px) scale(0.98);
    opacity: 0;
  }
}

.modal-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.modal-card p {
  margin: 0 0 18px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 9px;
}

.modal-actions .btn {
  flex: 1;
}

.toast-root {
  position: fixed;
  z-index: 500;
  left: 50%;
  top: calc(18px + env(safe-area-inset-top));
  transform: translateX(-50%);
  width: min(400px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 11px 15px;
  border-radius: 13px;
  background: rgba(29, 17, 10, 0.95);
  color: #fff;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 12px 30px rgba(20, 9, 2, 0.3);
  animation: toastIn 0.22s ease both;
}

.toast.success {
  background: rgba(30, 105, 65, 0.96);
}

.toast.error {
  background: rgba(164, 45, 35, 0.97);
}

.toast.leaving {
  animation: toastOut 0.2s ease both;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ---------- Product sheet ---------- */
.product-sheet {
  padding-top: 0;
}

.product-hero {
  margin: 0 -18px;
  height: 250px;
  position: relative;
  background: #f3e1d2;
  overflow: hidden;
}

.product-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 62%, rgba(25, 12, 5, 0.5));
}

.product-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
}

.product-sheet-body {
  padding-top: 18px;
}

.product-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.product-title-row h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.product-sheet-price {
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: -0.04em;
}

.product-sheet-desc {
  margin: 9px 0 15px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

.discount-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: #a73a17;
  font-size: 11px;
  font-weight: 750;
  margin-bottom: 14px;
}

.points-option {
  border: 1px solid #eed9ac;
  background: linear-gradient(100deg, #fff9e9, #fff5df);
  border-radius: 16px;
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.points-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #f7df9b;
  display: grid;
  place-items: center;
  font-size: 17px;
  flex: none;
}

.points-option-copy {
  flex: 1;
  min-width: 0;
}

.points-option-copy strong {
  display: block;
  font-size: 12px;
}

.points-option-copy span {
  display: block;
  font-size: 10px;
  color: #927031;
  margin-top: 2px;
}

.points-option .btn {
  min-height: 36px;
  font-size: 11px;
  padding: 0 12px;
  background: #8d621d;
}

.product-sheet-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 6px;
}

.product-sheet-actions .qty-stepper {
  height: 48px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
}

.product-sheet-actions .qty-stepper button {
  border: 0;
  background: transparent;
  width: 30px;
}

.product-sheet-actions .btn {
  flex: 1;
}

.points-balance-hint {
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 9px;
}

/* ---------- Forms ---------- */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > label {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-2);
  padding-left: 2px;
}

.field .hint {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.45;
  padding-left: 2px;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 13px;
  min-height: 48px;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea {
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.55;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(239, 91, 42, 0.11);
}

.select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23947e6f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.input-group {
  display: flex;
  gap: 8px;
}

.input-group .input {
  flex: 1;
  min-width: 0;
}

.input-group .btn {
  flex: none;
  min-height: 48px;
  font-size: 11.5px;
  padding: 0 14px;
  border-radius: 13px;
}

.form-error {
  padding: 10px 12px;
  background: var(--red-soft);
  border: 1px solid #f1c7c1;
  border-radius: 11px;
  color: #8c2d25;
  font-size: 11.5px;
  line-height: 1.45;
}

.form-success {
  padding: 10px 12px;
  background: var(--green-soft);
  border: 1px solid #c6e6d4;
  border-radius: 11px;
  color: #256d46;
  font-size: 11.5px;
  line-height: 1.45;
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 3px 0;
  font-size: 10px;
  color: var(--muted);
}

.form-divider::before,
.form-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.5;
}

.checkbox-line input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--brand);
}

/* ---------- Auth pages ---------- */
.auth-page {
  min-height: 100dvh;
  padding: calc(16px + env(safe-area-inset-top)) 18px calc(32px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 92% 7%, rgba(255, 177, 63, 0.23), transparent 190px),
    linear-gradient(180deg, #fff9f2, #fff4e9);
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 850;
  font-size: 14px;
}

.auth-brand img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.auth-title {
  margin: 8px 0 5px;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.auth-subtitle {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.auth-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(233, 213, 194, 0.9);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.auth-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-footer .text-btn {
  font-size: 12px;
}

.auth-legal {
  margin-top: auto;
  padding-top: 28px;
  text-align: center;
  font-size: 9.5px;
  color: #a99283;
  line-height: 1.55;
}

.debug-code {
  margin-top: 9px;
  border: 1px dashed #dcb76f;
  border-radius: 10px;
  background: #fff9e8;
  padding: 8px 10px;
  font-size: 11px;
  color: #88601c;
}

.auth-switch-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #f2ddc7;
  font-size: 10.5px;
  color: #7b5a3d;
  margin-bottom: 12px;
}

/* ---------- Checkout ---------- */
.checkout-page {
  padding-bottom: 130px;
}

.checkout-header {
  padding: calc(13px + env(safe-area-inset-top)) 16px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkout-header h1 {
  margin: 0;
  flex: 1;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.checkout-section {
  margin: 12px 16px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 15px;
  box-shadow: 0 7px 22px rgba(63, 32, 14, 0.04);
}

.checkout-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.checkout-section-head h2 {
  margin: 0;
  font-size: 13.5px;
  letter-spacing: -0.015em;
}

.address-card {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.address-icon {
  width: 35px;
  height: 35px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex: none;
}

.address-icon .icon {
  width: 18px;
  height: 18px;
}

.address-copy {
  flex: 1;
  min-width: 0;
}

.address-copy strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  flex-wrap: wrap;
}

.address-copy strong em {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 750;
  background: var(--green-soft);
  color: var(--green);
  padding: 3px 6px;
  border-radius: 5px;
}

.address-copy p {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.address-empty {
  border: 1px dashed #e0b98f;
  border-radius: 15px;
  background: #fffaf2;
  padding: 20px 16px;
  text-align: center;
}

.address-empty p {
  margin: 0 0 11px;
  font-size: 11.5px;
  color: #83633f;
}

.checkout-items {
  display: flex;
  flex-direction: column;
}

.checkout-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid #f6eadf;
}

.checkout-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.checkout-item img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex: none;
}

.checkout-item-copy {
  flex: 1;
  min-width: 0;
}

.checkout-item-copy strong {
  display: block;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkout-item-copy span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.checkout-item-price {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.checkout-item-price .redeemed {
  color: #9b6715;
  font-size: 9.5px;
}

.note-counter {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: var(--muted);
  margin-top: 5px;
}

.totals {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11.5px;
}

.totals-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.totals-line.discount {
  color: var(--green);
}

.totals-line.grand {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.totals-line.grand strong {
  font-size: 23px;
  letter-spacing: -0.04em;
}

.checkout-note {
  display: flex;
  gap: 8px;
  margin: 14px 16px 0;
  padding: 11px 12px;
  border-radius: 13px;
  background: #fbf1e4;
  color: #806548;
  font-size: 10.5px;
  line-height: 1.55;
}

.checkout-note .icon {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
}

.place-order-bar {
  position: fixed;
  z-index: 65;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: rgba(255, 250, 245, 0.94);
  border-top: 1px solid rgba(234, 213, 194, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.place-order-bar .btn {
  min-height: 52px;
  width: 100%;
  border-radius: 16px;
  font-size: 14px;
}

.place-order-sub {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 9px;
}

.place-order-sub strong {
  color: var(--ink);
  font-size: 12px;
}

/* address list */
.address-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.address-option {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  text-align: left;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.address-option.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(239, 91, 42, 0.09);
  background: #fffaf6;
}

.address-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #d6c1af;
  flex: none;
  margin-top: 1px;
  display: grid;
  place-items: center;
}

.address-option.selected .address-radio {
  border-color: var(--brand);
}

.address-option.selected .address-radio::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

.address-option strong {
  display: block;
  font-size: 12px;
}

.address-option p {
  margin: 3px 0 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Orders ---------- */
.orders-page-head {
  padding: 18px 18px 6px;
}

.orders-page-head h1 {
  margin: 4px 0 4px;
  font-size: 29px;
  letter-spacing: -0.05em;
}

.orders-page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
}

.order-filters {
  display: flex;
  gap: 8px;
  padding: 13px 16px 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.order-filters::-webkit-scrollbar {
  display: none;
}

.order-filter {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 11px;
  font-weight: 750;
  color: var(--muted);
  white-space: nowrap;
}

.order-filter.active {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}

.order-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 0;
}

.order-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(63, 32, 14, 0.045);
}

.order-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.order-card-head strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.order-card-head span {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
  margin-top: 3px;
}

.status-badge {
  flex: none;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 9.5px;
  font-weight: 850;
  white-space: nowrap;
}

.status-badge.pending_payment {
  background: #fff3d9;
  color: #96610e;
}

.status-badge.paid {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-badge.shipped {
  background: #efe9fb;
  color: #6551a1;
}

.status-badge.completed {
  background: var(--green-soft);
  color: var(--green);
}

.status-badge.cancel_requested {
  background: #fff0e0;
  color: #a35c0e;
}

.status-badge.cancelled {
  background: #f3efec;
  color: #8c7b6e;
}

.order-thumbs {
  display: flex;
  gap: 6px;
  margin-bottom: 11px;
}

.order-thumbs img {
  width: 49px;
  height: 49px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #f2e5d9;
}

.order-thumb-more {
  width: 49px;
  height: 49px;
  border-radius: 10px;
  background: #f7eee4;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
}

.order-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #f6eadf;
  padding-top: 10px;
}

.order-card-foot .total {
  font-size: 10px;
  color: var(--muted);
}

.order-card-foot .total strong {
  display: block;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-top: 1px;
}

.order-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.order-actions .btn {
  min-height: 32px;
  font-size: 10.5px;
  padding: 0 11px;
}

/* ---------- Order detail ---------- */
.order-detail-page {
  padding-bottom: calc(34px + var(--safe-bottom));
}

.order-hero {
  margin: 14px 16px 0;
  padding: 22px 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 166, 81, 0.27), transparent 43%),
    linear-gradient(135deg, #1d100a, #3b2115);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.order-hero::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  right: -54px;
  bottom: -64px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.order-hero .success-check {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  background: rgba(91, 201, 139, 0.18);
  color: #83e3b0;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border: 1px solid rgba(131, 227, 176, 0.24);
}

.order-hero .success-check .icon {
  width: 21px;
  height: 21px;
}

.order-hero h1 {
  margin: 0 0 5px;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.order-hero p {
  margin: 0;
  color: rgba(255, 245, 235, 0.63);
  font-size: 11.5px;
  line-height: 1.55;
}

.order-hero .order-no-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #f4d8c4;
}

.status-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 17px 16px 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
  color: #aa9586;
  font-weight: 700;
  text-align: center;
}

.progress-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e4d3c4;
  position: relative;
}

.progress-step.done {
  color: var(--ink-2);
}

.progress-step.done .progress-dot {
  background: var(--brand);
}

.progress-step.current .progress-dot {
  box-shadow: 0 0 0 4px rgba(239, 91, 42, 0.13);
}

.detail-section {
  margin: 13px 16px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 15px;
}

.detail-section h2 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.detail-info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  font-size: 11.5px;
  border-top: 1px solid #f7ede4;
}

.detail-info-row:first-of-type {
  border-top: 0;
}

.detail-info-row span {
  color: var(--muted);
}

.detail-info-row strong {
  text-align: right;
  font-weight: 700;
  max-width: 65%;
  line-height: 1.5;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid #f7ede4;
}

.detail-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.detail-item img {
  width: 52px;
  height: 52px;
  border-radius: 11px;
  object-fit: cover;
}

.detail-item-copy {
  flex: 1;
  min-width: 0;
}

.detail-item-copy strong {
  display: block;
  font-size: 11.5px;
}

.detail-item-copy span {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
  margin-top: 2px;
}

.detail-item-copy em {
  font-style: normal;
  color: #9a6a20;
}

.detail-item-price {
  font-size: 12px;
  font-weight: 800;
}

.order-actions-panel {
  margin: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-row {
  display: flex;
  gap: 8px;
}

.action-row .btn {
  flex: 1;
  min-height: 44px;
  font-size: 12px;
}

.cancel-state {
  margin: 13px 16px 0;
  padding: 13px;
  border-radius: 15px;
  background: #fff5e7;
  border: 1px solid #efd6b3;
  color: #8a6025;
  font-size: 11px;
  line-height: 1.55;
}

.contact-block {
  margin: 18px 16px 0;
}

.contact-block h2 {
  margin: 0 0 9px;
  font-size: 13px;
}

.contact-grid {
  display: grid;
  gap: 8px;
}

.contact-grid.single {
  grid-template-columns: 1fr;
}

.contact-grid.double {
  grid-template-columns: 1fr 1fr;
}

.contact-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 15px;
  padding: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  min-height: 58px;
  text-align: left;
}

.contact-btn img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex: none;
}

.contact-btn span {
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.35;
}

.contact-btn.with-image {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 6px;
  overflow: hidden;
}

.contact-btn.with-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  border-radius: 9px;
  object-fit: cover;
}

.contact-btn.with-image span {
  padding: 7px 4px 3px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-btn:not(.with-image) .icon {
  width: 19px;
  height: 19px;
  color: var(--brand);
}

.contact-btn:hover {
  border-color: #e4c5aa;
}

.contact-btn.chat {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
  justify-content: center;
  padding: 14px;
  min-height: 54px;
  font-size: 12px;
  font-weight: 800;
}

.contact-btn.chat .icon {
  width: 18px;
  height: 18px;
  color: #fff;
}

/* ---------- Profile ---------- */
.profile-top {
  padding: calc(16px + env(safe-area-inset-top)) 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-top h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.profile-hero {
  margin: 14px 16px 0;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 165, 73, 0.24), transparent 42%),
    linear-gradient(135deg, #1f110a, #3b2114);
  border-radius: 24px;
  padding: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  right: -60px;
  top: -70px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(145deg, #ffb257, #ee5526);
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 900;
  flex: none;
  box-shadow: 0 8px 20px rgba(208, 65, 21, 0.32);
}

.profile-identity h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.profile-identity p {
  margin: 4px 0 0;
  color: rgba(255, 245, 235, 0.58);
  font-size: 10px;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 17px;
}

.profile-stat {
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-stat span {
  display: block;
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 245, 235, 0.5);
}

.profile-stat strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.profile-stat.points strong {
  color: #ffd27b;
}

.profile-guest {
  text-align: center;
  padding: 7px 0;
}

.profile-guest .avatar {
  margin: 0 auto 11px;
  background: rgba(255, 255, 255, 0.1);
}

.profile-guest h2 {
  margin: 0 0 5px;
  font-size: 17px;
}

.profile-guest p {
  margin: 0 0 13px;
  font-size: 10.5px;
  color: rgba(255, 245, 235, 0.58);
}

.profile-guest .btn {
  min-height: 39px;
  font-size: 11.5px;
}

.profile-menu {
  margin: 13px 16px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.profile-row {
  width: 100%;
  border: 0;
  border-top: 1px solid #f6eadf;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 15px;
  text-align: left;
  text-decoration: none;
}

.profile-row:first-child {
  border-top: 0;
}

.profile-row-icon {
  width: 33px;
  height: 33px;
  border-radius: 10px;
  background: #fbf0e4;
  color: #946c4d;
  display: grid;
  place-items: center;
  flex: none;
}

.profile-row-icon .icon {
  width: 17px;
  height: 17px;
}

.profile-row-copy {
  flex: 1;
  min-width: 0;
}

.profile-row-copy strong {
  display: block;
  font-size: 12px;
}

.profile-row-copy span {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-row .chev {
  color: #b6a192;
  font-size: 16px;
  flex: none;
}

.profile-row.danger {
  color: var(--red);
}

.profile-row.danger .profile-row-icon {
  background: var(--red-soft);
  color: var(--red);
}

.profile-lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  border-top: 1px solid #f6eadf;
}

.profile-lang-row > span {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 12px;
  font-weight: 700;
}

.profile-lang-row .lang-switch {
  box-shadow: none;
  background: #fbf3eb;
}

.profile-lang-row .lang-switch button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(50, 25, 10, 0.1);
}

.profile-footer {
  text-align: center;
  padding: 24px 28px 0;
  font-size: 9px;
  color: #b5a193;
  line-height: 1.6;
}

/* ---------- Chat ---------- */
.chat-sheet {
  width: 100%;
  max-width: 480px;
  height: min(82dvh, 720px);
  background: #fffaf5;
  border-radius: 28px 28px 0 0;
  display: flex;
  flex-direction: column;
  animation: sheetIn 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  overflow: hidden;
}

.chat-head {
  padding: 10px 16px 12px;
  background: var(--dark);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.chat-head .chat-avatar {
  width: 37px;
  height: 37px;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffb257, #ee5526);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 900;
  flex: none;
}

.chat-head-copy {
  flex: 1;
}

.chat-head-copy strong {
  display: block;
  font-size: 12.5px;
}

.chat-head-copy span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  color: rgba(255, 245, 235, 0.58);
  margin-top: 2px;
}

.chat-head .sheet-close {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overscroll-behavior: contain;
}

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.chat-empty .empty-art {
  margin-bottom: 12px;
}

.chat-msg {
  max-width: 81%;
  align-self: flex-start;
}

.chat-msg.mine {
  align-self: flex-end;
}

.chat-bubble {
  padding: 9px 12px;
  border-radius: 15px 15px 15px 4px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 3px 10px rgba(60, 32, 14, 0.04);
}

.chat-msg.mine .chat-bubble {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
  border-radius: 15px 15px 4px 15px;
}

.chat-time {
  font-size: 8px;
  color: #b19d8e;
  margin-top: 3px;
  padding: 0 3px;
}

.chat-msg.mine .chat-time {
  text-align: right;
}

.chat-input-bar {
  flex: none;
  padding: 9px 12px calc(9px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  min-height: 42px;
  max-height: 100px;
  resize: none;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 11px 12px;
  font-size: 12px;
  outline: none;
  background: #fffaf5;
}

.chat-send {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 0;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}

.chat-send .icon {
  width: 18px;
  height: 18px;
}

/* ---------- Misc ---------- */
.fine-print {
  font-size: 9.5px;
  color: var(--muted);
  line-height: 1.55;
}

.link-plain {
  color: var(--brand);
  font-weight: 750;
  text-decoration: none;
}

.copy-id {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  padding: 0;
}

.reorder-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}

@media (min-width: 520px) {
  body {
    padding: 18px 0;
  }

  .app-shell {
    min-height: calc(100dvh - 36px);
    border-radius: 30px;
    overflow: hidden;
  }

  .bottom-nav {
    border-radius: 0 0 30px 30px;
  }

  .toast-root {
    top: 30px;
  }
}

@media (max-width: 360px) {
  .hero-copy {
    width: 75%;
    padding: 22px 18px;
  }

  .hero-copy h1 {
    font-size: 28px;
  }

  .product-grid {
    gap: 9px;
    padding: 0 13px;
  }

  .cart-widget {
    width: calc(100vw - 16px);
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}

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