/* ============================================================
   SoftRiot — STYLE.CSS
   Світла тема + неоновий фірмовий градієнт із логотипу.
   Адаптив: від смартгодинника (~200px) до 4K-екранів.
   ============================================================ */

/* ---------- 1. Токени ---------- */
:root {
  /* Кольори */
  --bg:        #f6f5fb;
  --bg-tint:   #efedf7;
  --surface:   #ffffff;
  --ink:       #191427;
  --ink-soft:  #4a4360;
  --muted:     #7c7593;
  --line:      #e6e3f0;
  --dark:      #17122a;
  --dark-2:    #221a3d;
  --dark-line: #352b54;

  /* Фірмовий неоновий градієнт (із логотипу) */
  --g-pink:   #ff4fa3;
  --g-orange: #ff7a45;
  --g-green:  #45d7a0;
  --g-cyan:   #36c5d8;
  --g-violet: #8a5bff;
  --brand-gradient: linear-gradient(100deg,
      var(--g-pink), var(--g-orange), var(--g-green), var(--g-cyan), var(--g-violet));
  --brand-gradient-soft: linear-gradient(100deg,
      rgba(255,79,163,.14), rgba(255,122,69,.14), rgba(69,215,160,.14),
      rgba(54,197,216,.14), rgba(138,91,255,.14));

  --accent:   #e5277e;
  --accent-2: #7b4dff;
  --accent-text: #c4116a; /* darker accent for small text on light backgrounds — meets WCAG AA contrast */

  /* Solid button color (calm, on-brand — replaces the neon gradient) */
  --btn:       #5b46c9;
  --btn-hover: #4a37ad;

  /* Радіуси й тіні */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 26px;
  --shadow-sm: 0 4px 18px rgba(25,20,39,.06);
  --shadow:    0 14px 40px rgba(25,20,39,.10);
  --shadow-lg: 0 30px 70px rgba(25,20,39,.16);

  /* Сітка / простір */
  --maxw: 1320px;
  --maxw-wide: 1760px;          /* для 4K */
  --gut: clamp(16px, 4vw, 48px);
  --header-h: 74px;

  /* Шрифти */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- 2. Reset / база ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: clamp(15px, 0.6vw + 13px, 18px);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
/* Overflow & flexibility safety: nothing escapes the viewport,
   flex/grid children are allowed to shrink instead of overflowing. */
html, body { max-width: 100%; overflow-x: hidden; }
*, *::before, *::after { min-width: 0; }
img, svg, iframe, video { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; padding: 0; }
input, select { font: inherit; color: inherit; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; font-weight: 600; }

/* ---------- 3. Утиліти ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: clamp(48px, 7vw, 110px); }
.section--tint { background: var(--bg-tint); }
.hidden { display: none !important; }

.eyebrow {
  font-family: var(--font-body);
  font-size: clamp(11px, 0.4vw + 9px, 13px);
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-text);
  display: inline-block;
}

.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 56px); }
.section-head h2 { font-size: clamp(28px, 4.4vw, 54px); letter-spacing: -.01em; margin-top: 10px; }
.section-head p { color: var(--ink-soft); margin-top: 14px; font-size: clamp(15px, 1vw, 18px); }
.section-head--center { margin-inline: auto; text-align: center; }

/* Градієнтна лінія-розділювач (фірмова деталь) */
.rule-grad { height: 3px; width: 64px; border-radius: 3px; background: var(--brand-gradient); }

/* Кнопки */
.btn {
  --bh: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: var(--bh); padding: 0 clamp(20px, 2.5vw, 30px);
  border-radius: 999px; font-weight: 700; font-size: clamp(14px, .6vw + 12px, 16px);
  letter-spacing: .01em; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn--primary { color: #fff; background: var(--btn); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--btn-hover); transform: translateY(-2px); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--dark-2); transform: translateY(-2px); }
.btn--outline { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.btn--outline:hover { border-color: var(--btn); color: var(--btn); }
.btn--block { width: 100%; }
.btn--sm { --bh: 42px; padding-inline: clamp(14px, 2vw, 20px); font-size: 14px; }

/* Small, tidy text link — used for "Read more" / "All products" */
.btn--link {
  min-height: auto; padding: 6px 2px; gap: .35em;
  font-weight: 700; font-size: 14px; color: var(--btn); border-radius: 6px;
  align-self: flex-start; justify-content: flex-start; width: auto;
}
.btn--link svg { width: 15px; height: 15px; }
.btn--link:hover { color: var(--btn-hover); }
.btn--link:hover svg { transform: translateX(3px); transition: transform .15s ease; }

/* Платформні кнопки */
.btn--etsy { background: #f1641e; color: #fff; }
.btn--etsy:hover { background: #d9530f; }
.btn--shopify { background: #5e8e3e; color: #fff; }
.btn--shopify:hover { background: #4d7731; }

/* Фокус для доступності */
:focus-visible { outline: 3px solid var(--btn); outline-offset: 2px; border-radius: 4px; }

/* ---------- 4. Хедер ---------- */
/* Header/footer/dynamic-grid content is rendered by JS after page load;
   reserving space upfront on the bare IDs avoids a large layout shift
   the moment that JS runs (CLS). */
#site-header { min-height: var(--header-h); display: block; }
#site-footer { min-height: 320px; display: block; }
#popular-slider, #shop-grid, #product-root, #related, #blog-grid { min-height: 420px; }
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(246,245,251,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  min-height: var(--header-h); padding-block: 10px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand__logo {
  width: 46px; height: 46px; border-radius: 13px; object-fit: cover;
  background: var(--dark); padding: 4px; box-shadow: var(--shadow-sm);
}
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -.01em; }
.brand__name span { font-style: italic; }

.nav { display: flex; align-items: center; gap: clamp(6px, 1.4vw, 26px); margin-inline: auto; }
.nav a {
  font-weight: 600; font-size: 15px; color: var(--ink-soft);
  padding: 8px 4px; position: relative; transition: color .15s ease;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--brand-gradient); border-radius: 2px; transform: scaleX(0);
  transform-origin: left; transition: transform .22s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Соцмережі (іконки) */
.socials { display: flex; align-items: center; gap: 6px; }
.socials a {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  color: var(--ink-soft); transition: color .15s ease, background .15s ease, transform .15s ease;
}
.socials a:hover { color: var(--ink); background: var(--brand-gradient-soft); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }
.socials--mini a { width: 34px; height: 34px; }
.socials--mini svg { width: 16px; height: 16px; }

/* Іконка кошика */
.cart-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; }
.cart-btn:hover { background: var(--bg-tint); }
.cart-btn svg { width: 21px; height: 21px; }
.cart-count {
  position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; border-radius: 9px;
  display: grid; place-items: center;
}

/* Бургер */
.burger { width: 44px; height: 44px; border-radius: 12px; display: none; place-items: center; }
.burger:hover { background: var(--bg-tint); }
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: .25s; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }
.burger span::before { top: -7px; }
.burger span::after { top: 7px; }
body.menu-open .burger span { background: transparent; }
body.menu-open .burger span::before { top: 0; transform: rotate(45deg); }
body.menu-open .burger span::after { top: 0; transform: rotate(-45deg); }

/* ---------- 5. Off-canvas layer + burger menu (drawer) ---------- */
/* The layer is fixed + transformed, so it becomes the containing block
   for its children and clips them — the drawer/cart can never push the
   page wider than the screen (no horizontal scroll on any device). */
.offcanvas {
  position: fixed; inset: 0; z-index: 70;
  overflow: hidden; pointer-events: none; transform: translateZ(0);
}
.offcanvas > * { pointer-events: auto; }

.drawer {
  position: absolute; top: 0; bottom: 0; right: 0; width: min(86vw, 360px); z-index: 3;
  background: var(--surface); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.4,.0,.2,1);
  display: flex; flex-direction: column; padding: 22px;
}
body.menu-open .drawer { transform: translateX(0); }
.drawer__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.drawer__close { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; }
.drawer__close:hover { background: var(--bg-tint); }
.drawer__nav { display: flex; flex-direction: column; gap: 4px; }
.drawer__nav a {
  font-family: var(--font-display); font-size: 22px; font-weight: 600; padding: 12px 8px;
  border-radius: 12px; color: var(--ink);
}
.drawer__nav a:hover, .drawer__nav a[aria-current="page"] { background: var(--brand-gradient-soft); }
.drawer__foot { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line); }
.drawer__foot p { font-size: 12px; color: var(--muted); margin-bottom: 10px; letter-spacing: .04em; }

.scrim {
  position: absolute; inset: 0; background: rgba(23,18,42,.45); z-index: 1;
  opacity: 0; visibility: hidden; transition: .3s;
}
body.menu-open .scrim, body.cart-open .scrim { opacity: 1; visibility: visible; }

/* ---------- 6. Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(54px, 8vw, 120px); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background:
    radial-gradient(50% 50% at 12% 18%, rgba(255,79,163,.28), transparent 70%),
    radial-gradient(46% 46% at 88% 22%, rgba(138,91,255,.26), transparent 70%),
    radial-gradient(60% 50% at 70% 95%, rgba(54,197,216,.22), transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero__title { font-size: clamp(38px, 7vw, 88px); letter-spacing: -.02em; }
.hero__title em { font-style: italic; }
.hero__lead { color: var(--ink-soft); font-size: clamp(16px, 1.4vw, 21px); margin: 22px 0 30px; max-width: 56ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__stats { display: flex; gap: clamp(22px, 4vw, 48px); margin-top: clamp(30px, 4vw, 50px); }
.hero__stats b { font-family: var(--font-display); font-size: clamp(24px, 3vw, 38px); display: block; }
.hero__stats span { font-size: 13px; color: var(--muted); letter-spacing: .03em; }

.hero__media { position: relative; max-width: 500px; margin-inline: auto; }
.hero__media img {
  width: 100%; height: auto; border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  aspect-ratio: 1/1; object-fit: cover;
}
.hero__tag {
  position: absolute; bottom: 18px; left: -10px; background: var(--surface);
  padding: 14px 18px; border-radius: var(--r); box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px;
}
.hero__tag b { font-family: var(--font-display); font-size: 18px; }
.hero__tag .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand-gradient); }

/* ---------- 7. Інфініті-слайдер товарів (Home) ---------- */
.slider { position: relative; }
.slider__viewport { overflow: hidden; }
.slider__track { display: flex; gap: clamp(16px, 2vw, 26px); will-change: transform; }
.slider__track > * { flex: 0 0 auto; }
.slider__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; z-index: 5; transition: transform .15s ease; }
.slider__nav:hover { transform: translateY(-50%) scale(1.08); }
.slider__nav svg { width: 20px; height: 20px; }
.slider__nav--prev { left: -8px; }
.slider__nav--next { right: -8px; }

/* ---------- 8. Картка товару ---------- */
.card {
  background: var(--surface); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__media { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--bg-tint); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.05); }
.card__cat {
  position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92);
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; color: var(--ink-soft);
}
/* Фірмова бирка-цінник (як на лого) */
.card__tag {
  position: absolute; top: 12px; right: 12px;
  background: var(--ink); color: #fff; font-weight: 800; font-size: 15px;
  padding: 8px 14px 8px 22px; border-radius: 8px;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
}
.card__tag s { color: var(--muted); font-weight: 600; font-size: 12px; margin-left: 6px; }
.card__body { padding: clamp(16px, 1.6vw, 22px); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__title { font-size: clamp(18px, 1.5vw, 22px); }
.card__desc { color: var(--ink-soft); font-size: 14px; flex: 1; }
.card__actions { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.card__row { display: flex; gap: 8px; }
.card__row .btn { flex: 1; padding-inline: 10px; }

/* ---------- 9. CTA / інфоблок ---------- */
.cta-band {
  background: var(--dark); color: #fff; border-radius: var(--r-lg); overflow: hidden;
  position: relative; padding: clamp(34px, 5vw, 70px);
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background:
    radial-gradient(40% 60% at 10% 20%, rgba(255,79,163,.5), transparent 70%),
    radial-gradient(40% 60% at 90% 80%, rgba(138,91,255,.5), transparent 70%);
}
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(26px, 3.6vw, 46px); max-width: 18ch; }
.cta-band p { color: rgba(255,255,255,.78); margin: 16px 0 26px; max-width: 52ch; }
.cta-band .btn--outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.cta-band .btn--outline:hover { background: #fff; color: var(--ink); }

/* ---------- 10. Грід (загальний) ---------- */
.grid { display: grid; gap: clamp(16px, 2vw, 28px); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }

/* ---------- 11. Футер ---------- */
.site-footer { background: var(--dark); color: rgba(255,255,255,.7); padding-block: clamp(44px, 6vw, 76px) 28px; }
.footer-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr); gap: clamp(28px, 4vw, 64px); }
.footer-brand .brand__name { color: #fff; }
.footer-brand p { margin: 16px 0 22px; max-width: 38ch; font-size: 15px; }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-col button { color: rgba(255,255,255,.7); transition: color .15s ease; font-size: 15px; text-align: left; }
.footer-col button { padding: 0; background: none; border: none; cursor: pointer; line-height: 1.5; }
.footer-col a:hover, .footer-col button:hover { color: #fff; }
.site-footer .socials a { color: rgba(255,255,255,.75); }
.site-footer .socials a:hover { color: #fff; background: rgba(255,255,255,.12); }
.footer-bottom {
  margin-top: clamp(34px, 4vw, 54px); padding-top: 22px; border-top: 1px solid var(--dark-line);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center;
  font-size: 13px; color: rgba(255,255,255,.55);
}
.footer-bottom .links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-bottom button:hover { color: #fff; }

/* ---------- 12. Попап / модалка ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; opacity: 0; visibility: hidden; transition: .25s; }
.modal.open { opacity: 1; visibility: visible; }
.modal__scrim { position: absolute; inset: 0; background: rgba(23,18,42,.55); backdrop-filter: blur(3px); }
.modal__box {
  position: relative; background: var(--surface); border-radius: var(--r-lg);
  max-width: 640px; width: 100%; max-height: 86vh; overflow: auto;
  box-shadow: var(--shadow-lg); padding: clamp(24px, 4vw, 44px); transform: translateY(16px) scale(.98);
  transition: transform .25s ease;
}
.modal.open .modal__box { transform: none; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; color: var(--ink-soft); }
.modal__close:hover { background: var(--bg-tint); color: var(--ink); }
.modal__box h3 { font-size: clamp(22px, 3vw, 32px); margin-bottom: 6px; padding-right: 30px; }
.modal__date { font-size: 13px; color: var(--accent-text); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.modal__box img { border-radius: var(--r); margin: 18px 0; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.modal__body p { color: var(--ink-soft); margin-bottom: 14px; white-space: pre-line; }
.legal h4 { font-family: var(--font-body); margin: 18px 0 6px; font-size: 16px; color: var(--ink); }
.legal p { font-size: 14px; }

/* ---------- Checkout ---------- */
.checkout-summary { background: var(--bg-tint); border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 18px; }
.checkout-summary__row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft); padding: 3px 0; }
.checkout-summary__row.total { font-weight: 800; color: var(--ink); font-size: 17px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.checkout-form { display: flex; flex-direction: column; gap: 12px; }
.checkout-form input, .checkout-form textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line);
  background: var(--surface); font-family: var(--font-body); font-size: 15px;
}
.checkout-form input:focus, .checkout-form textarea:focus { outline: none; border-color: var(--accent); }
.checkout-form textarea { resize: vertical; min-height: 70px; }
.checkout-error { color: #c0392b; font-size: 14px; margin: -4px 0 0; display: none; }
.checkout-error.show { display: block; }

/* ---------- 13. Cart (drawer) ---------- */
.cart {
  position: absolute; top: 0; bottom: 0; right: 0; width: min(92vw, 420px); z-index: 3;
  background: var(--surface); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
body.cart-open .cart { transform: translateX(0); }
.cart__head { display: flex; justify-content: space-between; align-items: center; padding: 22px; border-bottom: 1px solid var(--line); }
.cart__head h3 { font-size: 22px; }
.cart__items { flex: 1; overflow: auto; padding: 14px 22px; display: flex; flex-direction: column; gap: 14px; }
.cart__empty { color: var(--muted); text-align: center; margin-top: 40px; }
.cart-item { display: flex; gap: 12px; align-items: center; }
.cart-item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__info b { font-family: var(--font-display); font-size: 16px; display: block; }
.cart-item__info span { font-size: 13px; color: var(--muted); }
.cart-item__price { font-weight: 800; }
.cart-item__remove { color: var(--muted); font-size: 13px; }
.cart-item__remove:hover { color: var(--accent); }
.cart__foot { padding: 20px 22px; border-top: 1px solid var(--line); }
.cart__total { display: flex; justify-content: space-between; font-size: 18px; margin-bottom: 14px; }
.cart__total b { font-family: var(--font-display); font-size: 22px; }

/* ---------- 14. Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); z-index: 100;
  opacity: 0; visibility: hidden; transition: .25s;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ---------- 15. Сторінка SHOP ---------- */
.shop-layout { display: grid; grid-template-columns: 264px minmax(0,1fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.filters h3 { font-size: 20px; margin-bottom: 4px; }
.filter-group { padding-block: 16px; border-bottom: 1px solid var(--line); }
.filter-group:last-of-type { border-bottom: 0; }
.filter-group > label, .filter-group > span.lbl { font-weight: 800; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); display: block; margin-bottom: 12px; }
.check { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 15px; color: var(--ink-soft); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent-2); margin: 0; flex-shrink: 0; vertical-align: middle; }
.check:hover { color: var(--ink); }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--accent-2); }
.range-val { font-weight: 700; font-size: 14px; min-width: 46px; text-align: right; }
.swatch-row { display: flex; flex-wrap: wrap; gap: 9px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; position: relative; transition: transform .12s ease; }
.swatch:hover { transform: scale(1.12); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-2); }

.shop-bar { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.shop-bar .count { color: var(--muted); font-size: 14px; }
.shop-bar select { padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; }
.filters-toggle { display: none; }
.no-results { text-align: center; padding: 60px 20px; color: var(--muted); }

.shop-pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.shop-pagination button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 10px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 700; font-family: var(--font-body); cursor: pointer; transition: .15s ease;
}
.shop-pagination button svg { width: 16px; height: 16px; }
.shop-pagination button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.shop-pagination button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.shop-pagination button:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- 16. Сторінка PRODUCT ---------- */
.product { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.gallery { position: relative; }
.gallery__main { aspect-ratio: 4/5; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-tint); box-shadow: var(--shadow); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: var(--shadow-sm); display: grid; place-items: center; z-index: 4; }
.gallery__nav svg { width: 20px; height: 20px; }
.gallery__nav--prev { left: 12px; }
.gallery__nav--next { right: 12px; }
.gallery__dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.gallery__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); transition: .2s; }
.gallery__dot.active { background: var(--brand-gradient); width: 26px; border-radius: 5px; }

