/* TONE — стилі сайту.
   Палітра й шрифт — з бренд-буку: #FDF6EE, #311E15, Montserrat. */

:root {
  --linen: #FDF6EE;
  --umber: #311E15;
  --umber-80: #5A4B44;
  --umber-60: #6E625B;
  --umber-40: #ADA5A1;
  --sand: #EFE5D8;
  --sand-deep: #E4D6C4;
  --line: #E2D7CA;
  --error: #9A2B1B;
  --ok: #3F5B3A;

  --font: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  --gutter: 20px;
  --max: 1360px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

@media (min-width: 768px) { :root { --gutter: 40px; --header-h: 88px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--linen);
  color: var(--umber);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible { outline: 2px solid var(--umber); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 200;
  background: var(--umber); color: var(--linen); padding: 12px 20px;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

/* ---------- Типографіка ---------- */

h1, h2, h3, h4 { margin: 0; font-weight: 300; line-height: 1.15; letter-spacing: -.01em; }
.h-display { font-size: clamp(36px, 5.2vw, 72px); }
.h1 { font-size: clamp(32px, 4vw, 56px); }
.h2 { font-size: clamp(28px, 3vw, 42px); }
.h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 400; }
.h4 { font-size: 20px; font-weight: 500; letter-spacing: 0; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.6; font-weight: 300; max-width: 36em; }
.muted { color: var(--umber-60); }
.small { font-size: 16px; }

.wordmark {
  font-weight: 400;
  letter-spacing: .62em;
  margin-right: -.62em;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Кнопки й поля ---------- */

.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 32px;
  border: 1px solid var(--umber); border-radius: 0;
  background: var(--umber); color: var(--linen);
  font-size: 16px; font-weight: 500; letter-spacing: .04em;
  text-decoration: none; text-align: center;
  transition: color .5s var(--ease-out), border-color .5s var(--ease-out);
}
/* Заливка, що «піднімається» знизу при наведенні */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--sand);
  transform: translateY(101%);
  transition: transform .6s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn:hover, .btn:focus-visible { color: var(--umber); }
.btn--ghost { background: transparent; color: var(--umber); }
.btn--ghost::before { background: var(--umber); }
.btn--ghost:hover, .btn--ghost:focus-visible { color: var(--linen); }
.btn--light { background: var(--linen); color: var(--umber); border-color: var(--linen); }
.btn--light::before { background: var(--umber); }
.btn--light:hover, .btn--light:focus-visible { color: var(--linen); border-color: var(--linen); }
.btn--outline-light { background: transparent; color: var(--linen); border-color: rgba(253, 246, 238, .7); }
.btn--outline-light::before { background: var(--linen); }
.btn--outline-light:hover, .btn--outline-light:focus-visible { color: var(--umber); border-color: var(--linen); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.is-done::before { transform: none; background: var(--sand); }
.btn.is-done { color: var(--umber); }

/* Підкреслення, яке «перемальовується» при наведенні */
.link {
  display: inline-block; font-weight: 500; font-size: 17px;
  text-decoration: none; padding: 6px 0;
  background: linear-gradient(currentColor, currentColor) no-repeat right bottom 4px / 100% 1px;
  transition: background-size .5s var(--ease-out);
}
.link:hover { animation: underline-redraw .8s var(--ease-out); }
@keyframes underline-redraw {
  0% { background-size: 100% 1px; background-position: right bottom 4px; }
  45% { background-size: 0 1px; background-position: right bottom 4px; }
  46% { background-size: 0 1px; background-position: left bottom 4px; }
  100% { background-size: 100% 1px; background-position: left bottom 4px; }
}

.field { display: grid; gap: 8px; }
.field > label, .field legend { font-size: 16px; font-weight: 500; }
.field .hint { font-size: 15px; color: var(--umber-60); margin: 0; }

.input, .select, .textarea {
  width: 100%; min-height: 60px; padding: 16px 18px;
  background: rgba(255, 255, 255, .7); border: 1px solid var(--line); border-radius: 0;
  font-size: 18px; line-height: 1.4;
  appearance: none; -webkit-appearance: none;
  box-shadow: inset 0 -1px 0 var(--umber-40);
  transition: border-color .3s, box-shadow .4s var(--ease-out), background-color .3s;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--umber-40); background: #fff; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; background: #fff; border-color: var(--umber-40);
  box-shadow: inset 0 -2px 0 var(--umber), 0 0 0 4px rgba(49, 30, 21, .06);
}
.input::placeholder, .textarea::placeholder { color: var(--umber-40); }
.input[type=number] { -moz-appearance: textfield; }
.input[type=number]::-webkit-outer-spin-button, .input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.textarea { min-height: 128px; resize: vertical; }
.select {
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23311E15' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center;
}
.field.has-error .input, .field.has-error .select, .field.has-error .textarea {
  border-color: var(--error); box-shadow: inset 0 -2px 0 var(--error);
  animation: shake .4s var(--ease-out);
}
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.error-text { color: var(--error); font-size: 15px; margin: 0; display: none; }
.field.has-error .error-text { display: block; animation: fade-down .3s var(--ease-out); }
@keyframes fade-down { from { opacity: 0; transform: translateY(-4px); } }

/* Плаваючий підпис: всередині поля, піднімається при фокусі чи заповненні */
.float { position: relative; display: grid; gap: 8px; }
.float .input, .float .textarea { padding-top: 26px; padding-bottom: 10px; }
.float .textarea { padding-top: 30px; }
.float > label {
  position: absolute; left: 19px; top: 18px; z-index: 1;
  font-size: 18px; font-weight: 400; color: var(--umber-60);
  transform-origin: left top; pointer-events: none;
  transition: transform .35s var(--ease-out), color .3s;
}
.float .input:focus + label, .float .input:not(:placeholder-shown) + label,
.float .textarea:focus + label, .float .textarea:not(:placeholder-shown) + label {
  transform: translateY(-10px) scale(.74); color: var(--umber); font-weight: 500;
}
.float .input::placeholder, .float .textarea::placeholder { color: transparent; }
.float .optional { color: var(--umber-60); font-weight: 400; }
.float__suffix { position: absolute; right: 18px; top: 19px; font-size: 17px; color: var(--umber-60); pointer-events: none; }

/* Власні радіо й чекбокси */
.radio, .checkbox {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 24px; height: 24px; margin: 1px 0 0;
  display: grid; place-items: center;
  border: 1px solid var(--umber-40); background: #fff;
  cursor: pointer; transition: border-color .3s, background-color .3s;
}
.radio { border-radius: 50%; }
.radio::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--umber);
  transform: scale(0); transition: transform .35s var(--ease-spring);
}
.radio:checked { border-color: var(--umber); }
.radio:checked::before { transform: scale(1); }
.checkbox::before {
  content: ""; width: 12px; height: 7px; margin-top: -3px;
  border-left: 1.5px solid var(--linen); border-bottom: 1.5px solid var(--linen);
  transform: rotate(-45deg) scale(0); transition: transform .3s var(--ease-spring);
}
.checkbox:checked { background: var(--umber); border-color: var(--umber); }
.checkbox:checked::before { transform: rotate(-45deg) scale(1); }
.radio:hover, .checkbox:hover { border-color: var(--umber); }
.radio:focus-visible, .checkbox:focus-visible { outline: 2px solid var(--umber); outline-offset: 3px; }

