@font-face {
  font-family: 'Onest';
  src: url('./fonts/Onest-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Onest';
  src: url('./fonts/Onest-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Onest';
  src: url('./fonts/Onest-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geologica';
  src: url('./fonts/Geologica-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geologica';
  src: url('./fonts/Geologica-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #eeebe4;
  --color-card: #faf8f4;
  --color-text: #1f2420;
  --color-muted: #686c63;
  --color-line: #dad6ca;
  --color-accent: #3f4a34;
  --color-accent-dark: #2e3726;
  --color-accent-light: #eef0e6;
  --color-wood: #9c6b45;
  --color-sand: #e3ded1;
  --color-sand-dark: #d8d2c2;
  --color-danger: #b8432c;

  --font-main: 'Onest', system-ui, sans-serif;
  --font-display: 'Geologica', system-ui, sans-serif;

  color-scheme: light;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font: 400 16px/1.65 var(--font-main);
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

h1, h2, h3, .logo {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h1 { font-size: clamp(40px, 6.2vw, 84px); }
h2 { font-size: clamp(28px, 3.8vw, 46px); }

h3 {
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 18px;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section--sand {
  background: var(--color-sand);
}

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 32px;
}

.lead-text {
  color: var(--color-muted);
  max-width: 480px;
  margin: 22px 0 30px;
  font-size: 18px;
}

.link-more {
  font-weight: 500;
  border-bottom: 1.5px solid currentColor;
  transition: color 0.25s;
}

.link-more:hover {
  color: var(--color-wood);
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--color-accent);
  color: #fff;
  border: 1.5px solid var(--color-accent);
  border-radius: 4px;
  padding: 14px 28px;
  font: 500 15px var(--font-main);
  cursor: pointer;
  transition: background 0.25s, transform 0.25s, color 0.25s;
}

.btn:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
}

.btn--outline {
  background: none;
  color: var(--color-text);
  border-color: var(--color-text);
}

.btn--outline:hover {
  background: var(--color-text);
  color: #fff;
}

.btn--light {
  background: var(--color-accent-light);
  color: var(--color-accent);
  border-color: var(--color-accent-light);
}

.btn--light:hover {
  background: #fff;
}

.btn--small {
  padding: 11px;
  font-size: 14px;
}

.btn__label-on {
  display: none;
}

.btn.is-active .btn__label-on {
  display: inline;
}

.btn.is-active .btn__label-off {
  display: none;
}

.btn--outline.is-active {
  background: var(--color-text);
  color: #fff;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1.5px solid var(--color-line);
  border-radius: 100px;
  padding: 8px 16px;
  font: 500 14px var(--font-main);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s;
}

.pill-btn:hover {
  border-color: var(--color-text);
}

.pill-btn.is-active {
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
}

.pill-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pill-btn--compact {
  padding: 8px 11px;
}

.round-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(250, 248, 244, 0.9);
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}

.round-btn:hover {
  background: var(--color-accent);
  color: #fff;
  transform: scale(1.1);
}

.round-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.round-btn--bordered {
  border: 1.5px solid var(--color-line);
}

.round-btn--bordered:hover {
  border-color: var(--color-accent);
}

.counter {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 100px;
  background: var(--color-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.counter[hidden] {
  display: none;
}

.input {
  width: 100%;
  border: 1.5px solid var(--color-line);
  background: var(--color-card);
  border-radius: 4px;
  padding: 12px 14px;
  font: 400 15px var(--font-main);
  color: var(--color-text);
}

.input:focus {
  outline: 0;
  border-color: var(--color-accent);
}

.input.is-invalid {
  border-color: var(--color-danger);
}

/* Выпадающий список (сортировка в каталоге) */
.input--select {
  width: auto;
  border: 0;
  border-radius: 100px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-sand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231f2420' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 18px center / 12px 8px;
  padding: 8px 42px 8px 18px;
  font-size: 14px;
  cursor: pointer;
}

/* Кнопки-фильтры */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 0;
  background: var(--color-sand);
  border-radius: 100px;
  padding: 7px 14px;
  font: 400 13px var(--font-main);
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover {
  background: var(--color-sand-dark);
}

.chip.is-active {
  background: var(--color-text);
  color: #fff;
}

.chip__swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 7px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  vertical-align: -1px;
}

.photo {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(
    145deg,
    var(--photo-tone, #e4dac6),
    color-mix(in srgb, var(--photo-tone, #e4dac6) 80%, #6b5a3c)
  );
  color: rgba(31, 36, 32, 0.55);
  font: 500 15px var(--font-display);
}

.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

/* Выбор количества */
.quantity {
  display: flex;
  align-items: center;
  width: max-content;
  margin-top: 6px;
  border: 1.5px solid var(--color-line);
  border-radius: 100px;
}

.quantity__btn {
  width: 30px;
  height: 28px;
  border: 0;
  background: none;
  font-size: 16px;
  cursor: pointer;
}

.quantity__value {
  min-width: 22px;
  text-align: center;
  font-size: 14px;
}

/* Кнопка-крестик «удалить» */
.remove-btn {
  background: none;
  border: 0;
  color: var(--color-muted);
  font-size: 18px;
  cursor: pointer;
}

.remove-btn:hover {
  color: var(--color-danger);
}

.empty-message {
  color: var(--color-muted);
  padding: 30px 0;
}

.form-message {
  min-height: 18px;
  font-size: 13px;
  color: var(--color-accent);
}

/* Шапка */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(238, 235, 228, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1), border-color 0.3s;
}

.header.is-scrolled {
  border-color: var(--color-line);
}

.header.is-hidden {
  transform: translateY(-100%);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 20px;
}

/* Блок кнопок справа: поиск, избранное, корзина, бургер */
.header__actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 500;
  white-space: nowrap;
}

.logo__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  transition: transform 0.4s;
}

.logo:hover .logo__dot {
  transform: scale(1.5);
}

.nav {
  display: flex;
  gap: 30px;
}

.nav__link {
  position: relative;
  font-weight: 500;
  padding: 4px 0;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-wood);
  transition: width 0.3s;
}

.nav__link:hover::after,
.nav__link.is-active::after {
  width: 100%;
}

.nav__favorites {
  display: none;
}

.nav__favorites .counter {
  margin-left: 8px;
}

.burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid var(--color-line);
  border-radius: 50%;
  background: none;
  cursor: pointer;
}

.burger__line {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform 0.3s;
}

.burger.is-open .burger__line:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.burger.is-open .burger__line:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.is-bumped {
  animation: bump 0.4s;
}

@keyframes bump {
  50% { transform: scale(1.12); }
}

.hero {
  padding: 130px 0 70px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero__content > *,
.hero__image {
  animation: fade-up 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__image {
  aspect-ratio: 4 / 5;
  border-radius: 240px 240px 12px 12px;
  border: 1px solid var(--color-sand-dark);  
}

.hero__content > :nth-child(2) { animation-delay: 0.12s; }
.hero__content > :nth-child(3) { animation-delay: 0.24s; }
.hero__image { animation-delay: 0.2s; }

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}

.hero__image {
  aspect-ratio: 4 / 5;
  border-radius: 240px 240px 12px 12px;
}

.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.category-tile {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  padding: 18px;
  font: 500 19px var(--font-display);
  letter-spacing: -0.01em;
  transition: transform 0.4s, box-shadow 0.4s;
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 34px rgba(50, 40, 20, 0.16);
}

.category-tile__title {
  position: relative;
  z-index: 1;
}

.category-tile--has-photo {
  color: #fff;
}

.category-tile--has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(31, 36, 32, 0.6), rgba(31, 36, 32, 0) 55%);
  pointer-events: none;
}

.category-tile:hover img {
  transform: scale(1.05);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s, transform 0.6s;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.materials {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.materials__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.materials__photo {
  aspect-ratio: 3 / 5;
  border-radius: 6px;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s;
}

.materials__photo:nth-child(2) {
  margin-top: 36px;
}

.materials__photo:hover {
  transform: translateY(-10px);
  box-shadow: 0 18px 34px rgba(50, 40, 20, 0.18);
}

.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 36px;
}

.benefits__item {
  border-top: 2px solid var(--color-text);
  padding-top: 16px;
}

.benefits__text {
  margin-top: 6px;
  color: var(--color-muted);
  font-size: 15px;
}

/* Отзывы */
.reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.reviews__item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  background: var(--color-card);
  border-radius: 10px;
  padding: 26px;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s;
}

.reviews__item:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(50, 40, 20, 0.12);
}

.reviews__author {
  color: var(--color-muted);
  font-size: 14px;
  font-style: normal;
}

/* Подписка на рассылку */
.newsletter {
  background: var(--color-accent);
  color: var(--color-accent-light);
  padding: 56px 0;
}

.newsletter__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.newsletter__text,
.newsletter__message {
  margin-top: 8px;
  opacity: 0.8;
}

.newsletter__message {
  min-height: 24px;
}

.newsletter__form {
  display: flex;
  gap: 10px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-grid--3col {
  grid-template-columns: repeat(3, 1fr);
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--color-card);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: opacity 0.6s, transform 0.35s, box-shadow 0.35s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(50, 40, 20, 0.12);
}

.product-card__image {
  aspect-ratio: 1;
  border-radius: 6px;
}

.product-card:hover .product-card__image img {
  transform: scale(1.05);
}

.product-card__badge {
  position: absolute;
  left: 22px;
  top: 22px;
  z-index: 2;
  background: var(--color-accent);
  color: #fff;
  font: 500 12px var(--font-main);
  font-style: normal;
  padding: 3px 10px;
  border-radius: 100px;
}

.product-card__body {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  padding: 0 4px;
}

.product-card__title {
  font-size: 16px;
  line-height: 1.3;      
  margin-bottom: 4px;    
}

.product-card__meta {
  display: block;
  color: var(--color-muted);
  line-height: 1.45;
}

.product-card__price {
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.product-card__old-price {
  display: block;
  color: var(--color-muted);
  font-weight: 400;
  font-size: 13px;
}

.product-card__add {
  width: 100%;
  margin-top: auto;
}

/* Сердечко на фото.*/
.favorite-btn {
  position: absolute;
  right: 22px;                               
  top: 22px;                                 
  z-index: 2;                                
  width: 34px;
  height: 34px;
  border: 1px solid var(--color-sand-dark);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: #b5ae9f;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.25s, color 0.25s;
}

.favorite-btn:hover {
  transform: scale(1.14);
}

.favorite-btn.is-active {
  color: var(--color-danger);
}

.catalog-title {
  height: 0.72em;
  margin: 96px 0 44px;
  overflow: hidden;
  text-align: center;
  font: 300 clamp(72px, 16vw, 220px) / 1 var(--font-display);
  letter-spacing: -0.05em;
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.catalog-header__title {
  font: 500 clamp(24px, 3vw, 32px) var(--font-display);
  letter-spacing: -0.02em;
}

/* Панель: «Фильтры» */
.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--color-muted);
}

.catalog-toolbar__sort {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Кнопка открытия фильтров */
.filters-toggle {
  display: none;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 40px;
}

/* Левая колонка фильтров. */
.filters {
  position: sticky;
  top: 96px;
  display: block;
  max-height: calc(100vh - 116px);
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filters::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Шапка панели с кнопкой «Закрыть» */
.filters__header {
  display: none;
}

.filters__title {
  margin-top: 10px;
  font-size: 15px;
}

.filters__group {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-line);
}

.filters__summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  color: var(--color-muted);
  font-size: 15px;
  cursor: pointer;
}

.filters__summary::-webkit-details-marker {
  display: none;
}

.filters__summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23686c63' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.25s;
}