.product-info .cat-eyebrow { color: var(--accent-text); }
.product-info h1 { font-size: clamp(30px, 4.4vw, 56px); letter-spacing: -.02em; margin: 8px 0 14px; }
.product-info .price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.product-info .price b { font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); }
.product-info .price s { color: var(--muted); font-size: 20px; }
.product-info .lead { color: var(--ink-soft); font-size: 17px; margin-bottom: 26px; }

.opt-label { font-weight: 800; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; display: flex; gap: 8px; }
.opt-label .picked { color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 600; }
.colors { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.color-dot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; transition: transform .12s; }
.color-dot:hover { transform: scale(1.1); }
.color-dot[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-2); }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.size-pill { min-width: 48px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); font-weight: 700; display: grid; place-items: center; }
.size-pill[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.buy-row { display: grid; gap: 10px; margin-bottom: 30px; }

.pair-block { padding-top: 18px; border-top: 1.5px dashed var(--line); margin-top: 4px; }
.pair-block:first-of-type { padding-top: 0; border-top: none; margin-top: 0; }
.pair-block__label { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-bottom: 14px; color: var(--ink); }
.buy-row .platform { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }

.specs { border-top: 1px solid var(--line); padding-top: 24px; }
.spec { padding: 16px 0; border-bottom: 1px solid var(--line); }
.spec h4 { font-family: var(--font-body); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.spec p { color: var(--ink-soft); }
.occasion-box { margin-top: 24px; background: var(--brand-gradient-soft); border-radius: var(--r); padding: 22px; }
.occasion-box .eyebrow { color: var(--accent-2); }
.occasion-box h4 { font-family: var(--font-display); font-size: 20px; margin: 6px 0 8px; color: var(--ink); }
.occasion-box p { color: var(--ink-soft); font-size: 15px; }

/* ---------- 17. Сторінка ABOUT ---------- */
.about-hero { text-align: center; max-width: 820px; margin-inline: auto; }
.about-hero h1 { font-size: clamp(34px, 6vw, 76px); letter-spacing: -.02em; }
.values { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(18px, 2.5vw, 32px); }
.value { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.value .num { font-family: var(--font-display); font-size: 14px; color: var(--accent-text); font-weight: 700; }
.value h3 { font-size: 22px; margin: 12px 0 8px; }
.value p { color: var(--ink-soft); font-size: 15px; }
.about-split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.about-split img { border-radius: var(--r-lg); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; }
.prose p { color: var(--ink-soft); margin-bottom: 16px; font-size: 17px; }

/* ---------- 18. Сторінка BLOG ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(20px, 3vw, 36px); }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.post:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.post__media { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-tint); display: block; }
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post:hover .post__media img { transform: scale(1.04); }
.post__body { padding: clamp(20px, 2.2vw, 30px); display: flex; flex-direction: column; gap: 12px; flex: 1; }
.post__date { font-size: 12px; color: var(--accent-text); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.post__title { font-size: clamp(20px, 1.8vw, 26px); color: var(--ink); }
.post__excerpt { color: var(--ink-soft); font-size: 15px; flex: 1; }

/* ---------- 18b. Окрема сторінка статті ---------- */
.post-hero { padding-bottom: 0 !important; }
.post-content { max-width: 760px; margin-inline: auto; }
.post-content > img { width: 100%; border-radius: var(--r-lg); margin-bottom: clamp(28px, 3vw, 44px); aspect-ratio: 16/10; object-fit: cover; margin-top: clamp(24px, 3vw, 40px); }
.post-body { font-size: 17px; line-height: 1.8; color: var(--ink-soft); }
.post-body br { display: block; content: ""; margin-bottom: 10px; }
.post-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; padding-top: 36px; border-top: 1px solid var(--line); }

/* ---------- 19. Сторінка CONTACTS ---------- */
.contacts-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 40px); box-shadow: var(--shadow-sm); }
.contact-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-item:last-child { border-bottom: 0; }
.contact-item .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-gradient-soft); flex-shrink: 0; }
.contact-item .ic svg { width: 20px; height: 20px; color: var(--accent-2); }
.contact-item b { font-family: var(--font-display); font-size: 17px; display: block; }
.contact-item a, .contact-item span { color: var(--ink-soft); }
.map-wrap { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--surface); }
.map-wrap iframe { width: 100%; height: 100%; min-height: 440px; border: 0; display: block; filter: saturate(.9); }
.page-hero { padding-block: clamp(40px, 5vw, 72px) clamp(20px, 3vw, 32px); }
.page-hero h1 { font-size: clamp(34px, 5.5vw, 68px); letter-spacing: -.02em; }
.page-hero p { color: var(--ink-soft); margin-top: 12px; max-width: 60ch; font-size: clamp(15px,1.1vw,18px); }

