* { box-sizing: border-box; }

:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --ink: #171512;
  --muted: #5d7556;
  --line: #e6e0d6;
  --accent: #ff2eb6;
  --accent-ink: #ffffff;
  --lime: #d8ff3e;
  --radius: 18px;
  --shadow: 0 12px 32px rgba(30, 24, 16, 0.10);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

h1, h2, h3, h4 { font-family: 'Unbounded', 'Manrope', sans-serif; line-height: 1.1; margin: 0; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 239, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(30,24,16,.06); }
.header__inner { display: flex; align-items: center; gap: 1.5rem; height: 68px; }

.logo { font-family: 'Unbounded', sans-serif; font-weight: 900; font-size: 1.35rem; letter-spacing: .04em; }
.logo__dot { color: var(--accent); }

.nav { display: flex; gap: 1.25rem; margin-left: auto; }
.nav__link { font-weight: 600; font-size: .95rem; color: var(--muted); position: relative; padding: .25rem 0; transition: color .2s; }
.nav__link::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--accent); transition: width .25s; }
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { width: 100%; }

.header__actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.nav + .header__actions { margin-left: 0; }

.icon-btn {
  position: relative; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); cursor: pointer; transition: transform .15s, border-color .2s;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--ink); }

.cart-btn__count {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 700; border-radius: 999px;
  transition: transform .2s;
}
.cart-btn__count.bump { transform: scale(1.35); }

.burger { display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface); border-radius: 50%; cursor: pointer; }
.burger span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }

.search-bar { max-height: 0; overflow: hidden; transition: max-height .3s ease; border-top: 1px solid transparent; }
.search-bar.open { max-height: 90px; border-color: var(--line); }
.search-bar__input {
  width: 100%; margin: .8rem 0; padding: .8rem 1.1rem;
  border: 1px solid var(--line); border-radius: 999px;
  font: inherit; background: var(--surface); outline: none;
}
.search-bar__input:focus { border-color: var(--ink); }

/* ---------- Герой ---------- */
.hero { padding: 3.5rem 0 0; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }

.hero__badge {
  display: inline-block; padding: .4rem .9rem; border-radius: 999px;
  background: var(--lime); color: var(--ink);
  font-size: .8rem; font-weight: 700; letter-spacing: .02em;
}
.hero__title { font-size: clamp(2.2rem, 5vw, 3.9rem); font-weight: 900; margin: 1.1rem 0 0; color:hsl(184, 69%, 19%);}
.accent { color: var(--accent); }
.hero__lead { font-size: 1.08rem; color: var(--muted); max-width: 34rem; margin: 1rem 0 1.6rem; }

.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-weight: 700; cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s, color .2s;
}
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255,77,46,.35); }
.btn--ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.btn--sm { padding: .55rem 1rem; font-size: .9rem; }
.btn--block { width: 100%; }

.hero__stats { display: flex; gap: 2.2rem; margin-top: 2.2rem; }
.stat b { display: block; font-family: 'Unbounded', sans-serif; font-size: 1.35rem; }
.stat span { font-size: .85rem; color: var(--muted); }

.hero__art { position: relative; height: 420px; }
.blob { position: absolute; border-radius: 50%; filter: blur(2px); }
.blob--1 { width: 300px; height: 300px; background: #ffd9cf; top: 40px; right: 20px; animation: float 7s ease-in-out infinite; }
.blob--2 { width: 170px; height: 170px; background: var(--lime); bottom: 30px; left: 10px; animation: float 5s ease-in-out infinite reverse; }

.card-float {
  position: absolute; display: grid; place-items: center;
  width: 120px; height: 120px; font-size: 3.4rem;
  background: var(--surface); border-radius: 26px; box-shadow: var(--shadow);
}
.card-float--1 { top: 24px; left: 30px; transform: rotate(-8deg); animation: float 6s ease-in-out infinite; }
.card-float--2 { top: 150px; right: 40px; transform: rotate(7deg); animation: float 6.6s ease-in-out infinite .4s; }
.card-float--3 { bottom: 30px; left: 110px; transform: rotate(-4deg); animation: float 5.6s ease-in-out infinite .8s; }

.hero__price-tag {
  position: absolute; bottom: 90px; right: 0;
  background: var(--accent); color: #fff; font-weight: 800;
  padding: .5rem 1rem; border-radius: 999px; box-shadow: var(--shadow);
  animation: float 4.5s ease-in-out infinite;
}
@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -14px; } }

