:root {
  --bg: #fbf9ff;
  --bg-soft: #f4efff;
  --surface: rgba(255,255,255,.88);
  --surface-strong: #ffffff;
  --text: #171324;
  --muted: #746e86;
  --muted-2: #9a93ad;
  --line: #e9defe;
  --primary: #7c3aed;
  --primary-2: #a855f7;
  --pink: #ec4899;
  --accent: #f97316;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #e11d48;
  --shadow: 0 24px 70px rgba(85, 42, 160, .12);
  --shadow-soft: 0 14px 36px rgba(85, 42, 160, .1);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1320px;
  --font: "Noto Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --card: var(--surface);
  --border: var(--line);
}

:root[data-theme="dark"] {
  --bg: #0d0b13;
  --bg-soft: #151020;
  --surface: rgba(28, 23, 40, .82);
  --surface-strong: #171321;
  --text: #f7f3ff;
  --muted: #b9afcc;
  --muted-2: #8f84a3;
  --line: rgba(190, 159, 255, .2);
  --shadow: 0 24px 70px rgba(0, 0, 0, .35);
  --shadow-soft: 0 14px 36px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(circle at 14% 6%, rgba(124,58,237,.12), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(236,72,153,.12), transparent 28%),
    linear-gradient(180deg, var(--bg), #fff 50%, var(--bg));
  color: var(--text);
  min-height: 100vh;
}
:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 15% 8%, rgba(124,58,237,.22), transparent 32%),
    radial-gradient(circle at 84% 20%, rgba(236,72,153,.16), transparent 28%),
    linear-gradient(180deg, #0d0b13, #12101a 50%, #0d0b13);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.container { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; }
.app-shell { min-height: 100vh; }

.topbar {
  background: linear-gradient(90deg, #6420df, #7c3aed 52%, #d946ef);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.topbar__inner {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar__group { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.topbar__item { display: inline-flex; align-items: center; gap: 8px; opacity: .96; }
.topbar__item .material-symbols-outlined { font-size: 18px; }

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(255,255,255,.82);
  border-bottom: 1px solid var(--line);
}
:root[data-theme="dark"] .header { background: rgba(15, 12, 22, .82); }
.header__inner {
  height: 78px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 30px;
  letter-spacing: -.05em;
  color: var(--primary);
}
.logo__mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124,58,237,.15), rgba(236,72,153,.12));
  box-shadow: 0 12px 24px rgba(124,58,237,.14);
}
.logo__mark .material-symbols-outlined { font-size: 28px; color: var(--primary); font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 24; }
.logo small { font-size: 14px; color: var(--muted); letter-spacing: -.02em; margin-left: 2px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  transition: .18s ease;
}
.nav a:hover, .nav a.is-active { color: var(--primary); background: rgba(124,58,237,.1); }
.header__right { display: flex; align-items: center; gap: 10px; }
.search {
  position: relative;
  width: min(390px, 28vw);
}
.search .material-symbols-outlined {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.search input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0 18px 0 50px;
  outline: none;
  box-shadow: 0 10px 28px rgba(124,58,237,.06);
}
.search input:focus { border-color: rgba(124,58,237,.45); box-shadow: 0 0 0 4px rgba(124,58,237,.1); }
.icon-btn, .lang-select, .profile-btn {
  height: 50px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 28px rgba(124,58,237,.06);
  transition: .18s ease;
}
.icon-btn { min-width: 50px; padding: 0 14px; position: relative; }
.icon-btn:hover, .profile-btn:hover, .lang-select:hover { transform: translateY(-1px); border-color: rgba(124,58,237,.32); }
.lang-select { padding: 0 12px 0 18px; font-weight: 900; outline: none; }
.badge {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 20px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
  font-weight: 900;
  border: 2px solid var(--surface-strong);
}
.profile-btn { padding: 0 16px 0 8px; font-weight: 900; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  font-weight: 900;
}
.mobile-menu-btn { display: none; }

