:root {
  --bg: #f7f7f4;
  --paper: #fff;
  --ink: #151515;
  --muted: #686864;
  --line: #deded9;
  --accent: #c94d37;
  --dark: #151515;
  --focus: #165dba;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 78px; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
img { max-width: 100%; }

.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 13px; background: var(--ink); color: #fff; transform: translateY(-160%); transition: transform .16s ease; font-size: 12px; font-weight: 700; }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.promo-bar { overflow: hidden; padding: 7px 20px; background: var(--ink); color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .08em; line-height: 1.2; text-align: center; white-space: nowrap; }
.header { position: sticky; z-index: 10; top: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; min-height: 76px; padding: 0 clamp(20px, 5vw, 76px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(12px); }
.order-notice { position: sticky; z-index: 9; top: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(20px, 5vw, 76px); background: #e7f2e6; color: #173a1d; font-size: 12px; font-weight: 700; line-height: 1.45; }
.order-notice p { margin: 0; }
.order-notice button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 24px; line-height: 1; }
.logo { display: flex; align-items: center; width: 111px; height: 62px; overflow: hidden; }
.logo img { width: 106px; height: 106px; max-width: none; object-fit: cover; mix-blend-mode: multiply; }
nav { display: flex; align-items: center; gap: 28px; }
nav a, .track-button { border: 0; padding: 8px 0; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; font-size: 12px; font-weight: 700; }
nav a:hover, .track-button:hover { color: var(--accent); }
.cart-button, .primary { border: 0; background: var(--ink); color: #fff; cursor: pointer; font-size: 12px; font-weight: 700; transition: background-color .18s ease, transform .18s ease; }
.cart-button { justify-self: end; padding: 13px 16px; }
.cart-button:hover, .primary:hover { background: var(--accent); }
.cart-button:active, .primary:active { transform: translateY(1px); }
.cart-button span { display: inline-grid; width: 18px; height: 18px; margin-left: 7px; border-radius: 50%; place-items: center; background: #fff; color: var(--ink); font-size: 10px; }

.eyebrow { margin: 0 0 21px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.delivery h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(62px, 8vw, 122px); font-weight: 600; line-height: .84; letter-spacing: -.07em; }
.delivery em { color: var(--accent); font-weight: 600; }

.catalog { padding: clamp(22px, 3vw, 42px) clamp(20px, 5vw, 76px) clamp(42px, 6vw, 76px); }
.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 21px); max-width: 1450px; margin: 0 auto; }
.product { min-width: 0; border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; transition: transform .2s ease; }
.product:not(:disabled):hover { transform: translateY(-5px); }
.product:disabled { cursor: not-allowed; }
.product:disabled .product-image { opacity: .48; }
.product-image { position: relative; display: grid; height: clamp(300px, 36vw, 520px); overflow: hidden; place-items: center; background: linear-gradient(135deg, #e6e3dd, #d9d6cf); }
.product-image::after { color: #73736f; content: "СКОРО"; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.product-image.has-image::after { display: none; }
.product-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 48%; }
.product:nth-child(2) .product-image { background: #ddd9cf; }
.product:nth-child(3) .product-image { background: #e6d3c9; }
.product-tag { position: absolute; z-index: 1; top: 12px; left: 12px; padding: 7px 9px; background: rgba(255,255,255,.94); color: var(--ink); font-size: 10px; font-weight: 800; }
.product-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; min-height: 52px; padding: 15px 1px 3px; }
.product-name { min-height: 2.65em; font-size: 13px; font-weight: 700; line-height: 1.32; }
.product-price { padding-top: 1px; color: var(--muted); font-size: 12px; white-space: nowrap; }

.delivery { padding: clamp(72px, 9vw, 120px) clamp(20px, 10vw, 154px); background: var(--dark); color: #f9f9f7; }
.delivery .eyebrow { color: #aaa9a2; }
.delivery h2 { font-size: clamp(48px, 6vw, 91px); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1100px; margin-top: 76px; }
.steps article { border-top: 1px solid #575755; padding-top: 15px; }
.steps span { color: #bcbcb5; font-size: 10px; }
.steps h3 { margin: 42px 0 9px; font-size: 15px; }
.steps p { max-width: 240px; margin: 0; color: #c7c7bf; font-size: 12px; line-height: 1.65; }
.footer { display: grid; grid-template-columns: 1fr auto; gap: 10px 30px; padding: 30px clamp(20px, 5vw, 76px); color: var(--muted); font-size: 11px; line-height: 1.45; }
.footer p { margin: 0; }
.footer p:nth-last-child(-n + 2) { grid-column: 1 / -1; }
.footer a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.footer a:hover { color: var(--ink); }

.cart { position: fixed; z-index: 20; top: 0; right: 0; display: flex; flex-direction: column; width: min(440px, 100%); height: 100dvh; padding: 27px; transform: translateX(101%); background: var(--bg); box-shadow: -20px 0 70px #0002; transition: transform .3s ease; }
.cart.open { transform: translateX(0); }
.cart > * { min-width: 0; }
.overlay { position: fixed; z-index: 15; inset: 0; pointer-events: none; background: #0008; opacity: 0; transition: opacity .3s ease; }
.overlay.open { pointer-events: auto; opacity: 1; }
.cart-head, .dialog-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.cart h2, dialog h2 { margin: 0; font: 600 28px Georgia, serif; }
.close { border: 0; padding: 0 5px; background: transparent; color: var(--ink); cursor: pointer; font-size: 30px; line-height: 1; }
.cart-items { flex: 1; overflow: auto; padding: 10px 0; }
.empty { margin-top: 23px; color: var(--muted); font-size: 13px; }
.cart-item { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 14px 0; font-size: 13px; line-height: 1.4; }
.cart-item > span:last-child { flex: 0 0 auto; white-space: nowrap; }
.cart-item button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 20px; line-height: .7; }
.cart-total { display: flex; justify-content: space-between; padding: 20px 0; font-size: 15px; }
.primary { width: 100%; padding: 17px; }
.primary:disabled { cursor: not-allowed; opacity: .5; }
.secondary { border: 1px solid var(--line); padding: 15px 17px; background: transparent; color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 700; }
.secondary:hover { border-color: var(--ink); }
.cart > .secondary { width: 100%; margin-top: 9px; }
.cart-toast { position: fixed; z-index: 30; right: clamp(18px, 3vw, 42px); bottom: clamp(18px, 3vw, 36px); display: flex; align-items: center; gap: 28px; width: min(610px, calc(100% - 36px)); padding: 18px; border: 1px solid var(--line); background: var(--bg); box-shadow: 0 16px 50px #0002; }
.cart-toast[hidden] { display: none; }
.cart-toast > div:first-child { display: grid; gap: 5px; min-width: 0; }
.cart-toast strong { font: 600 20px/1.1 Georgia, serif; }
.cart-toast span { overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.cart-toast-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.cart-toast .primary, .cart-toast .secondary { width: auto; padding: 12px 15px; white-space: nowrap; }
.small-note { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.delivery-details { margin: 12px 0; padding: 13px; background: #ece9e2; font-size: 11px; line-height: 1.55; }
.delivery-details strong, .delivery-details span { display: block; }
.delivery-details strong { margin-bottom: 4px; }
.delivery-details label { margin: 0 0 11px; }
.delivery-details label:last-of-type { margin-bottom: 0; }
dialog { width: min(490px, calc(100% - 30px)); max-height: calc(100dvh - 30px); overflow: auto; border: 0; padding: 0; background: var(--bg); box-shadow: 0 20px 70px #0004; }
dialog::backdrop { background: #0008; }
dialog form { padding: 27px; }
.product-gallery { position: relative; margin-top: 18px; background: #e6e3dd; }
.product-dialog-image { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.gallery-arrow { position: absolute; top: 50%; width: 38px; height: 38px; border: 0; background: rgba(255,255,255,.92); color: var(--ink); cursor: pointer; font-size: 22px; transform: translateY(-50%); }
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.gallery-arrow:hover { background: var(--ink); color: #fff; }
.gallery-thumbs { display: flex; gap: 8px; padding-top: 9px; }
.gallery-thumb { width: 58px; height: 58px; border: 2px solid transparent; padding: 0; overflow: hidden; background: #e6e3dd; cursor: pointer; }
.gallery-thumb[aria-current="true"] { border-color: var(--ink); }
.gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.order-summary { margin: 0 0 16px; border-bottom: 1px solid var(--line); padding: 16px 0; font-size: 13px; line-height: 1.55; }
label { display: block; margin: 13px 0; font-size: 11px; font-weight: 800; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 0; padding: 12px; background: var(--paper); color: var(--ink); font-size: 13px; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: 2px solid var(--focus); outline-offset: 1px; }
textarea { height: 75px; resize: vertical; }
.consent { display: flex; align-items: flex-start; gap: 9px; font-weight: 400; line-height: 1.5; }
.consent input { flex: 0 0 auto; width: 15px; height: 15px; margin: 2px 0 0; }
.consent a, .small-note a { color: inherit; text-underline-offset: 2px; }

@media (max-width: 700px) {
  html { scroll-padding-top: 66px; }
  .header { min-height: 65px; gap: 7px; padding: 0 18px; grid-template-columns: 1fr auto auto; }
  .order-notice { top: 65px; padding: 10px 18px; font-size: 11px; }
  .logo { width: 92px; height: 56px; }
  .logo img { width: 92px; height: 92px; }
  .header nav { gap: 0; }
  .header nav a { display: none; }
  .track-button { border: 1px solid var(--line); padding: 9px 7px; font-size: 10px; white-space: nowrap; }
  .cart-button { padding: 10px 9px; font-size: 0; }
  .cart-button::before { content: "Корзина"; font: 700 10px/1 Arial, sans-serif; }
  .cart-button span { font-size: 10px; }
  .promo-bar { padding: 6px 10px; font-size: 8px; letter-spacing: .045em; }
  .catalog { padding: 18px 18px 76px; }
  .products { grid-template-columns: 1fr 1fr; gap: 13px; }
  .product-image { height: 55vw; }
  .delivery { padding: 72px 26px; }
  .delivery h2 { font-size: 50px; }
  .steps { grid-template-columns: 1fr; gap: 36px; margin-top: 52px; }
  .steps h3 { margin-top: 20px; }
  .footer { grid-template-columns: 1fr; gap: 10px; padding: 25px 18px; }
  .footer p:nth-last-child(-n + 2) { grid-column: auto; }
  .cart { padding: 22px; }
  .cart-toast { right: 12px; bottom: 12px; align-items: stretch; flex-direction: column; gap: 13px; width: calc(100% - 24px); padding: 15px; }
  .cart-toast-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cart-toast .primary, .cart-toast .secondary { min-width: 0; padding: 12px 8px; font-size: 10px; }
  dialog form { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.legal { max-width: 860px; margin: 0 auto; padding: 70px 24px 90px; }
.legal h1 { margin: 0 0 45px; font: 600 48px/1 "Playfair Display", Georgia, serif; letter-spacing: -.05em; }
.legal h2 { margin: 56px 0 18px; font: 600 30px/1.1 "Playfair Display", Georgia, serif; }
.legal h3 { margin: 25px 0 8px; font-size: 14px; }
.legal p, .legal li { font-size: 14px; line-height: 1.65; }
.legal li { margin: 6px 0; }
.legal .updated { color: #746f68; font-size: 12px; }
.legal a { color: #a53827; }
.legal .notice { padding: 16px 18px; background: #f0ece5; font-size: 13px; line-height: 1.55; }
.legal-back { padding: 24px clamp(20px, 5vw, 76px); border-bottom: 1px solid #e2ded6; }
.legal-back a { color: #1e1c19; font-size: 13px; font-weight: 700; text-decoration: none; }

@media (max-width: 700px) {
  .legal { padding: 44px 20px 70px; }
  .legal h1 { margin-bottom: 32px; font-size: 38px; }
  .legal h2 { margin-top: 44px; font-size: 27px; }
}