.filters__group[open] .filters__summary::after {
  transform: rotate(180deg);
}

.filters__group .chips {
  margin-top: 14px;
}

.filters__subtitle {
  margin-top: 14px;
  color: var(--color-muted);
  font-size: 13px;
}

.filters__subtitle + .chips {
  margin-top: 8px;
}

.filters__price-value {
  margin-top: 12px;
  font-weight: 500;
  font-size: 14px;
}

.filters__button {
  width: 100%;
  margin-top: 20px;
}

/* «Показать товары» */
.filters__apply {
  display: none;
}

.range {
  position: relative;
  height: 22px;
  margin: 12px 0 4px;
}

.range::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 9px;
  height: 3px;
  background: var(--color-line);
  border-radius: 3px;
}

.range__fill {
  position: absolute;
  top: 9px;
  height: 3px;
  background: var(--color-text);
  border-radius: 3px;
}

.range__input {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  background: none;
  accent-color: var(--color-accent);
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}

.range__input::-webkit-slider-runnable-track { background: none; }
.range__input::-moz-range-track { background: none; }

.range__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: 0;
  border-radius: 50%;
  background: var(--color-text);
  border: 3px solid var(--color-bg);
  pointer-events: auto;
  cursor: pointer;
}

.range__input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-text);
  border: 3px solid var(--color-bg);
  pointer-events: auto;
  cursor: pointer;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(31, 36, 32, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

.overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Боковая панель справа (избранное) */
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  background: var(--color-card);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s 0.45s;
}