main { padding: 42px 0 0; }
.hero {
  padding: 18px 0 34px;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(520px, 1.05fr);
  align-items: center;
  gap: 54px;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(124,58,237,.09);
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 22px;
}
.hero h1 {
  margin: 0;
  font-size: clamp(48px, 5.6vw, 82px);
  line-height: .98;
  letter-spacing: -.07em;
  font-weight: 950;
}
.gradient-text { background: linear-gradient(90deg, var(--primary), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p {
  margin: 22px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.72;
  font-weight: 600;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 16px;
  padding: 0 24px;
  border: 0;
  font-weight: 900;
  letter-spacing: -.02em;
  transition: .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { color: #fff; background: linear-gradient(135deg, var(--primary), var(--pink)); box-shadow: 0 18px 34px rgba(124,58,237,.24); }
.btn--ghost { color: var(--primary); background: var(--surface); border: 1px solid var(--line); }
.btn--soft { color: var(--primary); background: rgba(124,58,237,.1); }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 32px;
  max-width: 620px;
}
.stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}
.stat .material-symbols-outlined { color: var(--primary); font-size: 26px; }
.stat strong { display: block; font-size: 18px; font-weight: 950; letter-spacing: -.04em; }
.stat span { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }

.hero-showcase {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 28px;
  background: linear-gradient(135deg, #6d28d9, #8b5cf6 54%, #ec4899);
  box-shadow: 0 30px 80px rgba(124,58,237,.25);
  overflow: hidden;
}
.hero-showcase::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  filter: blur(4px);
}
.showcase__top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; color: #fff; margin-bottom: 20px; }
.showcase__title { display: flex; gap: 12px; align-items: center; }
.showcase__title .material-symbols-outlined { font-size: 30px; font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 24; }
.showcase__title h2 { margin: 0; font-size: 26px; letter-spacing: -.04em; }
.showcase__title p { margin: 4px 0 0; opacity: .82; font-size: 13px; font-weight: 700; }
.carousel-arrows { display: flex; gap: 8px; }
.carousel-arrows button { width: 38px; height: 38px; border-radius: 999px; border: 1px solid rgba(255,255,255,.26); color: #fff; background: rgba(255,255,255,.12); display: grid; place-items: center; }
.showcase-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
}
.showcase-track {
  display: flex;
  width: 100%;
  will-change: transform;
  transform: translateX(0);
  transition: transform .72s cubic-bezier(.22, .8, .22, 1);
}
.showcase-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 0;
}
.showcase-products { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mini-product {
  background: rgba(255,255,255,.96);
  color: #171324;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,.14);
  min-height: 258px;
  display: flex;
  flex-direction: column;
}
.mini-product__image { height: 128px; border-radius: 16px; background: linear-gradient(135deg, #fff, #f4efff); display: grid; place-items: center; overflow: hidden; margin-bottom: 12px; }
.mini-product__image img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.mini-product h3 { font-size: 13px; line-height: 1.35; margin: 0; min-height: 36px; }
.rating { display: flex; align-items: center; gap: 4px; margin: 8px 0; color: #7c3aed; font-size: 12px; font-weight: 800; }
.rating .material-symbols-outlined { font-size: 16px; color: var(--warning); font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 20; }
.mini-product strong { font-size: 22px; letter-spacing: -.05em; margin-top: auto; }
.carousel-dots { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; }
.carousel-dot { width: 28px; height: 4px; border: 0; border-radius: 10px; background: rgba(255,255,255,.35); cursor: pointer; padding: 0; transition: .18s ease; }
.carousel-dot.is-active { width: 46px; background: #fff; }
.carousel-arrows button { cursor: pointer; transition: .18s ease; }
.carousel-arrows button:hover { transform: translateY(-1px); background: rgba(255,255,255,.2); }

.section { padding: 26px 0; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.section__head h2 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.link-more { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 900; }
.products-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.product-card {
  position: relative;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
  transition: .18s ease;
}
.product-card:hover { transform: translateY(-4px); border-color: rgba(124,58,237,.28); }
.product-card__tag { display: inline-flex; margin-bottom: 10px; border-radius: 999px; padding: 5px 9px; background: rgba(124,58,237,.1); color: var(--primary); font-size: 11px; font-weight: 900; }
.product-card__heart { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-strong); color: var(--muted); display: grid; place-items: center; }
.product-card__image { height: 128px; border-radius: 16px; background: linear-gradient(135deg, #fff, #f4efff); display: grid; place-items: center; overflow: hidden; margin-bottom: 12px; }
.product-card__image img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.product-card h3 { margin: 0; font-size: 14px; line-height: 1.35; min-height: 38px; }
.product-card__seller { margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.product-card__bottom { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-top: 10px; }
.price { font-size: 18px; font-weight: 950; letter-spacing: -.04em; white-space: nowrap; }
.cart-small { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; border: 1px solid rgba(124,58,237,.28); background: rgba(124,58,237,.08); color: var(--primary); }

.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
.benefit { display: flex; align-items: center; gap: 14px; padding: 8px 12px; }
.benefit .material-symbols-outlined { color: var(--primary); font-size: 34px; }
.benefit strong { display: block; font-weight: 950; letter-spacing: -.03em; }
.benefit span { color: var(--muted); font-size: 12px; font-weight: 700; }

.footer {
  margin-top: 34px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.54);
}
:root[data-theme="dark"] .footer { background: rgba(17,14,24,.6); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, .75fr) 1.2fr;
  gap: 34px;
  padding: 34px 0;
}
.footer p { color: var(--muted); margin: 14px 0 0; line-height: 1.55; font-weight: 600; }
.footer h4 { margin: 0 0 12px; font-size: 15px; }
.footer a { display: block; color: var(--muted); font-size: 13px; font-weight: 700; margin: 8px 0; }
.newsletter { display: flex; gap: 10px; margin-top: 14px; }
.newsletter input { flex: 1; min-width: 0; height: 48px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; background: var(--surface); color: var(--text); outline: none; }
.newsletter button { width: 48px; border-radius: 14px; border: 0; color: #fff; background: linear-gradient(135deg, var(--primary), var(--pink)); }
.footer__bottom { border-top: 1px solid var(--line); padding: 16px 0; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; font-weight: 700; }

.page-card, .form-card, .empty-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}
.page-title { margin: 0 0 16px; font-size: clamp(34px, 4vw, 56px); letter-spacing: -.06em; line-height: 1.05; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.filters input, .filters select, .form-grid input, .form-grid select, .form-grid textarea {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: grid; gap: 7px; color: var(--text); font-size: 13px; font-weight: 900; }
.form-grid textarea { min-height: 100px; resize: vertical; }
.catalog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.product-detail { display: grid; grid-template-columns: .85fr 1fr; gap: 24px; align-items: start; }
.product-detail__image { min-height: 420px; background: linear-gradient(135deg, #fff, #f4efff); border-radius: var(--radius-lg); display: grid; place-items: center; overflow: hidden; }
.product-detail__image img { max-height: 380px; object-fit: contain; padding: 20px; }
.cart-list { display: grid; gap: 12px; }
.cart-row { display: grid; grid-template-columns: 74px 1fr auto auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-strong); }
.cart-row img { width: 74px; height: 74px; object-fit: contain; border-radius: 14px; background: #fff; }
.checkout-grid { display: grid; grid-template-columns: 1fr 390px; gap: 20px; align-items: start; }
.notice { padding: 14px 16px; border-radius: 16px; margin: 14px 0; font-weight: 800; }
.notice--ok { background: rgba(22,163,74,.1); color: var(--success); border: 1px solid rgba(22,163,74,.22); }
.notice--bad { background: rgba(225,29,72,.1); color: var(--danger); border: 1px solid rgba(225,29,72,.22); }

.loading-skeleton { background: linear-gradient(90deg, rgba(124,58,237,.07), rgba(236,72,153,.1), rgba(124,58,237,.07)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1180px) {
  .header__inner { grid-template-columns: auto auto 1fr; }
  .nav { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .hero__grid { grid-template-columns: 1fr; }
  .showcase-products, .showcase-slide, .products-grid { grid-template-columns: repeat(3, 1fr); }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-grid { grid-template-columns: repeat(3, 1fr); }
  .checkout-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .container { width: min(100% - 24px, var(--container)); }
  .topbar__inner { height: auto; min-height: 42px; padding: 8px 0; }
  .topbar__group:nth-child(2), .profile-btn span:not(.avatar) { display: none; }
  .header__inner { height: auto; padding: 12px 0; grid-template-columns: 1fr auto; }
  .header__right { grid-column: 1 / -1; width: 100%; display: grid; grid-template-columns: 1fr auto auto auto; }
  .search { width: 100%; }
  main { padding-top: 22px; }
  .hero h1 { font-size: 48px; }
  .stats { grid-template-columns: 1fr; }
  .showcase-products, .showcase-slide, .products-grid, .catalog-grid { grid-template-columns: 1fr; }
  .benefits, .footer__grid, .form-grid, .product-detail { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 62px 1fr; }
  .cart-row > *:nth-child(3), .cart-row > *:nth-child(4) { grid-column: 2; }
  .footer__bottom { flex-direction: column; }
}


/* ===== Checkout delivery/phone fix v12 ===== */
.checkout-block {
  display: grid;
  gap: 10px;
}

.delivery-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.delivery-option {
  min-height: 58px;
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 10px 30px rgba(124,58,237,.06);
  cursor: pointer;
}

.delivery-option input {
  width: 18px !important;
  height: 18px !important;
  accent-color: var(--primary);
  padding: 0 !important;
}

.delivery-option:has(input:checked) {
  border-color: rgba(124,58,237,.48);
  background: linear-gradient(135deg, rgba(124,58,237,.13), rgba(236,72,153,.10));
}

.form-grid--inner {
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0;
}

.checkout-summary p {
  display: grid;
  gap: 4px;
}

.checkout-summary p b {
  margin-left: 8px;
  white-space: nowrap;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 10px 0;
}

.summary-line--total strong {
  font-size: 28px;
  color: var(--primary);
}

@media (max-width: 720px) {
  .delivery-options,
  .form-grid--inner {
    grid-template-columns: 1fr;
  }
}


/* ===== Auth/account cleanup v13 ===== */
.profile-btn--guest .avatar--ghost {
  background: linear-gradient(135deg, rgba(124,58,237,.14), rgba(236,72,153,.14));
  color: var(--primary);
}
.profile-btn--guest .avatar--ghost .material-symbols-outlined {
  font-size: 20px;
}
.auth-page {
  min-height: 520px;
  display: grid;
  place-items: center;
}
.auth-card {
  width: min(540px, 100%);
}
.auth-card h1 {
  margin: 0 0 22px;
  font-size: clamp(34px, 4vw, 48px);
  letter-spacing: -.05em;
}
.auth-switch {
  margin-top: 16px;
  color: var(--muted);
  font-weight: 800;
}
.auth-switch a {
  color: var(--primary);
  font-weight: 900;
}
.account-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.account-card__head h2 {
  margin: 0 0 8px;
}
.account-card__head p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}


/* ===== Account dashboard full info v14 ===== */
.muted-text {
  color: var(--muted);
  font-weight: 750;
}
.text-ok { color: var(--success); }
.text-danger { color: var(--danger); }
.account-page {
  display: grid;
  gap: 24px;
}
.account-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.account-hero p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  max-width: 760px;
}
.account-login-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.account-login-card h2,
.account-login-card p { margin: 0; }
.account-login-card p { margin-top: 8px; color: var(--muted); font-weight: 750; }
.account-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: stretch;
}
.account-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.account-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}
.account-panel--profile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
}
.account-avatar-big {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 950;
  font-size: 28px;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  box-shadow: 0 18px 40px rgba(124,58,237,.25);
}
.account-panel h2,
.account-panel h3 { margin: 0; letter-spacing: -.04em; }
.account-panel h3 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
}
.account-panel h3 .material-symbols-outlined { color: var(--primary); }
.info-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.info-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.info-list > div:last-child { border-bottom: 0; }
.info-list span { color: var(--muted); font-weight: 800; }
.info-list strong { text-align: right; }
.info-list--compact { margin-top: 14px; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.metric-card {
  min-height: 132px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(244,239,255,.72));
  box-shadow: 0 12px 28px rgba(124,58,237,.07);
}
:root[data-theme="dark"] .metric-card {
  background: linear-gradient(135deg, rgba(30,24,43,.92), rgba(47,33,66,.72));
}
.metric-card .material-symbols-outlined { color: var(--primary); font-size: 28px; }
.metric-card span { color: var(--muted); font-weight: 850; font-size: 13px; }
.metric-card strong { font-size: 24px; line-height: 1.05; letter-spacing: -.05em; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-head a {
  color: var(--primary);
  font-weight: 900;
  font-size: 13px;
}
.account-order-list,
.mini-row-list { display: grid; gap: 10px; }
.account-order-row,
.mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.account-order-row:last-child,
.mini-row:last-child { border-bottom: 0; }
.account-order-row span,
.mini-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  margin-top: 3px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  background: rgba(124,58,237,.1);
  color: var(--primary);
  border: 1px solid rgba(124,58,237,.18);
}
.status-badge--ok {
  background: rgba(22,163,74,.1);
  color: var(--success);
  border-color: rgba(22,163,74,.22);
}
.promo-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(124,58,237,.12), rgba(236,72,153,.09));
  border: 1px solid var(--line);
}
.promo-code-box span {
  font-size: 22px;
  font-weight: 950;
  color: var(--primary);
  letter-spacing: .03em;
}
.bonus-balance-large {
  font-size: 36px;
  font-weight: 950;
  letter-spacing: -.06em;
  color: var(--primary);
  margin-bottom: 12px;
}
.empty-mini {
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  padding: 22px;
  border: 1px dashed rgba(124,58,237,.25);
  border-radius: 22px;
  color: var(--muted);
  font-weight: 800;
}
.empty-mini .material-symbols-outlined { font-size: 48px; color: var(--primary); }
@media (max-width: 1180px) {
  .account-grid,
  .account-content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .account-panel--profile { grid-template-columns: 1fr; }
  .account-order-row,
  .mini-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .metric-grid { grid-template-columns: 1fr; }
  .account-login-card { align-items: stretch; }
  .account-login-card .hero__actions { width: 100%; }
}

/* v15: hide Material Symbols text before icon font is ready */
.material-symbols-outlined {
  display: inline-flex;
  width: 1em;
  min-width: 1em;
  height: 1em;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1;
}
html:not(.icons-ready) .material-symbols-outlined {
  color: transparent !important;
}
html.icons-ready .material-symbols-outlined {
  color: currentColor;
}

/* v15: stable image placeholders, no broken image icons */
.image-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(124, 58, 237, .06), rgba(236, 72, 153, .08));
}
.image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  display: block;
}
.image-fallback {
  display: none;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, .10);
  color: var(--primary);
}
.image-fallback .material-symbols-outlined {
  font-size: 30px;
}
.image-wrap.is-empty .image-fallback,
.image-wrap.is-broken .image-fallback {
  display: flex;
}
.cart-row__image {
  width: 74px;
  height: 74px;
  border-radius: 14px;
  flex: 0 0 74px;
  background: #fff;
  overflow: hidden;
}
.cart-row__image .image-wrap img {
  padding: 6px;
}
.product-detail__image .image-wrap img {
  padding: 20px;
  max-height: 380px;
}