/* Великі рядки-варіанти (доставка, оплата) */
.choice {
  position: relative;
  display: grid; grid-template-columns: 24px 1fr auto; gap: 16px; align-items: start;
  padding: 20px 22px; border: 1px solid var(--line); background: rgba(255, 255, 255, .7);
  cursor: pointer; transition: border-color .3s, background-color .4s;
}
.choice + .choice { margin-top: -1px; }
.choice:hover { border-color: var(--umber-40); background: #fff; z-index: 1; }
.choice:has(input:checked) { border-color: var(--umber); background: #fff; z-index: 2; }
.choice::after {
  content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 3px; background: var(--umber);
  transform: scaleY(0); transform-origin: top; transition: transform .45s var(--ease-out);
}
.choice:has(input:checked)::after { transform: scaleY(1); }
.choice__title { font-weight: 500; display: block; }
.choice__desc { font-size: 15px; color: var(--umber-60); display: block; margin-top: 2px; }
.choice__price { font-size: 16px; white-space: nowrap; }
.choice:not([hidden]) { animation: fade-down .35s var(--ease-out); }
@media (max-width: 559px) {
  .choice { grid-template-columns: 24px 1fr; }
  .choice__price { grid-column: 2; margin-top: -8px; font-weight: 500; }
}

.check { display: flex; gap: 14px; align-items: flex-start; font-size: 16px; cursor: pointer; }

/* Випадний список у стилі сайту */
.cselect { position: relative; display: inline-block; min-width: 230px; }
.cselect__btn {
  width: 100%; min-height: 48px; padding: 10px 46px 10px 16px;
  display: flex; align-items: center;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .7);
  box-shadow: inset 0 -1px 0 var(--umber-40);
  font-size: 16px; text-align: left; transition: border-color .3s, background-color .3s;
}
.cselect__btn:hover { border-color: var(--umber-40); background: #fff; }
.cselect__btn::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .35s var(--ease-out), margin-top .35s;
}
.cselect.is-open .cselect__btn::after { transform: rotate(225deg); margin-top: -2px; }
.cselect__list {
  position: absolute; right: 0; left: 0; top: calc(100% + 6px); z-index: 30;
  margin: 0; padding: 6px 0; list-style: none;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 40px -18px rgba(49, 30, 21, .35);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s, transform .35s var(--ease-out), visibility 0s .35s;
}
.cselect.is-open .cselect__list { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .35s var(--ease-out); }
.cselect__opt { padding: 12px 18px; font-size: 16px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.cselect__opt[aria-selected="true"] { font-weight: 500; }
.cselect__opt[aria-selected="true"]::after { content: ""; width: 10px; height: 6px; margin-top: 6px; border-left: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(-45deg); }
.cselect__opt.is-active, .cselect__opt:hover { background: var(--sand); }

/* ---------- Верхня смуга й шапка ---------- */

.topbar {
  background: var(--umber); color: var(--linen);
  font-size: 15px; line-height: 1.4;
}
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 9px; padding-bottom: 9px; }
.topbar a { text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar__hours { display: none; }
@media (min-width: 768px) { .topbar__hours { display: inline; } }
@media (max-width: 559px) {
  .topbar .wrap { justify-content: center; }
  .topbar__promo { display: none; }
}

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 246, 238, .96);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__row {
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}
.header__logo { font-size: 22px; justify-self: center; }
@media (min-width: 768px) { .header__logo { font-size: 28px; } }
.header__nav { display: none; }
.header__nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
.header__nav a { text-decoration: none; font-size: 16px; padding: 8px 0; border-bottom: 1px solid transparent; }
.header__nav a:hover, .header__nav a[aria-current="page"] { border-bottom-color: var(--umber); }
.header__actions { justify-self: end; display: flex; gap: 24px; align-items: center; }
.header__actions a { text-decoration: none; font-size: 16px; padding: 8px 0; }
.header__actions a:hover { text-decoration: underline; }
.header__account { display: none; }
.cart-count {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; margin-left: 6px;
  background: var(--umber); color: var(--linen); border-radius: 13px; font-size: 14px; font-weight: 500;
}
.cart-count[data-empty="true"] { background: transparent; color: var(--umber); border: 1px solid var(--umber-40); }
.menu-btn {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0; border: 0; background: none; font-size: 16px;
}
.menu-btn__bars { width: 22px; height: 12px; position: relative; }
.menu-btn__bars::before, .menu-btn__bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
}
.menu-btn__bars::before { top: 0; } .menu-btn__bars::after { bottom: 0; }

