:root {
  --bg: #f4f1ec;
  --card: #ffffff;
  --ink: #17181a;
  --muted: #6d6f73;
  --line: #e2ddd5;
  --dark: #17181a;
  --fire: #f04e23;
  --fire-dark: #cf3d15;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

.demo-note {
  background: #fff3c9;
  color: #5c4a00;
  font-size: 13px;
  text-align: center;
  padding: 6px 16px;
}

/* Шапка */
.header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244, 241, 236, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__row { display: flex; align-items: center; gap: 20px; height: 60px; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.logo span { color: var(--fire); margin-left: 4px; }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav a:hover { color: var(--fire); }
.cart-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--dark); color: #fff;
  border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: 15px;
}
.cart-btn__count {
  background: var(--fire); border-radius: 999px;
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
}

/* Первый экран */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(240, 78, 35, .55), transparent 45%),
    radial-gradient(circle at 70% 90%, rgba(240, 78, 35, .25), transparent 50%),
    var(--dark);
  color: #fff;
}
.hero__inner { padding-top: 72px; padding-bottom: 80px; }
.hero__tag { text-transform: uppercase; letter-spacing: .18em; font-size: 13px; color: #ffb199; margin-bottom: 16px; }
.hero h1 { font-size: clamp(34px, 7vw, 68px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
.hero__text { max-width: 460px; margin: 20px 0 28px; color: #d3d3d3; font-size: 18px; }

/* Кнопки */
.btn {
  display: inline-block; border: 0; border-radius: 999px;
  padding: 14px 28px; font-weight: 700; text-align: center;
  transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn--fire { background: var(--fire); color: #fff; }
.btn--fire:hover { background: var(--fire-dark); }
.btn--dark { background: var(--dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--muted); padding: 10px; font-weight: 500; }
.btn--wide { width: 100%; }

/* Секции */
.section { padding: 56px 0; }
.section h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -.01em; }
.section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section--dark { background: var(--dark); color: #fff; }
.section--dark h2 { margin-bottom: 28px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: transparent; border: 1.5px solid var(--ink);
  border-radius: 999px; padding: 8px 18px; font-weight: 600; font-size: 15px;
}
.chip.is-active { background: var(--ink); color: #fff; }

/* Карточки товаров */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product { background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.product__pic { aspect-ratio: 4 / 5; position: relative; background: #fff; }
.product__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; background: #fff; transition: opacity .2s; }
.product__pic img + img { opacity: 0; }
.product__pic:hover img + img { opacity: 1; }
.product__badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255, 255, 255, .9); border-radius: 999px;
  padding: 3px 10px; font-size: 12px; font-weight: 600;
}
.product__info { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product__name { font-weight: 600; line-height: 1.3; }
.product__price { font-size: 19px; font-weight: 800; }
.sizes { display: flex; gap: 6px; flex-wrap: wrap; }
.size {
  min-width: 40px; height: 36px; padding: 0 8px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 14px; font-weight: 600;
}
.size.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.product__add {
  margin-top: auto; background: var(--ink); color: #fff;
  border: 0; border-radius: 10px; padding: 12px; font-weight: 700;
  transition: background .15s;
}
.product__add:hover { background: var(--fire); }
.product__add.is-added { background: #2e8b57; }
.product__add:disabled { background: var(--line); color: var(--muted); cursor: default; }
.product__price--none { font-size: 16px; font-weight: 600; color: var(--muted); }

/* Доставка */
.info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.info__card { background: #232427; border-radius: var(--radius); padding: 22px; }
.info__card h3 { font-size: 18px; margin-bottom: 8px; color: #ff8a66; }
.info__card p { color: #c9c9c9; font-size: 15px; }

/* Контакты */
.contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.contacts__label { color: var(--muted); font-size: 14px; }
.contacts__value { font-size: 20px; font-weight: 700; }

.footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 14px; }

/* Корзина */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 30; }
.cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40;
  width: min(420px, 100%); background: #fff;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, .2);
}
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cart__head h2 { font-size: 22px; }
.cart__close { background: none; border: 0; font-size: 32px; line-height: 1; width: 44px; height: 44px; }
.cart__body { flex: 1; overflow-y: auto; padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.cart__empty { color: var(--muted); text-align: center; padding: 40px 0; }
.cart__foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.cart__total { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; margin-bottom: 6px; }
.cart__total strong { font-size: 24px; }

.item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item__pic { width: 56px; height: 68px; border-radius: 8px; overflow: hidden; background: #fff; }
.item__pic img { width: 100%; height: 100%; object-fit: contain; }
.item__name { font-weight: 600; font-size: 15px; line-height: 1.25; }
.item__meta { color: var(--muted); font-size: 14px; }
.item__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.item__price { font-weight: 700; white-space: nowrap; }
.qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 8px; }
.qty button { background: none; border: 0; width: 34px; height: 34px; font-size: 18px; }
.qty span { min-width: 20px; text-align: center; font-weight: 600; }

.cart label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.cart input, .cart textarea {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px;
  font-size: 16px; color: var(--ink); background: #fff; resize: vertical;
}
.cart input:focus, .cart textarea:focus { outline: none; border-color: var(--ink); }

.cart__done { align-items: center; justify-content: center; text-align: center; }
.cart__done-mark {
  width: 72px; height: 72px; border-radius: 50%;
  background: #2e8b57; color: #fff; font-size: 38px;
  display: flex; align-items: center; justify-content: center;
}
.cart__done h3 { font-size: 24px; }
.cart__done p { color: var(--muted); margin-bottom: 10px; }

/* Планшет */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .info { grid-template-columns: repeat(2, 1fr); }
}

/* Телефон */
@media (max-width: 680px) {
  .nav { display: none; }
  .cart-btn { margin-left: auto; }
  .hero__inner { padding-top: 48px; padding-bottom: 56px; }
  .section { padding: 40px 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product__info { padding: 10px 10px 12px; gap: 8px; }
  .product__name { font-size: 14px; }
  .product__price { font-size: 17px; }
  .size { min-width: 34px; height: 34px; font-size: 13px; padding: 0 6px; }
  .info { grid-template-columns: 1fr; }
  .contacts { grid-template-columns: 1fr; }
}