/* v16: stronger catalog filters and category chips */
.catalog-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 22px;
}
.catalog-count {
  min-width: 170px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  color: var(--muted);
  box-shadow: var(--shadow-soft);
}
.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(190px, .85fr) minmax(120px, .55fr) minmax(120px, .55fr) minmax(170px, .7fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
}
.catalog-field {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0 14px;
  background: var(--bg-soft);
  min-width: 0;
}
.catalog-field .material-symbols-outlined {
  color: var(--primary);
  font-size: 21px;
}
.catalog-field input,
.catalog-field select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  width: 100%;
  min-width: 0;
  font: inherit;
  font-weight: 700;
}
.catalog-field select {
  cursor: pointer;
}
.category-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 18px;
  margin-bottom: 4px;
  scrollbar-width: thin;
}
.category-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(124, 58, 237, .08);
  cursor: pointer;
}
.category-chip .material-symbols-outlined {
  font-size: 20px;
  color: var(--primary);
}
.category-chip.is-active,
.category-chip:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--pink));
}
.category-chip.is-active .material-symbols-outlined,
.category-chip:hover .material-symbols-outlined { color: #fff; }
.muted { color: var(--muted); }
.checkout-summary .summary-line strong:not(.js-checkout-total),
.checkout-summary .js-checkout-subtotal { font-variant-numeric: tabular-nums; }
.js-checkout-message .notice { margin-top: 16px; }
button[disabled] { opacity: .65; cursor: not-allowed; }

@media (max-width: 1180px) {
  .catalog-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .catalog-field--search { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .catalog-head { display: block; }
  .catalog-count { margin-top: 12px; }
  .catalog-toolbar { grid-template-columns: 1fr; border-radius: 22px; }
}


/* ===== v17: catalog polish, cleaner product cards ===== */
.catalog-page {
  padding-bottom: 34px;
}
.catalog-page .page-title {
  margin-bottom: 6px;
}
.catalog-head {
  position: relative;
  padding: 24px;
  border: 1px solid rgba(124, 58, 237, .14);
  border-radius: 30px;
  background:
    radial-gradient(circle at 9% 0%, rgba(124,58,237,.10), transparent 34%),
    radial-gradient(circle at 96% 10%, rgba(236,72,153,.10), transparent 35%),
    var(--surface);
  box-shadow: var(--shadow-soft);
  align-items: center;
}
.catalog-head .muted { max-width: 640px; }
.catalog-count {
  background: var(--surface-strong);
  border-color: var(--line);
  box-shadow: 0 10px 24px rgba(85, 42, 160, .08);
}
.catalog-toolbar {
  position: sticky;
  top: 122px;
  z-index: 20;
  border-color: rgba(124,58,237,.14);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(85, 42, 160, .10);
}
:root[data-theme="dark"] .catalog-toolbar {
  background: rgba(20, 16, 29, .92);
}
.category-chips {
  padding: 8px 2px 22px;
  margin-bottom: 6px;
}
.category-chip {
  min-height: 46px;
  padding: 0 16px;
  background: var(--surface-strong);
  border-color: rgba(124,58,237,.15);
}
.catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  align-items: stretch;
  gap: 20px;
}
.product-card {
  display: flex;
  flex-direction: column;
  min-height: 430px;
  padding: 12px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.88));
  border: 1px solid rgba(124, 58, 237, .14);
  box-shadow: 0 18px 42px rgba(85, 42, 160, .10);
  overflow: hidden;
}
:root[data-theme="dark"] .product-card {
  background: linear-gradient(180deg, rgba(29,24,42,.96), rgba(20,17,30,.92));
}
.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(124,58,237,.38);
  box-shadow: 0 24px 56px rgba(85, 42, 160, .16);
}
.product-card__media {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 0%, rgba(124,58,237,.10), transparent 35%),
    linear-gradient(135deg, #fff, #f8f2ff);
  border: 1px solid rgba(124,58,237,.10);
}
:root[data-theme="dark"] .product-card__media {
  background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(124,58,237,.08));
}
.product-card__image {
  height: 205px;
  margin: 0;
  border-radius: 22px;
  background: transparent;
}
.product-card__image img,
.product-card__image .image-wrap img {
  padding: 12px;
  transition: transform .22s ease;
}
.product-card:hover .product-card__image img,
.product-card:hover .product-card__image .image-wrap img {
  transform: scale(1.035);
}
.product-card__tag {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 64px);
  margin: 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  color: var(--primary);
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 10px 22px rgba(85,42,160,.10);
}
.product-card__tag .material-symbols-outlined { font-size: 15px; }
.product-card__heart {
  right: 12px;
  top: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 15px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border-color: rgba(124,58,237,.16);
}
.product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 2px 2px;
}
.product-card h3 {
  min-height: 48px;
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.32;
  letter-spacing: -.025em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card h3 a:hover { color: var(--primary); }
.product-card__seller { display: none; }
.product-card__meta,
.product-card__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}
.product-card__meta span,
.product-card__trust span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(124,58,237,.07);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.product-card__meta .material-symbols-outlined,
.product-card__trust .material-symbols-outlined { font-size: 15px; color: var(--primary); }
.product-card__trust .rating {
  margin: 0;
  color: var(--primary);
  background: rgba(245,158,11,.11);
}
.product-card__trust .rating .material-symbols-outlined { color: var(--warning); }
.product-card__bottom {
  margin-top: auto;
  padding-top: 14px;
  align-items: center;
}
.price {
  font-size: 22px;
  color: var(--text);
}
.cart-small {
  width: 46px;
  height: 46px;
  border-radius: 17px;
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  box-shadow: 0 12px 24px rgba(124,58,237,.22);
}
.cart-small:hover { transform: translateY(-2px); }
.products-grid:not(.catalog-grid) {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
@media (max-width: 1180px) {
  .catalog-toolbar { position: static; }
  .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .product-card__image { height: 180px; }
}
@media (max-width: 720px) {
  .catalog-head { padding: 18px; border-radius: 24px; }
  .catalog-grid { grid-template-columns: 1fr; gap: 14px; }
  .product-card { min-height: auto; }
  .product-card__image { height: 210px; }
}

/* ===== V18: color selection, promo code, bonuses polish ===== */
.product-colors {
  margin: 20px 0 16px;
  display: grid;
  gap: 10px;
}
.product-colors > strong {
  font-size: 14px;
  font-weight: 900;
}
.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.color-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 850;
  cursor: pointer;
  transition: .18s ease;
}
.color-option span {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.5);
}
.color-option b { font-size: 12px; }
.color-option:hover,
.color-option.is-active {
  border-color: rgba(124,58,237,.54);
  box-shadow: 0 10px 24px rgba(124,58,237,.14);
  transform: translateY(-1px);
}
.product-no-colors { margin: 14px 0; }
.product-detail__prices {
  display: grid;
  gap: 8px;
  margin: 14px 0 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(124,58,237,.07);
  border: 1px solid rgba(124,58,237,.13);
  color: var(--muted);
  font-weight: 800;
}
.product-detail__prices b { color: var(--text); }
.cart-color {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.cart-color span {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.14);
}
.promo-block .promo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  margin-top: 10px;
}
.promo-block .js-promo-message {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
}
.bonus-block p { margin: 8px 0 0; }
.js-bonus-amount-wrap input { font-weight: 900; }
.checkout-summary .js-checkout-promo {
  color: var(--primary);
  font-weight: 950;
}
.checkout-summary .js-checkout-bonus {
  color: var(--success);
  font-weight: 950;
}
/* --- Индивидуальные бонусы по промокоду (скидка/подарок) --- */
.promo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.promo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.promo-chip .material-symbols-outlined { font-size: 18px; }
.promo-chip--discount {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  box-shadow: 0 10px 22px rgba(124,58,237,.26);
}
.promo-chip--gift {
  color: var(--accent);
  background: rgba(249,115,22,.12);
  border: 1px solid rgba(249,115,22,.28);
}
.checkout-summary .js-checkout-discount { color: var(--success); font-weight: 950; }
.checkout-summary .gift-value {
  color: var(--accent);
  font-weight: 900;
  text-align: right;
  max-width: 60%;
}
.checkout-savings {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 4px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-weight: 850;
  font-size: 13.5px;
  color: #0f7a3d;
  background: linear-gradient(135deg, rgba(22,163,74,.14), rgba(124,58,237,.08));
  border: 1px solid rgba(22,163,74,.25);
}
.checkout-savings .material-symbols-outlined { font-size: 22px; color: var(--success); }
:root[data-theme="dark"] .checkout-savings { color: #6ee7a8; }
.promo-buyer-bonus {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(124,58,237,.07), rgba(236,72,153,.05));
  border: 1px solid rgba(124,58,237,.18);
}
.promo-buyer-bonus__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 850;
  font-size: 14px;
  margin-bottom: 10px;
}
.promo-buyer-bonus__title .material-symbols-outlined { color: var(--primary); font-size: 20px; }
.promo-buyer-bonus__period {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 700;
}
.promo-buyer-bonus__period .material-symbols-outlined { font-size: 17px; }
@media (max-width: 720px) {
  .promo-block .promo-row { grid-template-columns: 1fr; }
  .color-options { gap: 8px; }
}

