:root {
  --preview-paper: #fcf9ef;
  --preview-yellow: #f5e653;
}
.hdr.preview-header { container-type: inline-size; width: min(calc(100% - 12px), calc(var(--wrap) + 16px)); margin: 6px auto 0; padding-top: clamp(10px, 1.35vw, 23px); border-radius: clamp(16px, 2vw, 30px); overflow: visible; position: relative; z-index: 4; background: var(--preview-paper); color: #161513; }
.preview-bar { padding: 0 clamp(16px,2.7cqw,70px) 0 5.8%; height: clamp(65px,4.75cqw,120px); display: flex; align-items: center; gap: clamp(14px,1.5cqw,40px); }
.preview-logo { width: clamp(144px,12.42cqw,334px); flex: none; }
.preview-logo img { display: block; width: 100%; height: auto; }
.preview-status { max-width: 23ch; border-left: 1px solid; padding-left: clamp(12px,1.8cqw,46px); font-weight: 650; font-size: clamp(13.8px,1.265cqw,32.2px); line-height: 1.1; }
.preview-status small { display: block; margin-top: 3px; color: #625e52; font-size: .66em; font-weight: 500; }
.preview-links { margin-left: auto; display: flex; align-items: center; gap: clamp(10px,1.35cqw,32px); }
.preview-links a { display: inline-flex; align-items: center; gap: .45em; font-weight: 650; font-size: clamp(12px,.99cqw,25px); white-space: nowrap; }
.preview-links a:last-child { border-left: 1px solid; padding-left: clamp(10px,1cqw,24px); }
.preview-links svg { width: 1.65em; height: 1.65em; }
.preview-links a:hover, .preview-tastes a:hover { color: #684914; }
.preview-hero { position: relative; isolation: isolate; min-height: 20cqw; }
.preview-copy { box-sizing: content-box; margin-left: 4.9%; width: 53.2%; padding: 1.35cqw 0 2.55cqw; }
.preview-heading { height: 1.04em; margin: 0 0 .08em; font: 900 clamp(48px,6.15cqw,166px)/1.04 Montserrat,Arial,sans-serif; letter-spacing: -.065em; white-space: nowrap; }
.preview-header .preview-search { position: relative; display: flex; align-items: center; gap: .9cqw; width: 100%; max-width: none; height: clamp(50px,4.2cqw,108px); padding: 0 0 .3cqw; margin: 0; background: transparent; border: 0; border-bottom: clamp(2px,.21cqw,5px) solid #161513; border-radius: 0; box-shadow: none; }
.preview-header .preview-search:focus-within { outline: none; border-color: #846a08; box-shadow: none; }
.preview-search > svg { width: clamp(24px,2.5cqw,60px); height: auto; flex: none; }
.preview-header .preview-search input[type=search] { min-width: 0; width: 100%; padding: 0; flex: 1; font: 550 clamp(18px,1.65cqw,42px)/1.15 Montserrat,Arial,sans-serif; background: transparent; color: #171614; }
.preview-header .preview-search input[type=search]:focus { outline: none; }
.preview-header .preview-search input::placeholder { color: #77756f; opacity: 1; }
.preview-header .preview-search button { flex: none; width: clamp(40px,3.55cqw,90px); height: auto; aspect-ratio: 1; border-radius: 50%; background: #111; color: #fff; display: grid; place-items: center; padding: 0; }
.preview-search button svg { width: 51%; height: 51%; }
.preview-tastes { display: flex; gap: 3.5cqw; margin-top: 1.1cqw; }
.preview-tastes a { position: relative; padding-bottom: .22em; font-size: clamp(16px,1.45cqw,38px); font-weight: 650; }
.preview-tastes a::after { content: ''; position: absolute; inset: auto 0 0; height: .24em; background: var(--preview-yellow); border-radius: .08em; }
.preview-art {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 41.5%;
  aspect-ratio: 783 / 346;
  pointer-events: none;
  z-index: -1;
}
.preview-ribbons {
  display: block;
  width: 100%;
  height: 100%;
  mask: url('img/plashka.svg') left center / auto 100% no-repeat;
}
.preview-dragon {
  position: absolute;
  top: -14.74%;
  left: 18.26%;
  width: 63.35%;
  height: auto;
  /* The sleeve curves up to the underarm, where the torso meets the panel edge. */
  clip-path: polygon(0 0, 100% 0, 100% 84.66%, 49.2% 84.66%, 47.7% 84.85%,
    46.8% 85.08%, 45.9% 85.4%, 44.5% 85.7%, 44.5% 100%, 0 100%);
}
html #side .scats { border: 0; box-shadow: none; background: var(--preview-paper); padding: clamp(12px,1vw,24px); border-radius: 30px 54px 30px 30px; }
html #side .scats .sbox__title { font-size: clamp(19.8px,1.395vw,32.4px); font-weight: 800; letter-spacing: -.045em; text-transform: none; padding: .1em .45em .65em; }
html #side .scats .sbox__title::after { flex: none; width: 1.7em; height: .27em; max-width: none; transform: rotate(-6deg); }
html #side .scat { font-size: 12.6px; padding: .44em .7em; border: 0; border-radius: 8px; background: transparent; color: #171614; box-shadow: none; font-weight: 550; line-height: 1.22; }
html #side .scat:hover { background: #f5efcf; }
html #side .scat.on { background: var(--preview-yellow); color: #121212; font-weight: 750; box-shadow: none; }
html #side .scat.on::after { content: '→'; margin-left: auto; font-size: 1.15em; }
@media (min-width:651px) and (max-width:900px) {
  html body:has(#grid) #side .scat { font-size: 14.49px; }
}
@media (min-width:901px) {
  .wrap.layout { grid-template-columns: var(--menu-wide,344.08px) minmax(0,1fr); }
  html #side .scat { font-size: clamp(13.5px,1.017vw,21.6px); }
}
@media (min-width:901px) and (max-width:1024px) {
  .wrap.layout { grid-template-columns: var(--menu-medium,303.6px) minmax(0,1fr); }
}
@media (max-width:900px) {
  .preview-bar { padding-inline: 4%; }
  .preview-links a span { display: none; }
  .preview-links a { min-width: 28px; min-height: 40px; justify-content: center; }
  .preview-links svg { width: 22px; height: 22px; }
  .preview-copy { margin-left: 4%; }
}
@media (max-width:650px) {
  .hdr.preview-header { --art-width: min(45vw,250px); width: 100%; margin: 0; padding-top: 0; }
  .preview-bar {
    height: auto; min-height: calc(var(--art-width) * .59); padding: clamp(6px, 1.8vw, 10px) 5% 10px; gap: 3px;
    flex-direction: column; align-items: flex-start; justify-content: flex-start;
  }
  .preview-logo { width: min(45vw, 232px); }
  .preview-status {
    max-width: calc(95vw - var(--art-width)); border: 0; padding: 0;
    font-weight: 700; font-size: clamp(12px, 3.2vw, 16px); line-height: 1.13;
  }
  .preview-status > span { display: block; }
  .preview-links, .preview-heading { display: none; }
  .preview-status small { font-size: 10px; }
  .preview-hero { position: static; isolation: auto; min-height: 0; }
  .preview-art { width: var(--art-width); top: calc(var(--art-width) * .08); bottom: auto; z-index: 0; }
  .preview-copy {
    box-sizing: border-box; display: flex; align-items: center; gap: 4px;
    width: 100%; padding: 0 3% 12px; margin: 0;
  }
  .preview-header .preview-search {
    flex: 1; min-width: 0; height: 48px; gap: clamp(5px, 1.7vw, 8px); padding: 0 6px 0 10px;
    border: 1.5px solid #24221e; border-radius: 14px; background: #fff;
  }
  .preview-header .preview-search input[type=search] { font-size: 18px; }
  .preview-header .preview-search:focus-within { outline: 2px solid #1a1a1a; outline-offset: 2px; }
  .preview-header .preview-search button:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 2px; }
  .preview-header .preview-search button { width: 36px; }
  .preview-tastes { display: none; margin: 0; }
  .preview-tastes a { display: none; }
  body:has(main .product) .preview-tastes { display: block; flex: none; }
}
@media (prefers-reduced-motion: reduce) { .preview-header *, .preview-header *::after { scroll-behavior: auto; } }

.preview-bar { position: relative; z-index: 1; pointer-events: none; }
.preview-bar a { pointer-events: auto; }
.preview-links .hact--cart {
  display: inline-grid; grid-template-rows: 1fr 1em 1fr; row-gap: 0;
  min-height: 3.4em; min-width: 0; padding: 0; background: transparent; color: inherit;
}
.preview-links .hact--cart svg { grid-area: 1 / 1 / -1 / 2; }
.preview-links .hact--cart > span { grid-area: 2 / 2; line-height: 1; }
.preview-links .hact--cart [data-cart-sum] {
  grid-area: 1 / 3; align-self: end; min-inline-size: 8ch; margin: 0;
  color: #24221e; font-size: .944em; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
  transform: translateY(25%);
}
@media (max-width: 900px) {
  .preview-links .hact--cart [data-cart-sum] { grid-column: 2; }
}
@media (min-width:901px) and (max-width:1100px) {
  .preview-links { gap: 14px; }
}
@media (min-width:901px) and (max-width:1100px) {
  html:not(.catalog-preview) .product .buybar .buy { flex-wrap: wrap; }
  html:not(.catalog-preview) .product .buybar .to-cart { flex: 1 0 min(100%, 150px); min-width: 0; }
}
.header-product-filter { display: none; }
@media (max-width:650px) {
  body:has(main .product) .header-product-filter {
    display: grid; place-items: center;
    width: 44px; height: 44px; border-radius: 50%; color: #171614;
  }
  .header-product-filter .filter-symbol { display: block; width: 23px; height: 23px; }
  body:has(.header-product-filter) main:has(.product) > .side-open-btn { display: none; }
}