@media (min-width: 1180px) {
  .menu-btn { display: none; }
  .header__nav { display: block; justify-self: start; }
  .header__logo { font-size: 30px; }
}

/* Мобільне меню */
.drawer {
  position: fixed; inset: 0; z-index: 100; background: var(--linen);
  display: flex; flex-direction: column;
  transform: translateX(-100%); visibility: hidden;
  transition: transform .35s var(--ease), visibility 0s .35s;
}
.drawer.is-open { transform: none; visibility: visible; transition: transform .35s var(--ease); }
.drawer__head { display: flex; justify-content: space-between; align-items: center; height: var(--header-h); padding: 0 var(--gutter); border-bottom: 1px solid var(--line); }
.drawer__close { border: 0; background: none; min-height: 48px; font-size: 16px; padding: 0; display: inline-flex; align-items: center; gap: 10px; }
.drawer__close::before { content: "×"; font-size: 30px; line-height: 1; font-weight: 300; }
.drawer nav { padding: 12px var(--gutter) 32px; overflow-y: auto; }
.drawer ul { list-style: none; margin: 0; padding: 0; }
.drawer li a { display: block; padding: 16px 0; font-size: 24px; font-weight: 300; text-decoration: none; border-bottom: 1px solid var(--line); }
.drawer__contacts { margin-top: 32px; font-size: 17px; display: grid; gap: 6px; }

/* ---------- Футер ---------- */

.footer { background: var(--umber); color: var(--linen); margin-top: 120px; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__mark {
  font-size: 30px; line-height: 1;
  padding: 56px 0 40px; border-bottom: 1px solid rgba(253, 246, 238, .18);
}
.footer__mark a:hover { text-decoration: none; }
.footer__grid { display: grid; gap: 40px; padding: 48px 0; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer h2 { font-size: 16px; font-weight: 500; margin-bottom: 16px; letter-spacing: .02em; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 17px; }
.footer__lead { font-size: 18px; font-weight: 300; max-width: 26em; color: rgba(253, 246, 238, .86); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 24px 0 32px; border-top: 1px solid rgba(253, 246, 238, .18); font-size: 15px; color: rgba(253, 246, 238, .7); }

/* ---------- Спільні секції ---------- */

.section { padding: 96px 0 0; }
@media (max-width: 767px) { .section { padding-top: 72px; } }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section__head p { margin: 12px 0 0; }

.page-head { padding: 56px 0 40px; }
.page-head .lead { margin-top: 20px; }
.crumbs { font-size: 15px; color: var(--umber-60); margin-bottom: 24px; }
.crumbs a { color: var(--umber-60); }
.crumbs span[aria-hidden] { margin: 0 8px; }

.texture {
  background-color: var(--sand);
  background-image: linear-gradient(rgba(239, 229, 216, .55), rgba(239, 229, 216, .55)), url("../img/brand/linen.jpg");
  background-size: auto, 900px auto;
}

/* ---------- Картка товару ---------- */

.grid { display: grid; gap: 40px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 24px; } }
@media (min-width: 1280px) { .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { position: relative; }
.card__media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--sand); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .5s var(--ease); }
.card__media img + img { position: absolute; inset: 0; opacity: 0; }
@media (hover: hover) { .card:hover .card__media img + img { opacity: 1; } }
.card__body { padding-top: 16px; display: grid; gap: 4px; }
.card__name { font-size: 18px; font-weight: 400; line-height: 1.35; }
.card__name a { text-decoration: none; }
.card__name a::after { content: ""; position: absolute; inset: 0; }
.card__name a:hover { text-decoration: underline; }
.card__meta { font-size: 15px; color: var(--umber-60); line-height: 1.4; }
.card__price { font-size: 18px; font-weight: 500; margin-top: 4px; }
@media (max-width: 599px) {
  .card__name, .card__price { font-size: 16px; }
  .card__meta { font-size: 14px; }
}

/* ---------- Головна ---------- */