/* Legal documents / consent patch for static-web checkout, auth and seller flow */
.legal-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 10px !important;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(124,58,237,.055);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 650 !important;
}
.legal-check input {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  margin-top: 2px;
  padding: 0 !important;
  accent-color: var(--primary);
}
.legal-check a,
.footer__bottom a {
  display: inline;
  color: var(--primary);
  font-weight: 850;
  margin: 0;
  text-decoration: none;
}
.legal-check a:hover,
.footer__bottom a:hover {
  text-decoration: underline;
}


/* Delivery labels from admin for product cards */
.product-card__trust span:not(.rating) {
  max-width: 100%;
  white-space: normal;
}
@media (max-width: 640px) {
  .product-card__trust span:not(.rating) {
    width: 100%;
    justify-content: flex-start;
  }
}


/* ===== v20: mobile header, image and route UX fix ===== */
html, body { overflow-x: hidden; }
.product-card__image,
.mini-product__image,
.product-detail__image {
  transform: translateZ(0);
}
.product-card__image .image-wrap,
.mini-product__image .image-wrap,
.product-detail__image .image-wrap {
  width: 100%;
  height: 100%;
}
.product-detail__image {
  min-height: 360px;
  aspect-ratio: 1 / 1;
}
.product-detail__image .image-wrap img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 340px;
  object-fit: contain;
}