/* ============================================================
   20. АДАПТИВ
   ============================================================ */

/* 4K і дуже широкі екрани */
@media (min-width: 2200px) {
  :root { --maxw: var(--maxw-wide); --header-h: 88px; }
  body { font-size: 20px; }
  .brand__logo { width: 56px; height: 56px; }
  .brand__name { font-size: 26px; }
}

/* Великі планшети / малі ноути — звужуємо сітки */
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Точка згортання навігації в бургер */
@media (max-width: 920px) {
  .nav { display: none; }
  .socials--header { display: none; }
  .burger { display: grid; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { max-width: 460px; margin-inline: auto; order: -1; }
  .hero__tag { left: 8px; right: 8px; width: auto; }
  .product { grid-template-columns: 1fr; }
  .about-split { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .shop-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filters-panel { display: none; }
  .filters-panel.open { display: block; }
  .filters-toggle { display: inline-flex; }
  .map-wrap iframe { min-height: 300px; }
}

/* Планшети / великі телефони */
@media (max-width: 720px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .cta-band { padding: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero__stats { flex-wrap: wrap; }
}

/* Телефони */
@media (max-width: 520px) {
  :root { --header-h: 64px; }
  .brand__name { display: none; }
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .buy-row .platform { grid-template-columns: 1fr; }
  .hero__tag { left: 8px; right: 8px; }
  .modal__box { padding: 20px 16px; }
  .cta-band { padding: 24px 20px; }
  .shop-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .shop-bar select { width: 100%; }
}

/* Дуже малі екрани / смартгодинники */
@media (max-width: 300px) {
  :root { --gut: 10px; }
  body { font-size: 13px; }
  .brand__logo { width: 36px; height: 36px; }
  .btn { --bh: 44px; padding-inline: 14px; }
  .header-actions .cart-btn { width: 38px; height: 38px; }
}

/* Зменшення анімацій */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- 21. Misc additions (notes, size filter, mobile slider) ---------- */
.cart__note { font-size: 12px; color: var(--muted); margin-top: 10px; text-align: center; }
.legal__note { font-size: 12px; margin-top: 18px; color: var(--muted); }

/* Size filter chips on the shop page */
.size-check { cursor: pointer; }
.size-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.size-check .size-pill { height: 38px; min-width: 42px; padding: 0 12px; }
.size-check input:checked + .size-pill { border-color: var(--ink); background: var(--ink); color: #fff; }
.size-check input:focus-visible + .size-pill { outline: 3px solid var(--btn); outline-offset: 2px; }

/* On small screens the slider uses swipe — hide the arrows so nothing
   pokes past the edge of the screen */
@media (max-width: 640px) {
  .slider__nav { display: none; }
}

/* Extra-tight safety on the very smallest screens */
@media (max-width: 360px) {
  .card__row { flex-direction: column; }
  .hero__stats { gap: 18px; }
}

/* Long unbreakable strings (emails, URLs) must wrap on tiny screens */
body { overflow-wrap: break-word; }
.contact-item a, .contact-item span, .cart-item__info { overflow-wrap: anywhere; word-break: break-word; }
