:root {
  --paper: #f6f2ef;
  --white: #ffffff;
  --ink: #22171f;
  --muted: #5f525b;
  --line: #ddd3d6;
  --plum: #6e2552;
  --plum-dark: #511a3c;
  --night: #2a1522;
  --error: #b3261e;
  --pad: clamp(16px, 3.4vw, 48px);
  --top: 80px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: var(--top); -webkit-tap-highlight-color: rgba(110, 37, 82, .15); }
body { background: var(--paper); color: var(--ink); font: 400 16px/1.5 "Mona Sans", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { display: block; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; touch-action: manipulation; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; }
h1, h2 { font-weight: 600; font-stretch: 118%; line-height: 1.06; letter-spacing: -.025em; text-wrap: balance; }
h2 { font-size: clamp(32px, 4.2vw, 60px); }
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.skip { position: absolute; left: 12px; top: -80px; z-index: 30; padding: 10px 16px; background: var(--ink); color: var(--white); border-radius: 8px; }
.skip:focus { top: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px; background: var(--plum); color: var(--white); font-weight: 600; transition: background-color .2s; }
.btn:hover { background: var(--plum-dark); }
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--line:hover { background: var(--paper); }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; height: var(--top); padding: 0 var(--pad); background: var(--paper); border-bottom: 1px solid var(--line); }
.logo { font-size: 30px; font-weight: 700; font-stretch: 125%; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.logo small { font-size: 16px; font-weight: 500; font-stretch: 100%; letter-spacing: 0; color: var(--muted); }
.demo { font-size: 12px; font-weight: 700; padding: 2px 8px; border: 1.5px solid currentColor; border-radius: 6px; color: var(--plum); }
.nav { display: flex; gap: 30px; margin: 0 auto; }
.nav a, .nav__menu { padding: 10px 0; font-weight: 500; }
.nav a:hover, .nav__menu:hover, .nav__menu[aria-expanded="true"] { color: var(--plum); }
.nav__menu[aria-expanded="true"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.cart-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 8px 0 20px; border-radius: 999px; background: var(--ink); color: var(--white); font-weight: 600; }
.cart-btn__count { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px; background: var(--white); color: var(--ink); font-variant-numeric: tabular-nums; }
.burger { display: none; }
.mega {
  position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100vh - var(--top)); overflow-y: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: repeat(3, minmax(0, 280px)); justify-content: center; gap: 24px 64px;
  padding: 36px var(--pad) 44px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px rgba(34, 23, 31, .14);
}
.mega__title { margin-bottom: 14px; font-size: 24px; font-weight: 600; font-stretch: 115%; }
.mega a { display: block; padding: 7px 0; color: var(--muted); }
.mega a:hover { color: var(--plum); text-decoration: underline; text-underline-offset: 4px; }