@media (hover: none), (pointer: coarse) {
  .product-card:hover {
    transform: none;
    border-color: rgba(124, 58, 237, .14);
    box-shadow: 0 18px 42px rgba(85, 42, 160, .10);
  }
  .product-card:hover .product-card__image img,
  .product-card:hover .product-card__image .image-wrap img {
    transform: none;
  }
}

@media (max-width: 780px) {
  .header__inner {
    gap: 12px;
  }
  .header__right {
    grid-template-columns: minmax(0, 1fr) 50px 86px 50px;
    gap: 10px;
    align-items: center;
  }
  .header__right .profile-btn {
    grid-column: 1 / -1;
    justify-self: start;
    width: auto;
    max-width: 100%;
    height: 48px;
    min-width: 0;
    padding: 0 16px 0 7px;
    border-radius: 999px;
    background: var(--surface);
  }
  .header__right .profile-btn span:not(.avatar) {
    display: inline !important;
    white-space: nowrap;
  }
  .header__right .profile-btn .avatar {
    flex: 0 0 36px;
  }
  .product-detail {
    gap: 16px;
  }
  .product-detail__image {
    min-height: 0;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 24px;
  }
  .product-detail__image .image-wrap img {
    padding: 12px;
    max-height: 300px;
  }
  .product-detail .page-card {
    padding: 18px;
  }
  .product-detail .page-title {
    font-size: clamp(28px, 8vw, 36px);
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 20px, var(--container));
  }
  .topbar__inner {
    justify-content: flex-start;
  }
  .topbar__group {
    gap: 10px;
  }
  .topbar__item {
    font-size: 11px;
    gap: 5px;
  }
  .header__inner {
    padding: 10px 0;
  }
  .logo {
    font-size: 27px;
  }
  .logo__mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }
  .header__right {
    grid-template-columns: minmax(0, 1fr) 46px 76px 46px;
    gap: 8px;
  }
  .search input,
  .icon-btn,
  .lang-select {
    height: 46px;
  }
  .search input {
    padding-left: 44px;
    padding-right: 12px;
    font-size: 14px;
    text-overflow: ellipsis;
  }
  .search .material-symbols-outlined {
    left: 15px;
  }
  .icon-btn {
    min-width: 46px;
    padding: 0 10px;
  }
  .lang-select {
    width: 76px;
    padding: 0 8px;
    font-size: 14px;
  }
  .header__right .profile-btn {
    height: 46px;
    padding-right: 14px;
  }
  .product-card__image {
    height: 190px;
  }
  .product-detail__image .image-wrap img {
    max-height: 260px;
  }
}