.drawer.is-open {
  transform: none;
  visibility: visible;
  transition-delay: 0s;
}

.drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--color-line);
}

.drawer__body {
  flex: 1;
  overflow: auto;
  padding: 6px 22px;
}

.drawer__footer {
  display: grid;
  gap: 12px;
  padding: 18px 22px;
  border-top: 1px solid var(--color-line);
}

/* Строка товара в панели избранного */
.favorites-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-line);
  cursor: pointer;
}

.favorites-item__image {
  width: 64px;
  height: 64px;
  border-radius: 6px;
}

.favorites-item__title {
  font: 500 15px var(--font-main);
}

.favorites-item__price {
  display: block;
  margin-top: 2px;
  color: var(--color-muted);
}

.favorites-item__add {
  margin-top: 12px;
  padding: 8px 14px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0s 0.3s;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

.modal--top {
  align-items: start;
  padding-top: 10vh;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 36, 32, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal__box {
  position: relative;
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 440px;
  background: var(--color-card);
  border-radius: 12px;
  padding: 32px 28px;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1.15);
}

.modal.is-open .modal__box {
  transform: none;
}

.modal__box p {
  color: var(--color-muted);
}

.modal__title {
  font-size: 24px;
  font-weight: 500;
}

.modal__close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 3;
}