.hero { position: relative; height: max(600px, calc(100svh - var(--header-h) - 38px)); overflow: hidden; background: var(--umber); color: var(--linen); }
.hero__photos { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr; gap: 0; }
.hero__photos figure { position: relative; margin: 0; overflow: hidden; }
.hero__photos figure:nth-child(n+2) { display: none; }
.hero__photos img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transform: scale(1.12); will-change: transform; }
@media (min-width: 768px) {
  .hero__photos { grid-template-columns: repeat(3, 1fr); gap: 3px; }
  .hero__photos figure:nth-child(n+2) { display: block; }
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(49, 30, 21, 0) 30%, rgba(49, 30, 21, .38) 55%, rgba(49, 30, 21, .86) 100%);
}
.hero__content {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding-bottom: clamp(36px, 6vh, 72px);
  display: grid; gap: 28px; align-items: end;
}
@media (min-width: 1000px) { .hero__content { grid-template-columns: 1.4fr 1fr; } }
.hero__title { font-size: clamp(40px, 6.4vw, 104px); font-weight: 300; line-height: 1.02; letter-spacing: -.025em; }
.hero__title .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .ln > span { display: block; }
.hero__side { display: grid; gap: 24px; justify-items: start; }
@media (min-width: 1000px) { .hero__side { justify-items: end; text-align: right; } }
.hero__side p { margin: 0; font-size: clamp(17px, 1.4vw, 20px); font-weight: 300; max-width: 26em; color: rgba(253, 246, 238, .9); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 520px) { .hero__actions .btn { flex: 1 1 100%; } }
.hero__scroll {
  position: absolute; left: 50%; bottom: 18px; z-index: 2; width: 1px; height: 44px; overflow: hidden;
  background: rgba(253, 246, 238, .25); display: none;
}
.hero__scroll::after { content: ""; position: absolute; left: 0; top: -100%; width: 1px; height: 100%; background: var(--linen); animation: scroll-hint 2.2s var(--ease-out) infinite; }
@keyframes scroll-hint { to { top: 100%; } }
@media (min-width: 1000px) { .hero__scroll { display: block; } }

/* Початкова анімація hero: фото відкриваються шторкою, рядки заголовка виїжджають */
.motion .hero__photos figure { clip-path: inset(100% 0 0 0); animation: curtain 1.4s var(--ease-out) forwards; }
.motion .hero__photos figure:nth-child(2) { animation-delay: .12s; }
.motion .hero__photos figure:nth-child(3) { animation-delay: .24s; }
.motion .hero__photos img { animation: settle 2.4s var(--ease-out) forwards; }
.motion .hero__title .ln > span { transform: translateY(110%); animation: line-up 1.2s var(--ease-out) forwards; animation-delay: calc(.7s + var(--i, 0) * .1s); }
.motion .hero__side { opacity: 0; animation: fade-up 1s var(--ease-out) 1.15s forwards; }
@keyframes curtain { to { clip-path: inset(0 0 0 0); } }
@keyframes settle { from { transform: scale(1.25); } to { transform: scale(1.12); } }
@keyframes line-up { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Бігучий рядок із тканинами */
.marquee { overflow: hidden; border-bottom: 1px solid var(--line); padding: 26px 0; white-space: nowrap; }
.marquee__track { display: inline-flex; align-items: center; gap: 48px; padding-right: 48px; animation: marquee 48s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { font-size: clamp(28px, 3.4vw, 48px); font-weight: 300; letter-spacing: -.01em; }
.marquee__track svg { flex: none; width: 22px; height: 40px; color: var(--umber-40); }
@keyframes marquee { to { transform: translateX(-50%); } }

.cats { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }
.cat { text-decoration: none; display: block; }
.cat__img { aspect-ratio: 3 / 4; overflow: hidden; background: var(--sand); }
.cat__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.cat:hover .cat__img img { transform: scale(1.03); }
.cat__label { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; font-size: 20px; font-weight: 400; }
.cat__label small { font-size: 15px; color: var(--umber-60); }
.cat:hover .cat__label span { text-decoration: underline; text-underline-offset: .25em; }

.suit { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .suit { grid-template-columns: 1.1fr 1fr; gap: 80px; } }
.suit__img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--sand); }
.suit__img img { width: 100%; height: 100%; object-fit: cover; }
.suit__list { list-style: none; margin: 32px 0; padding: 0; border-top: 1px solid var(--line); }
.suit__list li { border-bottom: 1px solid var(--line); }
.suit__list a { display: grid; grid-template-columns: 72px 1fr auto; gap: 18px; align-items: center; padding: 14px 0; text-decoration: none; }
.suit__list img { width: 72px; height: 96px; object-fit: cover; }
.suit__list a:hover .suit__name { text-decoration: underline; }
.suit__total { display: flex; justify-content: space-between; font-size: 18px; margin-bottom: 24px; }