.marquee { margin-top: 3rem; background: var(--ink); color: #fff; overflow: hidden; padding: .8rem 0; }
.marquee__track { display: flex; gap: 3rem; white-space: nowrap; width: max-content; animation: scroll 26s linear infinite; font-weight: 600; font-size: .95rem; }
.marquee__track span { color: var(--lime); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Секции ---------- */
.section { padding: 4rem 0; }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }
.section__head { margin-bottom: 1.8rem; }
.section__title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 900; }
.section__sub { color: var(--muted); margin: .5rem 0 0; }

/* ---------- Фильтры ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.6rem; }
.chip {
  padding: .5rem 1.05rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface);
  font: inherit; font-weight: 600; font-size: .9rem; color: var(--muted);
  transition: .18s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-2px); }
.chip--active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Товары ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.4rem; }
.grid__empty { text-align: center; color: var(--muted); padding: 2rem 0; font-weight: 600; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .25s;
  animation: appear .4s ease both;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
@keyframes appear { from { opacity: 0; transform: translateY(14px); } }

.card__media { position: relative; height: 190px; display: grid; place-items: center; font-size: 4rem; cursor: pointer; overflow: hidden; }
.card__media::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 20%, rgba(255,255,255,.55), transparent 60%); }
.card__emoji { transition: transform .3s; }
.card:hover .card__emoji { transform: scale(1.12) rotate(-4deg); }

.card__badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: .28rem .6rem; border-radius: 999px; background: var(--ink); color: #fff;
}
.card__badge--скидка { background: var(--accent); }
.card__badge--новинка { background: var(--lime); color: var(--ink); }

.card__fav {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.85); font-size: 1rem; line-height: 1;
  transition: transform .15s;
}
.card__fav:hover { transform: scale(1.12); }
.card__fav.is-on { background: var(--accent); }

.card__body { padding: .95rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.card__cat { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.card__name { font-weight: 700; font-size: 1.02rem; cursor: pointer; }
.card__name:hover { color: var(--accent); }
.card__descr { font-size: .87rem; color: var(--muted); margin: 0; }
.card__row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: auto; padding-top: .7rem; }
.card__price { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 1.12rem; }
.card__old { font-size: .85rem; color: var(--muted); text-decoration: line-through; margin-left: .4rem; font-family: 'Manrope', sans-serif; font-weight: 500; }

.add-btn {
  padding: .55rem .95rem; border-radius: 999px; border: 1.5px solid var(--ink);
  background: transparent; color: var(--ink); font: inherit; font-weight: 700; font-size: .88rem;
  cursor: pointer; transition: .18s; white-space: nowrap;
}
.add-btn:hover { background: var(--ink); color: #fff; }
.add-btn.added { background: var(--lime); border-color: var(--lime); color: var(--ink); }

/* ---------- Преимущества ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.feature { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; transition: transform .2s; }
.feature:hover { transform: translateY(-5px); }
.feature__icon { font-size: 2rem; margin-bottom: .6rem; }
.feature h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.feature p { margin: 0; color: var(--muted); font-size: .93rem; }

/* ---------- Доставка ---------- */
.delivery { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: start; }
.delivery__list { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .8rem; }
.delivery__list li { padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.delivery__promo { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.delivery__promo-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--lime); font-weight: 700; }
.delivery__promo-code { display: block; font-family: 'Unbounded', sans-serif; font-size: 2rem; margin: .4rem 0; letter-spacing: .08em; }
.delivery__promo p { margin: 0; color: #cfc9c0; font-size: .92rem; }

/* ---------- Подписка ---------- */
.subscribe { text-align: center; }
.subscribe__form { display: flex; gap: .7rem; justify-content: center; margin-top: 1.4rem; flex-wrap: wrap; }
.subscribe__input { padding: .85rem 1.2rem; border-radius: 999px; border: 1.5px solid var(--line); font: inherit; width: min(360px, 100%); outline: none; }
.subscribe__input:focus { border-color: var(--ink); }
.subscribe__ok { color: #1c8a4b; font-weight: 700; margin-top: 1rem; }

/* ---------- Подвал ---------- */
.footer { background: var(--ink); color: #e9e4dc; padding: 3rem 0; }
.footer__inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer .logo { color: #fff; }
.footer__note { color: #a29b90; font-size: .9rem; margin-top: .8rem; }
.footer__cols { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer__cols h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--lime); margin-bottom: .7rem; }
.footer__cols a, .footer__cols span { display: block; color: #cfc9c0; font-size: .95rem; margin-bottom: .45rem; transition: color .2s; }
.footer__cols a:hover { color: #fff; }

/* ---------- Корзина ---------- */
.overlay { position: fixed; inset: 0; background: rgba(23,21,18,.5); opacity: 0; visibility: hidden; transition: .3s; z-index: 90; }
.overlay.show { opacity: 1; visibility: visible; }

.cart {
  position: fixed; top: 0; right: 0; z-index: 100;
  width: min(420px, 100%); height: 100dvh;
  background: var(--surface); box-shadow: -20px 0 50px rgba(0,0,0,.18);
  transform: translateX(105%); transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.cart.open { transform: translateX(0); }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); }
.cart__head h3 { font-size: 1.2rem; }
.cart__items { flex: 1; overflow-y: auto; padding: 1rem 1.4rem; display: flex; flex-direction: column; gap: .9rem; }
.cart__empty { text-align: center; color: var(--muted); margin-top: 3rem; }
.cart__empty b { display: block; font-size: 2.4rem; margin-bottom: .5rem; }

.ci { display: grid; grid-template-columns: 64px 1fr auto; gap: .8rem; align-items: center; animation: appear .3s ease both; }
.ci__thumb { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; font-size: 1.8rem; }
.ci__name { font-weight: 700; font-size: .93rem; }
.ci__price { font-size: .85rem; color: var(--muted); }
.ci__qty { display: flex; align-items: center; gap: .45rem; margin-top: .35rem; }
.ci__qty button { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-weight: 700; line-height: 1; }
.ci__qty button:hover { background: var(--ink); color: #fff; }
.ci__qty span { font-weight: 700; font-size: .9rem; min-width: 16px; text-align: center; }
.ci__del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.ci__del:hover { color: var(--accent); }

.cart__foot { border-top: 1px solid var(--line); padding: 1.1rem 1.4rem 1.4rem; }
.cart__promo { display: flex; gap: .5rem; margin-bottom: .9rem; }
.cart__promo input { flex: 1; padding: .6rem .9rem; border-radius: 12px; border: 1.5px solid var(--line); font: inherit; outline: none; text-transform: uppercase; }
.cart__promo input:focus { border-color: var(--ink); }
.cart__row { display: flex; justify-content: space-between; font-size: .97rem; margin-bottom: .4rem; }
.cart__row--muted { color: #1c8a4b; }
.cart__row--total { font-size: 1.2rem; font-family: 'Unbounded', sans-serif; margin: .7rem 0 1rem; }
.cart__hint { text-align: center; font-size: .8rem; color: var(--muted); margin: .7rem 0 0; }

/* ---------- Модалка ---------- */
.modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 1.2rem; background: rgba(23,21,18,.55); animation: appear .2s ease; }
.modal__card { background: var(--surface); border-radius: 22px; width: min(720px, 100%); max-height: 88dvh; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; animation: pop .3s cubic-bezier(.34,1.56,.64,1); }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
.modal__media { display: grid; place-items: center; font-size: 7rem; min-height: 260px; }
.modal__body { padding: 1.6rem; display: flex; flex-direction: column; gap: .7rem; }
.modal__cat { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.modal__name { font-size: 1.5rem; font-weight: 900; }
.modal__price { font-family: 'Unbounded', sans-serif; font-size: 1.5rem; font-weight: 700; }
.modal__descr { color: var(--muted); font-size: .95rem; margin: 0; }
.modal__sizes { display: flex; gap: .5rem; flex-wrap: wrap; }
.size { width: 44px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; transition: .15s; }
.size:hover { border-color: var(--ink); }
.size.sel { background: var(--ink); border-color: var(--ink); color: #fff; }
.modal__close { position: absolute; }
.modal__meta { font-size: .85rem; color: var(--muted); display: grid; gap: .25rem; margin-top: .3rem; }

/* ---------- Тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 140%);
  background: var(--ink); color: #fff; padding: .8rem 1.4rem; border-radius: 999px;
  font-weight: 700; font-size: .93rem; z-index: 200; box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .hero__inner, .delivery { grid-template-columns: 1fr; }
  .hero__art { height: 300px; order: -1; }
  .modal__card { grid-template-columns: 1fr; }
  .modal__media { min-height: 180px; font-size: 5rem; }

  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .3s;
  }
  .nav.open { max-height: 320px; }
  .nav__link { padding: .95rem 1.25rem; border-bottom: 1px solid var(--line); }
  .nav__link::after { display: none; }
  .burger { display: flex; }
}

@media (max-width: 520px) {
  .hero__stats { gap: 1.2rem; }
  .stat b { font-size: 1.1rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
  .card__media { height: 150px; font-size: 3rem; }
  .card__descr { display: none; }
  .footer__cols { gap: 1.6rem; }
}