/* Окно товара */
.modal__box--product {
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  max-width: 960px;
  max-height: 92vh;
  padding: 20px;
  overflow: auto;
}

.product-view__gallery {
  display: grid;
  gap: 10px;
  align-content: start;
}

.product-view__viewer {
  position: relative;
}

.product-view__main-image {
  aspect-ratio: 1;
  border-radius: 8px;
}

.product-view__arrow {
  position: absolute;
  top: 50%;
  width: 38px;
  height: 38px;
  margin-top: -19px;
  border: 1px solid var(--color-accent);   
  border-radius: 50%;
  background: rgba(250, 248, 244, 0.92);
  color: var(--color-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.product-view__arrow:hover {
  background: var(--color-accent);
  color: #fff;
}

.product-view__arrow--prev { left: 10px; }
.product-view__arrow--next { right: 10px; }

.product-view__thumbs {
  display: flex;
  gap: 8px;
  padding: 2px;
  overflow-x: auto;
}

.product-view__thumb {
  flex: 0 0 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  font: 500 13px var(--font-main);
  cursor: pointer;
}

.product-view__thumb.is-active {
  border-color: var(--color-text);
}

.product-view__info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 10px 4px 6px;
}

.product-view__category {
  color: var(--color-muted);
}

.product-view__title {
  font-size: clamp(24px, 3vw, 34px);
}

.product-view__price {
  font: 500 26px var(--font-display);
}

.product-view__old-price {
  margin-left: 10px;
  color: var(--color-muted);
  font-size: 15px;
  font-weight: 400;
}

.product-view__specs {
  border-top: 1px solid var(--color-line);
}

.product-view__spec {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-line);
  font-size: 14px;
}