.fabrics { padding: 96px 0; margin-top: 96px; }
@media (max-width: 767px) { .fabrics { padding: 64px 0; margin-top: 72px; } }
.fabrics__grid { display: grid; gap: 48px; }
@media (min-width: 1000px) { .fabrics__grid { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; } }
.fabrics__img { aspect-ratio: 4 / 5; overflow: hidden; }
.fabrics__img img { width: 100%; height: 100%; object-fit: cover; }
.fabric-list { list-style: none; padding: 0; margin: 36px 0 32px; display: grid; gap: 0; }
.fabric-list li { display: grid; gap: 4px 32px; padding: 22px 0; border-top: 1px solid rgba(49, 30, 21, .16); }
@media (min-width: 640px) { .fabric-list li { grid-template-columns: 220px 1fr; } }
.fabric-list strong { font-weight: 500; font-size: 19px; }
.fabric-list span { color: var(--umber-80); }

.quote { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .quote { grid-template-columns: 1fr 1fr; gap: 80px; } }
.quote__img { aspect-ratio: 3 / 4; overflow: hidden; max-height: 720px; }
.quote__img img { width: 100%; height: 100%; object-fit: cover; }
.quote blockquote { margin: 0; font-size: clamp(26px, 2.8vw, 40px); font-weight: 300; line-height: 1.3; }
.quote figcaption { margin-top: 28px; font-size: 17px; color: var(--umber-60); }

.service { display: grid; gap: 32px; grid-template-columns: 1fr; border-top: 1px solid var(--line); padding-top: 40px; }
@media (min-width: 640px) { .service { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .service { grid-template-columns: repeat(4, 1fr); } }
.service h3 { font-size: 20px; font-weight: 500; margin-bottom: 10px; }
.service p { color: var(--umber-80); font-size: 17px; margin-bottom: 8px; }

/* ---------- Каталог ---------- */

.catalog { display: grid; gap: 32px; }
@media (min-width: 1000px) { .catalog { grid-template-columns: 240px 1fr; gap: 56px; } }
.filters { display: none; }
@media (min-width: 1000px) {
  .filters { display: block; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
}
.filters h2 { font-size: 16px; font-weight: 500; margin: 0 0 12px; }
.filters ul { list-style: none; margin: 0 0 36px; padding: 0; }
.filters button {
  display: flex; justify-content: space-between; width: 100%; padding: 9px 0; border: 0; background: none;
  font-size: 17px; text-align: left; color: var(--umber-80);
}
.filters button:hover { color: var(--umber); text-decoration: underline; text-underline-offset: .25em; }
.filters button[aria-pressed="true"] { color: var(--umber); font-weight: 500; }
.filters button small { color: var(--umber-60); font-weight: 400; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 46px; padding: 0 18px; border: 1px solid var(--umber-40); background: transparent;
  font-size: 16px; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--umber); color: var(--linen); border-color: var(--umber); }
@media (min-width: 1000px) { .chips { display: none; } }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.toolbar .select { width: auto; min-height: 48px; font-size: 16px; padding-top: 10px; padding-bottom: 10px; }
.toolbar .sort-label { font-size: 16px; display: flex; align-items: center; gap: 12px; }

.empty { padding: 64px 0; text-align: center; }

/* ---------- Сторінка товару ---------- */

.product { display: grid; gap: 32px; padding-top: 24px; }
@media (min-width: 1000px) { .product { grid-template-columns: 1.25fr 1fr; gap: 64px; align-items: start; } }

.gallery { display: grid; gap: 4px; }
@media (min-width: 1000px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery figure:first-child { grid-column: 1 / -1; } }
.gallery figure { margin: 0; aspect-ratio: 3 / 4; background: var(--sand); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 999px) {
  .gallery {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0;
    margin: 0 calc(var(--gutter) * -1); scrollbar-width: none;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery figure { flex: 0 0 100%; scroll-snap-align: start; }
}
.gallery-dots { display: flex; justify-content: center; gap: 4px; margin-top: 12px; }
.gallery-dots button { width: 44px; height: 32px; border: 0; background: none; padding: 0; position: relative; }
.gallery-dots button::after { content: ""; position: absolute; left: 8px; right: 8px; top: 15px; height: 2px; background: var(--umber-40); }
.gallery-dots button[aria-current="true"]::after { background: var(--umber); }
@media (min-width: 1000px) { .gallery-dots { display: none; } }

.buy { display: grid; gap: 0; }
@media (min-width: 1000px) { .buy { position: sticky; top: calc(var(--header-h) + 24px); } }
.buy__suit { font-size: 16px; color: var(--umber-60); margin-bottom: 10px; }
.buy__suit a { color: inherit; }
.buy h1 { font-size: clamp(30px, 3vw, 44px); }
.buy__price { font-size: 26px; font-weight: 400; margin: 16px 0 28px; }
.buy__facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; margin: 0 0 28px; font-size: 17px; }
.buy__facts dt { color: var(--umber-60); }
.buy__facts dd { margin: 0; }

.sizes { border: 0; padding: 0; margin: 0 0 12px; }
.sizes legend { font-size: 16px; font-weight: 500; margin-bottom: 12px; padding: 0; display: flex; justify-content: space-between; width: 100%; }
.sizes__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.size-opt { position: relative; }
.size-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.size-opt span {
  display: grid; place-items: center; min-height: 56px; border: 1px solid var(--umber-40); background: #fff;
  font-size: 17px; font-weight: 500;
}
.size-opt input:hover + span { border-color: var(--umber); }
.size-opt input:checked + span { background: var(--umber); color: var(--linen); border-color: var(--umber); }
.size-opt input:focus-visible + span { outline: 2px solid var(--umber); outline-offset: 3px; }
.size-opt input:disabled + span { color: var(--umber-40); background: transparent; text-decoration: line-through; cursor: not-allowed; }
.size-note { font-size: 15px; color: var(--umber-60); margin: 4px 0 20px; min-height: 1.4em; }
.size-note.is-error { color: var(--error); }
.buy__help { margin-top: 20px; padding: 20px; background: var(--sand); font-size: 16px; }
.buy__help p { margin: 0 0 4px; }

.acc { border-top: 1px solid var(--line); margin-top: 32px; }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  min-height: 64px; font-size: 18px; font-weight: 500;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 26px; font-weight: 300; }
.acc details[open] summary::after { content: "−"; }
.acc__body { padding: 0 0 24px; font-size: 17px; color: var(--umber-80); }
.acc__body ul { margin: 0 0 12px; padding-left: 20px; }
.acc__body li { margin-bottom: 4px; }