.band { position: relative; display: flex; align-items: center; height: clamp(250px, 40vh, 400px); overflow: hidden; background: var(--night); color: var(--white); }
.band img { position: absolute; top: 0; right: 0; width: auto; max-width: none; height: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%); mask-image: linear-gradient(90deg, transparent, #000 40%); }
.band__text { position: relative; }
.band h1 { font-size: clamp(36px, 5vw, 76px); max-width: 12em; }
.band p { margin-top: 14px; max-width: 24em; font-size: 18px; color: #eadbe4; }

.catalog { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding-top: 40px; padding-bottom: 100px; min-height: 70vh; align-content: start; }
.side { position: sticky; top: calc(var(--top) + 24px); align-self: start; }
.side__count { padding-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.side__title { margin: 20px 0 8px; font-weight: 600; }
.types button { display: flex; gap: 8px; width: 100%; padding: 9px 0; text-align: left; color: var(--muted); }
.types button span { font-variant-numeric: tabular-nums; opacity: .8; }
.types button:hover { color: var(--ink); }
.types button[aria-pressed="true"] { color: var(--plum); font-weight: 700; }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 44px 20px; }
.item { display: flex; flex-direction: column; min-width: 0; text-align: center; }
.item__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.item__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.65, 0, .25, 1); }
.item__media:hover img { transform: scale(1.04); }
.item__add { position: absolute; right: 8px; bottom: 8px; width: 48px; height: 48px; border-radius: 50%; background: var(--white); font-size: 28px; line-height: 1; box-shadow: 0 4px 14px rgba(34, 23, 31, .16); transition: background-color .2s, color .2s, opacity .2s; }
.item__add:hover { background: var(--plum); color: var(--white); }
.item h3 { margin-top: 14px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.item h3 a { display: inline-block; padding: 2px 0; }
.item h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.item__desc { margin: 4px auto 0; max-width: 24em; color: var(--muted); font-size: 14px; text-wrap: pretty; }
.item__price { margin-top: auto; padding-top: 10px; font-variant-numeric: tabular-nums; }
.item__price strong { font-size: 18px; }
.item__price span { margin-left: 8px; color: var(--muted); font-size: 14px; white-space: nowrap; }
@media (hover: hover) {
  .item__add { opacity: 0; }
  .item:hover .item__add, .item__add:focus-visible { opacity: 1; }
}

.collections h2 { padding-bottom: 32px; }
.collections ul { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(260px, 30vw, 440px); gap: 6px; }
.collections li { grid-column: span 7; }
.collections li:nth-child(2), .collections li:nth-child(3) { grid-column: span 5; }
.collections a { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; overflow: hidden; color: var(--white); text-align: center; padding: 24px; }
.collections img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.65, 0, .25, 1); }
.collections a::after { content: ""; position: absolute; inset: 0; background: rgba(34, 14, 28, .42); }
.collections a:hover img { transform: scale(1.04); }
.collections span { position: relative; z-index: 1; text-shadow: 0 1px 16px rgba(24, 10, 20, .6); }
.tile__name { font-size: clamp(30px, 3.6vw, 54px); font-weight: 600; font-stretch: 122%; line-height: 1.1; }
.tile__text { margin-top: 8px; max-width: 24em; }
.collections a:focus-visible { outline-color: var(--white); outline-offset: -10px; }

