:root {
  --paper: #fbf7f6;
  --powder: #e8ccc7;
  --powder-deep: #c99790;
  --graphite: #4b4a4c;
  --ink: #2f2d2e;
  --muted: #8a7f80;
  --line: #eedfdc;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Onest", system-ui, sans-serif;
  --arch: 999px 999px 14px 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--powder-deep); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Шапка: портрет Алёны в арке */
.hero {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: end;
  padding: 22px 16px 18px;
  background: var(--powder);
}
.hero__arch {
  width: 112px;
  aspect-ratio: 3 / 4;
  border-radius: var(--arch);
  overflow: hidden;
  background: var(--paper);
  display: grid;
  place-items: center;
}
.hero__arch img { width: 100%; height: 100%; object-fit: cover; }
.hero__mono { font: 600 44px/1 var(--serif); color: var(--graphite); }
.hero h1 {
  margin: 0 0 6px;
  font: 600 38px/1 var(--serif);
  color: var(--graphite);
  letter-spacing: -0.01em;
}
.hero p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--graphite); max-width: 34ch; }

/* Разделы: крупные слова с засечками, листаются вбок */
.sections {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 16px 16px 0;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.sections::-webkit-scrollbar { display: none; }
.sections button {
  flex: none;
  border: 0;
  background: none;
  padding: 0 0 10px;
  font: 500 23px/1.1 var(--serif);
  color: var(--muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.sections button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--graphite); }

.filters { padding: 14px 16px 4px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 12px; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13.5px;
  cursor: pointer;
}
.chips button[aria-pressed="true"] { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.filters__row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.search input, .brand select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}
.brand select { max-width: 42vw; appearance: none; padding-right: 26px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%234b4a4c' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 10px center; }

main { padding: 0 16px; }
.count { margin: 10px 0 12px; font-size: 13px; color: var(--muted); }

/* Сетка товаров: фото в арках */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { body { max-width: 960px; margin: 0 auto; } .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { cursor: pointer; }
.card__photo {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--arch);
  overflow: hidden;
  background: var(--powder);
}
.card__photo img { width: 100%; height: 100%; object-fit: cover; }
.card__add {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(251, 247, 246, .94);
  color: var(--graphite);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.card__add[aria-pressed="true"] { background: var(--graphite); color: #fff; font-size: 15px; }
.card__brand { margin: 10px 0 2px; font: 600 18px/1.15 var(--serif); color: var(--ink); }
.card__title {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.more, .btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px;
  font-weight: 500;
  cursor: pointer;
}
.more { margin: 26px 0 0; background: #fff; border: 1px solid var(--line); }
.btn { background: var(--graphite); color: #fff; }
.btn:disabled { opacity: .45; }
.link-btn { border: 0; background: none; padding: 0; color: var(--graphite); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }

.ask { margin: 34px 0 10px; padding: 20px 0 0; border-top: 1px solid var(--line); text-align: center; }
.ask p { margin: 0 0 8px; font: 500 20px/1.25 var(--serif); }

.empty { grid-column: 1 / -1; text-align: center; padding: 40px 8px; }
.empty p { margin: 0 0 10px; font: 500 21px/1.3 var(--serif); }

.cart-pill {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border: 0;
  border-radius: 999px;
  padding: 13px 26px;
  background: var(--graphite);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  z-index: 5;
}
.cart-pill span { display: inline-block; margin-left: 6px; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--powder); color: var(--ink); font-size: 13px; }
.cart-pill.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: translateX(-50%) scale(1.08); } }

/* Нижние листы: карточка товара и корзина */
.sheet { position: fixed; inset: 0; z-index: 10; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(47, 45, 46, .4); }
.sheet__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  animation: rise .28s ease-out;
}
@media (min-width: 960px) { .sheet__body { max-width: 560px; margin: 0 auto; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.sheet__close {
  position: sticky; top: 10px; float: right; margin: 10px 12px 0 0; z-index: 2;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(251, 247, 246, .94); font-size: 24px; line-height: 1; cursor: pointer;
}

.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; padding: 0 16px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img {
  flex: 0 0 82%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  scroll-snap-align: center;
  border-radius: 14px;
  background: var(--powder);
}
.gallery img:first-child { border-radius: var(--arch); }
.product { padding-top: 14px; }
.product__info { padding: 18px 16px 0; }
.product__brand { margin: 0; font-size: 13.5px; color: var(--muted); }
.product h2 { margin: 2px 0 14px; font: 600 28px/1.15 var(--serif); color: var(--graphite); }
.product__facts { margin: 0 0 14px; display: grid; gap: 6px; }
.product__facts div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.product__facts dt { color: var(--muted); }
.product__facts dd { margin: 0; text-align: right; }
.product__caption { white-space: pre-line; color: var(--graphite); font-size: 14px; margin: 0 0 18px; }
.product__actions { display: grid; gap: 14px; justify-items: center; }

.cart { padding: 4px 16px 0; }
.cart h2 { margin: 14px 0 12px; font: 600 30px/1 var(--serif); color: var(--graphite); }
.cart__list { list-style: none; margin: 0; padding: 0; }
.cart__list li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart__list img { width: 56px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 999px 999px 8px 8px; }
.cart__list b { display: block; font: 600 17px/1.15 var(--serif); }
.cart__list small { color: var(--muted); font-size: 12.5px; }
.cart__list button { border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; }
.cart__note { color: var(--muted); font-size: 13px; margin: 14px 0; }
.cart__empty { padding: 20px 0; font: 500 20px/1.3 var(--serif); }

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