.closeup { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .closeup { grid-template-columns: 1fr 1fr; gap: 64px; } }
.closeup__frame { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--sand); }
@media (min-width: 900px) { .closeup__frame { max-width: 560px; } }

/* ---------- Модальне вікно ---------- */

.modal { border: 0; padding: 0; max-width: min(760px, calc(100vw - 24px)); width: 100%; background: var(--linen); color: var(--umber); }
.modal::backdrop { background: rgba(49, 30, 21, .55); }
.modal__head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--linen); }
.modal__body { padding: 24px; }
.modal__close { border: 0; background: none; min-height: 44px; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; }
.modal__close::before { content: "×"; font-size: 28px; line-height: 1; font-weight: 300; }

/* ---------- Таблиці ---------- */

.table-wrap { overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.table { width: 100%; border-collapse: collapse; font-size: 17px; min-width: 520px; }
.table th, .table td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.table thead th { font-weight: 500; font-size: 16px; border-bottom-color: var(--umber); }
.table tbody th { font-weight: 500; }
.table tr.is-match { background: var(--sand); }

/* ---------- Кошик ---------- */

.cart { display: grid; gap: 48px; }
@media (min-width: 1000px) { .cart { grid-template-columns: 1fr 400px; gap: 72px; align-items: start; } }
.line { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.line:first-child { border-top: 1px solid var(--line); }
@media (min-width: 640px) { .line { grid-template-columns: 140px 1fr auto; gap: 28px; } }
.line__img { aspect-ratio: 3 / 4; overflow: hidden; background: var(--sand); }
.line__img img { width: 100%; height: 100%; object-fit: cover; }
.line__name { font-size: 19px; margin: 0 0 6px; font-weight: 400; }
.line__name a { text-decoration: none; }
.line__name a:hover { text-decoration: underline; }
.line__meta { font-size: 16px; color: var(--umber-60); margin: 0 0 16px; }
.line__price { font-size: 19px; font-weight: 500; }
@media (max-width: 639px) { .line__price { grid-column: 2; } }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--umber-40); background: #fff; }
.qty button { width: 48px; height: 48px; border: 0; background: none; font-size: 22px; font-weight: 300; }
.qty button:hover { background: var(--sand); }
.qty output { min-width: 40px; text-align: center; font-size: 17px; }
.line__actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.remove { border: 0; background: none; padding: 8px 0; font-size: 16px; text-decoration: underline; text-underline-offset: .25em; color: var(--umber-80); }

.summary { background: #fff; border: 1px solid var(--line); padding: 28px; display: grid; gap: 14px; }
@media (min-width: 1000px) { .summary { position: sticky; top: calc(var(--header-h) + 24px); } }
.summary h2 { font-size: 22px; font-weight: 400; margin-bottom: 8px; }
.summary__row { display: flex; justify-content: space-between; gap: 16px; font-size: 17px; }
.summary__row--total { font-size: 21px; font-weight: 500; padding-top: 16px; border-top: 1px solid var(--line); margin-top: 6px; }
.summary__note { font-size: 15px; color: var(--umber-60); margin: 0; }
.summary__items { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 14px; }
.summary__items li { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; font-size: 16px; }
.summary__items img { width: 56px; height: 75px; object-fit: cover; }
.summary__items small { display: block; color: var(--umber-60); font-size: 14px; }

/* ---------- Оформлення ---------- */

.checkout { display: grid; gap: 48px; }
@media (min-width: 1000px) { .checkout { grid-template-columns: 1fr 420px; gap: 72px; align-items: start; } }
.step { border: 0; padding: 0; margin: 0 0 56px; min-width: 0; }
.step legend { display: flex; gap: 16px; align-items: baseline; font-size: clamp(24px, 2.4vw, 30px); font-weight: 300; margin-bottom: 24px; padding: 0; }
.step legend b { font-weight: 500; font-size: 17px; display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--umber); border-radius: 50%; flex: none; transform: translateY(-3px); }
.fields { display: grid; gap: 20px; }
@media (min-width: 640px) { .fields--2 { grid-template-columns: 1fr 1fr; } }
.sub { margin-top: 20px; display: grid; gap: 20px; }
.sub[hidden] { display: none; }
.form-error { padding: 16px 20px; border: 1px solid var(--error); color: var(--error); background: #fff; margin-bottom: 24px; font-size: 16px; }
.promo { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.promo .btn { padding: 0 20px; }

.done { text-align: left; padding: 40px 0; }
.done__mark { width: 64px; height: 64px; border: 1px solid var(--umber); border-radius: 50%; display: grid; place-items: center; margin-bottom: 28px; }

/* ---------- Сторінки-статті (догляд, розмір, про бренд) ---------- */

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.toc a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border: 1px solid var(--umber-40); text-decoration: none; font-size: 16px; }
.toc a:hover { background: var(--umber); color: var(--linen); border-color: var(--umber); }

.care-item { display: grid; gap: 32px; padding: 64px 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 16px); }
@media (min-width: 900px) { .care-item { grid-template-columns: 320px 1fr; gap: 64px; } }
.care-item__swatch { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--sand); }
@media (max-width: 899px) { .care-item__swatch { max-width: 240px; } }
.care-item h2 { margin-bottom: 12px; }
.care-item .lead { font-size: 19px; margin-bottom: 28px; }
.care-rules { display: grid; gap: 0; margin: 0; }
.care-rules > div { display: grid; gap: 4px 24px; padding: 16px 0; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .care-rules > div { grid-template-columns: 180px 1fr; } }
.care-rules dt { font-weight: 500; }
.care-rules dd { margin: 0; color: var(--umber-80); }
.care-products { margin-top: 20px; font-size: 16px; color: var(--umber-60); }

