/* =========================================
   БАЗА / ПЕРЕМЕННІ / УТИЛІТИ
   ========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  font-size: 62.5%; /* 1rem ≈ 10px */
  --text: #22272a;
  --muted: #8c8f96;
  --white: #fff;
  --line: rgba(0, 0, 0, 0.12);
  --radius: 0.8rem;

  /* Базовий (мобільний) контейнер */
  --container: 37.5rem;

  --header-h: 6.4rem;
  --thumb-gap: 1.6rem;
  --accent-1: #8dff2a;
  --accent-2: #31e6ff;

  /* >>> НАСТРАИВАЕМЫЕ БОКОВЫЕ ПОЛЯ ДЛЯ БОЛЬШИХ КАРТОЧЕК <<< */
  --edge-pad: 1.2rem; /* измени на 0–3.2rem под себя */
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html,
body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
}

/* === Шрифти / Базові теги ======================== */
body {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}
img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Контейнер */
.container {
  width: min(100%, var(--container));
  margin-inline: auto;
  padding-inline: 1.8rem;
}

/* Секції, утиліти */
.section {
  padding-block: 4.8rem;
}
.muted {
  color: var(--muted);
}
button {
  cursor: pointer;
}
a.icon-btn {
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* =========================================
   HEADER (фіксований)
   ========================================= */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: #fff;
  border-bottom: 0.1rem solid var(--line);
  padding-top: env(safe-area-inset-top);
  transition: transform 0.25s ease;
  will-change: transform;
}
.header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.6rem;
  min-height: var(--header-h);
  padding-left: calc(1.6rem + env(safe-area-inset-left));
  padding-right: calc(1.6rem + env(safe-area-inset-right));
}
.header--hidden {
  transform: translateY(calc(-100% - env(safe-area-inset-top)));
  pointer-events: none;
}

.header__left,
.header__right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.header__right {
  justify-content: flex-end;
}
.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
}
.brand__logo {
  height: 1.7rem;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 4.1rem;
  height: 3.8rem;
  background: transparent;
  border: none;
  border-radius: 0.6rem;
  color: var(--text);
}
.icon-btn--square {
  background: transparent;
}
.icon-img {
  width: 2.2rem;
  height: 2.2rem;
  object-fit: contain;
}

.header__cart,
.header__fav {
  position: relative;
}
.badge {
  position: absolute;
  top: -0.6rem;
  right: -0.6rem;
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0 0.4rem;
  display: grid;
  place-items: center;
  border-radius: 99rem;
  background: #2f3a3a;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

.glass-btn {
  --bg1: rgb(255 255 255 / 0%);
  --bg2: rgba(255, 255, 255, 0);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.2rem;
  border-radius: 3.6rem;
  color: #fff;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: clamp(1.6rem, 1.2rem + 0.9vw, 2.6rem);
  line-height: 1;
  backdrop-filter: blur(1px) saturate(120%);
  -webkit-backdrop-filter: blur(1px) saturate(120%);
  box-shadow: 0 0.8rem 2.8rem rgba(0, 0, 0, 0.28),
    inset 0 0.1rem 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  isolation: isolate;
}

/* =========================================
   FOLD: HERO + ГАЛЕРЕЯ
   ========================================= */
.fold {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-top: calc(var(--header-h) + env(safe-area-inset-top));
}

/* ===== HERO під <picture> ===== */
.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: clamp(60rem, 75vh, 80rem);
  margin: 0;
  background: #fff;
}
.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero__img {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: auto;
  min-width: 100%;
  transform: translateX(-50%);
  display: block;
  max-width: none;
}

/* <=410px */
@media (max-width: 410px) {
  .hero {
    height: 60rem;
  }
  .hero__img {
    left: 0;
    transform: none;
    width: 100%;
    height: 100%;
    min-width: 100%;
    object-fit: cover;
    max-width: 42.5rem;
  }
}
/* 411–1023px */
@media (min-width: 411px) and (max-width: 1023px) {
  .hero {
    height: clamp(62rem, 72vh, 80rem);
  }
  .hero__img {
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: auto;
    min-width: 100%;
  }
}
/* Десктопи */
@media (min-width: 1024px) {
  .hero {
    height: clamp(72rem, 82vh, 96rem);
  }
}
@media (min-width: 1440px) {
  .hero {
    height: clamp(80rem, 88vh, 110rem);
  }
}