.product-view__spec dt {
  color: var(--color-muted);
}

.product-view__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

/* Окно поиска */
.modal__box--search {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  max-width: 560px;
  max-height: 76vh;
  padding: 20px;
}

.search__top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search__top .input {
  flex: 1;
  border-radius: 100px;
  padding: 12px 18px;
  font-size: 16px;
}

.search__close {
  flex: none;
}

.search__results {
  display: grid;
  gap: 4px;
  align-content: start;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.search__results::-webkit-scrollbar {
  display: none;
}

.search__results .empty-message {
  padding: 14px 4px;
}

.search__item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
  font: 500 15px var(--font-main);
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.2s;
}

.search__item:hover,
.search__item:focus-visible {
  background: var(--color-sand);
}

.search__item-image {
  width: 48px;
  height: 48px;
  border-radius: 6px;
}

.search__item-meta {
  display: block;
  color: var(--color-muted);
  font-weight: 400;
  font-size: 13px;
}

.search__item-price {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

/* Окно «Товар добавлен в корзину» */
.modal__box--added {
  justify-items: center;
  gap: 10px;
  max-width: 380px;
  padding: 36px 28px 28px;
  text-align: center;
}

.modal__box--added .modal__title {
  font-size: 22px;
}

.modal__box--added p {
  font-size: 15px;
}

.added__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 26px;
  line-height: 1;
}

.added__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.added__actions .btn {
  padding: 12px 10px;
}

.cart-title {
  margin: 120px 0 32px;
  font-size: clamp(36px, 5vw, 56px);
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
  padding-bottom: 40px;
}

/* Корзина пуста  */
.cart-layout:has(.checkout[hidden]) {
  grid-template-columns: 1fr;
}

.cart-empty {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 56px 24px;
  border-radius: 12px;
  background: var(--color-card);
  text-align: center;
  color: var(--color-muted);
}

/* Товар в корзине */
.cart-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--color-card);
  cursor: pointer;
}

.cart-item__image {
  width: 140px;
  aspect-ratio: 1;
  border-radius: 8px;
}

.cart-item__info {
  display: grid;
  gap: 4px;
  justify-items: start;
  align-content: center;
}

.cart-item__title {
  font-size: 20px;
}

.cart-item__meta {
  color: var(--color-muted);
}

.cart-item__info .quantity {
  margin-top: 10px;
}

.cart-item__price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  align-self: stretch;
  padding: 4px 6px 4px 0;
}

.cart-item__prices {
  display: grid;
  justify-items: end;
}

.cart-item__total {
  font: 500 20px var(--font-display);
  white-space: nowrap;
}

.cart-item__unit-price {
  color: var(--color-muted);
  font-size: 13px;
}

/* Блок справа: итог заказа и форма доставки */
.checkout {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 12px;
  background: var(--color-card);
}

.checkout[hidden] {
  display: none;
}

.order-summary {
  display: grid;
  gap: 14px;
}

.order-summary__title {
  font-size: 22px;
}

/* Полоска «до бесплатной доставки осталось…» */
.delivery-progress__text {
  color: var(--color-muted);
  font-size: 14px;
}

.delivery-progress__track {
  height: 6px;
  margin-top: 8px;
  border-radius: 6px;
  background: var(--color-line);
  overflow: hidden;
}

.delivery-progress__bar {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--color-accent);
  transition: width 0.5s;
}

.promo {
  display: flex;
  gap: 8px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
}

.summary-row--total {
  font-weight: 700;
  font-size: 19px;
}