.tips { display: grid; gap: 32px; }
@media (min-width: 900px) { .tips { grid-template-columns: repeat(3, 1fr); } }
.tips h3 { font-size: 20px; font-weight: 500; margin-bottom: 8px; }
.tips p { color: var(--umber-80); font-size: 17px; }

.measure { display: grid; gap: 48px; align-items: start; }
@media (min-width: 900px) { .measure { grid-template-columns: 360px 1fr; gap: 72px; } }
.measure svg { width: 100%; max-width: 360px; height: auto; }
.measure ol { margin: 0; padding: 0; list-style: none; counter-reset: m; display: grid; gap: 28px; }
.measure li { counter-increment: m; display: grid; grid-template-columns: 44px 1fr; gap: 16px; }
.measure li::before { content: counter(m); width: 36px; height: 36px; border: 1px solid var(--umber); border-radius: 50%; display: grid; place-items: center; font-size: 16px; font-weight: 500; }
.measure h3 { font-size: 20px; font-weight: 500; margin-bottom: 4px; }
.measure p { margin: 0; color: var(--umber-80); }

.finder { padding: 40px; background: #fff; border: 1px solid var(--line); }
@media (max-width: 639px) { .finder { padding: 24px 20px; } }
.finder__fields { display: grid; gap: 20px; margin: 24px 0; }
@media (min-width: 640px) { .finder__fields { grid-template-columns: repeat(3, 1fr); } }
.finder__result { margin-top: 24px; padding: 24px; background: var(--sand); font-size: 18px; }
.finder__result[hidden] { display: none; }
.finder__result strong { font-size: 30px; font-weight: 400; display: block; margin: 4px 0 8px; }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 80px; } }
.split--rev > :first-child { order: 2; }
@media (max-width: 899px) { .split--rev > :first-child { order: 0; } }
.split__img { overflow: hidden; background: var(--sand); }
.split__img img { width: 100%; height: 100%; object-fit: cover; }

.values { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.values li { display: grid; gap: 6px 40px; padding: 28px 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .values li { grid-template-columns: 320px 1fr; } }
.values h3 { font-size: 22px; font-weight: 400; }
.values p { margin: 0; color: var(--umber-80); }

.prose h2 { font-size: clamp(24px, 2.4vw, 32px); margin: 56px 0 16px; }
.prose h3 { font-size: 20px; font-weight: 500; margin: 32px 0 8px; }
.prose p, .prose li { color: var(--umber-80); }
.prose ul { padding-left: 22px; }

.contact-grid { display: grid; gap: 56px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 80px; } }
.contact-list { display: grid; gap: 28px; margin: 0; }
.contact-list dt { font-size: 16px; color: var(--umber-60); margin-bottom: 4px; }
.contact-list dd { margin: 0; font-size: 22px; font-weight: 300; }
.contact-list dd a { text-decoration: none; }
.contact-list dd a:hover { text-decoration: underline; }

/* ---------- Сповіщення ---------- */

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 140%);
  width: min(560px, calc(100vw - 32px));
  background: var(--umber); color: var(--linen); padding: 18px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 17px;
  visibility: hidden;
  transition: transform .4s var(--ease), visibility 0s .4s;
}
.toast.is-visible { transform: translate(-50%, 0); visibility: visible; transition: transform .4s var(--ease); }
.toast a { font-weight: 500; white-space: nowrap; }

/* ==========================================================
   Рух. Увімкнений лише коли на <html> є клас .motion
   (його ставить скрипт у <head>, якщо не ввімкнено «зменшити рух»).
   ========================================================== */

/* Плавний скрол Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Переходи між сторінками (View Transitions) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .45s var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in .7s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* Шапка ховається під час прокрутки вниз і повертається вгору */
.header { transition: transform .55s var(--ease-out), box-shadow .4s, background-color .4s; }
.header.is-scrolled { box-shadow: 0 10px 30px -22px rgba(49, 30, 21, .5); }
.header.is-hidden { transform: translateY(-101%); }
.header__nav a, .header__actions a { position: relative; border-bottom: 0 !important; }
.header__nav a::after, .header__actions > a:not([data-cart-label])::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease-out);
}
.header__nav a:hover::after, .header__nav a[aria-current="page"]::after, .header__actions > a:hover::after { transform: scaleX(1); transform-origin: left; }
.header__actions a:hover { text-decoration: none; }