/* Контент-оверлей */
.hero__content {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  z-index: 5;
}

/* Простий лінк */
.cta-link {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 0.1rem;
  text-underline-offset: 0.2rem;
  background: none;
  border: 0;
  line-height: 100%;
  white-space: nowrap;
}
.hero__content .cta-link {
  pointer-events: auto;
}

/* =========================================
   Glassmorphism CTA extras
   ========================================= */
.glass-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
      120% 100% at 12% 0%,
      rgba(255, 255, 255, 0.38),
      transparent 55%
    ),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06), transparent);
  mix-blend-mode: screen;
}
.glass-btn:hover {
  transform: translateY(-0.1rem);
  box-shadow: 0 1.2rem 3.6rem rgba(0, 0, 0, 0.33),
    inset 0 0.1rem 0 rgba(255, 255, 255, 0.22);
}
.glass-btn:active {
  transform: translateY(0);
  box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.33),
    inset 0 0.1rem 0 rgba(255, 255, 255, 0.18);
}
.glass-btn:focus,
.glass-btn:focus-visible {
  outline: none;
}
@media (min-width: 768px) {
  .glass-btn {
    padding: 1.6rem 3.2rem;
    border-radius: 4rem;
  }
}
@supports not (
  (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
) {
  .glass-btn {
    background-color: rgba(255, 255, 255, 0.18);
  }
}

/* Якір */
#shop {
  scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0rem));
}

/* =========================================
   CATEGORIES — база
   ========================================= */
.categories {
  display: grid;
  gap: 1.6rem;
  padding-block: 2.4rem 2.4rem;
  padding-inline: var(--edge-pad);
}
.cat-card {
  position: relative;
  display: block;
  width: 100%;
  height: 27rem;
  margin: 0;
  overflow: hidden;
  background: #eee;
  text-decoration: none;
}
.cat-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
  will-change: transform;
  z-index: 0;
}
.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.cat-card:hover::before,
.cat-card:focus-visible::before {
  opacity: 1;
}
.cat-card:hover > img,
.cat-card:focus-visible > img {
  transform: scale(1.02);
}

/* ======== VIEW как SHOP NOW (glass button) — ВСЕГДА ВИДНА + СВЕЧЕНИЕ ======== */
@keyframes glowPulse {
  0% {
    box-shadow: 0 0.8rem 2.8rem rgba(0, 0, 0, 0.28),
      inset 0 0.1rem 0 rgba(255, 255, 255, 0.22),
      0 0 0 0.2rem rgba(255, 255, 255, 0.22);
  }
  100% {
    box-shadow: 0 1.2rem 3.6rem rgba(0, 0, 0, 0.33),
      inset 0 0.1rem 0 rgba(255, 255, 255, 0.22),
      0 0 0 0.4rem rgba(255, 255, 255, 0.28);
  }
}

.cat-card__view {
  position: absolute;
  left: 50%;
  top: 75%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.2rem;
  border-radius: 2.6rem;
  color: #fff;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 1.5rem;
  line-height: 1;
  backdrop-filter: blur(2px) saturate(60%);
  -webkit-backdrop-filter: blur(2px) saturate(60%);
  background: transparent;
  isolation: isolate;
  opacity: 1;
  pointer-events: auto;
}
.cat-card__view::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
      120% 100% at 12% 0%,
      rgba(255, 255, 255, 0.38),
      transparent 55%
    ),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06), transparent);
  mix-blend-mode: screen;
}

/* усиление на hover/focus */
.cat-card__view:hover,
.cat-card__view:focus-visible {
  animation-duration: 1.6s;
  box-shadow: 0 1.4rem 4rem rgba(0, 0, 0, 0.36),
    inset 0 0.1rem 0 rgba(255, 255, 255, 0.24),
    0 0 0 0.48rem rgba(255, 255, 255, 0.32);
  outline: none;
}
.cat-card__view:active {
  transform: translate(-50%, -50%) scale(0.98);
}