.checkout-form {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--color-line);
}

.checkout-form__title {
  margin-bottom: 2px;
  font-size: 18px;
}

/* Экран «Заказ принят» */
.order-done {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 140px 0 60px;
  text-align: center;
}

.order-done p {
  max-width: 460px;
  color: var(--color-muted);
}

.footer {
  margin-top: 40px;
  padding: 56px 0 24px;
  background: var(--color-sand);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer__about {
  max-width: 260px;
  margin-top: 10px;
  color: var(--color-muted);
  font-size: 14px;
}

.footer__title {
  margin-bottom: 10px;
  font: 500 15px var(--font-main);
}

.footer__link,
.footer__text {
  display: block;
  margin: 6px 0;
  color: var(--color-muted);
  font-size: 14px;
}

.footer__link:hover {
  color: var(--color-text);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .section {
    padding: 56px 0;
  }

  .hero__inner,
  .materials,
  .catalog-layout,
  .newsletter__inner {
    grid-template-columns: 1fr;
  }

  .hero__image {
    max-width: 420px;
  }

  .categories,
  .product-grid,
  .product-grid--3col {
    grid-template-columns: repeat(2, 1fr);
  }

  .benefits,
  .reviews,
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .burger {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 6px 24px 14px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-line);
  }

  .nav.is-open {
    display: flex;
  }

  .nav__link {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-line);
  }

  .nav__link::after {
    display: none;
  }

  .catalog-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .catalog-toolbar {
    flex-wrap: wrap;
  }

  .filters-toggle {
    display: inline-flex;
    padding: 9px 18px;
    font-size: 14px;
  }

  .filters {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    width: min(360px, 100%);
    max-height: none;
    margin: 0;
    padding: 18px 22px 28px;
    background: var(--color-card);
    overscroll-behavior: contain;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s 0.45s;
  }

  .filters.is-open {
    transform: none;
    visibility: visible;
    transition-delay: 0s;
  }

  .filters__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px;
  }

  .filters__apply {
    display: inline-flex;
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }

  .checkout {
    position: static;
  }
}

/* Окно товара в одну колонку */
@media (max-width: 760px) {
  .modal__box--product {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .product-view__main-image {
    aspect-ratio: 1;
  }

  .product-view__actions {
    grid-template-columns: 1fr;
  }
}

/* Телефоны */
@media (max-width: 560px) {
  .benefits,
  .reviews,
  .footer__grid {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .product-grid--3col {
    gap: 12px;
  }

  .product-card__body {
    flex-direction: column;
    gap: 4px;
  }

  .product-card__price {
    text-align: left;
  }

  .newsletter__form {
    flex-direction: column;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 6px;
  }

  .pill-btn {
    padding: 8px 11px;
  }

  .pill-btn__label {
    display: none;
  }

  .modal--top {
    padding-top: 72px;
  }

  .cart-item {
    grid-template-columns: 88px 1fr;
    gap: 14px;
  }

  .cart-item__image {
    width: 88px;
  }

  .cart-item__title {
    font-size: 17px;
  }

  .cart-item__price-block {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    padding: 0 2px;
  }

  .cart-item__prices {
    justify-items: start;
  }
}

@media (max-width: 420px) {
  .header .container {
    padding: 0 16px;
  }

  .header__inner,
  .header__actions {
    gap: 8px;
  }

  .logo {
    gap: 8px;
    font-size: 20px;
  }

  .logo__dot {
    width: 12px;
    height: 12px;
  }

  .nav {
    padding: 6px 16px 14px;
  }

  .product-card__badge {
    position: static;
    align-self: flex-start;
    margin: 0 4px;
  }

  .product-card__body {
    position: relative;
  }

  .favorite-btn {
    top: auto;
    right: 4px;
    bottom: 0;
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .added__actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .header__favorites-btn {
    display: none;
  }

  .nav__favorites {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 0;
    border: 0;
    border-bottom: 1px solid var(--color-line);
    background: none;
    font: 500 16px var(--font-main);
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}