/* ===== v21: visible delivery and popularity cards ===== */
.product-card__delivery {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}
.delivery-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 14px;
  border: 1px solid rgba(124,58,237,.14);
  background: rgba(124,58,237,.075);
  color: var(--text);
  font-size: 12px;
  font-weight: 800 !important;
  line-height: 1.25;
}
.delivery-chip .material-symbols-outlined {
  flex: 0 0 auto;
  font-size: 17px;
  color: var(--primary);
}
.delivery-chip--fast {
  background: rgba(16,185,129,.10);
  border-color: rgba(16,185,129,.20);
}
.delivery-chip--slow {
  background: rgba(124,58,237,.08);
  border-color: rgba(124,58,237,.18);
}
.product-detail__delivery {
  background: transparent;
  border: 0;
  padding: 0;
}
.product-detail__delivery .delivery-chip {
  width: 100%;
  justify-content: space-between;
}
.product-detail__delivery .delivery-chip b {
  margin-left: auto;
  color: var(--text);
}
.footer-section--buyers .footer-delivery-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(124,58,237,.09);
  border: 1px solid rgba(124,58,237,.14);
}

@media (max-width: 640px) {
  .product-card__delivery {
    margin-top: 10px;
  }
  .delivery-chip {
    width: 100%;
    justify-content: flex-start;
    font-size: 12px;
    padding: 8px 10px;
  }
  .product-card__meta,
  .product-card__trust {
    gap: 6px;
  }
  .product-card__trust span {
    width: auto;
  }
  .footer-section--buyers {
    order: -1;
  }
}

/* ============================================================
   v22 UI polish — визуальные улучшения (без изменений логики)
   ============================================================ */

/* 1) Контраст подзаголовка карусели «Выбор покупателей» */
.showcase__title p {
  opacity: 1;
  color: rgba(255,255,255,.94);
  text-shadow: 0 1px 10px rgba(40,8,80,.28);
}

/* 2) Фокус-состояния полей (доступность + премиальность) */
.filters input:focus, .filters select:focus,
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus,
.catalog-field input:focus,
.account-card input:focus,
input:focus, select:focus, textarea:focus {
  border-color: rgba(124,58,237,.55) !important;
  box-shadow: 0 0 0 4px rgba(124,58,237,.15);
  background: var(--surface-strong);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }

/* 3) Поиск в шапке — мягкое свечение при фокусе */
.search:focus-within {
  border-color: rgba(124,58,237,.5);
  box-shadow: 0 12px 30px rgba(124,58,237,.16), 0 0 0 4px rgba(124,58,237,.12);
}

/* 4) Кнопки — единый ховер и доступный фокус */
.btn { transition: transform .16s ease, box-shadow .18s ease, filter .16s ease; }
.btn--primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.04) saturate(1.03);
  box-shadow: 0 22px 42px rgba(124,58,237,.32);
}
.btn--soft:hover { background: rgba(124,58,237,.16); transform: translateY(-1px); }
.btn--ghost:hover { transform: translateY(-1px); }
.btn:focus-visible {
  outline: 3px solid rgba(124,58,237,.45);
  outline-offset: 2px;
}

/* 5) Кнопка-корзинка — лёгкий «поп» иконки на ховере */
.cart-small { transition: transform .16s ease, box-shadow .18s ease; }
.cart-small:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 16px 30px rgba(124,58,237,.34); }
.cart-small:active { transform: translateY(0) scale(.97); }