/* Лічильник кошика «підстрибує» при додаванні */
.cart-count.is-bump { animation: bump .6s var(--ease-spring); }
@keyframes bump { 30% { transform: scale(1.45); } }

/* Картинка, що «летить» у кошик */
.fly { position: fixed; z-index: 300; pointer-events: none; object-fit: cover; box-shadow: 0 20px 50px -20px rgba(49, 30, 21, .6); }

/* Поява під час прокрутки */
.motion [data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); transition-delay: var(--d, 0s); }
.motion [data-reveal].is-in { opacity: 1; transform: none; }
.motion [data-reveal="img"] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); transition: clip-path 1.4s var(--ease-out); transition-delay: var(--d, 0s); }
.motion [data-reveal="img"] > img, .motion img[data-reveal="img"] { transform: scale(1.18); transition: transform 2s var(--ease-out); transition-delay: var(--d, 0s); }
.motion [data-reveal="img"].is-in { clip-path: inset(0 0 0 0); }
.motion [data-reveal="img"].is-in > img, .motion img[data-reveal="img"].is-in { transform: none; }
.motion [data-reveal="lines"] { opacity: 1; transform: none; }
.motion [data-reveal="lines"] .ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.motion [data-reveal="lines"] .ln > span { display: block; transform: translateY(105%); transition: transform 1.1s var(--ease-out); transition-delay: calc(var(--d, 0s) + var(--i, 0) * .08s); }
.motion [data-reveal="lines"].is-in .ln > span { transform: none; }

/* Паралакс: зображення трохи більше за рамку, рухається повільніше за сторінку */
[data-parallax] { overflow: hidden; }
.motion [data-parallax] > img { will-change: transform; }

/* Картки: повільне наближення фото при наведенні */
.card__media img:first-child { transition: transform 1.4s var(--ease-out); }
@media (hover: hover) { .card:hover .card__media img { transform: scale(1.05); } }
.card__media img + img { transition: opacity .7s var(--ease-out), transform 1.4s var(--ease-out); }
.card__media::after {
  content: "Переглянути"; position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: grid; place-items: center; min-height: 48px; font-size: 15px; font-weight: 500;
  background: rgba(253, 246, 238, .94); color: var(--umber);
  opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .6s var(--ease-out);
}
@media (hover: hover) { .card:hover .card__media::after { opacity: 1; transform: none; } }

/* Плавна поява завантажених фото */
.motion img.lazy-fade { opacity: 0; transition: opacity .9s var(--ease-out); }
.motion img.lazy-fade.is-loaded { opacity: 1; }

/* Цитата: слова «проявляються» під час прокрутки */
.scrub .w { opacity: .16; transition: opacity .25s linear; }
.scrub .w.on { opacity: 1; }

/* Оформлення: виконаний крок */
.step legend b { transition: background-color .4s, color .4s, border-color .4s; position: relative; }
.step.is-done legend b { background: var(--umber); color: var(--linen); }
.step.is-done legend b span { opacity: 0; }
.step legend b::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 7px; margin: -5px 0 0 -6px;
  border-left: 1.5px solid var(--linen); border-bottom: 1.5px solid var(--linen);
  transform: rotate(-45deg) scale(0); transition: transform .4s var(--ease-spring);
}
.step.is-done legend b::after { transform: rotate(-45deg) scale(1); }

/* Рядок кошика зникає плавно */
.line.is-leaving { animation: leave .45s var(--ease-out) forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(-24px); } }

/* Галерея товару: фото з'являються по черзі */
.motion .gallery figure { animation: fade-up .9s var(--ease-out) both; }
.motion .gallery figure:nth-child(2) { animation-delay: .1s; }
.motion .gallery figure:nth-child(3) { animation-delay: .2s; }
.motion .gallery figure:nth-child(4) { animation-delay: .3s; }
.motion .buy > * { animation: fade-up .9s var(--ease-out) both; animation-delay: .15s; }
.motion .buy > :nth-child(2) { animation-delay: .22s; }
.motion .buy > :nth-child(3) { animation-delay: .29s; }
.motion .buy > :nth-child(n+4) { animation-delay: .36s; }

/* Розміри: вибір з м'якою анімацією */
.size-opt span { transition: background-color .35s var(--ease-out), color .35s, border-color .35s, transform .35s var(--ease-spring); }
.size-opt input:active + span { transform: scale(.96); }

/* Акордеон: плавне розкриття */
.acc summary::after { transition: transform .4s var(--ease-out); }
.acc details[open] summary::after { content: "+"; transform: rotate(45deg); }
.acc__body { animation: fade-down .45s var(--ease-out); }

/* Модальне вікно й меню */
.modal[open] { animation: modal-in .5s var(--ease-out); }
.modal[open]::backdrop { animation: fade .4s; }
@keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
.drawer.is-open li { animation: fade-up .7s var(--ease-out) both; animation-delay: calc(.1s + var(--i, 0) * .05s); }
