:root {
  color-scheme: light;
  --ink: #242528;
  --paper: #fff;
  --white: #fff;
  --steel: #595d63;
  --line: #dedfe1;
  --red: #cb2028;
  --focus: #36628d;
  --safe-top: calc(max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, var(--shop-safe-top, 0px))) + var(--tg-content-safe-area-inset-top, var(--shop-content-top, 0px)));
  --safe-bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, var(--shop-safe-bottom, 0px))) + var(--tg-content-safe-area-inset-bottom, var(--shop-content-bottom, 0px)));
  --safe-left: calc(max(env(safe-area-inset-left, 0px), var(--tg-safe-area-inset-left, var(--shop-safe-left, 0px))) + var(--tg-content-safe-area-inset-left, var(--shop-content-left, 0px)));
  --safe-right: calc(max(env(safe-area-inset-right, 0px), var(--tg-safe-area-inset-right, var(--shop-safe-right, 0px))) + var(--tg-content-safe-area-inset-right, var(--shop-content-right, 0px)));
  --app-top: var(--safe-top);
  scroll-padding-top: var(--header-height, 70px);
  font-family: Arial, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 290px; padding-inline: var(--safe-left) var(--safe-right); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, .stepper, .detail-actions { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.frame { width: min(1440px, calc(100% - clamp(32px, 7vw, 120px))); margin-inline: auto; }
.masthead { position: sticky; inset-block-start: 0; z-index: 5; padding-top: var(--app-top); background: white; border-bottom: 1px solid var(--line); }
.service-strip { color: #42464b; background: #f4f5f6; font-size: 13px; }
.service-inner, .header-inner, .shop-actions, .nav-tool, .header-catalog { display: flex; align-items: center; }
.service-inner { min-height: 35px; gap: 25px; }
.service-inner a, .store-footer a { text-decoration: none; }
.service-inner a:hover, .store-footer a:hover { text-decoration: underline; }
.service-phone { margin-left: auto; font-weight: 700; }
.header-inner { min-height: 82px; gap: 24px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { display: block; width: 136px; height: auto; }
.nav-tool, .header-catalog { justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; background: transparent; border: 0; border-radius: 5px; font-size: 14px; font-weight: 650; }
.nav-tool:hover { color: var(--red); background: #f7f7f8; }
#open-menu { display: inline-flex; }
.header-catalog { padding-inline: 18px; background: var(--red); color: white; }
.shop-actions { margin-left: auto; gap: 16px; }
.cart-count { display: inline-grid; place-items: center; color: white; background: var(--red); border-radius: 20px; min-width: 18px; padding: 2px 4px; font-size: 11px; }
.demo { color: var(--steel); font-size: 11px; }
.icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; vertical-align: middle; flex: 0 0 auto; }
.icon svg { width: 100%; height: 100%; }
.hero { position: relative; isolation: isolate; display: flex; align-items: center; margin-top: 22px; min-height: clamp(294px, 23vw, 370px); padding: clamp(24px,4vw,64px); overflow: hidden; border-radius: 10px; background: #f4f4f2 url('/assets/search-drawing.webp') right 39% / cover no-repeat; }
.hero::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,#f7f7f6 4%,rgba(247,247,246,.98) 21%,rgba(247,247,246,.89) 39%,rgba(247,247,246,.43) 59%,transparent 82%); }
.hero-copy { width: min(100%,580px); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(36px, 7vw, 68px); letter-spacing: -.065em; line-height: .99; font-weight: 850; }
.hero h1 { font-size: clamp(38px,4.4vw,67px); letter-spacing: -.058em; line-height: .99; }
.hero p { margin: 10px 0 24px; font-size: clamp(16px,1.35vw,20px); color: #373b40; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 45px; border: 1px solid transparent; border-radius: 7px; padding: 10px 15px; font-weight: 750; text-decoration: none; }
.primary { background: var(--red); color: white; }
.primary:hover:not(:disabled) { background: #ab1820; }
.secondary { background: var(--white); border-color: var(--line); }
.search { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 4px 4px 4px 15px; border: 1px solid #96999b; border-radius: 6px; background: white; }
.search > .icon { color: #676b70; }
.search input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 6px 0; font-size: 16px; }
.search input:focus { outline: 0; }
.search:focus-within { outline: 2px solid var(--focus); }
.search button { align-self: stretch; background: var(--red); color: white; border: 0; border-radius: 4px; padding-inline: 20px; font-weight: 700; }
.quick-sections { display: grid; grid-template-columns: repeat(auto-fit,minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.quick-link { display: flex; align-items: center; gap: clamp(10px,1.5vw,24px); min-width: 0; height: 84px; padding: 0 16px 0 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fafafa; text-align: left; font-size: 18px; font-weight: 700; }
.quick-link img { width: 28%; height: 100%; object-fit: cover; }
.quick-link .icon { margin-left: auto; width: 17px; color: var(--steel); }
.quick-link:hover, .card:hover { border-color: #a4a7aa; }
.catalog { padding: 36px 0 64px; scroll-margin-top: 16px; }
.catalog-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.catalog-title h2, .panel h2 { font-size: clamp(26px,3vw,38px); letter-spacing: -.045em; }
#catalog-count { color: var(--steel); font-size: 14px; }
.catalog-tools { margin-bottom: 14px; }
.catalog-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
#filters-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; }
#filters-toggle[aria-expanded="true"] { border-color: var(--ink); }
.catalog-sort { display: flex; align-items: center; gap: 8px; color: var(--steel); font-size: 14px; min-width: 0; }
.catalog-sort select, .price-range input { min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 16px; color: var(--ink); background: white; }
.catalog-sort select { max-width: 100%; }
.catalog-filters { margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,165px),1fr)); gap: 12px; align-items: end; background: #fafafa; }
.catalog-filters .field, .price-range { min-width: 0; margin: 0; }
.catalog-filters .field select { min-height: 44px; }
.price-range { padding: 0; border: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.price-range legend { padding: 0; font-size: 14px; font-weight: 700; }
.price-range label { display: grid; gap: 3px; font-size: 13px; color: var(--steel); }
.price-range input { width: 100%; }
.filter-actions { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: 8px; }
.filter-actions button { min-height: 44px; }
@media (max-width: 600px) {
  .catalog-sort { display: grid; flex: 1; max-width: 215px; gap: 3px; font-size: 13px; }
  .catalog-filters { grid-template-columns: minmax(0,1fr); }
}
.catalog-layout { display: grid; grid-template-columns: clamp(190px,18vw,245px) minmax(0,1fr); gap: clamp(18px,2vw,34px); align-items: start; }
.catalog-results { min-width: 0; }
.category-panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; }
.category-panel > summary { display: flex; align-items: center; gap: 10px; padding: 14px; font-size: 15px; font-weight: 700; background: #f6f6f6; cursor: pointer; }
.category-panel > summary::after { content: '⌄'; margin-left: auto; }
.category-panel[open] > summary::after { transform: rotate(180deg); }
.category-tree, .category-children { list-style: none; padding: 0; margin: 0; }
#categories { max-height: min(70vh,650px); overflow-y: auto; padding: 5px; scrollbar-width: thin; }
.category-children { margin-left: 10px; border-left: 1px solid var(--line); }
.category-item-button, .category-branch > summary { width: 100%; padding: 9px 10px; text-align: left; color: var(--ink); background: none; border: 0; border-radius: 3px; font: inherit; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; cursor: pointer; }
.category-item-button:hover, .category-branch summary:hover { background: #f4f5f6; }
.category-item-button[aria-current=true] { background: #faeded; color: #a51a20; font-weight: 700; }
.filter-reset { max-width: 100%; overflow-wrap: anywhere; min-height: 38px; margin-bottom: 12px; background: #f8eeee; border: 0; border-radius: 5px; padding: 7px 12px; text-align: left; }
.products { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,205px),1fr)); gap: 14px; }
.card { position: relative; min-width: 0; display: flex; flex-direction: column; border-radius: 9px; overflow: hidden; background: var(--white); border: 1px solid var(--line); }
.photo { display: grid; place-items: center; width: 100%; aspect-ratio: 1.48; overflow: hidden; background: #f4f5f5; color: #626969; }
.photo img { width: 100%; height: 100%; object-fit: contain; }
.photo .icon { width: 40px; height: 40px; opacity: .55; }
.product-link { padding: 0; text-align: left; border: 0; background: transparent; width: 100%; }
.product-link:focus-visible { outline-offset: -3px; }
.card-copy { display: grid; gap: 5px; padding: 11px 12px 6px; }
.sku { color: var(--steel); font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card-name { line-height: 1.22; font-size: 16px; font-weight: 750; overflow-wrap: anywhere; }
.card-bottom { margin-top: auto; padding: 5px 12px 12px; display: flex; align-items: center; gap: 4px; justify-content: space-between; }
.price { font-size: 18px; letter-spacing: -.025em; white-space: nowrap; }
.small-button { width: 42px; min-height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 6px; }
.card-bottom .small-button { background: var(--red); color: #fff; flex-shrink: 0; }
.save-product { position: absolute; top: 6px; right: 6px; width: 40px; min-height: 40px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 50%; }
.save-product[aria-pressed=true] { color: var(--red); }
.save-product[aria-pressed=true] svg { fill: currentColor; }
.pricing { display: grid; gap: 3px; min-width: 0; }
.availability { color: #356345; font-size: 12px; }
.menu-links { display: grid; }
.saved-product { background: white; text-decoration: none; font: inherit; border: 0; text-align: left; padding: 14px 0; }
.menu-header { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 5px 12px 5px 16px; border-bottom: 1px solid var(--line); }
.menu-header h2 { min-width: 0; font-size: 17px; overflow-wrap: anywhere; }
.menu-header .close { position: static; margin-left: auto; flex: 0 0 44px; height: 44px; }
#menu-back { display: inline-flex; align-items: center; flex-shrink: 0; gap: 5px; min-height: 44px; padding: 3px 8px 3px 0; border: 0; background: white; color: var(--red); }
#menu-back:not([hidden]) + h2 { color: var(--red); }
.menu-scroll { min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; }
.menu-links > :is(a,button) { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 54px; padding: 11px 16px; border: 0; border-bottom: 1px solid var(--line); background: white; color: var(--ink); font: inherit; text-decoration: none; text-align: left; overflow-wrap: anywhere; }
.menu-primary > :is(a,button), .menu-account > :is(a,button) { font-weight: 700; }
.menu-links > [aria-current="true"] { box-shadow: inset 3px 0 var(--red); color: var(--red); background: #fff5f5; }
.menu-links > [aria-current="true"] .menu-next { color: inherit; }
.menu-links > :is(a,button):focus-visible { outline-offset: -3px; }
.menu-subpage .brand-thumb { flex-shrink: 0; margin-right: 0; }
.menu-account > :is(a,button) { background: #f6f6f6; }
.menu-account .icon, .menu-contacts .icon { color: var(--steel); }
.menu-account .cart-count { background: #58616a; }
.menu-next { margin-left: auto; color: var(--steel); }
.menu-contacts { display: grid; gap: 8px; padding: 16px 16px 22px; }
.menu-contacts p, .menu-contacts > a { display: flex; align-items: baseline; gap: 10px; margin: 0; line-height: 1.45; }
.menu-contacts > a { min-height: 44px; align-items: center; color: inherit; }
.menu-social { display: flex; flex-wrap: wrap; gap: 6px; }
.menu-social a { flex: 1; display: grid; place-items: center; min-height: 44px; padding: 5px 8px; border-radius: 6px; font-size: 14px; font-weight: 650; text-decoration: none; color: white; background: #146f98; }
.menu-social a:nth-child(2) { background: linear-gradient(120deg,#325ac2,#7735a8); }
.menu-social a:nth-child(3) { background: #26713b; }
.saved-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.saved-product { min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.saved-product small { display: block; margin-top: 5px; font-weight: normal; color: var(--steel); }
.saved-row .small-button { flex-shrink: 0; }
.store-footer { border-top: 1px solid var(--line); background: #f6f6f6; }
.store-footer .frame { display: flex; align-items: center; gap: 16px 28px; flex-wrap: wrap; padding-block: 28px; font-size: 14px; }
.store-footer strong { margin-right: auto; }
body:has(.cart-bar:not([hidden])) .store-footer { padding-bottom: 70px; }
.status { padding: 16px 0; color: var(--steel); line-height: 1.45; }
.status .button { margin-top: 10px; }
.more { margin: 16px auto 0; display: flex; }
.cart-bar { position: fixed; z-index: 1; bottom: 0; width: 100%; padding: 9px 18px max(10px,env(safe-area-inset-bottom),var(--tg-safe-area-inset-bottom,0px)); background: var(--paper); border-top: 1px solid var(--line); }
.cart-bar .button { width: min(100%, 620px); display: flex; justify-content: space-between; margin: 0 auto; }
.cart-bar .icon { margin-right: 5px; }
.dialog-surface { position: absolute; inset: 0; margin: auto; height: fit-content; width: min(100% - 24px, 520px); max-height: min(85dvh, 760px); overflow: auto; border: 1px solid var(--line); border-radius: 14px; padding: 0; color: var(--ink); background: var(--paper); }
dialog { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; overflow: hidden; background: transparent; }
dialog::backdrop { background: transparent; }
.dialog-shade { position: absolute; inset: 0; background: rgba(22,30,32,.61); touch-action: none; }
.dialog-surface { --from-transform: translateY(8px) scale(.985); --to-transform: translateY(5px) scale(.99); }
dialog[data-closing] .dialog-surface { pointer-events: none; }
body.modal-open { overflow: hidden; }
.panel { position: relative; display: grid; gap: 15px; padding: 22px; }
.panel h2 { padding-right: 43px; }
.panel .photo { border-radius: 7px; }
.panel .photo img { object-fit: contain; }
.close { position: absolute; z-index: 1; right: 14px; top: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; width: 42px; height: 42px; display: grid; place-items: center; }
.detail-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.totals { display: flex; justify-content: space-between; align-items: center; }
.checkout { display: grid; gap: 13px; }
.field { display: grid; gap: 5px; font-size: 14px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; padding: 9px 10px; min-height: 42px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--white); font-weight: 400; font-size: 16px; }
.field textarea { resize: vertical; }
.checkout-error { color: #a22c1b; line-height: 1.4; overflow-wrap: anywhere; }
.checkout-note { color: var(--steel); font-size: 13px; line-height: 1.4; }
.orders-view { padding: 30px 0 max(32px, env(safe-area-inset-bottom)); min-height: calc(100dvh - 68px); }
.orders-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.orders-heading h1 { font-size: clamp(30px, 6vw, 46px); }
.orders-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,420px),1fr)); gap: 16px; align-items: start; }
.order-card { min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
.order-heading { cursor: pointer; display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: 1.5rem 1.25rem 1.65rem; align-items: center; gap: 3px 10px; padding: 14px 16px; border-radius: inherit; list-style: none; }
.order-heading::-webkit-details-marker { display: none; }
.order-heading:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.order-number, .order-heading .order-status { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.order-number { font-size: 17px; }
.order-date { grid-column: 1 / -1; color: var(--steel); font-size: 13px; }
.order-chevron { justify-self: end; color: var(--steel); transform: rotate(90deg); }
.order-card[open] .order-chevron { transform: rotate(-90deg); }
.order-card[open] .order-heading { grid-template-rows: auto 1.25rem auto; }
.order-card[open] .order-number, .order-card[open] .order-status { white-space: normal; overflow-wrap: anywhere; }
.order-statuses { display: flex; align-items: center; min-width: 0; gap: 4px; }
.order-statuses > .order-status:first-child { min-width: 0; flex-shrink: 1; }
.order-card[open] .order-statuses { flex-wrap: wrap; }
.order-amount { justify-self: end; font-variant-numeric: tabular-nums; }
.order-detail { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.order-item, .order-total { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.order-status { flex-shrink: 0; padding: 4px 8px; border-radius: 5px; background: #edf0e9; font-size: 12px; line-height: 1.3; }
.order-status.order-cancelled { color: #87232a; background: #fbe3e5; }
.order-cancelled-items { padding: 8px 0; border-top: 1px solid var(--line); }
.order-cancelled-items h3 { margin: 0; font-size: 14px; }
.order-cancelled-items .order-items { padding: 6px 0 0; }
.order-cancelled-name { min-width: 0; overflow-wrap: anywhere; }
.order-meta { margin-top: 7px; color: var(--steel); font-size: 13px; }
.order-items { display: grid; gap: 8px; list-style: none; padding: 12px 0; margin: 0; }
.order-item { align-items: center; font-size: 14px; line-height: 1.35; }
.order-item-product { display: grid; grid-template-columns: 46px minmax(0,1fr); align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.order-item-product .photo { width: 46px; height: 46px; aspect-ratio: 1; }
.order-item-product .photo .icon { width: 20px; height: 20px; }
a.order-item-product:hover strong, a.order-item-product:focus-visible strong { text-decoration: underline; }
.order-item-info { display: grid; min-width: 0; overflow-wrap: anywhere; }
.order-item-info small, .order-item-price { color: var(--steel); }
.order-item-price { flex-shrink: 0; }
.order-total { padding-top: 10px; border-top: 1px solid var(--line); }
.order-print { display: grid; justify-items: start; gap: 6px; margin-top: 14px; }
.order-print-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.order-print-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.order-print-button .icon { width: 18px; height: 18px; }
.order-print .order-meta { margin: 0; }
.order-chat { font-size: 14px; color: var(--red); text-underline-offset: 3px; }
#orders-back { margin-top: 18px; }
@media (max-width: 959px) {
  .frame { width: calc(100% - 32px); }
  .service-strip, .header-catalog { display: none; }
  #open-menu { display: inline-flex; }
  .header-inner { min-height: 64px; gap: 10px; }
  .shop-actions { gap: 5px; }
  .hero { padding: 30px; }
  .catalog-layout { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .category-panel > summary { min-height: 46px; }
  .category-item-button, .category-branch > summary { min-height: 44px; }
  .category-panel #categories { max-height: 46dvh; }
}
@media (max-width: 660px) {
  .frame { width: calc(100% - 28px); }
  .header-inner { gap: 4px; min-height: 60px; }
  .brand img { width: 97px; }
  .shop-actions { gap: 0; }
  .tool-label { display: none; }
  .nav-tool { position: relative; padding: 0; }
  .nav-tool .cart-count { position: absolute; top: 1px; right: 0; min-width: 15px; padding: 1px 3px; font-size: 10px; }
  .demo { font-size: 9px; }
  .hero { min-height: 220px; padding: 22px 16px 16px; margin-top: 12px; align-items: flex-end; background-position: 63% 32%; }
  .hero::before { background: linear-gradient(90deg,rgba(249,249,247,.98) 0%,rgba(249,249,247,.91) 31%,rgba(249,249,247,.50) 61%,transparent 95%); }
  .hero h1 { font-size: clamp(33px,8.5vw,45px); }
  .hero p { margin: 8px 0 22px; font-size: 15px; }
  .search { min-height: 48px; padding-left: 9px; gap: 5px; }
  .search > .icon { width: 16px; }
  .search input { font-size: 16px; }
  .search button { padding-inline: 11px; }
  .quick-sections { gap: 7px; margin-top: 10px; }
  .quick-link { height: auto; display: grid; grid-template-rows: 55px 1fr; text-align: center; gap: 0; padding: 0; font-size: 13px; }
  .quick-link img { width: 100%; height: 55px; }
  .quick-link > span:not(.icon) { padding: 6px 2px; }
  .quick-link .icon { display: none; }
  .catalog { padding-block: 24px 44px; }
  .catalog-title { margin-bottom: 12px; }
  .products { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .card-copy { padding: 8px; }
  .card-name { font-size: 14px; }
  .card-bottom { padding: 4px 8px 8px; }
  .card .price { white-space: normal; overflow-wrap: anywhere; font-size: 15px; }
  .small-button { width: 40px; min-height: 40px; }
  .save-product { top: 3px; right: 3px; }
  .store-footer .frame { gap: 12px 20px; }
  .store-footer strong { width: 100%; }
  .dialog-surface { --from-transform: translateY(32px); --to-transform: translateY(24px); margin: auto auto 0; width: 100%; max-width: 100%; max-height: 92dvh; border-radius: 14px 14px 0 0; padding-bottom: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom,0px)); }
  .panel { padding: 18px 16px; }
  .orders-view { padding-top: 20px; }
  .order-heading { padding-inline: 13px; }
}
@media (max-width: 360px) {
  .header-inner { width: calc(100% - 12px); }
  .brand img { width: 80px; }
  .demo { display: none; }
  .frame { width: calc(100% - 20px); }
}

.brand-thumb { width: 38px; height: 23px; object-fit: contain; vertical-align: middle; margin-right: 9px; background: #fff; border-radius: 2px; }
.card-bottom { flex-direction: column; align-items: stretch; gap: 10px; }
.card-bottom .pricing { gap: 6px; }
.buy-product { min-height: 40px; width: 100%; }
.purchase-controls { display: flex; align-items: center; gap: 8px; }
.purchase-stepper { display: grid; grid-template-columns: minmax(40px,1fr) auto minmax(40px,1fr); align-items: center; flex: 1; min-height: 42px; border-radius: 6px; background: #f5f5f5; }
.purchase-stepper .small-button { width: 100%; background: transparent; color: var(--red); }
.purchase-stepper .small-button:disabled { color: #999; }
.purchase-stepper output { min-width: 2.5ch; text-align: center; font-variant-numeric: tabular-nums; }
.flying-icon { position: fixed; z-index: 100; width: 26px; height: 26px; padding: 3px; border-radius: 50%; background: white; color: var(--red); pointer-events: none; box-shadow: 0 2px 8px #0002; }
.flying-icon svg { stroke-width: 2.3; }
.stock-label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.stock-label::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock-label.available { color: #3a672c; }
.stock-label.unavailable { color: #bb1e29; }
.info-block { padding: 14px 0; border-top: 1px solid var(--line); }
.info-block h3, .detail-block h3 { margin-bottom: 6px; font-size: 17px; }
.info-block p, .description-copy { line-height: 1.55; }
.contact-email { width: fit-content; padding-block: 8px; }
#info-dialog > .dialog-surface { width: min(100% - 24px,760px); overflow: hidden; }
#info-panel { display: flex; flex-direction: column; gap: 0; padding: 0; max-height: inherit; }
.info-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.info-header h2 { padding: 0; font-size: clamp(21px,4vw,30px); overflow-wrap: anywhere; }
.info-header .close { position: static; height: 44px; flex: 0 0 44px; }
.info-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px; }
.info-scroll p { white-space: pre-line; overflow-wrap: anywhere; }
.info-intro { margin-bottom: 14px; line-height: 1.55; }
.info-image { display: block; width: 100%; max-height: min(46dvh,400px); object-fit: contain; margin: 0 0 12px; border-radius: 7px; background: #f5f5f5; }
.info-document { display: block; width: fit-content; min-height: 44px; padding: 10px 0; color: #ad1c24; }
.info-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.info-partners { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,145px),1fr)); gap: 8px; margin-bottom: 14px; }
.info-partners .info-block { display: flex; flex-direction: column-reverse; justify-content: start; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; }
.info-partners .info-image { height: 82px; margin: 0; padding: 4px; background: white; }
.preorder-note { padding: 10px 12px; border-left: 3px solid var(--red); background: #fff6f4; line-height: 1.4; }
#product-dialog > .dialog-surface { max-width: 960px; max-height: none; margin: auto; border: 0; border-radius: 14px; padding: 0; overscroll-behavior: contain; background: #fff; }
#product-image-dialog > .dialog-surface { width: min(100% - 24px,760px); margin: auto; }
#product-image-panel .photo { height: min(58dvh,520px); aspect-ratio: auto; grid-template: minmax(0,1fr) / minmax(0,1fr); background: white; }
#product-image-panel img { display: block; min-width: 0; min-height: 0; object-position: center; }
#product-image-title { font-size: clamp(18px,4vw,24px); overflow-wrap: anywhere; }
#product-panel { --detail-gutter: clamp(16px,3vw,36px); padding: 16px var(--detail-gutter); }
#product-panel:has(.detail-scroll) { height: 100%; padding: 0; overflow: hidden; display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 0; }
#product-title { font-size: clamp(20px,2.4vw,30px); letter-spacing: -.025em; line-height: 1.2; overflow-wrap: anywhere; }
.detail-overview #product-title { padding-right: 0; }
.detail-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px var(--detail-gutter); border-bottom: 1px solid var(--line); }
.detail-nav .close { position: static; flex: 0 0 44px; height: 44px; }
.detail-crumb { min-height: 44px; min-width: 0; background: none; border: 0; text-align: left; padding: 6px 0; color: var(--steel); font-size: 14px; overflow-wrap: anywhere; }
.detail-crumb:hover, .recent-item:hover { text-decoration: underline; }
.detail-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px var(--detail-gutter); }
.detail-main { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.25fr); grid-template-rows: auto 1fr; grid-template-areas: 'media title' 'media pricing'; gap: 12px 20px; }
.detail-media { position: relative; grid-area: media; display: grid; grid-template-rows: minmax(0,1fr); }
.detail-main .photo { height: clamp(220px,39dvh,320px); min-height: 100%; aspect-ratio: auto; grid-template: minmax(0,1fr) / minmax(0,1fr); background: #f4f4f5; }
.detail-main .photo img { display: block; min-width: 0; min-height: 0; width: 100%; height: 100%; padding: 8px; object-fit: contain; object-position: center; }
.detail-zoom { position: absolute; bottom: 9px; right: 9px; }
.detail-overview { grid-area: title; min-width: 0; }
.detail-title-row { display: flex; justify-content: space-between; align-items: start; gap: 6px; }
.detail-tools { display: flex; flex-shrink: 0; gap: 6px; }
.detail-tools .small-button, .detail-copy, .detail-zoom { width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.detail-tools .save-product { position: static; }
.detail-copy { border-color: transparent; }
.detail-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--steel); overflow-wrap: anywhere; }
.specs { display: grid; grid-template-columns: auto minmax(0,1fr); margin: 0; gap: 5px 12px; font-size: 14px; }
.specs dt { color: var(--steel); }
.specs dd { margin: 0; overflow-wrap: anywhere; }
.maker-logo { display: block; height: 35px; max-width: 130px; object-fit: contain; margin-bottom: 12px; }
.detail-meta .maker-logo { margin: 0; height: 24px; max-width: 80px; }
.detail-pricing { grid-area: pricing; min-width: 0; border-radius: 8px; padding: 12px 14px; background: #f4f4f5; }
.detail-pricing .detail-buy-action { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.detail-order-controls { display: grid; align-items: end; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px 12px; }
.detail-field-label { display: block; margin-bottom: 3px; font-size: 13px; color: var(--steel); }
.detail-order-controls .purchase-stepper { max-width: 180px; background: white; border: 1px solid var(--line); }
.detail-order-controls .purchase-stepper button { min-height: 44px; }
.detail-sum { border-left: 1px solid var(--line); padding-inline-start: 12px; }
.detail-subtotal { display: block; font-size: clamp(18px,2vw,24px); font-weight: 750; overflow-wrap: anywhere; }
.detail-order-controls .buy-product { grid-column: 1 / -1; }
.cross-numbers { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,90px),1fr)); gap: 6px; max-width: 560px; }
.cross-number { max-width: 100%; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: #f4f4f5; overflow-wrap: anywhere; }
.cross-number:hover { border-color: var(--red); color: #ad1c24; }
.detail-price { display: block; margin-bottom: 3px; font-size: clamp(21px,2.4vw,28px); overflow-wrap: anywhere; }
.detail-stock-unknown, .detail-share-status { color: var(--steel); font-size: 14px; }
.detail-share-status:not(:empty) { margin-top: 8px; }
.detail-share-status input { width: 100%; min-height: 44px; }
.detail-block { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.description-copy { white-space: pre-line; overflow-wrap: anywhere; font-size: 15px; }
.description-copy.clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.detail-block .text-action { min-height: 44px; }
.text-action { border: 0; background: none; padding: 10px 0; text-align: left; color: #ad1c24; }
.recent-products { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(132px,42vw,170px); gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; list-style: none; margin: 0; padding: 3px 3px 8px; scroll-padding-inline: 3px; }
.recent-products li { min-width: 0; scroll-snap-align: start; }
.recent-item { display: grid; align-content: start; gap: 6px; width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: white; text-align: left; color: var(--ink); }
.recent-item:focus-visible { outline-offset: -2px; }
.recent-item .photo { height: 100px; aspect-ratio: auto; grid-template: minmax(0,1fr) / minmax(0,1fr); }
.recent-item .photo img { display: block; min-width: 0; min-height: 0; object-position: center; padding: 4px; }
.recent-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 14px; line-height: 1.25; }
.recent-price { font-size: 14px; }
.detail-actions { justify-content: flex-end; padding: 8px var(--detail-gutter) 10px; border-top: 1px solid var(--line); background: white; }
.detail-actions .detail-buy-action { width: 100%; }
@media (max-width:660px) {
  .detail-main { grid-template-columns: minmax(0,1fr); grid-template-rows: auto; grid-template-areas: 'title' 'media' 'pricing'; gap: 8px; }
  .detail-main .photo { height: clamp(124px,24dvh,184px); min-height: 0; }
  .detail-main .photo:has(> .icon) { height: 94px; }
  .detail-pricing { padding: 8px 10px; }
  .detail-actions { padding-inline: 10px; }
  .stock-label { font-size: 12px; }
}

.account-state-notice,.account-cart-migration { margin: 12px 0; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff8e8; }
.account-cart-migration p { margin: 8px 0 12px; }

@media (pointer: coarse) {
  .tg-fullscreen { --app-top: max(48px, var(--safe-top)); }
}
.cart-bar { left: var(--safe-left); right: var(--safe-right); width: auto; padding-bottom: max(10px, var(--safe-bottom)); }
body:has(.cart-bar:not([hidden])) .store-footer { padding-bottom: calc(70px + var(--safe-bottom)); }
.dialog-surface { max-height: calc(100dvh - var(--app-top) - var(--safe-bottom) - 16px); }
#menu-dialog > .dialog-surface {
  --from-transform: translateX(-100%); --to-transform: translateX(-100%);
  inset: 0 auto 0 0; margin: 0; width: min(350px, 86vw); height: 100dvh;
  max-width: none; max-height: none; padding: var(--app-top) 0 var(--safe-bottom) var(--safe-left);
  display: grid; grid-template-rows: auto minmax(0,1fr); overflow: hidden;
  border: 0; border-radius: 0; overscroll-behavior: contain; box-shadow: 6px 0 26px #0002;
}
#product-dialog > .dialog-surface {
  inset: var(--app-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  width: calc(100% - var(--safe-left) - var(--safe-right) - 48px);
  height: min(740px,calc(100dvh - var(--app-top) - var(--safe-bottom) - 48px));
}
.cart-product, .saved-product {
  display: grid; grid-template-columns: 52px minmax(0,1fr); align-items: center;
  column-gap: 10px; min-width: 0; border: 0; background: transparent; text-align: left;
}
.cart-product { padding: 0; }
.cart-product .photo, .saved-product .photo { grid-row: 1 / span 2; height: 52px; width: 52px; aspect-ratio: 1; }
.cart-product .photo .icon, .saved-product .photo .icon { width: 24px; height: 24px; }
.saved-product small { grid-column: 2; }
.cart-product:hover strong, .saved-product:hover { text-decoration: underline; }
.clear-cart { justify-self: start; border: 0; background: none; color: var(--steel); min-height: 44px; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }
.quick-sections {
  display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-width: thin;
}
.quick-link { display: flex; flex: 0 0 clamp(245px,36vw,490px); height: clamp(88px,8vw,104px); gap: 16px; padding: 0 14px 0 0; text-align: left; scroll-snap-align: start; font-size: 16px; }
.quick-link img { width: 32%; height: 100%; }
.quick-link img.quick-brand { object-fit: contain; padding: 10px; background: white; }
.address-options { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 6px; max-height: 190px; overflow-y: auto; overscroll-behavior: contain; }
.address-options li { padding: 12px; min-height: 44px; cursor: pointer; }
.address-options li + li { border-top: 1px solid var(--line); }
.address-options li:hover, .address-options li[aria-selected="true"] { background: #f3f5f7; }
.quick-link .icon { display: inline-flex; flex: 0 0 16px; }
.card .photo { position: relative; }
.card .photo .maker-logo { position: absolute; left: 6px; bottom: 6px; width: 53px; height: 26px; object-fit: contain; margin: 0; padding: 3px; background: white; border: 1px solid var(--line); border-radius: 3px; }
.maker-name, .card .photo .maker-name { width: fit-content; max-width: 80%; height: auto; padding: 4px 7px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 660px) {
  dialog:not(#menu-dialog):not(#product-dialog):not(#product-image-dialog) > .dialog-surface { max-height: calc(100dvh - var(--app-top) - 44px); padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left); }
  #product-dialog > .dialog-surface {
    inset: auto var(--safe-right) 0 var(--safe-left); margin: 0;
    width: calc(100% - var(--safe-left) - var(--safe-right)); height: calc(100dvh - var(--app-top) - 44px);
    border-radius: 14px 14px 0 0;
  }
  .detail-actions { padding-bottom: max(10px,var(--safe-bottom)); }
}