@supports not (
  (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
) {
  .cat-card__view {
    background-color: rgba(255, 255, 255, 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cat-card__view {
    animation: none;
  }
}

/* ===== CATEGORIES: десктоп ===== */
@media (min-width: 80em) {
  :root {
    --edge-pad: 1.6rem;
  }

  .categories {
    grid-template-columns: repeat(2, minmax(56rem, 1fr));
    justify-items: stretch;
    align-items: start;
    gap: 6rem;
    padding-block: 6rem 6rem;
    padding-inline: var(--edge-pad);
    box-sizing: content-box;
  }
  .categories > .cat-card {
    height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
  }
  .categories > .cat-card > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.35s ease;
  }
  .categories > .cat-card:hover > img,
  .categories > .cat-card:focus-visible > img {
    transform: scale(1.05);
  }

  .categories > .cat-card::before {
    opacity: 0;
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.06) 40%,
      rgba(0, 0, 0, 0.1) 100%
    );
    transition: opacity 0.25s ease;
  }
}

/* =========================================
   PRODUCT SECTIONS
   ========================================= */
.product-sections {
  display: grid;
  gap: 3.2rem;
  padding: 0 1rem 2rem;
}
.psec__title,
.psec__title > span {
  margin: 0 0 1.6rem;
  color: #111;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-color: #111;
  text-decoration-thickness: 0.2rem;
  text-underline-offset: 0.5rem;
  font-size: 1.9rem;
  line-height: 1;
}
.pgrid {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: none !important;
  gap: 1.6rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding-bottom: 0.4rem;
}
.pgrid.pgrid--2 {
  grid-auto-columns: calc(50% - 0.8rem);
}
.pgrid .prod-card {
  min-width: 0;
  scroll-snap-align: start;
}
.pgrid::-webkit-scrollbar {
  display: none;
}
.prod-card {
  display: block;
  text-decoration: none;
  color: var(--text, #111);
}
.prod-card__media {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #ececec;
}
.prod-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
  will-change: transform;
}
.prod-card:hover .prod-card__media img {
  transform: scale(1.02);
}
.prod-card__title {
  margin: 0.8rem 0 0.3rem;
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 2rem;
}
.prod-card__price {
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 2rem;
}
@media (prefers-reduced-motion: reduce) {
  .prod-card__media img {
    transition: none;
  }
}
.pgrid-progress {
  position: relative;
  height: 0.15rem;
  background: #d9d9d9;
  overflow: hidden;
  margin: 1.6rem 0 0;
}
.pgrid-progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: #2c2c2c;
  border-radius: inherit;
  will-change: transform;
  transition: none !important;
}
.pgrid-progress__fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0.01rem;
  pointer-events: none;
}

/* =========================================
   DUO — горизонтальная фотка по контейнеру
   ========================================= */

.duo {
  margin: 2.4rem auto; /* отступы как у соседних блоков */
}

.duo.container {
  max-width: var(--container, 37.5rem);
  width: 100%;
  margin: 0 auto;
}

/* сам кликабельный айтем */
.duo__item {
  position: relative;
  display: block;
  width: 100%; /* ровно по ширине контейнера */
  aspect-ratio: auto; /* высоту не фиксируем */
  overflow: hidden;
  background: transparent;
  margin-bottom: 4rem;
  margin-top: 2rem;
}

/* изображение растягиваем в блок */
.duo__item > img {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: cover; /* фото заполняет блок, без белых полей */
  object-position: center;
  display: block;
  border-radius: inherit;
}

/* =========================================
   FOOTER (mobile)
   ========================================= */

.footer {
  background: #9db4d3;
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 1.4rem;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}

/* Лого */
.footer__logo img {
  max-width: 23rem;
  margin: 0 auto 2.5rem;
  display: block;
}

/* Навігація: 2×2 як у макеті */
.footer__nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1.8rem;
  margin: 0 auto 2.5rem;
  flex-direction: row;
}

.footer__nav a {
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.4rem;
  white-space: nowrap;
  text-decoration: none;
}

.footer__nav a:nth-child(1),
.footer__nav a:nth-child(2),
.footer__nav a:nth-child(3),
.footer__nav a:nth-child(4) {
  grid-column: unset !important;
  grid-row: unset !important;
  justify-self: center !important;
}

