@font-face {
  font-family: Manrope;
  src: url("/assets/fonts/Manrope-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: NauryzRedKeds;
  src: url("/assets/fonts/NauryzRedKeds.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #f3f3f3;
  --ink: #111;
  --muted: #6b6b6b;
  --card: #fff;
  --line: #e2e2e2;
  --accent: #111;
  --soft: #4a4a4a;
  --fill: #ececec;
  --ok: #2f6b4f;
  --font: Manrope, system-ui, "Segoe UI", sans-serif;
  --shell-bg: #151515;
  --shell-border: #2c2c2c;
  --shell-text: #f4f4f4;
  --shell-muted: #a3a3a3;
  --shell-hover: rgba(255, 255, 255, .08);
  --overlay-backdrop: rgba(0, 0, 0, .55);
  /* Ниже .modal / шапки (40), .toast (70), .screen-overlay (80) */
  --buy-bar-z: 35;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.5 var(--font);
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
.product-meta a,
.prose a,
.toggle-text a {
  border-bottom: 1px solid currentColor;
}
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-bottom: 48px; min-height: 50vh; }
.impersonate-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #111;
  color: #fff;
  padding: 10px 0;
}
.impersonate-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.impersonate-bar button {
  background: #fff;
  color: #111;
  border: 0;
  border-radius: 8px;
  height: 34px;
  padding: 0 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.impersonate-bar + .top { top: 54px; }
.top {
  background: var(--shell-bg);
  border-bottom: 1px solid var(--shell-border);
  color: var(--shell-text);
  position: sticky;
  top: 0;
  z-index: 20;
}
.top .logo-block { color: var(--shell-text); }
.top .logo-img,
.foot .foot-logo img {
  filter: brightness(0) invert(1);
}
.top .tagline { color: var(--shell-muted); }
.top .btn-catalog {
  background: #fff;
  color: var(--shell-bg);
  border-color: #3a3a3a;
}
.top .btn-catalog:hover {
  background: #e8e8e8;
  color: var(--shell-bg);
}
.top .icon-btn { color: var(--shell-text); }
.top .icon-btn:hover {
  background: var(--shell-hover);
  color: #fff;
}
.top .icon-btn .badge {
  background: #fff;
  color: var(--shell-bg);
}
.top .wrap,
.foot .wrap {
  padding-left: 32px;
  padding-right: 32px;
}
.top-inner {
  display: flex;
  align-items: center;
  gap: 16px 20px;
  padding: 12px 0;
}
.logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  line-height: 1.15;
  flex-shrink: 0;
}
.logo-img {
  display: block;
  height: 32px;
  width: auto;
  max-width: min(128px, 38vw);
}
.tagline {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .02em;
  margin-top: 3px;
  text-align: center;
  width: 100%;
}
.btn-catalog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 9px 14px;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.btn-catalog .ico { width: 16px; height: 16px; fill: currentColor; }
.btn-catalog:hover { background: var(--soft); color: #fff; }
.header-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}
.icon-btn:hover { background: var(--fill); color: var(--ink); }
.icon-btn .ico { width: 22px; height: 22px; display: block; }
.icon-btn .badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 700;
}
.btn {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.flash { position: relative; z-index: 90; padding: 10px 16px; text-align: center; }
[hidden] { display: none !important; }
.flash.ok { background: #e7f5ec; }
.flash.err { background: #fde8e6; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 70;
  max-width: min(420px, calc(100vw - 32px));
  margin: 0;
  padding: 13px 18px;
  border-radius: 12px;
  background: #151515;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .22);
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  pointer-events: none;
  transition: opacity .28s ease, transform .28s ease;
}
.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.err { background: #7a3030; }
@keyframes cart-pop {
  0% { transform: scale(.55); }
  55% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.icon-btn.is-bump .badge { animation: cart-pop .4s ease; }
.hero {
  padding: 40px 0 16px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 12px;
  font-family: NauryzRedKeds, Manrope, sans-serif;
  font-weight: 400;
  font-size: clamp(32px, 4.6vw, 48px);
  letter-spacing: .02em;
  line-height: 1.15;
  background-image: linear-gradient(
    105deg,
    #161616 0%,
    #161616 28%,
    #7a7a7a 42%,
    #ffffff 50%,
    #7a7a7a 58%,
    #161616 72%,
    #161616 100%
  );
  background-size: 280% 100%;
  background-position: 100% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: hero-sheen 4.2s ease-in-out infinite;
}
@keyframes hero-sheen {
  0%, 18% { background-position: 130% 50%; }
  62%, 100% { background-position: -30% 50%; }
}
.hero p {
  margin: 0 auto;
  color: var(--muted);
  max-width: 640px;
}
.catalog-home h2 { margin: 28px 0 16px; font-size: 22px; }
.brand-block {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(72px, 108px) minmax(0, 1fr);
  gap: 20px 28px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 28px;
  margin-bottom: 16px;
}
.brand-intro { min-width: 0; }
.brand-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
}
.brand-title {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.05;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.brand-title a {
  color: inherit;
  text-decoration: none;
}
.brand-title a:hover { color: var(--soft); }
.brand-count {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.brand-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 120px;
}
.brand-visual img {
  display: block;
  max-height: 132px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.brand-visual--empty { min-height: 0; }
.brand-subs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 36px;
  align-content: start;
}
.brand-sub {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  font-size: 13px;
  line-height: 1.35;
  min-width: 0;
  max-width: 100%;
}
.brand-sub-name {
  font-weight: 700;
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-decoration: underline;
  text-decoration-color: #b8b8b8;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.catalog-subs.brand-subs .brand-sub,
.catalog-subs.brand-subs .brand-sub-name {
  text-decoration: none;
  border-bottom: none;
}
.brand-sub:hover .brand-sub-name { color: var(--soft); }
.brand-sub-count {
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-compact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.brand-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 132px;
  padding: 18px 0 18px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}
.brand-compact:hover {
  background: #fff;
}
.brand-compact-text {
  min-width: 0;
  padding-right: 8px;
}
.brand-compact-title {
  margin: 0 0 8px;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.1;
  letter-spacing: .01em;
  text-transform: none;
  display: inline-block;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-compact .brand-kicker { margin-bottom: 10px; }
.brand-compact .brand-count { font-size: 14px; }
.brand-compact-visual {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  align-self: stretch;
  flex-shrink: 0;
  padding-right: 6px;
}
.brand-compact-visual img {
  display: block;
  max-height: 118px;
  width: auto;
  max-width: 108px;
  object-fit: contain;
  object-position: right bottom;
}
.chips a, .chip-btn {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  text-decoration: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.chips em { font-style: normal; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
a, .btn, .btn-catalog, .icon-btn, .fav-btn, .qty-btn, .chip-btn, .tab-nav button, .pager a, .brand-sub, .chips a, .variant-card, .overlay-close, .linkish, .toggle-ui, .choice-ui, .file-ui {
  transition: color .4s ease, background-color .4s ease, border-color .4s ease, opacity .4s ease, box-shadow .4s ease, transform .4s ease, filter .4s ease;
}
.card, .brand-block, .brand-compact, .card-wrap .card {
  transition: transform .5s ease, box-shadow .5s ease, border-color .5s ease, background-color .4s ease;
}
.card:hover, .brand-block:hover, .brand-compact:hover,
.brand-block.await-in.is-in:hover, .brand-compact.await-in.is-in:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(17, 17, 17, .08);
  z-index: 1;
}
.brand-block.await-in, .brand-compact.await-in {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .7s ease, transform .75s cubic-bezier(.22, 1, .36, 1), box-shadow .5s ease, border-color .5s ease, background-color .4s ease;
}
.brand-block.await-in.is-in, .brand-compact.await-in.is-in {
  opacity: 1;
  transform: none;
}
.card-wrap:hover {
  transform: translateY(-6px);
  z-index: 2;
}
.card-wrap:hover .card {
  box-shadow: 0 14px 32px rgba(17, 17, 17, .08);
  transform: none;
}
.card-wrap .card:hover { transform: none; }
.btn:hover, .search-big button:hover {
  background: var(--soft);
}
.btn.ghost:hover, .pager a:hover {
  background: var(--fill);
  border-color: #ccc;
}
main a:hover:not(.card):not(.logo-block):not(.btn):not(.icon-btn):not(.btn-catalog) {
  color: var(--soft);
}
.chips a:hover, .chip-btn:hover {
  background: #e6e6e6;
  color: var(--ink);
}
.qty-btn:hover { opacity: .55; }
.tab-nav button:hover { color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  a, .btn, .btn-catalog, .icon-btn, .fav-btn, .qty-btn, .chip-btn, .tab-nav button, .pager a, .brand-sub, .chips a, .card, .brand-block, .toggle-ui, .toggle-ui::after, .choice-ui, .file-ui {
    transition: none;
  }
  .card:hover, .brand-block:hover, .card-wrap:hover, .card-wrap:hover .card,
  .brand-block.await-in.is-in:hover, .brand-compact.await-in.is-in:hover { transform: none; }
  .hero h1 {
    animation: none;
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--ink);
  }
  .toast { transition: none; transform: translateX(-50%); }
  .icon-btn.is-bump .badge { animation: none; }
  .brand-block.await-in, .brand-compact.await-in,
  .brand-block.await-in.is-in, .brand-compact.await-in.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
.card.product strong {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.9em;
  font-size: 14px;
  line-height: 1.35;
  margin-top: 10px;
}
.thumb, .noimg, .photo-frame {
  aspect-ratio: 1;
  background: var(--fill);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  position: relative;
  color: var(--muted);
  font-size: 13px;
}
.thumb img, .photo-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--fill);
}
.card.product .thumb,
.card.product .thumb img {
  background: #fff;
}
.photo-frame img,
.main-photo {
  background: #fff;
}
.thumb .noimg, .photo-frame .noimg { position: absolute; inset: 0; }
.thumb.is-loading .noimg { visibility: hidden; }
.thumb .skel {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, #e6e6e6 0%, #f6f6f6 45%, #e6e6e6 90%);
  background-size: 220% 100%;
  animation: skel-shine 1.15s ease-in-out infinite;
}
.thumb:not(.is-loading) .skel { display: none; }
.thumb.is-loading img { opacity: 0; }
@keyframes skel-shine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .thumb .skel { animation: none; }
}
img.is-broken { display: none; }
.prices { margin-top: auto; padding-top: 8px; }
.prices.big { font-size: 22px; margin: 12px 0 16px; padding: 0; }
.from { color: var(--muted); font-weight: 400; }
.price-old { text-decoration: line-through; color: var(--muted); margin-right: 8px; font-size: .85em; }
.price-pro { color: var(--ok); font-weight: 700; }
.price.muted { color: #000; font-weight: 600; }
.crumbs { margin: 18px 0 8px; color: var(--muted); font-size: 14px; }
.crumbs a {
  color: inherit;
  border-bottom: 1px solid transparent;
}
.crumbs a:hover { border-bottom-color: currentColor; }
.sep { margin: 0 6px; }
.pager { display: flex; gap: 6px; margin: 24px 0; flex-wrap: wrap; align-items: center; }
html.js .pager-fallback { display: none; }
.catalog-more {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.catalog-more[hidden] { display: none !important; }
.catalog-more.is-loading .catalog-more-label { opacity: .55; }
.pager a, .pager span {
  min-width: 36px;
  text-align: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.pager span[aria-current] { background: var(--accent); color: #fff; border-color: var(--accent); }
.pager .dots { border: 0; background: transparent; min-width: 0; padding: 6px 2px; }
/* Фоновое видео карточки. Выключается флагом $productBgVideo в templates/product.php */
html:has(.product-bg) { overflow-x: clip; }
main.wrap:has(.product-bg) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
main.wrap:has(.product-bg) > .product-bg {
  grid-column: 1;
  grid-row: 1 / 3;
  position: relative;
  z-index: 0;
  pointer-events: none;
}
main.wrap:has(.product-bg) > .crumbs,
main.wrap:has(.product-bg) > .product-page,
main.wrap:has(.product-bg) > .product-tabs {
  position: relative;
  z-index: 1;
  grid-column: 1;
}
main.wrap:has(.product-bg) > .crumbs { grid-row: 1; }
main.wrap:has(.product-bg) > .product-page { grid-row: 2; }
main.wrap:has(.product-bg) > .product-tabs {
  grid-row: 3;
  background: var(--bg);
}
.product-bg video {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  object-fit: cover;
}
@media (prefers-reduced-motion: reduce) {
  .product-bg { display: none; }
}
.product-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; margin: 16px 0 28px; align-items: start; }
.photo-frame, .noimg.big { border: 1px solid var(--line); border-radius: 12px; }
.photo-frame { background: #fff; }
.noimg.big { background: var(--fill); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumbs button {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.product-buy h1 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; }
.card-wrap {
  position: relative;
  height: 100%;
  transition: transform .5s ease;
}
.card-wrap .card { height: 100%; }
.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 2px 8px rgba(17, 17, 17, .08);
}
.fav-btn .ico { width: 18px; height: 18px; }
.fav-btn.is-on { color: #c43b3b; }
.fav-btn.is-on .ico {
  fill: currentColor;
  stroke: currentColor;
}
.thumb > .fav-btn,
.photo-frame > .fav-btn,
.noimg.big > .fav-btn {
  top: 10px;
  right: 10px;
}
.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  margin: 0 0 10px;
  font-size: 13px;
  color: #000;
}
.product-meta a { color: inherit; }
.product-meta .dot { color: #b0b0b0; }
.variant-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
}
.variant-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 68px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  line-height: 1.3;
}
.variant-card.is-on {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.variant-card .v-name { font-size: 14px; font-weight: 600; }
.variant-card .v-price { font-size: 13px; color: var(--muted); margin-top: 4px; }
.variant-card.is-on .v-price { color: var(--ink); }
.field { display: grid; gap: 6px; font-size: 14px; color: var(--muted); margin: 12px 0; }
.field select, .qty-input, .form input, .form textarea, .form select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
}
.qty-input { width: 88px; }
.buy { display: flex; gap: 10px; align-items: stretch; margin-top: 8px; }
.buy .btn { height: 44px; padding: 0 22px; }
.qty-stepper {
  display: inline-flex;
  align-items: center;
  height: 44px;
  background: var(--fill);
  border-radius: 10px;
}
.qty-stepper input {
  width: 40px;
  height: 44px;
  border: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.table td:has(.qty-stepper) { vertical-align: middle; white-space: nowrap; }
.qty-btn {
  width: 40px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}
.stock-out { color: var(--accent); font-weight: 600; }
.product-text { margin-top: 8px; }
.product-tabs { margin-top: 28px; }
.tab-nav { display: flex; flex-wrap: wrap; gap: 4px 0; border-bottom: 1px solid var(--line); }
.tab-nav button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
  margin-bottom: -1px;
}
.tab-nav button.is-on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.tab-nav button:disabled { cursor: default; opacity: 1; }
.tab-panel { padding: 16px 2px 0; }
.tab-panel[hidden] { display: none; }
.doc-list { display: grid; gap: 10px; max-width: 560px; }
.doc-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
}
.doc-card:hover { border-color: #111; }
.doc-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #151515;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.doc-body { min-width: 0; }
.doc-body strong { display: block; font-size: 15px; line-height: 1.3; }
.doc-body small { color: var(--muted); font-weight: 700; font-size: 13px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
.screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: var(--overlay-backdrop);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.screen-overlay[hidden] { display: none !important; }
.screen-overlay > .overlay-close {
  z-index: 2;
  color: #fff;
}
.screen-overlay > .overlay-close:hover {
  background: rgba(255, 255, 255, .1);
}
body.is-locked { overflow: hidden; }
.overlay-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.overlay-close .ico { width: 26px; height: 26px; }
.overlay-close:hover { background: rgba(17, 17, 17, .06); }
.search-big {
  display: flex;
  width: min(640px, 92vw);
}
.search-big input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px 0 0 10px;
  background: #fff;
}
.search-big button {
  width: 58px;
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.search-big button .ico { width: 22px; height: 22px; }
.catalog-overlay {
  overflow: auto;
  padding: 56px 20px 32px;
}
.catalog-mega {
  position: relative;
  width: min(480px, 100%);
  max-height: min(86vh, 780px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 28px 8px 16px;
  box-shadow: 0 20px 50px rgba(17, 17, 17, .12);
}
.catalog-mega-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.catalog-mega-close .ico { width: 22px; height: 22px; }
.catalog-mega-close:hover { background: var(--fill); }
.catalog-mega h2 {
  margin: 0 16px 12px;
  padding-right: 40px;
  font-size: 22px;
  line-height: 1.25;
}
.catalog-mega-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.catalog-mega-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  text-decoration: none;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
}
.catalog-mega-list a:hover {
  background: var(--bg);
  color: var(--ink);
}
.catalog-mega-list em {
  font-style: normal;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.auth-box {
  width: min(480px, 92vw);
  max-height: min(86vh, 780px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 22px;
  box-shadow: 0 20px 50px rgba(17, 17, 17, .12);
}
.auth-box h2 { margin: 0 0 16px; font-size: 22px; line-height: 1.25; }
.auth-actions { display: grid; gap: 10px; }
.auth-actions .btn { width: 100%; }
.auth-hint { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.auth-extra { margin: 12px 0 0; }
.auth-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}
.back-link .ico { width: 16px; height: 16px; }
.linkish {
  display: inline;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 1px solid currentColor;
}
.btn:disabled,
.btn:disabled:hover {
  background: #d4d4d4;
  color: #8a8a8a;
  cursor: not-allowed;
}
.smart-captcha { min-height: 102px; }
.auth-box .form {
  max-width: none;
  border: 0;
  padding: 0;
}
.form { display: grid; gap: 12px; max-width: 520px; background: #fff; padding: 18px; border-radius: 12px; border: 1px solid var(--line); }
.form > label { display: grid; gap: 6px; font-size: 14px; }
.form .btn { justify-self: start; min-width: 160px; }
.auth-box .form .btn { width: 100%; justify-self: stretch; min-width: 0; }
.form fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.radios label, .form fieldset label { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.form input[type="checkbox"], .form input[type="radio"] { width: auto; margin-top: 4px; }
.form fieldset.choice {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.choice legend {
  padding: 0;
  margin: 0 0 8px;
  font-size: 14px;
  float: none;
}
.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.form fieldset.choice .choice-card {
  display: block;
  margin: 0;
  cursor: pointer;
}
.choice-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.choice-ui {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
}
.choice-card input:checked + .choice-ui {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.choice-card:focus-within .choice-ui {
  box-shadow: 0 0 0 3px rgba(17, 17, 17, .16);
}
.form > label.file-pick { gap: 8px; cursor: pointer; }
.form > label.file-pick input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.file-title { font-size: 14px; }
.file-ui {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px dashed #c8c8c8;
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
}
.file-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #fff;
  flex-shrink: 0;
}
.file-ico .ico { width: 18px; height: 18px; }
.file-label {
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-pick:hover .file-ui {
  border-color: var(--ink);
  background: #e8e8e8;
}
.file-pick.has-file .file-ui {
  border-style: solid;
  border-color: var(--ink);
  background: #fff;
}
.file-error {
  color: #9f1c14;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.file-pick.is-bad .file-ui {
  border-color: #9f1c14;
  background: #fde8e6;
}
.auth-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fde8e6;
  color: #9f1c14;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.file-pick:focus-within .file-ui {
  box-shadow: 0 0 0 3px rgba(17, 17, 17, .16);
}
.form > label.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  line-height: 1.35;
}
.form > label.toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.toggle-ui {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: #d6d6d6;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, .06);
}
.toggle-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(17, 17, 17, .22);
  transition: transform .4s ease;
}
.toggle input:checked + .toggle-ui {
  background: var(--accent);
}
.toggle input:checked + .toggle-ui::after {
  transform: translateX(18px);
}
.toggle:focus-within .toggle-ui {
  box-shadow: 0 0 0 3px rgba(17, 17, 17, .16);
}
.toggle-text { min-width: 0; flex: 1; }
.toggle-text a { color: inherit; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.address-suggest {
  position: relative;
}
.address-suggest label {
  display: block;
}
.address-suggest-list {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% - 4px);
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(17, 17, 17, .12);
  max-height: 240px;
  overflow-y: auto;
}
.address-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 14px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.address-suggest-item:hover,
.address-suggest-item.is-active {
  background: var(--fill);
}
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(260px, 1fr);
  gap: 20px;
  align-items: start;
}
.checkout-layout .form { max-width: none; }
.checkout-side {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.checkout-side h2 { margin: 0 0 14px; font-size: 18px; }
.checkout-lines { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.checkout-lines li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.checkout-lines strong { font-weight: 700; white-space: nowrap; }
.checkout-note { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.pay-note { margin: 0; font-size: 14px; font-weight: 600; }
.form fieldset.choice[data-receive] {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 14px 14px;
}
.form fieldset.choice[data-receive] > legend {
  width: auto;
  margin: 0 0 10px 2px;
  padding: 0 6px;
}
.form fieldset.choice .ship-fields { display: grid; gap: 12px; margin-top: 12px; }
.form fieldset.choice .ship-fields label { display: grid; gap: 6px; margin: 0; font-size: 14px; }
.pickup-note { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.promo-block { display: grid; gap: 8px; justify-items: start; }
.promo-block.is-open .promo-toggle { display: none; }
.promo-toggle {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px dotted #a3a3a3;
}
.promo-toggle:hover {
  color: var(--ink);
  border-bottom-color: currentColor;
}
.promo-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.promo-row .btn { min-width: 0; height: 42px; }
.promo-status { margin: 0; font-size: 14px; font-weight: 600; }
.promo-status.ok { color: var(--ok); }
.promo-status.err { color: #8d2d2d; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 20px; }
.catalog-subs-panel {
  margin: 12px 0 20px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.catalog-subs-panel .catalog-subs { margin: 0; }
.reels { display: flex; align-items: flex-start; gap: 10px; overflow-x: auto; padding: 8px 0 20px; }
.reel {
  min-width: 92px;
  width: 92px;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: visible;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.reel img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  box-sizing: border-box;
  border: 2px solid #111;
  border-radius: 18px;
}
.reel.is-seen img { border-color: #a3a3a3; }
.reel span {
  display: block;
  padding: 8px 2px 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: #111;
}
.modal {
  position: fixed;
  inset: 0;
  background: var(--overlay-backdrop);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  place-items: center;
  padding: 16px;
  z-index: 40;
}
.modal.is-open, .modal:not([hidden]) { display: grid; }
.modal[hidden] { display: none !important; }
.modal-box { background: #fff; max-width: 640px; width: 100%; max-height: 90vh; overflow: auto; padding: 16px 20px 20px; border-radius: 12px; position: relative; }
.modal-close {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 3;
  background: #fff;
  color: #111;
  font-size: 26px;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(17, 17, 17, .16);
  cursor: pointer;
  line-height: 1;
  width: 36px;
  height: 36px;
  padding: 0;
}
.slider { position: relative; margin: 0 0 14px; }
.slider[hidden] { display: none !important; }
.slider-view {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  touch-action: pan-y pinch-zoom;
}
.slider-view img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  display: block;
  background: #fff;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
  box-shadow: 0 4px 16px rgba(17, 17, 17, .16);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  padding: 0;
}
.slider-prev { left: 8px; }
.slider-next { right: 8px; }
.slider-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.slider-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d4d4d4;
  cursor: pointer;
}
.slider-dots button.is-on { background: #111; }
.prose { max-width: 760px; }
.prose :where(p, li, span, div, td, th) {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
}
.prose img { height: auto; }
.catalog-intro.prose {
  position: relative;
  max-width: none;
  margin: 0 0 20px;
  padding: 18px 22px;
  line-height: 1.55;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
}
.catalog-intro.prose:not(.is-open):not(.is-short) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.catalog-intro.prose.is-open,
.catalog-intro.prose.is-short {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  cursor: auto;
}
.catalog-intro.prose:not(.is-open):not(.is-short)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  border-radius: 0 0 15px 15px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .72) 55%, #fff);
  pointer-events: none;
}
.cart-total { font-size: 18px; }
.cart-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.foot {
  margin-top: 40px;
  background: var(--shell-bg);
  border-top: 1px solid var(--shell-border);
  color: var(--shell-text);
}
.foot-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 32px;
  align-items: start;
  padding: 32px 0 36px;
  font-size: 14px;
  line-height: 1.55;
}
.foot-col { min-width: 0; }
.foot p { margin: 0 0 10px; color: var(--shell-muted); }
.foot p:last-child { margin-bottom: 0; }
.foot strong { color: var(--shell-text); font-weight: 700; }
.foot-col p a {
  color: var(--shell-text);
  border-bottom: 1px solid transparent;
}
.foot-col p a:hover {
  color: #fff;
  border-bottom-color: currentColor;
}
.foot-logo {
  display: inline-block;
  margin-bottom: 10px;
}
.foot-logo img {
  display: block;
  height: 24px;
  width: auto;
  max-width: 100px;
}
.foot-lead {
  margin: 0 0 12px !important;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--shell-text) !important;
  line-height: 1.2;
}
.foot-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--shell-muted);
}
.foot-bullets li { margin: 0 0 6px; }
.foot-bullets li:last-child { margin-bottom: 0; }
.foot-links {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.foot-links a {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  color: var(--shell-muted);
  font-weight: 500;
  border-bottom: 1px solid transparent;
}
.foot-links a:hover {
  color: #fff;
  border-bottom-color: currentColor;
}
.sr { position: absolute; left: -9999px; }
.inline { display: inline; }
.admin-edit-fab {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 26;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(21, 21, 21, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(17, 17, 17, .18);
  transition: background-color .25s ease, opacity .25s ease, transform .25s ease;
}
.admin-edit-fab:hover {
  background: #151515;
  color: #fff;
  transform: translateY(-1px);
}
body:has(form.buy) .admin-edit-fab {
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 860px) {
  .admin-edit-fab {
    left: 12px;
    bottom: 12px;
    padding: 9px 14px;
    font-size: 12px;
  }
  body:has(form.buy) .admin-edit-fab {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 860px) {
  body { font-size: 14px; }
  .grid.products,
  .grid.grid-favorites {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .grid.products .card,
  .grid.grid-favorites .card { padding: 8px; border-radius: 10px; }
  .grid.products .card.product strong,
  .grid.grid-favorites .card.product strong {
    font-size: 12px;
    -webkit-line-clamp: 2;
    min-height: 2.5em;
    margin-top: 6px;
  }
  .grid.products .prices,
  .grid.grid-favorites .prices { font-size: 12px; }
  .grid.products .fav-btn,
  .grid.grid-favorites .fav-btn { width: 32px; height: 32px; }
  .grid.products .fav-btn .ico,
  .grid.grid-favorites .fav-btn .ico { width: 16px; height: 16px; }
  .grid.products .thumb > .fav-btn,
  .grid.grid-favorites .thumb > .fav-btn {
    top: 4px;
    right: 4px;
  }
  .hero p { font-size: 14px; }
  .top .wrap,
  .foot .wrap,
  main.wrap {
    padding-left: 12px;
    padding-right: 12px;
  }
  .catalog-overlay { padding-left: 12px; padding-right: 12px; }
  .toast { max-width: min(420px, calc(100vw - 24px)); }
  .top-inner { gap: 8px; }
  .header-actions { gap: 0; order: 1; }
  .icon-btn { width: 34px; height: 38px; }
  .btn-catalog { order: 2; gap: 0; padding: 7px 10px; font-size: 13px; }
  .btn-catalog .ico { display: none; }
  .brand-block {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "intro visual"
      "subs subs";
    padding: 18px 20px;
    gap: 16px 20px;
  }
  .brand-intro { grid-area: intro; }
  .brand-visual {
    grid-area: visual;
    min-height: 0;
    align-self: center;
  }
  .brand-visual img { max-height: 104px; }
  .brand-subs {
    grid-area: subs;
    grid-template-columns: 1fr;
    gap: 8px 0;
  }
  .catalog-subs.brand-subs {
    grid-template-columns: 1fr;
    gap: 8px 0;
  }
  .brand-block {
    position: relative;
    max-height: 340px;
    overflow: hidden;
    cursor: pointer;
  }
  .brand-block.is-open,
  .brand-block.is-short {
    max-height: none;
    overflow: visible;
    cursor: auto;
  }
  .brand-block:not(.is-open):not(.is-short)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 44px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(210, 210, 210, .72) 55%, #d5d5d5);
    pointer-events: none;
  }
  .catalog-intro.prose {
    padding: 16px 18px;
    margin-bottom: 16px;
  }
  .brand-compact-grid {
    grid-template-columns: 1fr;
  }
  .product-page, .split, .foot-inner, .checkout-layout { grid-template-columns: 1fr; }
  .checkout-layout .checkout-side { order: -1; }
  /* form.buy внутри .product-page: без z-index у страницы fixed-панель не уходит над .product-tabs */
  main.wrap:has(.product-bg) > .product-page {
    z-index: auto;
  }
  form.buy {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--buy-bar-z);
    width: 100%;
    margin: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 28px rgba(17, 17, 17, .08);
    gap: 8px;
  }
  form.buy .qty-stepper { flex-shrink: 0; }
  form.buy .btn { flex: 1; }
  body:has(form.buy) .toast { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  main.wrap:has(form.buy) { padding-bottom: 100px; }
  body:has(form.buy) .foot { padding-bottom: 88px; }
  .cart-form { min-width: 0; max-width: 100%; box-sizing: border-box; }
  .cart-form .table-wrap { overflow: visible; max-width: 100%; }
  .cart-form .cart-table { display: block; width: 100%; background: transparent; }
  .cart-form .cart-table thead { display: none; }
  .cart-form .cart-table tbody {
    display: grid;
    gap: 12px;
  }
  .cart-form .cart-table tr {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "price"
      "qty"
      "total";
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
  }
  .cart-form .cart-table td {
    display: block;
    border: 0;
    padding: 0;
    min-width: 0;
  }
  .cart-form .cart-table td:nth-child(1) { grid-area: name; }
  .cart-form .cart-table td:nth-child(1) a {
    overflow-wrap: anywhere;
    word-break: break-word;
    font-weight: 600;
    line-height: 1.35;
  }
  .cart-form .cart-table td:nth-child(2) { grid-area: price; }
  .cart-form .cart-table td:nth-child(3) {
    grid-area: qty;
    justify-self: start;
  }
  .cart-form .cart-table td:nth-child(3):has(.qty-stepper) { white-space: normal; }
  .cart-form .cart-table td:nth-child(3) .qty-stepper {
    max-width: 100%;
    height: 36px;
    border-radius: 8px;
  }
  .cart-form .cart-table td:nth-child(3) .qty-stepper input {
    width: 32px;
    height: 36px;
    font-size: 14px;
  }
  .cart-form .cart-table td:nth-child(3) .qty-btn {
    width: 32px;
    height: 36px;
    font-size: 18px;
  }
  .cart-form .cart-table td:nth-child(4) {
    grid-area: total;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-weight: 600;
  }
  .cart-form .cart-table td:nth-child(2)::before,
  .cart-form .cart-table td:nth-child(3)::before {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
  }
  .cart-form .cart-table td:nth-child(2)::before { content: "Цена"; }
  .cart-form .cart-table td:nth-child(3)::before { content: "Количество"; }
  .cart-form .cart-table td:nth-child(4)::before {
    content: "Сумма";
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
  }
  .cart-form .cart-total {
    margin-top: 16px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
  }
  .cart-form .cart-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 12px;
    gap: 10px;
  }
  .cart-form .cart-actions > * { width: 100%; text-align: center; box-sizing: border-box; }
}
@media (max-width: 379px) {
  .top-inner { gap: 8px; }
  .logo-img { height: 22px; max-width: 86px; }
  .tagline { font-size: 8px; margin-top: 2px; }
  .header-actions { gap: 0; }
  .icon-btn { width: 32px; height: 36px; }
  .icon-btn .ico { width: 20px; height: 20px; }
  .btn-catalog { padding: 7px 8px; font-size: 13px; }
}
