:root {
  --page: #fafafa;
  --page-soft: #f2f0f5;
  --surface: #ffffff;
  --surface-muted: #fafcfd;
  --text: #3a3d4a;
  --heading: #20212a;
  --muted: #706e7e;
  --muted-2: #7e899c;
  --border: #dfe3ee;
  --border-strong: #a4a9bc;
  --primary: #9e6afb;
  --primary-deep: #773df3;
  --info: #4c8dca;
  --success: #2c8f6c;
  --scrollbar-thumb: rgba(126, 137, 156, 0.34);
  --scrollbar-track: rgba(223, 227, 238, 0.36);
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-sheet: 24px;
  --shadow-card: 0 10px 28px rgba(69, 44, 113, 0.08);
  --shadow-soft: 0 6px 18px rgba(16, 24, 40, 0.07);
  --shadow-sheet: 0 -18px 54px rgba(30, 30, 44, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--page);
}

body {
  min-height: 100dvh;
  background: linear-gradient(180deg, #ffffff 0, var(--page) 180px, var(--page-soft) 100%);
  color: var(--text);
  font-family: "Manrope", Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

body.sheet-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  --header-brand-track: 122px;
  --header-gap: 12px;
  display: grid;
  grid-template-columns: minmax(98px, 122px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0 -16px 18px;
  padding: calc(9px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--border-strong);
  background: rgba(250, 250, 250, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  cursor: pointer;
  line-height: 0;
  text-align: left;
}

.brand:focus-visible {
  outline: none;
}

.brand-logo {
  width: 112px;
  height: auto;
  flex: 0 1 auto;
}

.search-panel {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
}

.search-panel::after {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 18px;
  height: 18px;
  pointer-events: none;
  content: "";
  background: var(--muted-2);
  -webkit-mask: no-repeat center / 18px 18px
    url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m21 21-4.35-4.35M10.5 18a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15Z' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  mask: no-repeat center / 18px 18px
    url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m21 21-4.35-4.35M10.5 18a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15Z' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  transform: translateY(-50%);
}

.search-panel.is-search-focused::after {
  background: var(--primary-deep);
}

.search-panel input {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 9px 42px 9px 12px;
  border: 1px solid var(--border-strong);
  border-left: 0;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  outline: none;
  background: var(--surface-muted);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  color: var(--text);
  font-size: 15px;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.search-panel input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search-panel input:focus {
  border-color: var(--primary-deep);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.category-bar {
  grid-column: 1 / -1;
  position: relative;
  min-width: 0;
  margin: 0 -16px -2px;
  overflow: hidden;
}

.category-menu-btn {
  display: flex;
  width: 100%;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-right: 1px solid var(--border-strong);
  border-radius: var(--radius-xs) 0 0 var(--radius-xs);
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.category-menu-btn::before {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  background: var(--muted-2);
  content: "";
  -webkit-mask: no-repeat center / 18px 18px
    url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 3H3V10H10V3Z' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M21 3H14V10H21V3Z' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M21 14H14V21H21V14Z' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10 14H3V21H10V14Z' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask: no-repeat center / 18px 18px
    url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 3H3V10H10V3Z' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M21 3H14V10H21V3Z' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M21 14H14V21H21V14Z' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10 14H3V21H10V14Z' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.category-menu-label {
  display: none;
}

.search-panel.is-search-focused .category-menu-btn {
  border-color: var(--primary-deep);
  background: var(--surface);
}

.category-menu-btn:focus-visible,
.category-menu-btn[aria-expanded="true"] {
  border-color: var(--primary);
  background: var(--surface);
  color: var(--primary-deep);
}

.category-menu-btn:hover {
  background: var(--surface);
}

.category-menu-btn:focus-visible::before,
.category-menu-btn[aria-expanded="true"]::before {
  background: currentColor;
}

.category-list {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 16px 4px;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

@media (hover: hover) and (pointer: fine) {
  .category-list,
  .sheet-gallery-thumbs {
    cursor: grab;
  }

  .category-list.is-drag-scrolling,
  .sheet-gallery-thumbs.is-drag-scrolling {
    cursor: grabbing;
    user-select: none;
  }
}

.category-chip {
  flex: 0 0 auto;
  max-width: min(66vw, 260px);
  min-height: 34px;
  overflow: hidden;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease;
  white-space: nowrap;
}

.category-chip:hover,
.category-chip:focus-visible {
  border-color: var(--primary);
  color: var(--primary-deep);
}

.category-chip.is-active {
  border-color: var(--primary-deep);
  background: var(--primary-deep);
  box-shadow: 0 8px 18px rgba(119, 61, 243, 0.16);
  color: #ffffff;
}

.category-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: calc(-1 * (var(--header-brand-track) + var(--header-gap)));
  z-index: 45;
  display: grid;
  gap: 2px;
  width: auto;
  max-height: min(52dvh, 360px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.scroll-visual-bar {
  --scroll-thumb-size: 0px;
  --scroll-thumb-offset: 0px;
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: transparent;
  pointer-events: none;
}

.scroll-visual-bar[hidden] {
  display: none !important;
}

.scroll-visual-thumb {
  position: absolute;
  border-radius: inherit;
  background: var(--scrollbar-thumb);
}

.scroll-visual-bar.is-horizontal {
  height: 3px;
}

.scroll-visual-bar.is-horizontal .scroll-visual-thumb {
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--scroll-thumb-size);
  transform: translateX(var(--scroll-thumb-offset));
}

.scroll-visual-bar.is-vertical {
  width: 4px;
}

.scroll-visual-bar.is-vertical .scroll-visual-thumb {
  top: 0;
  right: 0;
  left: 0;
  height: var(--scroll-thumb-size);
  transform: translateY(var(--scroll-thumb-offset));
}

.category-scrollbar {
  margin: 0 16px 2px;
}

.category-menu-scrollbar {
  position: absolute;
  top: calc(100% + 14px);
  right: 4px;
  z-index: 46;
  height: calc(min(52dvh, 360px) - 16px);
}

.category-menu-item {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

.category-menu-item:hover,
.category-menu-item:focus-visible {
  background: var(--surface-muted);
  color: var(--primary-deep);
  outline: none;
}

.category-menu-item[aria-checked="true"] {
  background: var(--primary-deep);
  color: #ffffff;
}

.status-box,
.meta-row {
  color: var(--muted);
  font-size: 12px;
}

.status-box {
  min-height: 20px;
  margin: -4px 0 14px;
  padding: 0 2px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 16px 14px;
}

.product-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #efefef, #f2f0f5);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 160ms ease, transform 160ms ease;
}

.image-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.image-fallback.is-adult,
.sheet-image-fallback.is-adult,
.viewer-fallback.is-adult {
  background:
    linear-gradient(135deg, rgba(32, 33, 42, 0.92), rgba(58, 61, 74, 0.88)),
    var(--heading);
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.image-fallback.is-adult::after,
.sheet-image-fallback.is-adult::after {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.78);
  content: "Подтвердите возраст";
  font-size: 11px;
  font-weight: 600;
}

.image-wrap.is-clickable {
  cursor: pointer;
}

.product-image.is-adult-blurred,
.sheet-thumb-btn img.is-adult-blurred {
  filter: blur(12px);
  transform: scale(1.04);
}

.sheet-image.is-adult-blurred {
  --sheet-image-scale: 1.04;
  filter: blur(12px);
}

.image-wrap.is-adult-blocked::after,
.sheet-image-wrap.is-adult-blocked::after,
.sheet-thumb-btn.is-adult-blocked:not(.is-broken)::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: rgba(32, 33, 42, 0.18);
  color: #ffffff;
  content: "18+";
  font-weight: 800;
  letter-spacing: 0;
  pointer-events: none;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.34);
}

.image-wrap.is-adult-blocked::after,
.sheet-image-wrap.is-adult-blocked::after {
  font-size: 22px;
}

.sheet-thumb-btn.is-adult-blocked:not(.is-broken)::after {
  font-size: 13px;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
}

.product-title {
  display: -webkit-box;
  min-height: 2.76em;
  margin: 0;
  overflow: hidden;
  color: var(--heading);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-article {
  width: fit-content;
  max-width: 100%;
  margin: 1px 0 0;
  overflow: hidden;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--page-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-meta {
  display: block;
  margin: 0;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-price {
  margin: 1px 0 3px;
  overflow: hidden;
  color: var(--heading);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions {
  display: grid;
  gap: 7px;
  margin-top: auto;
}

.details-btn,
.contact-btn,
.load-more-btn,
.sheet-contact-btn {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-weight: 700;
  line-height: 1.15;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
}

.details-btn {
  width: 100%;
  padding: 9px 10px;
  border-color: var(--border);
  background: var(--surface-muted);
  color: var(--text);
  font-size: 12px;
}

.contact-btn,
.load-more-btn,
.sheet-contact-btn {
  background-color: var(--primary);
  background-image: radial-gradient(50% 50% at 50% 50%, var(--primary), var(--primary-deep));
  color: #ffffff;
}

.contact-btn {
  width: 100%;
  padding: 9px 8px;
  font-size: 11.5px;
}

.details-btn:hover,
.details-btn:focus-visible {
  border-color: var(--primary);
  color: var(--primary-deep);
}

.contact-btn:hover,
.contact-btn:focus-visible,
.load-more-btn:hover,
.load-more-btn:focus-visible,
.sheet-contact-btn:hover,
.sheet-contact-btn:focus-visible {
  box-shadow: 0 8px 18px rgba(119, 61, 243, 0.22);
}

.details-btn:active,
.contact-btn:active,
.load-more-btn:active,
.sheet-contact-btn:active {
  transform: translateY(1px);
}

.load-more-panel {
  display: grid;
  min-height: 74px;
  place-items: center;
  padding: 18px 0 4px;
}

.load-more-btn {
  min-width: min(100%, 260px);
  padding: 12px 18px;
  border-radius: var(--radius-xs);
  box-shadow: 0 10px 24px rgba(119, 61, 243, 0.18);
}

.load-more-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  color: var(--muted);
  font-size: 12px;
}

.load-more-status::before {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(158, 106, 251, 0.18);
  border-top-color: var(--primary-deep);
  border-radius: 50%;
  content: "";
  animation: spin 700ms linear infinite;
}

.load-more-sentinel {
  height: 1px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(29, 31, 46, 0.42);
  opacity: 0;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity 200ms ease;
}

.sheet-backdrop.is-open {
  opacity: 1;
}

.product-sheet {
  --sheet-drag-y: 0px;
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  display: flex;
  max-height: min(90dvh, 820px);
  flex-direction: column;
  padding-top: 12px;
  padding-bottom: env(safe-area-inset-bottom);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-sheet);
  transform: translateY(calc(105% + var(--sheet-drag-y)));
  transition: transform 240ms cubic-bezier(0.2, 0.86, 0.28, 1);
}

.product-sheet.is-open {
  transform: translateY(var(--sheet-drag-y));
}

.product-sheet.is-dragging {
  transition: none;
}

.sheet-handle {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 32px;
  flex: 0 0 auto;
  margin: -6px 0 -6px;
  background: transparent;
  cursor: grab;
  touch-action: none;
}

.sheet-handle::before {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #cfd4e3;
  content: "";
  transform: translateX(-50%);
}

.product-sheet.is-dragging .sheet-handle {
  cursor: grabbing;
}

.sheet-close-btn {
  position: absolute;
  top: 9px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  color: var(--heading);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.sheet-close-btn:hover,
.sheet-close-btn:focus-visible {
  border-color: var(--primary);
  color: var(--primary-deep);
}

.sheet-scroll {
  overflow-y: auto;
  max-height: calc(min(90dvh, 820px) - 26px - env(safe-area-inset-bottom));
  padding: 0 16px calc(16px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sheet-gallery {
  display: grid;
  gap: 10px;
  width: 100%;
}

.sheet-image-wrap {
  --sheet-slide-x: 0px;
  --sheet-image-scale: 1;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: var(--sheet-image-ratio, 4 / 3);
  width: 100%;
  min-height: clamp(190px, 42vw, 320px);
  max-height: min(68dvh, 560px);
  padding: 0;
  border: 1px solid rgba(223, 227, 238, 0.72);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  box-shadow: none;
  cursor: zoom-in;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.sheet-image-wrap:disabled {
  cursor: default;
  opacity: 1;
}

.sheet-image-wrap:focus-visible {
  border-color: var(--primary-deep);
  outline: 3px solid rgba(158, 106, 251, 0.18);
}

.sheet-image,
.sheet-image-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sheet-image {
  background: var(--surface-muted);
  object-fit: contain;
  transform: translate3d(var(--sheet-slide-x), 0, 0) scale(var(--sheet-image-scale));
  transition: filter 160ms ease, transform 190ms cubic-bezier(0.22, 0.9, 0.26, 1);
  will-change: transform;
}

.sheet-image-wrap.is-dragging .sheet-image,
.sheet-image-wrap.is-jumping .sheet-image {
  transition: none;
}

.sheet-image-fallback {
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.sheet-gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.sheet-gallery-thumbs::-webkit-scrollbar {
  display: none;
}

.sheet-thumbs-scrollbar {
  margin: -4px 1px 0;
}

.sheet-thumb-btn {
  position: relative;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-muted);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.sheet-thumb-btn:focus-visible {
  border-color: var(--primary-deep);
  outline: none;
}

.sheet-thumb-btn.is-active {
  border-width: 2px;
  border-color: var(--primary-deep);
  box-shadow: none;
  transform: none;
}

.sheet-thumb-btn.is-broken::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  content: "Нет фото";
  font-size: 10px;
  text-align: center;
}

.sheet-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 160ms ease, transform 160ms ease;
}

.sheet-body {
  display: grid;
  gap: 13px;
  padding: 15px 2px 0;
}

.sheet-article,
.sheet-title,
.sheet-price,
.sheet-description-block h3,
.sheet-description {
  margin: 0;
}

.sheet-article {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--page-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-title {
  color: var(--heading);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.sheet-price {
  color: var(--primary-deep);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

.sheet-price-block {
  display: grid;
  gap: 5px;
}

.sheet-price-disclaimer {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.sheet-specs {
  display: grid;
  gap: 0;
  margin: 2px 0 0;
  border-top: 1px solid var(--border);
}

.sheet-specs div {
  display: grid;
  grid-template-columns: minmax(108px, 0.42fr) 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.sheet-specs dt {
  color: var(--muted);
  font-size: 12px;
}

.sheet-specs dd {
  min-width: 0;
  margin: 0;
  color: var(--heading);
  overflow-wrap: anywhere;
  font-size: 13.5px;
  font-weight: 600;
}

.sheet-description-block {
  display: grid;
  gap: 9px;
  padding-top: 3px;
}

.sheet-description-block h3 {
  color: var(--heading);
  font-size: 16px;
  line-height: 1.3;
}

.sheet-description {
  color: var(--text);
  font-size: 14px;
  line-height: 1.62;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.sheet-contact-btn {
  position: sticky;
  bottom: max(10px, env(safe-area-inset-bottom));
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  padding: 13px 16px;
  border-radius: var(--radius-xs);
  box-shadow: 0 14px 30px rgba(119, 61, 243, 0.2);
  font-size: 14px;
}

.age-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(29, 31, 46, 0.48);
  opacity: 0;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity 180ms ease;
}

.age-modal-backdrop.is-open {
  opacity: 1;
}

.age-modal {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 18px;
  z-index: 130;
  display: grid;
  gap: 14px;
  max-width: 420px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sheet);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.age-modal.is-open {
  opacity: 1;
  transform: translateY(0);
}

.age-modal h2,
.age-modal p {
  margin: 0;
}

.age-modal h2 {
  color: var(--heading);
  font-size: 18px;
  line-height: 1.25;
}

.age-modal p {
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.55;
}

.age-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.age-confirm-btn,
.age-cancel-btn {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-weight: 700;
  line-height: 1.15;
}

.age-confirm-btn {
  background-color: var(--primary);
  background-image: radial-gradient(50% 50% at 50% 50%, var(--primary), var(--primary-deep));
  color: #ffffff;
}

.age-cancel-btn {
  border-color: var(--border);
  background: var(--surface-muted);
  color: var(--text);
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: calc(24px + env(safe-area-inset-top)) 14px calc(124px + env(safe-area-inset-bottom));
  background: rgba(9, 10, 16, 0.96);
  color: #ffffff;
  opacity: 0;
  transition: opacity 160ms ease;
  touch-action: none;
}

.image-viewer.is-open {
  opacity: 1;
}

.viewer-stage {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.image-viewer.has-multiple .viewer-stage::before,
.image-viewer.has-multiple .viewer-stage::after {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 16px;
  height: 16px;
  border-top: 2px solid rgba(255, 255, 255, 0.36);
  border-left: 2px solid rgba(255, 255, 255, 0.36);
  content: "";
  pointer-events: none;
}

.image-viewer.has-multiple .viewer-stage::before {
  left: max(18px, env(safe-area-inset-left));
  transform: translateY(-50%) rotate(-45deg);
}

.image-viewer.has-multiple .viewer-stage::after {
  right: max(18px, env(safe-area-inset-right));
  transform: translateY(-50%) rotate(135deg);
}

.viewer-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  transform: translate3d(var(--viewer-x, 0px), var(--viewer-y, 0px), 0) scale(var(--viewer-scale, 1));
  transform-origin: center;
  transition: transform 190ms cubic-bezier(0.22, 0.9, 0.26, 1);
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.viewer-stage.is-dragging .viewer-image {
  transition: none;
}

.viewer-stage.is-jumping .viewer-image {
  transition: none;
}

.viewer-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.74);
  text-align: center;
}

.viewer-nav-btn {
  display: none;
}

.viewer-bottom-panel {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 2;
  display: grid;
  width: min(320px, calc(100% - 28px));
  gap: 12px;
  justify-items: center;
  pointer-events: none;
  transform: translateX(-50%);
}

.viewer-dots {
  display: flex;
  max-width: 100%;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: auto;
  scrollbar-width: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.viewer-dots::-webkit-scrollbar {
  display: none;
}

.viewer-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.viewer-dot.is-active {
  background: var(--primary-deep);
  box-shadow: 0 0 0 3px rgba(158, 106, 251, 0.24);
}

.viewer-close-btn {
  display: inline-grid;
  width: min(230px, 100%);
  min-height: 50px;
  place-items: center;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  background-color: var(--primary);
  background-image: radial-gradient(50% 50% at 50% 50%, var(--primary), var(--primary-deep));
  box-shadow: 0 14px 30px rgba(119, 61, 243, 0.28);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.15;
  pointer-events: auto;
  transition: box-shadow 140ms ease, transform 140ms ease;
}

.viewer-close-btn:hover,
.viewer-close-btn:focus-visible {
  box-shadow: 0 16px 34px rgba(119, 61, 243, 0.36);
}

.viewer-close-btn:active {
  transform: translateY(1px);
}

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

@media (min-width: 769px) {
  .app-shell {
    padding-right: 20px;
    padding-left: 20px;
  }

  .app-header {
    margin-right: -20px;
    margin-left: -20px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .category-bar {
    margin-right: -20px;
    margin-left: -20px;
  }

  .category-list {
    padding-right: 20px;
    padding-left: 20px;
  }

  .category-scrollbar {
    margin-right: 20px;
    margin-left: 20px;
  }

  .product-card:hover {
    border-color: rgba(158, 106, 251, 0.42);
    box-shadow: 0 16px 40px rgba(69, 44, 113, 0.12);
    transform: translateY(-2px);
  }

  .product-sheet {
    right: auto;
    bottom: 24px;
    left: 50%;
    width: min(680px, calc(100% - 48px));
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius-sheet);
    transform: translateX(-50%) translateY(calc(100% + 34px + var(--sheet-drag-y)));
  }

  .product-sheet.is-open {
    transform: translateX(-50%) translateY(var(--sheet-drag-y));
  }

  .sheet-image-wrap {
    aspect-ratio: var(--sheet-image-ratio, 4 / 3);
  }
}

@media (max-width: 520px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .details-btn,
  .contact-btn {
    min-height: 38px;
  }
}

@media (max-width: 390px) {
  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .app-header {
    --header-brand-track: 104px;
    --header-gap: 9px;
    grid-template-columns: minmax(92px, 104px) minmax(0, 1fr);
    gap: 9px;
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .search-panel {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .category-bar {
    margin-right: -12px;
    margin-left: -12px;
  }

  .category-list {
    gap: 7px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .category-scrollbar {
    margin-right: 12px;
    margin-left: 12px;
  }

  .category-menu-btn {
    min-width: 44px;
  }

  .category-chip {
    min-height: 32px;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 11.5px;
  }

  .brand-logo {
    width: 100px;
  }

  .search-panel input {
    min-height: 42px;
    padding-left: 12px;
    font-size: 14px;
  }

  .product-grid {
    gap: 12px;
  }

  .card-body {
    padding: 9px;
  }

  .product-title {
    font-size: 13px;
  }

  .contact-btn {
    font-size: 11px;
  }

  .sheet-scroll {
    padding-right: 12px;
    padding-left: 12px;
  }

  .sheet-title,
  .sheet-price {
    font-size: 20px;
  }

  .sheet-specs div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .age-modal {
    right: 12px;
    left: 12px;
  }

  .age-modal-actions {
    grid-template-columns: 1fr;
  }
}