/* Соц. іконки */
.footer__socials {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer__socials img {
  width: 3.2rem;
  height: 3.2rem;
  display: block;
}

/* Лінія на всю ширину сторінки */
.footer-line {
  height: 0.1rem;
  background: #ffffff;
  margin: 2rem 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Партнери */
.footer__partners {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5rem;
  margin-bottom: -2rem;
  margin-top: -5rem;
}
.partner {
  display: block;
  height: auto;
}
.partner--nova {
  max-height: 5.6rem;
  max-width: 13rem;
} /* свій розмір */
.partner--mono {
  max-height: 14rem;
  max-width: 14rem;
} /* свій розмір */

/* Копірайт */
.footer__copy {
  font-size: 1.2rem;
  opacity: 0.8;
}

/* =========================================
   ТОЛЬКО ДЛЯ КОМПЬЮТЕРОВ — шире контейнер
   ========================================= */
@media (min-width: 64em) {
  :root {
    --container: 96rem;
  }
} /* 960 */
@media (min-width: 80em) {
  :root {
    --container: 125rem;
  }
} /* 1200 */
@media (min-width: 90em) {
  :root {
    --container: 137rem;
  }
} /* 1320 */
@media (min-width: 120em) {
  :root {
    --container: 157rem;
  }
} /* 1520 */

@media (min-width: 64em) {
  .container {
    width: min(100%, var(--container));
    padding-inline: 0rem;
  }
}
@media (min-width: 80em) {
  .container {
    padding-inline: 0rem;
  }
}

/* ============================
   DESKTOP GRID: 4 cards per row
   ============================ */
@media (min-width: 64em) {
  /* секції трохи розсуваємо */
  .product-sections {
    gap: 5.6rem;
    padding-bottom: 10rem;
  }

  /* замість горизонтального скролу — звичайна сітка 4x */
  .pgrid {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2.4rem;
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }
  .pgrid.pgrid--2 {
    grid-auto-columns: initial; /* вимикаємо мобільний розмір 50% */
  }
  .pgrid .prod-card {
    scroll-snap-align: unset;
    min-width: 0;
  }

  /* прибираємо індикатор прокрутки (лінію знизу) */
  .pgrid-progress {
    display: none;
  }

  /* візуально як у шопів: трохи “вужчі й вищі” картки */
  .prod-card__media {
    aspect-ratio: 3 / 4; /* було 1 / 1 */
  }

  /* дрібний тюнінг текстів, щоб усе гарно влазило */
  .psec__title,
  .psec__title > span {
    font-size: 3.5rem;
    margin-bottom: 2rem;
  }
  .prod-card__title {
    font-size: 1.7rem;
    line-height: 2.2rem;
    margin: 0rem 0 0.2rem;
  }
  .prod-card__price {
    font-size: 1.3rem;
    line-height: 2rem;
  }
}

/* на дуже великих екранах робимо трішки ширший зазор, щоб дихало */
@media (min-width: 90em) {
  .pgrid {
    gap: 2.8rem;
  }
}

/* ======= Десктопні стилі підвалу та DUO (без фикс-ширины!) ======= */
/* ======= Десктопні стилі підвалу ======= */
@media (min-width: 1024px) {
  .footer__top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 2rem;
    margin-bottom: 2rem;
  }

  .footer__logo {
    grid-column: 2;
  }
  .footer__logo img {
    max-width: 44rem;
    max-height: 12.6rem;
    margin: 3rem auto 2.5rem;
  }

  /* 🔥 Центруємо навігацію */
  .footer__nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 12rem;
    margin-top: 3rem;
    margin-bottom: 2.5rem;
  }

  /* 🔥 Скидаємо мобільні nth-child стилі */
  .footer__nav a {
    all: unset;
    color: #fff;
    font-weight: 800;
    font-size: 2rem;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
  }

  /* 🔥 Повністю прибираємо стрілки, риски, псевдоелементи */
  .footer__nav a::after,
  .footer__nav a::before {
    content: none !important;
  }

  .footer__socials {
    grid-column: 1 / -1;
    margin-top: 2rem;
  }

  .partner--nova {
    max-height: 14.6rem;
    max-width: 14.6rem;
  }
  .partner--mono {
    max-height: 19.4rem;
    max-width: 19.4rem;
  }

  .footer__copy {
    font-weight: 600;
    font-size: 1.3rem;
    color: #ffffff;
  }
}