/* 6) Hero-статы — мягкий подъём на ховере */
.stat { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.stat:hover { transform: translateY(-3px); }

/* 7) Чипы доставки — ровный ритм */
.delivery-chip { line-height: 1.15; }

/* 8) Аккуратные ссылки в подвале */
.footer-section a, .footer a { transition: color .15s ease, opacity .15s ease; }
.footer a:hover { color: var(--primary); }

/* 9) Плавная прокрутка по якорям */
html { scroll-behavior: smooth; }

/* 10) Уважение к reduce-motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* Промо-хинт на странице товара (скидка/подарок по применённому промокоду) */
.promo-hint {
  margin: 4px 0 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(124,58,237,.08), rgba(236,72,153,.07));
  border: 1px solid rgba(124,58,237,.20);
  display: grid;
  gap: 10px;
}
.promo-hint__code {
  display: flex; align-items: center; gap: 7px;
  font-weight: 850; font-size: 13.5px; color: var(--primary);
}
.promo-hint__code .material-symbols-outlined { font-size: 19px; }
.promo-hint__price { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.promo-hint__old { color: var(--muted-2); text-decoration: line-through; font-weight: 800; }
.promo-hint__new { font-size: 24px; font-weight: 950; letter-spacing: -.03em; color: var(--text); }
.promo-hint__badge {
  padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  box-shadow: 0 8px 18px rgba(124,58,237,.26);
}
.promo-hint__gift {
  display: flex; align-items: center; gap: 7px;
  font-weight: 800; font-size: 13.5px; color: var(--accent);
}
.promo-hint__gift .material-symbols-outlined { font-size: 19px; }
:root[data-theme="dark"] .promo-hint { border-color: rgba(168,85,247,.3); }


/* v25: agent personal discount and promo history in account */
.discount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  color: #fff;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(124,58,237,.18);
}
.metric-card--discount {
  border-color: rgba(236,72,153,.22);
  background: linear-gradient(135deg, rgba(124,58,237,.08), rgba(236,72,153,.09));
}
.promo-history-box {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(124,58,237,.14);
  border-radius: 18px;
  background: rgba(124,58,237,.05);
}
.promo-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--text);
}
.promo-history-head strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.promo-history-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.promo-history-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr .8fr .8fr;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(124,58,237,.10);
}
.promo-history-row:first-of-type { border-top: 0; }
.promo-history-row div {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.promo-history-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.promo-history-row strong,
.promo-history-row b {
  font-size: 13px;
  line-height: 1.25;
}
@media (max-width: 720px) {
  .promo-history-row {
    grid-template-columns: 1fr 1fr;
  }
  .promo-history-row .text-end {
    text-align: left;
  }
}


/* v26: mobile fit + search usability fix */
html,
body,
#app,
.app-shell {
  max-width: 100%;
  overflow-x: hidden;
}
.header__inner,
.header__right,
.search,
.catalog-toolbar,
.catalog-field,
.account-panel,
.info-list > div {
  min-width: 0;
}
.info-list strong {
  min-width: 0;
  max-width: 62%;
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.account-panel h2,
.account-panel h3,
.account-order-row,
.mini-row {
  overflow-wrap: anywhere;
}
.catalog-field input,
.catalog-field select,
.search input {
  min-width: 0;
}
@media (max-width: 520px) {
  .container {
    width: min(100% - 18px, var(--container));
  }
  .topbar__inner {
    padding: 7px 0;
    overflow: hidden;
  }
  .topbar__group {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    gap: 6px;
  }
  .topbar__group:nth-child(2) {
    display: none !important;
  }
  .topbar__item {
    min-width: 0;
    max-width: 33%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10.5px;
    gap: 4px;
  }
  .topbar__item .material-symbols-outlined {
    font-size: 15px;
    flex: 0 0 auto;
  }
  .header__inner {
    gap: 9px;
  }
  .header__right {
    grid-template-columns: minmax(0, 1fr) 42px 64px 42px;
    gap: 6px;
  }
  .search input {
    height: 44px;
    padding-left: 38px;
    padding-right: 9px;
    font-size: 13px;
  }
  .search .material-symbols-outlined {
    left: 13px;
    font-size: 20px;
  }
  .icon-btn {
    min-width: 42px;
    height: 44px;
    padding: 0 8px;
  }
  .lang-select {
    width: 64px;
    height: 44px;
    padding: 0 6px;
    font-size: 13px;
  }
  .profile-btn {
    max-width: 100%;
  }
  .catalog-head {
    padding: 18px;
    border-radius: 24px;
  }
  .catalog-toolbar {
    position: static;
    padding: 12px;
    gap: 10px;
    border-radius: 22px;
  }
  .catalog-field {
    height: 50px;
    padding: 0 12px;
  }
  .catalog-field input,
  .catalog-field select {
    font-size: 14px;
  }
  .catalog-toolbar .btn {
    width: 100%;
    min-height: 48px;
  }
  .info-list > div {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 4px;
  }
  .info-list strong {
    max-width: 100%;
    text-align: left;
  }
  .account-panel {
    padding: 18px;
  }
  .account-hero .page-title {
    font-size: clamp(30px, 11vw, 42px);
  }
}
@media (max-width: 390px) {
  .container {
    width: min(100% - 14px, var(--container));
  }
  .header__right {
    grid-template-columns: minmax(0, 1fr) 40px 58px 40px;
    gap: 5px;
  }
  .lang-select {
    width: 58px;
  }
  .icon-btn {
    min-width: 40px;
  }
}

/* v27: live search suggestions + mobile search fix */
.search-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 120;
  display: none;
  max-height: min(420px, 70vh);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(124,58,237,.16);
  border-radius: 22px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 24px 60px rgba(35,20,60,.18);
  backdrop-filter: blur(14px);
}
:root[data-theme="dark"] .search-suggestions {
  background: rgba(24,18,35,.98);
  border-color: rgba(190,159,255,.22);
  box-shadow: 0 28px 70px rgba(0,0,0,.45);
}
.search-suggestions.is-open { display: grid; gap: 6px; }
.search-suggestion {
  width: 100%;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px 10px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.search-suggestion:hover,
.search-suggestion:focus-visible {
  background: rgba(124,58,237,.10);
  outline: none;
}
.search-suggestion__image {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(135deg, #fff, #f4efff);
  color: var(--primary);
}
.search-suggestion__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.search-suggestion__body {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.search-suggestion__body b {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 900;
}
.search-suggestion__body small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.search-suggestion__price {
  white-space: nowrap;
  color: var(--primary);
  font-size: 12px;
  font-weight: 950;
}
.search-suggestion--plain {
  grid-template-columns: auto 1fr;
  justify-content: flex-start;
  color: var(--primary);
  font-weight: 900;
}
@media (max-width: 780px) {
  .search-suggestions {
    position: fixed;
    left: 10px;
    right: 10px;
    top: 132px;
    max-height: 58vh;
    border-radius: 20px;
  }
}
@media (max-width: 520px) {
  .search-suggestions {
    top: 118px;
  }
  .search-suggestion {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .search-suggestion__price {
    grid-column: 2;
    justify-self: start;
  }
}



/* ===== v28: mobile UX polish for header, product page and checkout ===== */
@media (max-width: 780px) {
  html,
  body,
  #app,
  .app-shell {
    max-width: 100%;
    overflow-x: hidden;
  }

  .topbar {
    position: relative;
    z-index: 60;
  }

  .topbar__inner {
    min-height: 36px;
    padding: 6px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .topbar__inner::-webkit-scrollbar {
    display: none;
  }

  .topbar__group {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    width: max-content !important;
    min-width: 100%;
    gap: 12px !important;
  }

  .topbar__item {
    flex: 0 0 auto;
    max-width: none !important;
    font-size: 12px !important;
    line-height: 1;
    white-space: nowrap;
  }

  .header__inner {
    grid-template-columns: 1fr !important;
    align-items: stretch;
    gap: 10px !important;
    padding: 10px 0 12px !important;
  }

  .logo {
    width: max-content;
    font-size: 30px;
  }

  .logo__mark {
    width: 44px;
    height: 44px;
  }

  .header__right {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 48px 76px 48px !important;
    gap: 8px !important;
  }

  .search {
    min-width: 0;
  }

  .search input {
    width: 100%;
    height: 48px;
    font-size: 15px;
  }

  .icon-btn,
  .lang-select {
    height: 48px;
  }

  .profile-btn {
    grid-column: 1 / -1;
    justify-self: start;
    max-width: 100%;
    height: 48px;
  }

  .profile-btn span:not(.avatar) {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  main {
    padding-top: 16px;
  }

  .product-detail {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 14px;
    width: min(100% - 18px, var(--container));
  }

  .product-detail__image {
    min-height: 0 !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    max-height: 360px;
    border-radius: 26px;
  }

  .product-detail__image .image-wrap img {
    padding: 10px !important;
    max-height: 330px;
    object-fit: contain;
  }

  .product-detail .page-card,
  .product-detail__card {
    padding: 18px !important;
    border-radius: 26px;
  }

  .product-detail .kicker {
    margin-bottom: 10px;
  }

  .product-detail .page-title {
    margin-bottom: 12px;
    font-size: clamp(25px, 7.3vw, 34px) !important;
    line-height: 1.08;
    letter-spacing: -.055em;
  }

  .product-detail__price,
  .product-detail .gradient-text {
    margin: 10px 0 14px;
    font-size: clamp(30px, 8vw, 38px);
    line-height: 1.05;
  }

  .product-colors {
    margin: 14px 0;
    gap: 8px;
  }

  .product-colors > strong {
    font-size: 15px;
  }

  .color-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .color-option {
    min-width: 0;
    justify-content: center;
    padding: 10px 8px;
    gap: 7px;
    border-radius: 18px;
  }

  .color-option b {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
  }

  .product-detail__prices {
    margin: 14px 0;
    padding: 0 !important;
    gap: 9px;
    background: transparent !important;
    border: 0 !important;
  }

  .product-detail__delivery .delivery-chip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: 100%;
    min-height: 54px;
    padding: 11px 12px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.15;
  }

  .product-detail__delivery .delivery-chip b {
    justify-self: end;
    white-space: nowrap;
    font-size: 15px;
  }

  .product-detail__cart {
    width: 100%;
    min-height: 58px;
    border-radius: 20px;
    font-size: 17px;
  }

  .product-detail__description {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }

  .product-detail__description h3 {
    margin: 0 0 10px;
    font-size: 18px;
  }

  .product-detail__description p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .checkout-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .checkout-grid .page-card {
    padding: 18px;
  }

  .delivery-options {
    grid-template-columns: 1fr !important;
  }

  .checkout-summary {
    position: static !important;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 16px, var(--container)) !important;
  }

  .topbar__item {
    font-size: 11px !important;
  }

  .header__right {
    grid-template-columns: minmax(0, 1fr) 44px 66px 44px !important;
    gap: 6px !important;
  }

  .search input,
  .icon-btn,
  .lang-select {
    height: 44px !important;
  }

  .search input {
    padding-left: 40px !important;
    padding-right: 10px !important;
    font-size: 14px !important;
  }

  .logo {
    font-size: 28px;
  }

  .logo__mark {
    width: 42px;
    height: 42px;
  }

  .product-detail {
    width: min(100% - 14px, var(--container)) !important;
  }

  .product-detail .page-card,
  .product-detail__card {
    padding: 16px !important;
    border-radius: 24px;
  }

  .product-detail__image {
    max-height: 320px;
    border-radius: 24px;
  }

  .color-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-detail__delivery .delivery-chip {
    min-height: 50px;
    padding: 10px;
    font-size: 13px;
  }

  .product-detail__delivery .delivery-chip b {
    font-size: 14px;
  }
}



/* ===== v29: add-to-cart no-scroll feedback ===== */
.js-add-cart.is-added,
.cart-small.is-added {
  background: linear-gradient(135deg, #16a34a, #22c55e) !important;
  color: #fff !important;
  transform: none !important;
}

.cart-small.is-added .material-symbols-outlined,
.js-add-cart.is-added .material-symbols-outlined {
  color: #fff !important;
}


/* v30: seller application status in account */
.seller-application-success {
  padding: 28px 0;
}
.seller-status-card h4 {
  margin: 8px 0 6px;
  font-size: 18px;
}
.seller-status-card p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 14px;
}
.seller-status-card .notice--soft {
  background: rgba(124,58,237,.08);
  border: 1px solid rgba(124,58,237,.16);
  color: var(--text);
}
.seller-status-card--ok {
  border-color: rgba(22,163,74,.22);
}
.seller-status-card--bad {
  border-color: rgba(225,29,72,.22);
}
.seller-status-card--warn {
  border-color: rgba(245,158,11,.28);
}
.status-badge--bad {
  background: rgba(225,29,72,.10);
  color: var(--danger);
  border: 1px solid rgba(225,29,72,.20);
}
.status-badge--warn {
  background: rgba(245,158,11,.12);
  color: #b45309;
  border: 1px solid rgba(245,158,11,.24);
}
@media (max-width: 720px) {
  .seller-application-success {
    padding: 16px 0;
  }
  .seller-status-card .hero__actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
