[hidden] { display: none !important; }

:root {
  --bg: #f3ede2;
  --surface: #fbf5ea;
  --surface-2: #efe4d4;
  --text: #2a2219;
  --muted: #8f7b66;
  --accent: #d1b188;
  --accent-soft: #f2e5d2;
  --line: rgba(74, 56, 34, .10);
  --green: #567648;
  --green-soft: #eef3e8;
  --nav-height: 82px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
button { color: inherit; }
button, article { -webkit-tap-highlight-color: transparent; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.app-shell { width: min(100%, 760px); min-height: 100vh; margin: 0 auto; padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 24px); }
.page { display: none; padding: calc(16px + env(safe-area-inset-top)) 16px 34px; }
.page.active { display: block; animation: page-in .22s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.home-page { padding-top: calc(12px + env(safe-area-inset-top)); }

.sr-only { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }
.hero-image-banner { position:relative; display:block; width:100%; overflow:hidden; padding:0; min-height:0; aspect-ratio:1672 / 941; border-radius:34px; background:#111; box-shadow:0 16px 42px rgba(25,20,14,.12); }
.hero-banner-image { display:block; width:100%; height:100%; object-fit:cover; }
.hero-banner-link { position:absolute; z-index:3; left:4.3%; bottom:17.2%; width:25.5%; height:12.8%; padding:0; border:0; border-radius:999px; background:transparent; cursor:pointer; }
.hero-banner-link:focus-visible { outline:3px solid #d5ba8f; outline-offset:4px; }
.hero-banner-link:active { background:rgba(0,0,0,.05); }

.content-section { margin-top: 44px; }
.section-header { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin:0 4px 20px; }
.section-header h2, .inner-header h1 { margin:0; font-family:var(--serif); font-weight:500; letter-spacing:-.045em; }
.section-header h2 { font-size:clamp(38px,7vw,54px); }
.section-header p { margin:7px 0 0; color:var(--muted); font-size:16px; }

.category-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.category-card { padding:0; overflow:hidden; border:1px solid var(--line); border-radius:28px; background:rgba(251,245,234,.84); box-shadow:0 10px 26px rgba(68,54,31,.055); cursor:pointer; }
.category-image { display:grid; place-items:center; margin:12px; aspect-ratio:1; overflow:hidden; border-radius:50%; background:#eee8de; }
.category-image img { width:100%; height:100%; object-fit:cover; }
.category-card strong { display:block; min-height:58px; padding:5px 12px 18px; font-size:17px; font-weight:600; text-align:center; }

.stock-section { padding:30px 18px 22px; border:1px solid rgba(101,126,82,.12); border-radius:32px; background:linear-gradient(145deg, #f7f7ef, #f2f1e9); box-shadow:0 14px 38px rgba(54,69,45,.06); }
.stock-heading { margin-bottom:20px; }
.stock-kicker { color:#b69767; }
.check-dot { display:inline-grid; place-items:center; width:20px; height:20px; margin-right:7px; border-radius:50%; background:#cfb486; color:#fff; font-size:12px; letter-spacing:0; }
.round-link { display:grid; place-items:center; width:46px; height:46px; border:1px solid var(--line); border-radius:50%; background:rgba(255,255,255,.5); color:#9a8665; font-size:24px; cursor:pointer; }
.stock-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.stock-card { padding:10px; border:1px solid var(--line); border-radius:26px; background:rgba(251,245,234,.9); cursor:pointer; }
.stock-photo { display:grid; place-items:center; aspect-ratio:1; overflow:hidden; border-radius:50%; background:#eee8de; }
.stock-photo img { width:100%; height:100%; object-fit:cover; }
.stock-card h3 { margin:13px 2px 7px; font-size:16px; text-align:center; }
.stock-count { display:block; width:max-content; max-width:100%; margin:0 auto 2px; padding:7px 10px; border-radius:9px; background:#f0ebe3; color:#6d6255; font-size:12px; }

.new-heading { align-items:flex-end; }
.text-link { padding:10px 14px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.55); color:#a4885d; cursor:pointer; }
.new-feature { position:relative; min-height:330px; overflow:hidden; border-radius:30px; background:#e8dece; cursor:pointer; }
.new-feature img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.new-feature::after { content:""; position:absolute; inset:0; background:linear-gradient(to top, rgba(20,15,10,.45), transparent 50%); }
.new-tag { position:absolute; z-index:2; top:18px; left:18px; padding:7px 12px; border-radius:999px; background:#b99b70; color:#fff; font-size:12px; font-weight:700; }
.new-feature-copy { position:absolute; z-index:2; left:24px; bottom:22px; color:#fff; }
.new-feature-copy h3 { margin:0 0 6px; font-size:24px; }
.new-feature-copy strong { font-size:18px; }
.new-small-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:14px; }
.new-small { position:relative; min-width:0; overflow:hidden; border-radius:26px; border:1px solid var(--line); background:#eee6da; cursor:pointer; }
.new-small img { width:100%; aspect-ratio:1.08; object-fit:cover; display:block; }
.new-small-copy { padding:13px 14px 16px; background:rgba(255,255,255,.62); }
.new-small-copy h3 { margin:0 0 5px; font-size:15px; }
.new-small-copy strong { font-size:14px; }
.new-small .new-tag { top:12px; left:12px; padding:5px 9px; }

.inner-header { display:grid; grid-template-columns:46px 1fr auto; align-items:center; gap:14px; margin:8px 0 24px; }
.inner-header h1 { font-size:42px; }
.mini-brand { display:grid; place-items:center; width:46px; height:46px; padding:0; border:0; border-radius:50%; background:#171717; color:#fff; font-weight:800; cursor:pointer; }
.header-cart { display:flex; align-items:center; gap:7px; padding:8px 10px; border:1px solid var(--line); border-radius:999px; background:var(--surface); cursor:pointer; }
.header-cart span { color:var(--muted); font-size:12px; }
.header-cart b { display:grid; place-items:center; min-width:22px; height:22px; padding:0 5px; border-radius:50%; background:#171717; color:#fff; font-size:11px; }

.search-box { display:flex; align-items:center; gap:10px; margin-bottom:14px; padding:0 14px; border:1px solid var(--line); border-radius:17px; background:rgba(251,245,234,.94); }
.search-box svg { width:20px; height:20px; color:var(--muted); }
.search-box input { width:100%; height:52px; border:0; outline:0; background:transparent; color:var(--text); }
.search-box input::placeholder { color:#aaa49c; }
.filter-row { display:flex; gap:8px; margin:0 -16px; padding:0 16px 4px; overflow-x:auto; scrollbar-width:none; }
.filter-row::-webkit-scrollbar { display:none; }
.filter-chip { flex:0 0 auto; min-height:38px; padding:0 14px; border:1px solid var(--line); border-radius:999px; background:rgba(255,255,255,.64); color:#665f56; cursor:pointer; }
.filter-chip.active { border-color:#171717; background:#171717; color:#fff; }
.results-label { min-height:18px; margin:14px 2px 12px; color:var(--muted); font-size:12px; }
.catalog-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.product-card { position:relative; min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:26px; background:rgba(251,245,234,.9); cursor:pointer; }
.product-image { position:relative; display:grid; place-items:center; aspect-ratio:1; overflow:hidden; margin:10px; border-radius:50%; background:#eee8de; }
.product-image img { width:100%; height:100%; object-fit:cover; }
.status-badge { position:absolute; z-index:2; top:14px; left:14px; padding:6px 9px; border-radius:999px; background:rgba(238,243,232,.92); color:var(--green); font-size:10px; font-weight:750; }
.status-badge.order { background:rgba(239,232,220,.94); color:#806b48; }
.product-info { padding:4px 14px 16px; }
.product-brand { margin:0 0 4px; color:#a1845e; font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.product-name { min-height:40px; margin:0; font-size:15px; line-height:1.3; }
.product-bottom { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:12px; }
.product-price { font-weight:800; }
.card-add { display:grid; place-items:center; width:36px; height:36px; border:0; border-radius:50%; background:#171717; color:#fff; font-size:22px; cursor:pointer; }
.card-add:disabled { opacity:.28; }
.empty-state { display:grid; justify-items:center; gap:9px; padding:50px 22px; text-align:center; color:var(--muted); }
.empty-state strong { color:var(--text); font-family:var(--serif); font-size:24px; }

.cart-list { display:grid; gap:12px; }
.cart-item { display:grid; grid-template-columns:92px minmax(0,1fr); gap:14px; padding:12px; border:1px solid var(--line); border-radius:24px; background:rgba(251,245,234,.9); cursor:pointer; transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.cart-item:active { transform:scale(.995); }
.cart-item:focus-visible { outline:2px solid #171717; outline-offset:3px; }
.cart-thumb { align-self:center; display:grid; place-items:center; width:92px; height:148px; overflow:hidden; border:1px solid rgba(122,105,82,.08); border-radius:999px; background:var(--surface); }
.cart-thumb img { width:100%; height:100%; padding:7px; box-sizing:border-box; object-fit:contain; background:var(--surface); }
.cart-item h3 { margin:4px 0 6px; }
.cart-item p { margin:0; color:var(--muted); font-size:12px; }
.cart-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; }
.qty { display:flex; align-items:center; gap:8px; }
.qty button { position:relative; z-index:1; width:30px; height:30px; border:0; border-radius:50%; background:#eee8de; cursor:pointer; }
.remove { position:relative; z-index:1; border:0; background:transparent; color:#a34f46; cursor:pointer; }
.cart-summary { margin-top:18px; padding:20px; border:1px solid var(--line); border-radius:28px; background:rgba(251,245,234,.94); }
.summary-row { display:flex; justify-content:space-between; padding:4px 0; color:var(--muted); }
.summary-row.total { margin:12px 0 18px; padding-top:16px; border-top:1px solid var(--line); color:var(--text); font-size:20px; }
.cart-summary p { margin:12px 0 0; color:var(--muted); font-size:11px; text-align:center; }
.primary-button { display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:0 20px; border:0; border-radius:999px; background:#171717; color:#fff; font-weight:700; cursor:pointer; }
.full-width { width:100%; }

.bottom-nav { position:fixed; z-index:30; right:0; bottom:0; left:0; display:grid; grid-template-columns:repeat(4,1fr); width:min(calc(100% - 24px),736px); height:calc(var(--nav-height) + env(safe-area-inset-bottom)); margin:0 auto 8px; padding:8px 10px env(safe-area-inset-bottom); border:1px solid rgba(255,255,255,.72); border-radius:30px; background:rgba(251,245,234,.92); box-shadow:0 14px 42px rgba(40,31,18,.14); backdrop-filter:blur(20px); }
.nav-item { position:relative; display:grid; justify-items:center; align-content:center; gap:5px; border:0; border-radius:18px; background:transparent; color:#92908b; cursor:pointer; font-size:11px; }
.nav-item svg { width:24px; height:24px; }
.nav-item.active { color:#171717; font-weight:720; }
.nav-item.active::after { content:""; position:absolute; bottom:2px; width:42px; height:4px; border-radius:999px; background:#d5ba8f; }
.nav-badge { position:absolute; top:3px; left:calc(50% + 8px); display:grid; place-items:center; min-width:19px; height:19px; padding:0 5px; border-radius:999px; background:#cbb08a; color:#fff; font-size:10px; font-weight:800; }

.product-dialog { width:min(calc(100% - 24px),520px); max-height:calc(100vh - 24px); padding:0; overflow:auto; border:0; border-radius:30px; background:var(--surface); color:var(--text); }
.product-dialog::backdrop { background:rgba(49,35,21,.42); backdrop-filter:blur(4px); }
.dialog-close { position:sticky; z-index:5; top:12px; float:right; display:grid; place-items:center; width:38px; height:38px; margin:12px 12px -50px 0; border:0; border-radius:50%; background:rgba(255,255,255,.9); font-size:27px; cursor:pointer; }
.dialog-image { display:grid; place-items:center; aspect-ratio:1.15; background:#eee8de; }
.dialog-image img { width:100%; height:100%; object-fit:cover; }
.dialog-body { padding:23px; }
.dialog-body h2 { margin:3px 0 9px; font-family:var(--serif); font-size:31px; font-weight:500; }
.dialog-price { margin:0 0 18px; font-size:22px; font-weight:850; }
.dialog-meta { display:grid; grid-template-columns:repeat(2,1fr); gap:9px; margin:18px 0; }
.meta { padding:12px; border-radius:14px; background:#f2ede4; }
.meta small,.meta strong { display:block; }
.meta small { margin-bottom:5px; color:var(--muted); font-size:10px; }
.dialog-description { color:var(--muted); line-height:1.55; }
.toast { position:fixed; z-index:60; right:16px; bottom:calc(var(--nav-height) + env(safe-area-inset-bottom) + 22px); left:16px; width:max-content; max-width:calc(100% - 32px); margin:auto; padding:12px 16px; transform:translateY(18px); border-radius:999px; background:#171717; color:#fff; font-size:13px; font-weight:700; opacity:0; pointer-events:none; transition:.2s; }
.toast.show { transform:none; opacity:1; }

@media (max-width: 620px) {
  .category-grid,.stock-grid { gap:9px; }
  .category-card strong { min-height:46px; padding:3px 6px 13px; font-size:12px; }
  .category-image { margin:8px; }
  .stock-section { padding:24px 12px 18px; }
  .stock-card { padding:7px; }
  .stock-card h3 { font-size:12px; }
  .stock-count { padding:5px 7px; font-size:9px; }
  .new-feature { min-height:300px; }
  .new-small-copy { padding:10px; }
  .new-small-copy h3 { font-size:12px; }
  .new-small-copy strong { font-size:12px; }
  .section-header h2 { font-size:42px; }
}
@media (max-width: 390px) {
  .category-grid,.stock-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .category-card:last-child,.stock-card:nth-child(5) { grid-column:auto; }
  .new-small-grid { grid-template-columns:1fr 1fr; }
  .new-small-grid .new-small:last-child { grid-column:1 / -1; }
}

@media (max-width: 620px) {
  .hero-image-banner { border-radius:26px; }
}
@media (max-width: 390px) {
  .hero-image-banner { border-radius:22px; }
}

/* Product data and gallery additions */
.home-empty-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding: 26px 18px;
  border: 1px dashed rgba(86, 118, 72, .22);
  border-radius: 24px;
  background: rgba(255, 255, 255, .48);
  text-align: center;
}
.home-empty-card strong { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.home-empty-card span { color: var(--muted); font-size: 13px; line-height: 1.5; }

.new-feature { min-height: 360px; background: #fff; border: 1px solid var(--line); }
.new-feature img {
  position: absolute;
  top: 20px;
  right: 20px;
  bottom: 98px;
  left: 20px;
  width: calc(100% - 40px);
  height: calc(100% - 118px);
  object-fit: contain;
  object-position: center center;
}
.new-feature::after { background: linear-gradient(to top, rgba(248,245,239,.99), rgba(248,245,239,.9) 28%, rgba(248,245,239,.18) 58%, transparent 74%); }
.new-feature-copy { left: 24px; right: 24px; bottom: 20px; color: var(--text); }
.new-feature-copy h3 { max-width: 90%; line-height: 1.18; }
.new-feature-status { display: block; width: max-content; margin-bottom: 8px; padding: 6px 9px; border-radius: 999px; background: rgba(239,232,220,.94); color: #806b48; font-size: 10px; font-weight: 800; }

.product-image img,
.cart-thumb img,
.dialog-image img { object-fit: contain; }
.product-variants { min-height: 16px; margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.card-add { flex: 0 0 auto; }

.dialog-gallery { background: #f6f2eb; }
.dialog-image-shell { position: relative; aspect-ratio: 1.12; overflow: hidden; background: #fff; }
.dialog-image { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; background: #fff; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; }
.dialog-image::-webkit-scrollbar { display: none; }
.dialog-slide { flex: 0 0 100%; width: 100%; height: 100%; margin: 0; display: grid; place-items: center; scroll-snap-align: start; scroll-snap-stop: always; background: #fff; }
.dialog-thumbs { display: flex; gap: 8px; padding: 10px 14px 14px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.dialog-thumbs::-webkit-scrollbar { display: none; }
.dialog-thumb { flex: 0 0 76px; padding: 5px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.74); cursor: pointer; scroll-snap-align: center; }
.dialog-thumb.active { border-color: #171717; box-shadow: inset 0 0 0 1px #171717; }
.dialog-thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; background: #fff; pointer-events: none; }
.dialog-main-image { display: block; width: 100%; height: 100%; object-fit: contain !important; object-position: center; padding: 12px; box-sizing: border-box; pointer-events: none; -webkit-user-drag: none; }
.dialog-image-counter { position: absolute; right: 14px; bottom: 14px; z-index: 2; min-width: 42px; padding: 6px 9px; border-radius: 999px; background: rgba(23,23,23,.74); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; text-align: center; pointer-events: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }


.variant-section { margin: 22px 0; }
.variant-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.variant-heading h3 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 500; }
.variant-heading span { max-width: 170px; color: var(--muted); font-size: 10px; line-height: 1.35; text-align: right; }
.size-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.size-option { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 50px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 14px; background: #f6f1e8; cursor: pointer; text-align: left; }
.size-option strong { font-size: 14px; }
.size-option span { color: #806b48; font-size: 11px; font-weight: 700; white-space: nowrap; }
.size-option.active { border-color: #171717; background: #171717; color: #fff; box-shadow: 0 8px 18px rgba(23,23,23,.13); }
.size-option.active span { color: #e6d1af; }
.dialog-add-button:disabled { background: #d8d3cb; color: #8b8780; cursor: not-allowed; }
.cart-variant { margin: 0 0 8px !important; color: #806b48 !important; }
.cart-variant strong { color: var(--text); }

@media (max-width: 420px) {
  .dialog-body { padding: 20px 16px 22px; }
  .dialog-thumb { flex-basis: 70px; }
  .variant-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .variant-heading span { max-width: none; text-align: left; }
  .size-option { padding: 8px 9px; }
  .size-option strong { font-size: 13px; }
  .size-option span { font-size: 10px; }
}

/* v22 — каталог, карточка товара и оформление */
.stock-photo img,
.new-feature img,
.new-small img { object-fit: contain; background: #fff; }

.status-badge.last,
.stock-count.last,
.new-feature-status.last {
  background: rgba(255, 235, 218, .96);
  color: #a24b2f;
}

.recent-badge {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(23, 23, 23, .9);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.product-sku {
  margin: 6px 0 0;
  color: #9b9389;
  font-size: 10px;
  letter-spacing: .025em;
}

.cart-sku {
  margin: 0 0 5px !important;
  color: #9b9389 !important;
  font-size: 10px !important;
}

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

.dialog-title-row > div { min-width: 0; }
.dialog-title-row h2 { margin-bottom: 7px; }

.share-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6f1e8;
  color: #3d3934;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.share-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dialog-status {
  position: static;
  display: inline-block;
  margin-bottom: 2px;
}

.brand-article {
  margin: -7px 0 16px;
  color: var(--muted);
  font-size: 11px;
}

.delivery-note {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin: 17px 0 20px;
  padding: 14px;
  border: 1px solid rgba(128, 107, 72, .13);
  border-radius: 17px;
  background: #f6f1e8;
}

.delivery-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #171717;
  color: #fff;
  font-size: 17px;
}

.delivery-note strong { display: block; margin: 1px 0 4px; font-size: 13px; }
.delivery-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }

.size-option > span {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.size-option > span b {
  font-size: 11px;
  color: inherit;
}

.size-option > span small {
  color: #a24b2f;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.size-option.active > span small { color: #f2c9b9; }
.size-option:disabled { opacity: .42; cursor: not-allowed; }

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.66);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.success-card {
  display: grid;
  justify-items: center;
  padding: 30px 20px 22px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 18px 44px rgba(46, 36, 20, .07);
  text-align: center;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #dde8d6;
  color: #46613e;
  font-size: 34px;
  font-weight: 850;
}

.success-icon.muted { background: #eee8de; color: #8f887f; }
.success-card h2 { margin: 5px 0 8px; font-family: var(--serif); font-size: 42px; font-weight: 500; letter-spacing: -.04em; }
.success-card > p { max-width: 410px; margin: 0 0 20px; color: var(--muted); line-height: 1.5; }

.order-number-card {
  display: grid;
  justify-items: center;
  gap: 7px;
  width: min(100%, 390px);
  margin: 0 0 10px;
  padding: 16px 18px;
  border: 1px solid rgba(71, 101, 64, .18);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(221,232,214,.74), rgba(255,255,255,.86));
}

.order-number-card > span {
  color: #6e7669;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.order-number-card > strong {
  color: #2f4930;
  font-size: clamp(18px, 5vw, 24px);
  letter-spacing: .045em;
  overflow-wrap: anywhere;
}

.order-number-copy {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(47,73,48,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #3f5a40;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.order-created {
  margin: 0 0 12px !important;
  color: #8a8379 !important;
  font-size: 11px;
}

.success-summary {
  width: 100%;
  margin: 2px 0 16px;
  padding: 14px;
  border-radius: 18px;
  background: #f4efe7;
  text-align: left;
}

.success-item,
.success-total {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  font-size: 12px;
}

.success-item span { color: #665f56; }
.success-item strong { flex: 0 0 auto; font-size: 11px; }
.success-total { margin-top: 7px; padding-top: 13px; border-top: 1px solid var(--line); font-size: 17px; }

.success-warning {
  display: grid;
  gap: 5px;
  width: 100%;
  margin-bottom: 16px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #fff2e7;
  color: #7d4b31;
  text-align: left;
}

.success-warning strong { font-size: 12px; }
.success-warning span { font-size: 10px; line-height: 1.45; }
.success-card .secondary-button { margin-top: 9px; }

@media (max-width: 420px) {
  .dialog-title-row { display: block; }
  .share-button { margin: 3px 0 14px; }
  .success-card { padding-right: 16px; padding-left: 16px; }
  .success-item { display: grid; gap: 3px; }
}

/* v23 — каталог для 50–100+ моделей */
button,
input,
select { font: inherit; }

.availability-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .58);
}

.availability-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 42px;
  padding: 0 9px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #777168;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.availability-tab b {
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eee7dc;
  color: #736758;
  font-size: 10px;
}

.availability-tab.active {
  background: #171717;
  color: #fff;
  box-shadow: 0 7px 17px rgba(23, 23, 23, .13);
}

.availability-tab.active b {
  background: rgba(255,255,255,.16);
  color: #fff;
}

.advanced-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .54);
}

.select-filter {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.select-filter > span {
  padding-left: 3px;
  color: #9a9389;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.select-filter select {
  width: 100%;
  min-width: 0;
  height: 43px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #8f887f 50%) calc(100% - 16px) 19px / 5px 5px no-repeat,
    linear-gradient(135deg, #8f887f 50%, transparent 50%) calc(100% - 11px) 19px / 5px 5px no-repeat,
    #fffdf9;
  color: #3f3a34;
  cursor: pointer;
  font-size: 12px;
  text-overflow: ellipsis;
}

.select-filter select:focus {
  border-color: #9f8a6a;
  box-shadow: 0 0 0 3px rgba(200, 170, 123, .13);
}

.filter-wide { grid-column: span 2; }

.reset-filters {
  align-self: end;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f1ece4;
  color: #766d62;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.reset-filters:active { transform: translateY(1px); }

.catalog-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  margin: 7px 2px 5px;
}

.catalog-summary .results-label { margin: 0; }

.active-filters-label {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eee7dc;
  color: #7f7364;
  font-size: 10px;
  font-weight: 750;
}

.load-more-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin: 18px 0 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #423d37;
  cursor: pointer;
  font-weight: 750;
}

.load-more-button[hidden] { display: none; }

.product-variants {
  display: -webkit-box;
  min-height: 31px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
}

.product-variants span {
  display: block;
  margin-bottom: 2px;
  color: #9d958a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.product-card .status-badge {
  max-width: calc(100% - 82px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card .product-image img {
  content-visibility: auto;
}

@media (max-width: 560px) {
  .advanced-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-wide { grid-column: span 1; }
  .reset-filters { grid-column: span 1; }
}

@media (max-width: 420px) {
  .availability-tab { gap: 4px; padding: 0 5px; font-size: 10px; }
  .availability-tab b { min-width: 18px; height: 18px; padding: 0 5px; font-size: 9px; }
  .advanced-filters { gap: 7px; padding: 10px; }
  .select-filter select { height: 41px; padding-left: 9px; font-size: 11px; }
  .reset-filters { min-height: 41px; font-size: 11px; }
  .catalog-summary { align-items: flex-start; }
  .active-filters-label { font-size: 9px; }
  .product-card .recent-badge { top: 43px; right: auto; left: 14px; }
  .product-card .status-badge { max-width: calc(100% - 28px); }
}

/* v24 — избранное, компактные фильтры и улучшенное оформление */
button,
input,
select,
textarea { font: inherit; }

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: stretch;
  margin-bottom: 12px;
}

.catalog-tools .search-box { margin: 0; }

.favorites-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 58px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.68);
  color: #615b53;
  cursor: pointer;
}

.favorites-filter span { font-size: 22px; line-height: 1; }
.favorites-filter b { font-size: 11px; }
.favorites-filter.active { border-color: #171717; background: #171717; color: #fff; }

.filter-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.filter-toolbar .filter-row { margin: 0; }

.filters-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #4d4841;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.filters-toggle b {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #eee7dc;
  color: #736758;
  font-size: 9px;
}

.filters-toggle[aria-expanded="true"] { background: #171717; color: #fff; }
.filters-toggle[aria-expanded="true"] b { background: rgba(255,255,255,.16); color: #fff; }
.advanced-filters.is-collapsed { display: none; }

.favorite-button {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 50%;
  background: rgba(255,255,255,.86);
  color: #5f5951;
  box-shadow: 0 7px 18px rgba(34,28,20,.08);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.favorite-button.active { background: #171717; color: #fff; }
.product-card .status-badge { padding-right: 10px; }

.dialog-title-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.favorite-dialog-button.active { border-color: #171717; background: #171717; color: #fff; }

.dialog-sticky-actions {
  position: sticky;
  z-index: 4;
  bottom: 0;
  margin: 18px -23px -23px;
  padding: 13px 23px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(218,210,198,.82);
  background: rgba(248,245,239,.94);
  box-shadow: 0 -12px 28px rgba(42,34,22,.06);
  backdrop-filter: blur(16px);
}

.checkout-form {
  display: grid;
  gap: 11px;
  margin: 18px 0;
  padding: 15px;
  border-radius: 19px;
  background: #f4efe7;
}

.checkout-form h3 {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
}

.checkout-form label { display: grid; gap: 6px; }
.checkout-form label > span { color: #766f65; font-size: 10px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.checkout-form label small { font-weight: 500; letter-spacing: 0; text-transform: none; }
.checkout-form input,
.checkout-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.84);
  color: var(--text);
  outline: none;
}
.checkout-form input { min-height: 44px; padding: 0 12px; }
.checkout-form textarea { min-height: 78px; padding: 11px 12px; resize: vertical; }
.checkout-form input:focus,
.checkout-form textarea:focus { border-color: #171717; box-shadow: 0 0 0 3px rgba(23,23,23,.07); }

.success-contact {
  display: grid;
  gap: 3px;
  width: 100%;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  text-align: left;
}
.success-contact span { color: #7f786e; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.success-contact strong { font-size: 13px; }
.success-contact small { margin-top: 3px; color: var(--muted); line-height: 1.4; }

@media (max-width: 520px) {
  .filter-toolbar { display: block; }
  .filter-toolbar .filters-toggle { width: 100%; margin-top: 9px; }
  .dialog-title-actions { justify-content: flex-start; margin: 7px 0 14px; }
  .dialog-title-actions .share-button { margin: 0; }
  .dialog-sticky-actions { margin-right: -16px; margin-left: -16px; padding-right: 16px; padding-left: 16px; }
}
.product-card .recent-badge { top: 52px; right: 12px; left: auto; }

.checkout-status {
  margin: 10px 4px 0;
  color: #7b746b;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}
.checkout-status.error {
  color: #9d3f35;
  font-weight: 700;
}
.success-warning.success-sent {
  border-color: rgba(51, 128, 76, .22);
  background: rgba(80, 155, 96, .09);
}
.success-warning.success-sent strong { color: #2f7443; }

/* v30: reduce below-the-fold rendering work on slower Telegram WebViews. */
@supports (content-visibility: auto) {
  .home-page .categories-section,
  .home-page .stock-section,
  .home-page .new-section {
    content-visibility: auto;
    contain-intrinsic-size: 620px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page.active { animation: none; }
  * { scroll-behavior: auto !important; }
}


/* v45 — варианты цвета в одной карточке */
.color-variant-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.color-option { min-width: 0; padding: 7px; border: 1px solid var(--line); border-radius: 15px; background: #f6f1e8; color: var(--text); cursor: pointer; text-align: left; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.color-option img { display: block; width: 100%; aspect-ratio: 1; margin-bottom: 7px; border-radius: 11px; background: #fff; object-fit: contain; }
.color-option strong { display: block; min-height: 30px; font-size: 11px; line-height: 1.25; }
.color-option span { display: block; margin-top: 4px; color: #806b48; font-size: 10px; font-weight: 800; }
.color-option.active { border-color: #171717; box-shadow: inset 0 0 0 1px #171717, 0 7px 16px rgba(23,23,23,.10); transform: translateY(-1px); }
.color-option.active span { color: #171717; }
.color-option:disabled { opacity: .42; cursor: not-allowed; }
@media (max-width: 360px) { .color-variant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* v50 — единые карточки, категории без обрезки и компактный выбор вариантов */
.new-small {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,.72);
}
.new-small > img {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 1.08;
  object-fit: contain;
  background: #fff;
}
.new-small-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 146px;
  box-sizing: border-box;
  background: rgba(255,255,255,.72);
}
.new-small-copy strong { margin-top: auto; padding-top: 8px; }

.category-image {
  width: calc(100% - 16px);
  margin: 8px auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #eee8de;
}
.category-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 50%;
}

.color-variant-section {
  margin: 14px 0 10px;
  padding: 0;
}
.color-variant-section .variant-heading {
  margin-bottom: 8px;
}
.color-variant-section .variant-heading h3 {
  font-size: 20px;
}
.color-variant-section .variant-heading span {
  font-size: 9px;
}
.color-variant-grid {
  display: flex;
  gap: 8px;
  margin: 0 -2px;
  padding: 2px 2px 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.color-variant-grid::-webkit-scrollbar { display: none; }
.color-option {
  flex: 0 0 112px;
  scroll-snap-align: start;
  padding: 6px;
  border-radius: 14px;
}
.color-option img {
  aspect-ratio: 1.15;
  margin-bottom: 5px;
}
.color-option strong {
  min-height: 27px;
  font-size: 10px;
}
.color-option span {
  margin-top: 3px;
  font-size: 10px;
}
.color-variant-section + .dialog-price {
  margin-top: 4px;
  margin-bottom: 10px;
}
@media (max-width: 420px) {
  .new-small-copy { min-height: 132px; padding: 12px 13px 14px; }
  .color-option { flex-basis: 104px; }
}


/* v51 — поддержка на главной и компактный выбор размера */
.support-section {
  padding-bottom: calc(126px + env(safe-area-inset-bottom));
}
.support-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(128, 107, 72, .16);
  border-radius: 25px;
  background: linear-gradient(145deg, rgba(255,255,255,.86), rgba(239,232,220,.92));
  box-shadow: 0 16px 38px rgba(46,36,20,.06);
}
.support-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #171717;
  color: #fff;
  font-family: var(--serif);
  font-size: 26px;
}
.support-copy { min-width: 0; }
.support-copy h2 { margin: 3px 0 5px; font-family: var(--serif); font-size: 27px; font-weight: 500; }
.support-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.support-button {
  grid-column: 1 / -1;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: #171717;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.compact-size-selector {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin: -4px 0 16px;
  padding: 13px 14px;
  border: 1px solid rgba(128,107,72,.16);
  border-radius: 17px;
  background: #f6f1e8;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.compact-size-selector span { min-width: 0; }
.compact-size-selector small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; }
.compact-size-selector strong { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.compact-size-change { display: inline-flex; align-items: center; gap: 5px; color: #806b48; font-size: 10px; font-weight: 800; white-space: nowrap; }
.compact-size-change b { font-size: 20px; line-height: .8; }

.sheet-dialog {
  width: min(calc(100% - 20px), 500px);
  max-height: min(82vh, 720px);
  margin: auto auto 0;
  padding: 12px 18px calc(20px + env(safe-area-inset-bottom));
  overflow: auto;
  border: 0;
  border-radius: 28px 28px 0 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 -18px 54px rgba(0,0,0,.2);
}
.sheet-dialog::backdrop { background: rgba(49,35,21,.38); backdrop-filter: blur(3px); }
.sheet-handle { width: 46px; height: 5px; margin: 0 auto 14px; border-radius: 999px; background: #d7d0c7; }
.sheet-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.sheet-header h2 { margin: 4px 0 0; font-family: var(--serif); font-size: 28px; font-weight: 500; }
.sheet-close { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer; font-size: 25px; line-height: 1; }
.sheet-help { margin: 10px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.size-picker-options { display: grid; gap: 8px; }
.size-picker-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 26px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f6f1e8;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.size-picker-option span { display: grid; gap: 3px; }
.size-picker-option span strong { font-size: 14px; }
.size-picker-option span small { color: #a24b2f; font-size: 9px; font-weight: 750; }
.size-picker-option > b { color: #806b48; font-size: 12px; white-space: nowrap; }
.size-picker-option > i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-style: normal; }
.size-picker-option.active { border-color: #171717; box-shadow: inset 0 0 0 1px #171717; }
.size-picker-option.active > i { background: #171717; color: #fff; }
.size-picker-option:disabled { opacity: .42; cursor: not-allowed; }

.support-form { display: grid; gap: 14px; margin-top: 18px; }
.support-form label { display: grid; gap: 7px; }
.support-form label > span { color: #665f56; font-size: 11px; font-weight: 750; }
.support-form select,
.support-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f6f1e8;
  color: var(--text);
  font: inherit;
  outline: none;
}
.support-form select { min-height: 50px; padding: 0 13px; }
.support-form textarea { min-height: 126px; padding: 13px; resize: vertical; line-height: 1.45; }
.support-form select:focus,
.support-form textarea:focus { border-color: #806b48; box-shadow: 0 0 0 3px rgba(128,107,72,.10); }
.support-status { margin: -2px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.4; text-align: center; }
.support-status.success { color: #2f7443; }
.support-status.error { color: #a24b2f; }

@media (max-width: 420px) {
  .support-card { padding: 17px; }
  .support-copy h2 { font-size: 24px; }
  .compact-size-selector { grid-template-columns: minmax(0,.72fr) minmax(0,1fr) auto; gap: 9px; padding: 12px; }
  .compact-size-selector strong { font-size: 13px; }
  .sheet-dialog { width: 100%; }
}


/* v52 — исправленный блок категорий: один ровный круг, точное центрирование */
.category-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
}
.category-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 10px 10px 0;
  aspect-ratio: 1 / 1;
  overflow: visible;
  border-radius: 0;
  background: transparent;
}
.category-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: 50% 50%;
  border-radius: 0;
  transform: none;
}
.category-card strong {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 7px 9px 16px;
  line-height: 1.2;
  text-align: center;
}
@media (max-width: 430px) {
  .category-image { margin: 8px 8px 0; }
  .category-card strong { min-height: 48px; padding: 5px 6px 13px; }
}


/* v53 — категории: чистый круг и центрированный нижний ряд */
.category-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.category-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 10px 26px rgba(68,54,31,.055);
  overflow: hidden;
  min-width: 0;
}
.category-card:nth-child(4) { grid-column: 2 / span 2; }
.category-card:nth-child(5) { grid-column: 4 / span 2; }
.category-image {
  display: grid;
  place-items: center;
  width: calc(100% - 24px);
  margin: 12px auto 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 50%;
  background: #eee8de;
}
.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.category-card strong {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 8px 10px 16px;
  line-height: 1.2;
  text-align: center;
}
@media (max-width: 430px) {
  .category-grid { gap: 10px; }
  .category-image { width: calc(100% - 18px); margin: 9px auto 0; }
  .category-card strong { min-height: 50px; padding: 6px 6px 13px; font-size: 12px; }
}


/* v55 — тёплая унификация палитры и чистые категории */
.new-feature { background: #fbf5ea; border-color: rgba(128,107,72,.14); }
.new-feature::after { background: linear-gradient(to top, rgba(251,245,234,.985), rgba(251,245,234,.92) 30%, rgba(251,245,234,.22) 60%, transparent 76%); }
.new-feature-status { background: rgba(242,229,210,.96); color: #8b6d45; }

.new-small { background: #f2e6d7; border-color: rgba(128,107,72,.14); box-shadow: 0 10px 26px rgba(68,54,31,.05); }
.new-small > img,
.new-small img { background: #fbf5ea; }
.new-small-copy { background: rgba(251,245,234,.96); }

.stock-section { border-color: rgba(191,164,117,.14); background: linear-gradient(145deg, #f8f2e7, #f2e8d8); box-shadow: 0 14px 38px rgba(54,69,45,.045); }
.stock-card { background: rgba(250,243,232,.96); border-color: rgba(128,107,72,.12); }
.stock-photo { background: #f0e6d8; }
.stock-count { background: #f3e7d8; color: #7b6852; }

.bottom-nav { border-color: rgba(209,177,136,.24); background: rgba(246,238,226,.97); box-shadow: 0 14px 42px rgba(40,31,18,.12); }
.nav-item { color: #7f7263; }
.nav-item.active { color: var(--text); }

.category-card { background: rgba(250,243,232,.96); border-color: rgba(128,107,72,.12); }
.category-image { width: calc(100% - 22px); margin: 11px auto 0; background: transparent; border-radius: 0; overflow: visible; }
.category-image img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; object-position: center; display: block; }
@media (max-width: 430px) {
  .category-image { width: calc(100% - 18px); margin: 9px auto 0; }
}


/* v58 — тёплый фон категорий и доработка иконок */
.categories-section {
  margin-top: 38px;
  padding: 2px 2px 10px;
  border-radius: 30px;
  background: linear-gradient(180deg, #f7efe4 0%, #f5ecdf 68%, rgba(245,236,223,0) 100%);
}
.home-page .categories-section + .stock-section { margin-top: 18px; }
.categories-section .section-header { margin-bottom: 18px; }
.categories-section .eyebrow { color: #7b6954; }
.categories-section .category-card { background: #fbf5ea; border-color: rgba(128,107,72,.12); }
.categories-section .category-card strong { background: #fbf5ea; }
.categories-section .category-image { width: calc(100% - 18px); margin: 10px auto 0; }
.categories-section .category-image img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
@media (max-width: 430px) {
  .categories-section { margin-top: 34px; padding-bottom: 8px; }
  .home-page .categories-section + .stock-section { margin-top: 14px; }
  .categories-section .category-image { width: calc(100% - 14px); margin-top: 8px; }
}


/* v58 — единый тёплый фон главной страницы */
:root { --bg: #f5ecdf; }
html, body, .app-shell, .home-page { background: #f5ecdf; }

/* Категории больше не имеют отдельной цветной подложки */
.home-page .categories-section {
  margin-top: 38px;
  padding: 0 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.home-page .categories-section + .stock-section { margin-top: 28px; }
.categories-section .category-card {
  background: #fbf5ea;
  border-color: rgba(128,107,72,.11);
  box-shadow: 0 9px 24px rgba(68,54,31,.045);
}
.categories-section .category-card strong { background: #fbf5ea; }

/* Блок наличия остаётся выделенным, но в том же тёплом оттенке страницы */
.home-page .stock-section {
  border-color: rgba(177,145,98,.12);
  background: #f7efe4;
  box-shadow: 0 12px 32px rgba(68,54,31,.035);
}
.home-page .stock-card { background: #fbf5ea; }
.home-page .stock-photo { background: #f2e8da; }

/* Новинки и поддержка — светлее страницы, без чистого белого */
.home-page .new-feature,
.home-page .new-small,
.home-page .new-small > img,
.home-page .new-small img,
.home-page .new-small-copy { background: #fbf5ea; }
.home-page .support-card {
  background: #f8efe3;
  border-color: rgba(177,145,98,.14);
  box-shadow: 0 12px 32px rgba(68,54,31,.04);
}

@media (max-width: 430px) {
  .home-page .categories-section { margin-top: 34px; padding-bottom: 6px; }
  .home-page .categories-section + .stock-section { margin-top: 24px; }
}


/* v59 — финальный единый комплект категорий */
.categories-section .category-card {
  overflow: hidden;
  background: #fbf5ea;
}
.categories-section .category-image {
  width: calc(100% - 16px);
  margin: 8px auto 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 22px;
  background: #f5ecdf;
}
.categories-section .category-image img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 22px;
}
@media (max-width: 430px) {
  .categories-section .category-image {
    width: calc(100% - 12px);
    margin-top: 6px;
    border-radius: 18px;
  }
  .categories-section .category-image img { border-radius: 18px; }
}


/* v61 — точечная коррекция палитры от v59 */
:root { --bg: #f7efe5; }
html, body, .app-shell, .home-page { background: #f7efe5; }

/* Категории почти в цвет страницы */
.home-page .categories-section {
  background: transparent;
}
.categories-section .section-header { margin-bottom: 16px; }
.categories-section .eyebrow { color: #8e7355; }
.categories-section .category-card {
  background: #faf3ea;
  border-color: rgba(126, 101, 69, .09);
  box-shadow: 0 8px 22px rgba(68,54,31,.035);
}
.categories-section .category-card strong {
  background: #faf3ea;
}
.categories-section .category-image {
  background: #f8f0e6;
}

/* Тёплый нейтральный блок наличия без холодного оттенка */
.home-page .stock-section {
  border-color: rgba(177,145,98,.11);
  background: #f8f1e7;
  box-shadow: 0 12px 32px rgba(68,54,31,.03);
}
.home-page .stock-card { background: #fbf5eb; }
.home-page .stock-photo { background: #f6eee3; }

/* Новинки и поддержка в одной спокойной гамме */
.home-page .new-feature,
.home-page .new-small,
.home-page .new-small > img,
.home-page .new-small img,
.home-page .new-small-copy { background: #fbf5eb; }
.home-page .support-card {
  background: #faf3e9;
  border-color: rgba(177,145,98,.12);
  box-shadow: 0 12px 30px rgba(68,54,31,.03);
}

/* Нижнее меню — тёплое, но без лишней желтизны */
.bottom-nav {
  border-color: rgba(209,177,136,.22);
  background: rgba(249,243,234,.96);
  box-shadow: 0 14px 38px rgba(40,31,18,.11);
}

/* Кнопки и мелкие подложки */
.text-link,
.round-link {
  background: rgba(251,245,235,.88);
}


/* v62 — более тёплая и живая кремовая палитра */
:root { --bg: #efe3d3; }
html, body, .app-shell, .home-page { background: #efe3d3; }

.home-page .categories-section { background: transparent; }
.categories-section .eyebrow { color: #9b7752; }
.categories-section .category-card {
  background: #f6eadc;
  border-color: rgba(140,107,69,.10);
  box-shadow: 0 9px 24px rgba(77,57,31,.04);
}
.categories-section .category-card strong { background: #f6eadc; }
.categories-section .category-image { background: #f1e3d4; }

.home-page .stock-section {
  border-color: rgba(177,145,98,.13);
  background: #f5e8d8;
  box-shadow: 0 12px 30px rgba(68,54,31,.035);
}
.home-page .stock-card { background: #f8ecde; }
.home-page .stock-photo { background: #f3e5d6; }

.home-page .new-feature,
.home-page .new-small,
.home-page .new-small > img,
.home-page .new-small img,
.home-page .new-small-copy { background: #f8ecde; }
.home-page .support-card {
  background: #f6e9db;
  border-color: rgba(177,145,98,.13);
  box-shadow: 0 12px 28px rgba(68,54,31,.035);
}

.bottom-nav {
  border-color: rgba(209,177,136,.25);
  background: rgba(244,232,217,.97);
  box-shadow: 0 14px 36px rgba(40,31,18,.12);
}

.text-link,
.round-link {
  background: rgba(246,233,218,.9);
}


/* v63 — более тёплая, уютная молочно-кремовая гамма */
:root { --bg: #ebdcc8; }
html, body, .app-shell, .home-page {
  background: #ebdcc8;
}

/* общие секции */
.home-page .categories-section,
.home-page .support-section {
  background: transparent;
}

/* Заголовки и мелкие подписи */
.categories-section .eyebrow,
.home-page .section-chip,
.home-page .support-kicker {
  color: #9b7650;
}

/* Категории — мягче и ближе к странице */
.categories-section .category-card {
  background: #f2e4d3;
  border-color: rgba(149,115,78,.10);
  box-shadow: 0 8px 20px rgba(75,55,29,.035);
}
.categories-section .category-card strong {
  background: #f2e4d3;
}
.categories-section .category-image {
  background: #efdfcf;
}

/* В наличии */
.home-page .stock-section {
  background: #f3e6d6;
  border-color: rgba(182,147,103,.14);
  box-shadow: 0 12px 28px rgba(68,54,31,.035);
}
.home-page .stock-card {
  background: #f7ecdf;
}
.home-page .stock-photo {
  background: #f4e7d9;
}

/* Новинки */
.home-page .new-feature,
.home-page .new-small,
.home-page .new-small-copy {
  background: #f7ecdf;
}
.home-page .new-small img,
.home-page .new-small > img {
  background: #f6ebde;
}

/* Поддержка */
.home-page .support-card {
  background: #f5e8da;
  border-color: rgba(182,147,103,.14);
  box-shadow: 0 12px 28px rgba(68,54,31,.035);
}

/* Кнопки и мелкие карточки */
.text-link,
.round-link {
  background: rgba(247,236,223,.92);
}

/* Нижнее меню — тёплое, мягкое, уютное */
.bottom-nav {
  background: rgba(243,230,215,.97);
  border-color: rgba(206,171,129,.28);
  box-shadow: 0 14px 34px rgba(45,33,18,.12);
}

/* Немного теплее вторичные поверхности */
.home-page .feature-status,
.home-page .new-badge,
.home-page .status-pill,
.home-page .tag,
.home-page .stock-note {
  background: #efdbc5;
}


/* v64 — фон на ~10% холоднее, без зеленого оттенка */
:root { --bg: #ece3d7; }
html, body, .app-shell, .home-page {
  background: #ece3d7;
}

.home-page .categories-section,
.home-page .support-section {
  background: transparent;
}

.categories-section .eyebrow,
.home-page .section-chip,
.home-page .support-kicker {
  color: #93755a;
}

.categories-section .category-card {
  background: #f4ebe1;
  border-color: rgba(146,116,84,.10);
  box-shadow: 0 8px 20px rgba(75,55,29,.03);
}
.categories-section .category-card strong {
  background: #f4ebe1;
}
.categories-section .category-image {
  background: #efe5db;
}

.home-page .stock-section {
  background: #f4eadf;
  border-color: rgba(176,146,108,.14);
  box-shadow: 0 12px 28px rgba(68,54,31,.03);
}
.home-page .stock-card {
  background: #f8eee5;
}
.home-page .stock-photo {
  background: #f3e8dd;
}

.home-page .new-feature,
.home-page .new-small,
.home-page .new-small-copy {
  background: #f8eee5;
}
.home-page .new-small img,
.home-page .new-small > img {
  background: #f5eadf;
}

.home-page .support-card {
  background: #f6ede3;
  border-color: rgba(176,146,108,.14);
  box-shadow: 0 12px 28px rgba(68,54,31,.03);
}

.text-link,
.round-link {
  background: rgba(248,238,229,.94);
}

.bottom-nav {
  background: rgba(244,234,223,.97);
  border-color: rgba(198,168,132,.26);
  box-shadow: 0 14px 34px rgba(45,33,18,.10);
}

.home-page .feature-status,
.home-page .new-badge,
.home-page .status-pill,
.home-page .tag,
.home-page .stock-note {
  background: #efdfcd;
}


/* v65 — единый внутренний фон в карточках категорий */
.categories-section .category-card {
  background: #f4ebe1;
}
.categories-section .category-card strong {
  background: #f4ebe1;
}
.categories-section .category-image {
  background: #f3e7da;
}


/* v85 — отзывы покупателей, выбор 1–10 фотографий и надёжная загрузка */
.reviews-section { padding-top: 4px; padding-bottom: 8px; }
.reviews-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(128,107,72,.15);
  border-radius: 25px;
  background: #f6ede3;
  box-shadow: 0 12px 28px rgba(68,54,31,.03);
}
.reviews-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #806b48;
  color: #fff;
  font-size: 20px;
}
.reviews-copy { min-width: 0; }
.reviews-copy h2 { margin: 3px 0 5px; font-family: var(--serif); font-size: 27px; font-weight: 500; }
.reviews-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.48; }
.reviews-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.reviews-channel-button,
.reviews-leave-button {
  min-height: 48px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}
.reviews-channel-button { border: 0; background: #171717; color: #fff; }
.reviews-leave-button { border: 1px solid rgba(23,23,23,.20); background: rgba(255,255,255,.42); color: #171717; }

.review-privacy-note {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 15px;
  background: rgba(128,107,72,.09);
  color: #655d54;
  font-size: 10px;
  line-height: 1.5;
}
.review-form { display: grid; gap: 14px; margin-top: 16px; }
.review-form > label:not(.review-consent) { display: grid; gap: 7px; }
.review-form label > span { color: #665f56; font-size: 11px; font-weight: 750; }
.review-form input[type="text"],
.review-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f6f1e8;
  color: var(--text);
  font: inherit;
  outline: none;
}
.review-form input[type="text"] { min-height: 50px; padding: 0 13px; }
.review-form textarea { min-height: 126px; padding: 13px; resize: vertical; line-height: 1.45; }
.review-form input[type="text"]:focus,
.review-form textarea:focus { border-color: #806b48; box-shadow: 0 0 0 3px rgba(128,107,72,.10); }
.review-photo-field {
  position: relative;
  padding: 14px;
  border: 1px dashed rgba(128,107,72,.42);
  border-radius: 17px;
  background: #f6f1e8;
  cursor: pointer;
}
.review-photo-field input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.review-photo-field strong { display: grid; place-items: center; min-height: 46px; margin-top: 3px; border-radius: 999px; background: #171717; color: #fff; font-size: 12px; }
.review-photo-field small { color: var(--muted); font-size: 9px; line-height: 1.4; text-align: center; }
.review-photo-preview {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.45);
}
.review-photo-preview[hidden] { display: none; }
.review-photo-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-photo-preview-head strong { color: #665f56; font-size: 11px; }
.review-photo-preview-head button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(23,23,23,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.65);
  color: #665f56;
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 750;
}
.review-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.review-photo-item { position: relative; min-width: 0; }
.review-photo-item img { display: block; width: 100%; aspect-ratio: 1 / 1; border-radius: 12px; object-fit: cover; }
.review-photo-item span {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: #665f56;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-photo-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 50%;
  background: rgba(23,23,23,.76);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 17px;
  line-height: 1;
}
.review-photo-preview button:disabled { cursor: wait; opacity: .55; }
.review-consent { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 9px; align-items: start; cursor: pointer; }
.review-consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #171717; }
.review-consent span { font-weight: 500 !important; line-height: 1.45; }
.review-status { margin: -2px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.4; text-align: center; }
.review-status.success { color: #2f7443; }
.review-status.error { color: #a24b2f; }

@media (max-width: 420px) {
  .reviews-card { padding: 17px; }
  .reviews-copy h2 { font-size: 24px; }
  .reviews-actions { grid-template-columns: 1fr; }
}


/* v86 — полноэкранная галерея товара */
.dialog-main-image, .dialog-image { cursor: zoom-in; }
.photo-viewer-open { overflow: hidden !important; overscroll-behavior: none; }
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: rgba(10, 10, 10, .985);
  color: #fff;
  opacity: 0;
  transition: opacity .15s ease;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
.photo-viewer.open { opacity: 1; }
.photo-viewer::backdrop { background: #0a0a0a; }
.photo-viewer-topbar {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  min-height: 64px;
  padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.46), transparent);
}
.photo-viewer-counter {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(34,34,34,.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
}
.photo-viewer-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(34,34,34,.72);
  color: #fff;
  font-size: 31px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
}
.photo-viewer-stage {
  position: absolute;
  inset: 60px 0 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  outline: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: zoom-out;
}
.photo-viewer-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center center;
  transform-origin: center center;
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}
.photo-viewer-image.animate { transition: transform .18s ease; }
.photo-viewer-image.slide-left { animation: photoViewerFromRight .16s ease-out; }
.photo-viewer-image.slide-right { animation: photoViewerFromLeft .16s ease-out; }
@keyframes photoViewerFromRight { from { opacity: .55; transform: translate3d(24px,0,0); } to { opacity: 1; transform: translate3d(0,0,0); } }
@keyframes photoViewerFromLeft { from { opacity: .55; transform: translate3d(-24px,0,0); } to { opacity: 1; transform: translate3d(0,0,0); } }
.photo-viewer-nav {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 56px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 16px;
  background: rgba(34,34,34,.68);
  color: #fff;
  font-size: 38px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.photo-viewer-prev { left: max(12px, env(safe-area-inset-left)); }
.photo-viewer-next { right: max(12px, env(safe-area-inset-right)); }
.photo-viewer-nav:disabled { opacity: .2; cursor: default; }
.photo-viewer-hint {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100vw - 40px);
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(34,34,34,.62);
  color: rgba(255,255,255,.82);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@media (max-width: 700px), (hover: none) {
  .photo-viewer-nav { display: none; }
  .photo-viewer-stage { inset: 58px 0 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .photo-viewer, .photo-viewer-image.animate { transition: none; }
  .photo-viewer-image.slide-left, .photo-viewer-image.slide-right { animation: none; }
}