.delivery { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 56px; padding-top: 110px; padding-bottom: 110px; }
.delivery__lead { font-size: clamp(20px, 2vw, 26px); line-height: 1.4; max-width: 24em; }
.delivery dl { margin-top: 28px; }
.delivery dl div { padding: 18px 0; border-top: 1px solid var(--line); }
.delivery dt { font-weight: 600; }
.delivery dd { color: var(--muted); max-width: 36em; }
.delivery dd a { color: var(--plum); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

.foot { background: var(--ink); color: #cfc3ca; padding: 56px 0 40px; font-size: 15px; }
.foot p { max-width: 46em; margin-bottom: 10px; }
.foot .foot__logo { font-size: 34px; font-weight: 700; font-stretch: 125%; color: var(--white); }
.foot a { display: inline-block; padding: 10px 0; color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.foot a:focus-visible { outline-color: var(--white); }

dialog { border: 0; color: var(--ink); overscroll-behavior: contain; }
dialog::backdrop { background: rgba(34, 23, 31, .55); }
body:has(dialog[open]) { overflow: hidden; }
.close { min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--white); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--line); }
.close:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

.product { margin: auto; width: min(1000px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: 18px; background: var(--paper); }
.product[open] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.product .close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.product__photo img { width: 100%; height: 100%; max-height: calc(100dvh - 32px); object-fit: cover; }
.product__info { display: flex; flex-direction: column; justify-content: center; padding: 72px 40px 40px; }
.product__col { color: var(--plum); font-weight: 600; }
.product h2 { margin: 6px 0 14px; font-size: clamp(28px, 3vw, 40px); }
.product h3 { margin: 24px 0 4px; font-size: 16px; }
.product__info > p { color: var(--muted); }
.product__info > .product__price { margin-top: 28px; color: var(--ink); font-variant-numeric: tabular-nums; }
.product__price strong { font-size: 32px; }
.product__price span { margin-left: 10px; color: var(--muted); }
.product__buy { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.product__buy .btn { flex: 1; }
.qty { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--line); }
.qty button { width: 44px; height: 44px; border-radius: 50%; font-size: 22px; }
.qty button:hover { background: var(--paper); }
.qty output { min-width: 28px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.product__buy .qty { min-height: 52px; padding: 0 4px; }

.drawer { margin: 0 0 0 auto; width: min(480px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; background: var(--white); }
.drawer[open] { display: flex; flex-direction: column; animation: slide .35s cubic-bezier(.65, 0, .25, 1); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer__top { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 14px; }
.drawer h2 { font-size: 30px; }
.steps { display: flex; gap: 6px; padding: 0 24px; counter-reset: s; }
.steps li { flex: 1; padding: 8px 0; border-top: 4px solid var(--line); font-size: 14px; color: var(--muted); counter-increment: s; }
.steps li::before { content: counter(s) ". "; }
.steps li.is-done, .steps li[aria-current] { border-color: var(--plum); color: var(--ink); }
.steps li[aria-current] { font-weight: 700; }
.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px 32px; }
.drawer h3 { margin-bottom: 8px; font-size: 20px; }
.drawer p + p { margin-top: 10px; }
.empty { display: grid; gap: 20px; justify-items: start; padding-top: 12px; }
.line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line img { width: 72px; height: 90px; object-fit: cover; border-radius: 8px; }
.line__name { font-weight: 600; line-height: 1.3; }
.drawer .line__name + .line__meta { margin: 2px 0 8px; color: var(--muted); font-size: 14px; }
.line__side { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-variant-numeric: tabular-nums; }
.line__side button { padding: 10px 0; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.line__side button:hover { color: var(--error); }
.sum { margin-top: 20px; font-variant-numeric: tabular-nums; }
.sum div { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; }
.sum__total { margin-top: 6px; border-top: 2px solid var(--ink); font-size: 20px; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.actions .btn { flex: 1; }
.options { border: 0; }
.options legend { margin-bottom: 10px; font-weight: 600; }
.option { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.option:has(input:checked) { border-color: var(--plum); background: var(--paper); }
.option input { width: 20px; height: 20px; accent-color: var(--plum); flex: none; }
.option small { display: block; color: var(--muted); font-size: 14px; }
.field { margin-top: 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 15px; }
.field input, .field select { width: 100%; min-height: 52px; padding: 0 14px; font-size: 16px; color: var(--ink); background-color: var(--white); border: 1.5px solid #bfb3bb; border-radius: 10px; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.drawer .field__error { margin-top: 4px; color: var(--error); font-size: 14px; font-weight: 600; }
.field__error:empty { display: none; }
.done__title { font-size: 26px !important; }
[data-step="done"] .btn { margin-top: 24px; }

.toast { position: fixed; left: 50%; bottom: 20px; z-index: 20; width: max-content; max-width: calc(100% - 32px); padding: 12px 22px; border-radius: 999px; background: var(--ink); color: var(--white); transform: translate(-50%, 12px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s; pointer-events: none; }
.toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  :root { --top: 64px; }
  .top { gap: 10px; }
  .logo { font-size: 25px; }
  .logo small { display: none; }
  .nav { display: none; }
  .cart-btn { margin-left: auto; min-height: 44px; padding: 0 6px 0 16px; }
  .cart-btn__count { min-width: 30px; height: 30px; }
  .burger { display: block; min-height: 44px; padding: 0 2px; font-weight: 600; }
  .mega { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding-top: 22px; }
  .mega__col--more { grid-column: 1 / -1; }
  .mega__title { font-size: 19px; }
  .band { height: 250px; align-items: flex-end; padding-bottom: 24px; }
  .band img { right: -140px; }
  .band__text { z-index: 1; }
  .band p { font-size: 15px; max-width: 18em; }
  .catalog { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 12px; padding-bottom: 64px; }
  .side { position: static; min-width: 0; }
  .side__title { display: none; }
  .side__count { border: 0; padding: 0; order: 2; font-size: 14px; }
  .side { display: flex; flex-direction: column; gap: 6px; }
  .types { display: flex; scrollbar-width: none; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; margin: 0 calc(-1 * var(--pad)); padding: 6px var(--pad); }
  .types button { width: auto; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--white); white-space: nowrap; align-items: center; }
  .types button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .item h3 { font-size: 15px; margin-top: 10px; }
  .item__desc { display: none; }
  .item__add { width: 44px; height: 44px; right: 4px; bottom: 4px; }
  .collections ul { grid-auto-rows: 240px; }
  .collections li, .collections li:nth-child(n) { grid-column: 1 / -1; }
  .delivery { grid-template-columns: minmax(0, 1fr); padding-top: 72px; padding-bottom: 72px; }
  .product[open] { grid-template-columns: minmax(0, 1fr); }
  .product__photo img { height: 42dvh; }
  .product__info { padding: 20px 20px 24px; }
}

@media (max-width: 360px) {
  .top { gap: 7px; padding: 0 10px; }
  .logo { font-size: 21px; }
  .demo { padding: 1px 5px; font-size: 11px; }
  .cart-btn { gap: 6px; padding-left: 12px; font-size: 14px; }
  .burger { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
