/* =========================================================
   Aroma Lab — масляні парфуми. Mobile first.
   ========================================================= */
:root {
  --black: #111;
  --text: #1a1a1a;
  --muted: #777;
  --line: #e2e2e2;
  --gray: #f4f4f4;
  --orange: #f28c1b;
  --green: #2ea44f;
  --blue: #2aa6dc;
  --red: #d33;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Розташування напису на вашому флаконі (у % від картинки bottle.png).
     Якщо заміните bottle.png — підкоригуйте ці значення. */
  --label-top: 47%;
  --label-height: 38%;
  --label-side: 22%;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: #fff;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; font-weight: 600; }
h1 { font-size: 22px; }
h2 { font-size: 19px; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
main { min-height: 50vh; padding-bottom: 48px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 28px;
  background: var(--black); color: #fff;
  border: 1px solid var(--black); border-radius: 0;
  text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 600;
  transition: background .2s, color .2s;
}
.btn:hover { background: #fff; color: var(--black); }
.btn--outline { background: #fff; color: var(--black); }
.btn--outline:hover { background: var(--black); color: #fff; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- Шапка ---------- */
.hdr { border-bottom: 1px solid var(--line); background: #fff; }
.hdr__row {
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  min-height: 64px; gap: 8px;
}
.hdr__left, .hdr__right { display: none; }
.hdr__burger, .hdr__cart-mobile {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 0; position: relative;
}
.hdr__burger svg, .hdr__cart-mobile svg { width: 24px; height: 24px; }
.logo { display: flex; flex-direction: column; align-items: center; justify-self: center; line-height: 1; }
.logo__name { display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 700; letter-spacing: .16em; margin-right: -.16em; white-space: nowrap; }
.logo__drop { width: 14px; height: 20px; }
.logo__sub { font-size: 9px; letter-spacing: .42em; text-transform: uppercase; color: var(--muted); margin-top: 5px; margin-right: -.42em; }
.cart-count {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--black); color: #fff; font-size: 11px; font-weight: 600;
  display: grid; place-items: center;
}
.cart-count:empty, .cart-count[data-n="0"] { display: none; }

.catbar { background: var(--black); }
.catbar__list {
  display: flex; gap: 4px; margin: 0 auto; padding: 0 8px; list-style: none;
  overflow-x: auto; scrollbar-width: none; justify-content: space-between; max-width: 1240px;
}
.catbar__list::-webkit-scrollbar { display: none; }
.catbar a {
  display: block; padding: 13px 10px; color: #fff; white-space: nowrap;
  text-transform: uppercase; font-size: 13px; letter-spacing: .1em; font-weight: 500;
}
.catbar a:hover, .catbar a.is-active { color: #bbb; }
.catbar a.is-sale { color: #ffb15e; }

/* Мобільне меню */
.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__bg { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .25s; }
.drawer.is-open .drawer__bg { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(86vw, 340px);
  background: #fff; padding: 16px 20px 32px; overflow-y: auto;
  transform: translateX(-100%); transition: transform .25s;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__close { float: right; background: none; border: 0; width: 40px; height: 40px; font-size: 28px; line-height: 1; }
.drawer nav { clear: both; display: flex; flex-direction: column; margin: 12px 0 20px; }
.drawer nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
.drawer__info { display: grid; gap: 10px; font-size: 14px; }
.drawer__info .socials { margin-top: 6px; }

/* Пошук */
.search { display: flex; border: 1px solid var(--line); height: 40px; }
.search input { flex: 1; min-width: 0; border: 0; padding: 0 12px; outline: none; background: transparent; font-size: 14px; }
.search button { width: 42px; border: 0; background: none; display: grid; place-items: center; }
.search svg { width: 18px; height: 18px; }

.socials { display: flex; gap: 10px; }
.socials a { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; }
.socials a:hover { background: var(--black); color: #fff; border-color: var(--black); }
.socials svg { width: 16px; height: 16px; }

/* ---------- Хлібні крихти ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0; font-size: 13px; color: var(--muted); list-style: none; margin: 0; }
.crumbs li:not(:last-child)::after { content: "›"; margin-left: 6px; }
.crumbs a:hover { color: var(--black); text-decoration: underline; }
.crumbs li:last-child { color: var(--text); }

/* ---------- Банер акції ---------- */
.promo-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px;
  border: 1px solid var(--black); padding: 14px 16px; margin-bottom: 20px; text-align: center;
}
.promo-strip b { font-size: 18px; letter-spacing: .05em; }

/* ---------- Фільтри ---------- */
.filters {
  border: 1px solid var(--line); padding: 12px; margin-bottom: 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.filters select, .field input, .field select, .field textarea {
  height: 42px; border: 1px solid var(--line); border-radius: 0; background: #fff; padding: 0 10px;
  font-size: 14px; color: var(--text); width: 100%;
}
.filters select { -webkit-appearance: none; appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23111'/%3E%3C/svg%3E") no-repeat right 10px center;
  padding-right: 28px; }
.filters__sort { grid-column: 1 / -1; }
.filters__reset { grid-column: 1 / -1; background: none; border: 0; text-decoration: underline; font-size: 13px; color: var(--muted); padding: 4px; justify-self: start; }
.catalog-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.catalog-head small { color: var(--muted); }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }

/* ---------- Сітка товарів ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 28px 16px; }
@media (min-width: 520px) { .grid { grid-template-columns: repeat(2, 1fr); } }

.card { display: flex; flex-direction: column; text-align: center; position: relative; }
.card__pic { display: block; background: #fff; transition: opacity .2s; }
.card__pic:hover { opacity: .88; }
.card__name { margin: 12px 0 6px; font-size: 15px; font-weight: 500; min-height: 2.5em; }
.card__name a:hover { text-decoration: underline; }
.card__price { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.card .btn { align-self: center; min-width: 160px; }
.wish-btn {
  position: absolute; top: 8px; right: 8px; z-index: 6; width: 38px; height: 38px;
  border: 0; background: rgba(255,255,255,.85); border-radius: 50%; display: grid; place-items: center;
}
.wish-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--black); stroke-width: 1.6; }
.wish-btn.is-on svg { fill: var(--red); stroke: var(--red); }

.badges {
  position: absolute; top: 10px; left: 10px; z-index: 6;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
}
.badge {
  padding: 5px 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: #fff;
  text-transform: uppercase;
}
.badge--sale { background: var(--red); }
.badge--hit { background: var(--green); }
.badge--new { background: var(--blue); }

/* ---------- Композиція фото: оригінал + наш флакон + інгредієнти ---------- */
.pic {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  container-type: inline-size; overflow: hidden; background: #fff;
}
.pic__orig {
  position: absolute; left: 3%; bottom: 17%; width: 50%; height: 72%;
  object-fit: contain; object-position: center bottom; z-index: 1;
}
.pic__mine {
  position: absolute; left: 47%; bottom: 10%; height: 80%; aspect-ratio: 4 / 9; z-index: 2;
  filter: drop-shadow(-6px 6px 10px rgba(0,0,0,.12));
}
.pic__mine img { width: 100%; height: 100%; object-fit: contain; }
.pic__label {
  position: absolute; left: var(--label-side); right: var(--label-side);
  top: var(--label-top); height: var(--label-height);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2cqw;
  text-align: center; color: var(--black); overflow: hidden;
}
.pic__brand { font-size: 1.5cqw; letter-spacing: .3em; font-weight: 700; margin-right: -.3em; }
.pic__name { font-size: 2.3cqw; font-weight: 700; line-height: 1.15; text-transform: uppercase; overflow-wrap: anywhere; }
.pic__vol { font-size: 1.7cqw; color: #444; }
.pic__ingr {
  position: absolute; left: 4%; right: 4%; bottom: 1%; height: 22%; z-index: 3;
  display: flex; justify-content: center; align-items: flex-end;
}
.pic__ingr img { height: 100%; width: auto; aspect-ratio: 1; object-fit: contain; margin: 0 -2.5%; }

/* ---------- Сторінка товару ---------- */
.product { display: grid; gap: 24px; }
.product__gallery { position: relative; }
.product__gallery .pic { border: 1px solid var(--line); }
.ship-note { margin-top: 14px; display: grid; gap: 8px; font-size: 13px; color: #444; }
.ship-note div { display: flex; gap: 10px; align-items: center; }
.ship-note svg { width: 22px; height: 22px; flex: none; }
.product__title { font-size: 22px; margin-bottom: 10px; }
.product__meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.in-stock { color: var(--green); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.in-stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.out-stock { color: var(--red); font-weight: 600; }
.product__price { font-size: 28px; font-weight: 700; margin-bottom: 16px; }
.product__actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 20px; }
.product__actions .is-on { background: var(--black); color: #fff; }

.promo-box { border: 2px solid var(--black); padding: 16px; margin-bottom: 24px; text-align: center; }
.promo-box__title { font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.promo-box p { margin: 0 0 12px; font-size: 14px; }
.promo-box__sub { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.timer { display: flex; justify-content: center; gap: 8px; }
.timer div { min-width: 60px; padding: 8px 4px; background: var(--black); color: #fff; }
.timer b { display: block; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.timer span { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }

.specs { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 8px; }
.specs th, .specs td { text-align: left; vertical-align: top; padding: 10px 12px; }
.specs th { width: 42%; font-weight: 600; }
.specs tr:nth-child(odd) { background: var(--gray); }

.desc { margin-top: 36px; display: grid; gap: 28px; }
.desc__lead { font-size: 15px; max-width: 820px; }
.feature-group h2 { font-size: 17px; text-transform: uppercase; letter-spacing: .05em; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.features { display: grid; gap: 14px; list-style: none; margin: 0; padding: 0; }
.features li { display: flex; gap: 14px; align-items: flex-start; }
.features .ico { flex: none; width: 44px; height: 44px; border: 1px solid var(--black); border-radius: 50%; display: grid; place-items: center; }
.features svg { width: 22px; height: 22px; }
.features b { display: block; }
.features span { color: #555; font-size: 14px; }

/* ---------- Карусель ---------- */
.rail { margin-top: 48px; }
.rail__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.rail__head h2 { margin: 0; text-transform: uppercase; letter-spacing: .05em; font-size: 17px; }
.rail__nav { display: flex; gap: 6px; }
.rail__nav button { width: 38px; height: 38px; border: 1px solid var(--black); background: #fff; font-size: 18px; }
.rail__nav button:hover { background: var(--black); color: #fff; }
.rail__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px;
}
.rail__track::-webkit-scrollbar { display: none; }
.rail__track > * { scroll-snap-align: start; }
@media (min-width: 520px) { .rail__track { grid-auto-columns: calc((100% - 32px) / 3); } }
@media (min-width: 1024px) { .rail__track { grid-auto-columns: calc((100% - 48px) / 4); } }

/* ---------- Кошик ---------- */
.cart { display: grid; gap: 28px; }
.cart-items { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cart-item { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item .pic { border: 1px solid var(--line); }
.cart-item__name { font-weight: 500; font-size: 14px; }
.cart-item__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.qty { display: inline-flex; border: 1px solid var(--line); height: 36px; }
.qty button { width: 34px; border: 0; background: none; font-size: 18px; }
.qty input { width: 40px; text-align: center; border: 0; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cart-item__price { font-weight: 700; }
.price-old { color: var(--muted); font-weight: 400; font-size: .8em; margin-right: 4px; }
.cart-item__row .price-old { display: block; }
.price-new { color: var(--red); }
.cart-item__del { background: none; border: 0; color: var(--muted); font-size: 13px; text-decoration: underline; }
.summary { background: var(--gray); padding: 18px; }
.summary__row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.summary__row--disc { color: var(--red); font-weight: 600; }
.summary__total { font-size: 20px; font-weight: 700; border-top: 1px solid #ccc; padding-top: 10px; margin-top: 4px; }
.summary__hint { font-size: 13px; background: #fff; border: 1px dashed var(--orange); padding: 10px; margin: 12px 0 0; }

.checkout { display: grid; gap: 14px; margin-top: 24px; }
.checkout h2 { margin: 6px 0 0; font-size: 17px; text-transform: uppercase; letter-spacing: .05em; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.field > span { font-weight: 600; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--black); }
.field textarea { height: 80px; padding: 10px; resize: vertical; }
.field.has-error input { border-color: var(--red); }
.field__err { color: var(--red); font-size: 12px; min-height: 0; }
.pay-opts { display: grid; gap: 8px; }
.pay-opts label { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); padding: 12px; cursor: pointer; font-size: 14px; }
.pay-opts input { accent-color: var(--black); width: 18px; height: 18px; }
.pay-opts label:has(input:checked) { border-color: var(--black); }
.checkout__txt { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.form-msg { padding: 12px; font-size: 14px; }
.form-msg--err { background: #fde8e8; color: #a11; }
.success { text-align: center; padding: 40px 16px; border: 1px solid var(--black); }
.success h1 { font-size: 22px; }

/* ---------- Текстові сторінки ---------- */
.prose { max-width: 820px; }
.prose h2 { margin-top: 1.6em; font-size: 18px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose .note { background: var(--gray); padding: 14px 16px; }

/* ---------- Підвал ---------- */
.ftr { background: var(--black); color: #ddd; padding: 40px 0 24px; font-size: 14px; }
.ftr__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; }
.ftr h3 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.ftr ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ftr a:hover { color: #fff; text-decoration: underline; }
.ftr .logo { align-items: flex-start; color: #fff; justify-self: start; }
.ftr .logo__sub { color: #999; }
.ftr__brand { grid-column: 1 / -1; display: grid; gap: 14px; }
.pay-icons { display: flex; gap: 8px; }
.pay-icons span { background: #fff; border-radius: 4px; width: 54px; height: 34px; display: grid; place-items: center; }
.pay-icons svg { height: 20px; width: auto; }
.ftr .socials a { border-color: #555; color: #fff; }
.ftr .socials a:hover { background: #fff; color: var(--black); }
.ftr__bottom { border-top: 1px solid #333; margin-top: 32px; padding-top: 18px; font-size: 12px; color: #888; display: grid; gap: 6px; }

/* ---------- Кнопка «вгору», тост ---------- */
.totop {
  position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 46px; height: 46px;
  background: var(--black); color: #fff; border: 1px solid #fff; display: grid; place-items: center;
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: .25s;
}
.totop.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.totop svg { width: 20px; height: 20px; }
.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 120; transform: translate(-50%, 140%);
  background: var(--black); color: #fff; padding: 12px 18px; display: flex; gap: 14px; align-items: center;
  font-size: 14px; transition: transform .3s, opacity .3s, visibility .3s; width: max-content; max-width: calc(100% - 32px);
  opacity: 0; visibility: hidden;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast a { text-decoration: underline; white-space: nowrap; font-weight: 600; }

/* =========================================================
   ПК
   ========================================================= */
@media (min-width: 768px) {
  h1 { font-size: 26px; }
  .filters { grid-template-columns: repeat(3, 1fr) 1.1fr; align-items: end; }
  .filters__sort { grid-column: auto; }
  .ftr__cols { grid-template-columns: 1.3fr 1fr 1fr 1.2fr; }
  .ftr__brand { grid-column: auto; }
  .product__actions { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: 1fr 1fr; gap: 18px 28px; }
}

@media (min-width: 1024px) {
  body { font-size: 15px; }
  .hdr__row { grid-template-columns: 1fr auto 1fr; min-height: 96px; gap: 24px; }
  .hdr__burger, .hdr__cart-mobile { display: none; }
  .hdr__left, .hdr__right { display: flex; }
  .hdr__left { flex-direction: column; gap: 10px; align-items: flex-start; }
  .hdr__nav { display: flex; gap: 18px; font-size: 13px; }
  .hdr__nav a:hover { text-decoration: underline; }
  .hdr__left .search { width: 300px; }
  .hdr__right { flex-direction: column; justify-content: center; align-items: flex-end; gap: 10px; font-size: 13px; }
  .hdr__line { display: flex; align-items: center; gap: 20px; }
  .hdr__info { display: grid; gap: 2px; text-align: right; }
  .hdr__info small { color: var(--muted); }
  .hdr__phone { font-weight: 700; font-size: 15px; white-space: nowrap; }
  .hdr__cart { position: relative; display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
  .hdr__cart svg { width: 22px; height: 22px; }
  .hdr__cart .cart-count { position: static; }
  .logo__name { font-size: 30px; letter-spacing: .2em; margin-right: -.2em; }
  .logo__drop { width: 18px; height: 26px; }
  .logo__sub { font-size: 10px; }
  .catbar__list { justify-content: center; gap: 48px; }
  .catbar a { padding: 14px 6px; font-size: 14px; }

  .grid { grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
  .filters { padding: 14px 18px; gap: 18px; }

  .product { grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
  .product__gallery { position: sticky; top: 16px; }
  .product__title { font-size: 26px; }

  .cart { grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
  .cart-item { grid-template-columns: 110px 1fr; }
  .cart__side { position: sticky; top: 16px; }
  .desc { grid-template-columns: 1fr 1fr; gap: 36px 48px; }
  .desc__lead { grid-column: 1 / -1; }
  .desc .features { grid-template-columns: 1fr; }
}

/* ---------- Розгортання картки при наведенні (лише миша) ---------- */
.card__more { display: none; }
.chip { display: inline-block; border: 1px solid var(--line); padding: 4px 10px; font-size: 12px; font-weight: 600; }
.chip.is-on { border-color: var(--black); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; }
.link-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.link-btn:hover span { text-decoration: underline; }
.link-btn.is-on { color: var(--red); }
.link-btn.is-on[data-wish] svg { fill: var(--red); stroke: var(--red); }
.card[data-href] { cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .grid .card { z-index: 1; transition: transform .25s ease; }
  .grid .card::before {
    content: ""; position: absolute; inset: -14px -14px 0; z-index: -1;
    background: #fff; border: 1px solid var(--line); border-bottom: 0;
    box-shadow: 0 12px 32px rgba(0,0,0,.14); clip-path: inset(-40px -40px 0 -40px);
    opacity: 0; transition: opacity .25s ease;
  }
  .grid .card .card__more {
    display: block; position: absolute; top: 100%; left: -14px; right: -14px;
    padding: 16px 14px 14px; background: #fff; border: 1px solid var(--line); border-top: 0;
    box-shadow: 0 12px 32px rgba(0,0,0,.14); clip-path: inset(0 -40px -40px -40px);
    text-align: left; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s;
  }
  .grid .card:hover { z-index: 30; transform: scale(1.03); }
  .grid .card:hover::before, .grid .card:hover .card__more { opacity: 1; visibility: visible; }
}
.card__vol { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 2px 0 10px; }
.card__acts { display: flex; gap: 18px; margin-bottom: 10px; }
.card__specs { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.35; }
.card__specs th, .card__specs td { border: 0; padding: 3px 0; vertical-align: top; text-align: left; }
.card__specs th { width: 44%; padding-right: 8px; color: var(--muted); font-weight: 500; }

/* ---------- Порівняння ---------- */
.cmp-wrap { overflow-x: auto; margin-bottom: 40px; }
.cmp { border-collapse: collapse; font-size: 13px; }
.cmp tbody th, .cmp thead th { width: 170px; min-width: 140px; }
.cmp th, .cmp td { border-bottom: 1px solid var(--line); padding: 10px; vertical-align: top; text-align: left; }
.cmp thead td { min-width: 180px; width: 220px; }
.cmp tbody th { color: var(--muted); font-weight: 500; white-space: nowrap; }
.cmp__name { display: block; font-weight: 600; margin: 8px 0 4px; }
.cmp .btn { min-width: 0; width: 100%; }

/* ---------- Наявність ---------- */
.low-stock { color: var(--orange); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.low-stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.out-stock { color: var(--muted) !important; }
.card__stock { font-size: 13px; margin: -6px 0 10px; }
.btn--notify { font-size: 12px; letter-spacing: .02em; }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.form-msg--ok { background: #e7f6ec; color: #1d6b35; }
.dlg { border: 0; padding: 0; max-width: 420px; width: calc(100% - 32px); }
.dlg::backdrop { background: rgba(0,0,0,.45); }
.dlg__box { position: relative; display: grid; gap: 14px; padding: 24px; }
.dlg__box h2 { margin: 0; font-size: 18px; text-transform: uppercase; letter-spacing: .04em; }
.dlg__name { margin: 0; font-size: 14px; color: var(--muted); }
.dlg__x { position: absolute; top: 6px; right: 10px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* =========================================================
   МОБІЛЬНА ВЕРСІЯ (до 1023px). ПК (від 1024px) не змінюється.
   ========================================================= */
.hdr__icons, .hdr__msearch { display: none; }
.mhome { display: none; }
@keyframes cart-bump {
  0% { transform: scale(1); } 30% { transform: scale(1.28) translateY(-4px); }
  55% { transform: scale(.92); } 75% { transform: scale(1.08); } 100% { transform: scale(1); }
}
.is-bump { animation: cart-bump .55s ease; }

@media (max-width: 1023px) {
  body { font-size: 16px; }
  /* шапка закріплена зверху */
  #site-header { display: contents; }
  .hdr { position: sticky; top: 0; z-index: 50; }
  .hdr__row { grid-template-columns: auto 1fr auto; gap: 0; min-height: 60px; padding: 0 8px 0 4px; }
  .hdr__burger { width: 44px; height: 48px; }
  .hdr .logo { justify-self: start; align-items: flex-start; margin-left: 2px; }
  .hdr .logo__name { font-size: 17px; letter-spacing: .12em; gap: 5px; }
  .hdr .logo__drop { width: 12px; height: 17px; }
  .hdr .logo__sub { font-size: 8px; letter-spacing: .38em; margin-left: 17px; }
  .hdr__icons { display: flex; align-items: center; }
  .hdr__ico { width: 40px; height: 48px; display: grid; place-items: center; position: relative; background: none; border: 0; color: var(--text); padding: 0; }
  .hdr__ico svg { width: 23px; height: 23px; }
  .hdr__cart-mobile .cart-count { top: 6px; right: 0; }
  .hdr.is-search .hdr__msearch { display: block; padding: 0 16px 12px; }
  .hdr__msearch .search { height: 46px; }
  .hdr__msearch .search input { font-size: 16px; }
  .is-mhome .catbar { display: none; }

  /* бокове меню на весь екран */
  .drawer__panel { width: 100%; padding: 8px 20px 40px; }
  .drawer__top { display: flex; justify-content: space-between; align-items: center; min-height: 56px; margin-bottom: 8px; }
  .drawer__top .logo { justify-self: start; align-items: flex-start; }
  .drawer__close { float: none; width: 48px; height: 48px; font-size: 34px; }
  .drawer .search { height: 48px; margin-bottom: 8px; }
  .drawer .search input { font-size: 16px; }
  .drawer__cats { display: flex; flex-direction: column; margin: 8px 0 18px; }
  .drawer__cats a {
    display: flex; justify-content: space-between; align-items: center; padding: 17px 0;
    border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  }
  .drawer__cats a svg { width: 20px; height: 20px; color: var(--muted); }
  .drawer__cats a.is-sale { color: var(--red); }
  .drawer nav.drawer__pages { margin: 0 0 22px; }
  .drawer__pages a { padding: 13px 0; font-size: 16px; }
  .drawer__info { font-size: 15px; gap: 12px; }
  .drawer__info h3 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
  .drawer__info .socials a { width: 44px; height: 44px; }

  /* картки: 2 в ряд, назва жирна у 2 рядки, кнопка на всю ширину */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .card { text-align: left; }
  .card__name { font-weight: 700; font-size: 14px; line-height: 1.3; min-height: 2.6em; margin: 10px 0 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .card__price { font-size: 17px; margin-bottom: 4px; }
  .card__price .price-old { font-size: 13px; }
  .card__stock { font-size: 12px; margin: 0 0 10px; }
  .card .btn { align-self: stretch; min-width: 0; width: 100%; min-height: 46px; padding: 8px 6px; margin-top: auto; }
  .card .btn--notify { font-size: 11px; line-height: 1.25; }
  .badges { top: 6px; left: 6px; gap: 3px; }
  .badge { font-size: 11px; padding: 4px 7px; }
  .badge--sale { background: var(--orange); }
  .wish-btn { top: 4px; right: 4px; width: 36px; height: 36px; }

  /* ---------- Головна ---------- */
  .mhome { display: block; }
  .is-mhome #crumbs, .is-mhome .promo-strip, .is-mhome .catalog-head, .is-mhome #filters, .is-mhome #grid { display: none; }

  .mslider { position: relative; margin: 0 -16px 14px; background: #000; color: #fff; }
  .mslider__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .mslider__track::-webkit-scrollbar { display: none; }
  .mslide {
    flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; min-height: 430px;
    display: grid; place-items: center; text-align: center; padding: 44px 24px 70px;
    background: radial-gradient(120% 80% at 50% 25%, #2b2b2b 0%, #0b0b0b 55%, #000 100%);
  }
  .mslide__in { max-width: 360px; }
  .mslide__kicker { display: block; font-family: "Cormorant Garamond", Georgia, serif; font-size: 14px; letter-spacing: .5em; margin-right: -.5em; text-transform: uppercase; color: #cfcfcf; margin-bottom: 22px; }
  .mslide__title { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; font-size: 36px; line-height: 1.08; letter-spacing: .01em; margin: 0; color: #fff; }
  .mslide__title--sm { font-size: 30px; margin-bottom: 14px; }
  .mslide__big { font-family: "Cormorant Garamond", Georgia, serif; font-size: 96px; line-height: 1; font-weight: 500; letter-spacing: .02em; font-variant-numeric: lining-nums; font-feature-settings: "lnum"; }
  .mslide__line { display: block; width: 120px; height: 1px; background: rgba(255,255,255,.55); margin: 22px auto; }
  .mslide__sub { color: #bdbdbd; font-size: 14px; letter-spacing: .06em; margin: 0 0 26px; }
  .mslide__sub b { color: #fff; }
  .mslide__img { height: 150px; width: auto; margin: 0 auto 18px; filter: drop-shadow(0 0 28px rgba(255,255,255,.18)); }
  .mslide__btn { display: inline-block; border: 1px solid #fff; color: #fff; padding: 15px 30px; font-size: 13px; font-weight: 600; letter-spacing: .22em; margin-right: -.22em; text-transform: uppercase; }
  .mslide__btn:active { background: #fff; color: #000; }
  .mslider__dots { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; gap: 4px; }
  .mslider__dots button { width: 28px; height: 28px; border: 0; background: none; padding: 0; display: grid; place-items: center; cursor: pointer; }
  .mslider__dots button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); transition: background .2s, transform .2s; }
  .mslider__dots button.is-on::before { background: #fff; transform: scale(1.25); }

  .mcat-btn {
    display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 58px; margin: 0 0 22px;
    background: var(--black); color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  }
  .mcat-btn svg { width: 22px; height: 22px; }

  .mpromo { background: #f6f1ea; text-align: center; padding: 30px 20px 26px; margin: 0 0 30px; }
  .mpromo__kicker { font-size: 14px; font-weight: 700; letter-spacing: .3em; margin-right: -.3em; text-transform: uppercase; }
  .mpromo__big { font-family: "Cormorant Garamond", Georgia, serif; font-size: 92px; line-height: 1; font-weight: 600; color: var(--orange); font-variant-numeric: lining-nums; font-feature-settings: "lnum"; margin: 4px 0 8px; }
  .mpromo__sub { font-size: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
  .mpromo__price { font-size: 17px; margin-bottom: 18px; }
  .mpromo__price s { color: var(--muted); }
  .mpromo__price b { color: var(--red); font-size: 20px; }
  .mpromo__t { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
  .mpromo .timer { margin-bottom: 20px; }
  .mpromo .timer div { min-width: 64px; padding: 10px 4px; }
  .mpromo__btn { min-height: 54px; font-size: 14px; }

  .mrow { margin: 0 0 30px; }
  .mrow__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
  .mrow__head h2 { margin: 0; font-size: 21px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
  .mrow__head a { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; min-height: 44px; }
  .mrow__head a svg { width: 16px; height: 16px; }
  .mcar {
    display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 24px) / 2.3); gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 -16px; padding: 0 16px 4px; scroll-padding: 0 16px; overscroll-behavior-x: contain;
  }
  .mcar::-webkit-scrollbar { display: none; }
  .mcar .card { scroll-snap-align: start; }
}
@media (min-width: 1024px) {
  .hdr__icons, .hdr__msearch { display: none !important; }
}

/* ---------- Логотип (images/logo.png) ---------- */
.logo { display: block; line-height: 0; }
.logo__img { display: block; height: 40px; width: auto; }
.ftr .logo__img { height: 104px; }
.drawer__top .logo__img { height: 36px; }
@media (max-width: 1023px) { .hdr .logo__img { height: 34px; } }
@media (min-width: 1024px) { .hdr .logo__img { height: 54px; } }

/* ---------- Композиція фото: по центру, інгредієнти окремим рядом знизу ---------- */
.pic__row {
  position: absolute; left: 4%; right: 4%; top: 3%; bottom: 27%;
  display: flex; justify-content: center; align-items: flex-end;
}
.pic__row .pic__orig {
  position: relative; left: auto; bottom: auto; inset: auto; flex: none;
  height: 90%; width: auto; max-width: 54%; object-fit: contain; object-position: center bottom; z-index: 1;
}
.pic__row .pic__mine {
  position: relative; left: auto; bottom: auto; flex: none;
  height: 100%; aspect-ratio: 4 / 9; margin-left: -2%; z-index: 2;
}
.pic__brand { font-size: 1.3cqw; }
.pic__name { font-size: 2cqw; }
.pic__vol { font-size: 1.45cqw; }
.pic__label { gap: 1cqw; }
.pic__ingr { left: 3%; right: 3%; bottom: 2%; height: 24%; justify-content: center; align-items: flex-end; gap: 1%; }
.pic__ingr img { margin: 0; height: 100%; max-width: 25%; object-fit: contain; object-position: center bottom; }

/* ---------- Відступ перед підвалом ---------- */
main, main.container { padding-bottom: 72px; }

@media (max-width: 1023px) {
  /* сердечко не перекриває кришку флакона */
  .pic__row { top: 11%; }
  .wish-btn { top: 2px; right: 2px; width: 32px; height: 32px; background: rgba(255,255,255,.9); }
  .wish-btn svg { width: 18px; height: 18px; }
}

.consent { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }
.consent a { text-decoration: underline; }

/* ---------- Відгуки ---------- */
.stars { color: #e0a400; letter-spacing: .05em; }
.card__rating { font-size: 13px; margin: -2px 0 6px; }
.card__rating span { color: var(--muted); }
.reviews { max-width: 760px; margin: 40px 0; }
.reviews h2 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; text-transform: uppercase; letter-spacing: .05em; font-size: 17px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.reviews h2 small { font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.review { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 14px; }
.review__head time { color: var(--muted); font-size: 12px; }
.review p { margin: 6px 0 0; white-space: pre-line; }
.reviews .muted { color: var(--muted); }
.review-form { display: grid; gap: 12px; margin-top: 22px; max-width: 520px; }
.review-form h3 { margin: 0; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; }
.review-form .btn { justify-self: start; }
.rate { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rate input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate label { font-size: 32px; line-height: 1; color: #d6d6d6; cursor: pointer; padding: 2px; }
.rate label:hover, .rate label:hover ~ label, .rate input:checked ~ label { color: #e0a400; }
.rate input:focus-visible + label { outline: 2px solid var(--black); }
