/* ==========================================================
   Зоомагазин «Лемур» — стилі
   Кольори взято з логотипу: бірюзовий #23ad99 і темно-синій #2b3c4a
   ========================================================== */

:root {
  --teal: #23ad99;
  --teal-700: #128270;
  --teal-800: #0e6b5c;
  --teal-100: #d5efea;
  --teal-50: #ecf8f5;
  --ink: #2b3c4a;
  --ink-2: #455566;
  --muted: #5f6f80;
  --line: #e6ecef;
  --line-strong: #d2dbe0;
  --bg: #ffffff;
  --bg-soft: #f5f8f8;
  --sale: #d63c32;
  --danger: #c93a3a;
  --danger-bg: #fdf0ef;
  --success-bg: #ecf8f5;
  --warn: #9a6512;
  --warn-bg: #fdf6e7;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(43, 58, 74, 0.05), 0 4px 16px rgba(43, 58, 74, 0.06);
  --shadow-lg: 0 2px 6px rgba(43, 58, 74, 0.06), 0 16px 40px rgba(43, 58, 74, 0.12);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-brand: 'Comfortaa', 'Manrope', system-ui, sans-serif;
  --container: 1240px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 140px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--teal-700);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(24px, 3vw, 32px);
}

h1,
h2,
.card__title {
  text-wrap: balance;
}

h2 {
  font-size: clamp(20px, 2.2vw, 24px);
}

h3 {
  font-size: 18px;
}

p {
  margin: 0 0 1em;
}

.icon {
  flex-shrink: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 20px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--teal-100);
  outline-offset: 2px;
}

.muted {
  color: var(--muted);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--teal-700);
  color: #fff;
}

.btn--primary:hover {
  background: var(--teal-800);
  color: #fff;
}

.btn--dark {
  background: var(--ink);
  color: #fff;
}

.btn--dark:hover {
  background: #1d2935;
  color: #fff;
}

.btn--ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--teal);
  color: var(--teal-700);
}

.btn--soft {
  background: var(--teal-50);
  color: var(--teal-800);
}

.btn--soft:hover {
  background: var(--teal-100);
  color: var(--teal-800);
}

.btn--danger {
  background: #fff;
  border-color: #f0c9c6;
  color: var(--danger);
}

.btn--danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.btn--lg {
  min-height: 54px;
  font-size: 16px;
  padding: 0 28px;
}

.btn--sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 10px;
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.link {
  color: var(--teal-700);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.link:hover {
  color: var(--teal-800);
  text-decoration: underline;
}

/* ---------- Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header__row {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--ink);
}

.logo:hover {
  color: var(--ink);
}

.logo__mark {
  width: 48px;
  height: 48px;
}

.logo__wordmark {
  height: 40px;
  width: auto;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  background: none;
  border: 0;
}

.action:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.action__icon {
  position: relative;
  display: inline-flex;
}

/* Бейдж сидить у верхньому куті іконки й росте праворуч-угору — від іконки, а не поверх неї */
.action__badge {
  position: absolute;
  bottom: calc(100% - 7px);
  left: calc(100% - 7px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--sale);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
  border: 1px solid #fff;
  box-sizing: border-box;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.action__badge[hidden] {
  display: none;
}

.action__badge.is-bumped {
  transform: scale(1.25);
}

/* Сума кошика під підписом; змінюється з «прокруткою» вгору або вниз */
.action--cart .action__label {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: 4px;
  line-height: 1.15;
}

.action__sum {
  position: relative;
  display: block;
  overflow: hidden;
  margin-top: 1px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--teal-700);
  white-space: nowrap;
}

.action__sum-value {
  display: block;
}

.action__sum-value.is-leaving {
  position: absolute;
  top: 0;
  left: 0;
}

/* Мобільне меню */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  visibility: hidden;
}

.drawer.is-open {
  visibility: visible;
}

.drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 40, 0.45);
  opacity: 0;
  transition: opacity 0.2s;
}

.drawer.is-open .drawer__overlay {
  opacity: 1;
}

.drawer__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(340px, 88vw);
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.drawer.is-open .drawer__panel {
  transform: none;
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.drawer__section {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}

.drawer__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 8px 12px 4px;
}

.drawer__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  font-weight: 600;
}

.drawer__link .icon {
  color: var(--teal);
}

.drawer__link:hover {
  background: var(--bg-soft);
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: none;
  border-radius: 10px;
  color: var(--ink);
}

.icon-btn:hover {
  background: var(--bg-soft);
}

/* ---------- Основна частина ---------- */
main {
  min-height: 50vh;
}

.page {
  padding-block: 24px 64px;
}

.section {
  margin-top: 40px;
}

.section:first-child {
  margin-top: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs li + li::before {
  content: '/';
  color: var(--line-strong);
}

.breadcrumbs a:hover {
  color: var(--teal-700);
}

.breadcrumbs [aria-current] {
  color: var(--ink-2);
}

/* Повідомлення */
.flashes {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14.5px;
}

.alert .icon {
  margin-top: 1px;
}

.alert--success {
  background: var(--success-bg);
  color: var(--teal-800);
}

.alert--error {
  background: var(--danger-bg);
  color: var(--danger);
}

.alert--info {
  background: var(--bg-soft);
  color: var(--ink-2);
}

.alert--warn {
  background: var(--warn-bg);
  color: var(--warn);
}

/* ---------- Головна ---------- */
.page.page--home {
  padding-bottom: 0;
}

.page--home .section {
  margin-top: 56px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal-700);
}

.display-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 8px 0 0;
  font-size: 14.5px;
  color: var(--muted);
}

/* Промо-карусель: на широких екранах два банери, на телефоні — один */
.promo-carousel__viewport {
  position: relative;
}

.promo-carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 16px) / 2);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.promo-carousel__track::-webkit-scrollbar {
  display: none;
}

.promo-slide {
  display: block;
  aspect-ratio: 1260 / 528;
  border-radius: 24px;
  overflow: hidden;
  background: #ffd23c;
  scroll-snap-align: start;
}

.promo-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.promo-slide:hover img {
  transform: scale(1.02);
}

.promo-carousel__arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  transform: translateY(-50%);
  transition: color 0.2s;
}

.promo-carousel__arrow:hover {
  color: var(--teal-700);
}

.promo-carousel__arrow--prev {
  left: -16px;
}

.promo-carousel__arrow--next {
  right: -16px;
}

.promo-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.promo-carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line-strong);
  transition: width 0.3s, background-color 0.3s;
}

.promo-carousel__dot[aria-current='true'] {
  width: 28px;
  background: var(--teal);
}

/* «Для кого обираєте?» */
.pets__list {
  display: flex;
  justify-content: center;
  gap: 20px;
  list-style: none;
  margin: 28px 0 0;
  padding: 8px 0 0;
}

.pets__list li {
  width: 170px;
  flex-shrink: 0;
}

.pet {
  display: block;
  text-align: center;
  color: var(--ink);
}

.pet__photo {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(120% 120% at 50% 15%, #fff 0%, #eef0f2 55%, #dfe3e7 100%);
  box-shadow: inset 0 0 0 1px rgba(43, 60, 74, 0.08);
  transition: transform 0.5s, box-shadow 0.5s;
}

.pet__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease-out;
}

/* Бірюзовий обідок поверх фото */
.pet__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--teal);
  opacity: 0;
  transition: opacity 0.4s;
}

.pet:hover .pet__photo {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.pet:hover .pet__photo img {
  transform: scale(1.07);
}

.pet:hover .pet__photo::after {
  opacity: 1;
}

.pet__name {
  display: block;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.pet:hover .pet__name {
  color: var(--teal-700);
}

.pet__count {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* Полиці товарів */
.shelf__head {
  position: relative;
  margin-bottom: 22px;
  padding-left: 20px;
}

.shelf__head::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 6px;
  border-radius: 999px;
  background: var(--shelf-accent, var(--teal));
}

.shelf--sale {
  --shelf-accent: var(--sale);
}

.shelf--new {
  --shelf-accent: #f5b100;
}

.shelf__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.shelf__badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sale);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.shelf__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* «Чому ми?» */
.why__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 20px 0 0;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
}

.why__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 0 24px;
}

.why__item + .why__item {
  border-left: 1px solid var(--line);
}

.why__item:first-child {
  padding-left: 0;
}

.why__item:last-child {
  padding-right: 0;
}

.why__item .icon {
  color: var(--teal);
  stroke-width: 1.5;
}

.why__item h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.why__item p {
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
}

/* «Потрібна допомога?» — смуга на всю ширину над підвалом */
.help-band {
  margin-top: 64px;
  background: var(--teal-50);
}

.help-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 36px;
}

.help-band p {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--ink-2);
}

@media (max-width: 1100px) {
  .shelf__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .why__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 0;
  }

  .why__item:nth-child(2) {
    padding-right: 0;
  }

  .why__item:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 900px) {
  .promo-carousel__track {
    grid-auto-columns: 100%;
  }

  .promo-carousel__arrow {
    display: none;
  }

  .pets__list {
    justify-content: flex-start;
    gap: 14px;
    margin-inline: -20px;
    padding: 8px 20px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .pets__list::-webkit-scrollbar {
    display: none;
  }

  .pets__list li {
    width: 124px;
    scroll-snap-align: start;
  }
}

@media (max-width: 640px) {
  .page--home .section {
    margin-top: 40px;
  }

  .promo-slide {
    border-radius: 18px;
  }

  .pets__list {
    margin-inline: -16px;
    padding-inline: 16px;
    scroll-padding-inline: 16px;
  }

  .shelf__head {
    padding-left: 16px;
  }

  .shelf__list {
    display: flex;
    gap: 10px;
    margin-inline: -16px;
    padding: 0 16px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }

  .shelf__list::-webkit-scrollbar {
    display: none;
  }

  .shelf__list li {
    flex: 0 0 70%;
    max-width: 260px;
    scroll-snap-align: start;
  }

  .why__list {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 4px 20px;
  }

  .why__item,
  .why__item:nth-child(n) {
    padding: 16px 0;
    border-left: 0;
  }

  .why__item + .why__item {
    border-top: 1px solid var(--line);
  }

  .help-band {
    margin-top: 48px;
  }

  .help-band__inner {
    flex-direction: column;
    align-items: stretch;
    padding-block: 28px;
  }
}

.cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cats li {
  display: flex;
}

.cat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 10px 14px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid transparent;
  text-align: center;
  font-weight: 700;
  font-size: 14.5px;
  transition: border-color 0.15s, background-color 0.15s, transform 0.15s;
}

.cat:hover {
  background: #fff;
  border-color: var(--teal);
  color: var(--ink);
  transform: translateY(-2px);
}

.cat__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  color: var(--teal-700);
  display: grid;
  place-items: center;
  box-shadow: 0 1px 2px rgba(43, 58, 74, 0.06);
}

.cat:hover .cat__icon {
  background: var(--teal-50);
}

.cat__count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-top: -6px;
}

.empty {
  text-align: center;
  padding: 56px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-2);
}

.empty .icon {
  margin: 0 auto 12px;
  color: var(--teal);
}

.empty h2,
.empty h3 {
  margin-bottom: 6px;
}

.empty p {
  color: var(--muted);
  max-width: 460px;
  margin: 0 auto 18px;
}

/* ---------- Картка товару ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s;
}

.card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 0;
  background: #fff;
  overflow: hidden;
}

.card__media img {
  position: absolute;
  inset: 14px 14px 8px;
  width: calc(100% - 28px);
  height: calc(100% - 22px);
  object-fit: contain;
  transition: transform 0.35s ease;
}

.card__media .placeholder {
  position: absolute;
  inset: 14px 14px 8px;
  width: auto;
  height: auto;
}

.card:hover .card__media img {
  transform: scale(1.05);
}

.placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  border-radius: calc(var(--radius) - 6px);
  color: #b7c4cc;
}

.badges {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}

.badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.badge--sale {
  background: var(--sale);
  color: #fff;
}

.badge--hit {
  background: var(--ink);
  color: #fff;
}

.badge--muted {
  background: var(--bg-soft);
  color: var(--muted);
}

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 2px 16px 16px;
}

.card__brand {
  font-size: 11.5px;
  font-weight: 800;
  line-height: 16px;
  min-height: 16px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Назва — до 3 рядків: видно колір, розмір і вагу */
.card__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.2em;
  text-wrap: pretty;
}

.card__title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card:hover .card__title a {
  color: var(--teal-700);
}

/* Низ картки притиснутий донизу — ціни й кнопки в ряду стоять на одному рівні */
.card__foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--teal-700);
}

.stock::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}

.stock--out {
  color: var(--muted);
}

.stock--out::before {
  background: #b8c3cb;
}

.card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
  min-height: 28px;
}

.price {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.price__now {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.price__now--sale {
  color: var(--sale);
}

.price__old {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(95, 111, 128, 0.7);
  white-space: nowrap;
}

.buy-form {
  position: relative;
  z-index: 2;
}

.btn-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--teal-700);
  color: #fff;
  font-weight: 800;
  font-size: 14.5px;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-buy:hover {
  background: var(--teal-800);
  box-shadow: 0 8px 18px -8px rgba(18, 130, 112, 0.7);
}

.btn-buy:active {
  transform: scale(0.97);
}

.btn-buy__done {
  display: none;
}

.btn-buy.is-added {
  background: var(--ink);
  animation: buy-pop 0.35s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.btn-buy.is-added .btn-buy__cart {
  display: none;
}

.btn-buy.is-added .btn-buy__done {
  display: block;
}

@keyframes buy-pop {
  40% {
    transform: scale(1.04);
  }
}

.btn-buy[disabled] {
  background: var(--bg-soft);
  color: var(--muted);
  font-weight: 700;
  cursor: not-allowed;
  box-shadow: none;
}

.card--out .card__media img {
  opacity: 0.55;
  filter: grayscale(0.4);
}

/* ---------- Каталог ---------- */
.shop-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.shop-head h1 {
  margin: 0;
}

.shop-head .count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  margin-left: 6px;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  white-space: nowrap;
}

.chip .icon {
  color: var(--teal);
}

.chip:hover {
  border-color: var(--teal);
  color: var(--ink);
}

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.chip.is-active .icon {
  color: var(--teal-100);
}

.chip__count {
  font-size: 12px;
  color: var(--muted);
}

.chip.is-active .chip__count {
  color: #c6d0d8;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.select {
  height: 40px;
  padding: 0 36px 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232b3a4a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  font-size: 14px;
  font-weight: 600;
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 32px;
  list-style: none;
  padding: 0;
}

.pagination a,
.pagination span {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  font-weight: 700;
  font-size: 14px;
}

.pagination a:hover {
  border-color: var(--teal);
}

.pagination .is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.category-text {
  margin-top: 40px;
  color: var(--ink-2);
  max-width: 820px;
  font-size: 14.5px;
}

/* ---------- Сторінка товару ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.gallery {
  position: sticky;
  top: calc(var(--header-h) + 64px);
}

.gallery__main {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
}

.gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery__thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.thumb {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  padding: 6px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumb.is-active,
.thumb:hover {
  border-color: var(--teal);
}

.product__brand {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.product__title {
  font-size: clamp(22px, 2.6vw, 30px);
  margin-bottom: 10px;
}

.product__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}

.product__lead {
  color: var(--ink-2);
  margin-bottom: 20px;
}

.buybox {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: #fff;
}

.buybox__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 18px;
}

.buybox__price .price__now {
  font-size: 34px;
}

.buybox__price .price__old {
  font-size: 17px;
  margin: 0;
}

.buybox__save {
  font-size: 13px;
  font-weight: 700;
  color: var(--sale);
  background: #fdeeed;
  padding: 3px 9px;
  border-radius: 999px;
}

.buybox__row {
  display: flex;
  gap: 10px;
}

.buybox__row .btn {
  flex: 1;
}

.qty {
  display: inline-flex;
  align-items: center;
  height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}

.qty button {
  width: 42px;
  height: 100%;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  color: var(--ink-2);
}

.qty button:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.qty input {
  width: 40px;
  height: 100%;
  border: 0;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  -moz-appearance: textfield;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.qty--sm {
  height: 40px;
}

.qty--sm button {
  width: 34px;
}

.qty--sm input {
  width: 34px;
  font-size: 15px;
}

.quick {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
}

.quick__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}

.quick__label .icon {
  color: var(--teal);
}

.quick__row {
  display: flex;
  gap: 8px;
}

.quick__row .input {
  flex: 1;
  min-width: 0;
}

.quick__hint {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.benefits {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.benefits li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.4;
}

.benefits .icon {
  color: var(--teal);
  margin-top: 1px;
}

.benefits strong {
  display: block;
  font-size: 14.5px;
}

.benefits span {
  color: var(--muted);
}

.tabs-content {
  margin-top: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 48px;
}

.prose {
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.7;
}

.prose p:last-child {
  margin-bottom: 0;
}

.specs {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.specs th,
.specs td {
  text-align: left;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.specs th {
  color: var(--muted);
  font-weight: 600;
  width: 45%;
  padding-right: 16px;
}

.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.mobile-buy {
  display: none;
}

/* ---------- Кошик ---------- */
.cart {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.cart-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item__img {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 6px;
  background: #fff;
}

.cart-item__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item__name {
  font-weight: 700;
  line-height: 1.35;
}

.cart-item__unit {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.cart-item__sum {
  font-weight: 800;
  font-size: 17px;
  min-width: 100px;
  text-align: right;
  white-space: nowrap;
}

.cart-item.is-unavailable {
  opacity: 0.65;
}

.summary {
  position: sticky;
  top: calc(var(--header-h) + 64px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--bg-soft);
}

.summary h2 {
  font-size: 19px;
}

.summary__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 14.5px;
}

.summary__row--save {
  color: var(--sale);
  font-weight: 700;
}

.summary__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0 18px;
  margin-top: 8px;
  border-top: 1px solid var(--line-strong);
  font-weight: 800;
}

.summary__total strong {
  font-size: 26px;
}

.summary__note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 8px;
}

.summary__items {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.summary__item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}

.summary__item img,
.summary__item .placeholder {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 4px;
}

.summary__item-name {
  line-height: 1.3;
  font-weight: 600;
}

.summary__item-qty {
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Форми ---------- */
.form-card {
  max-width: 440px;
  margin: 24px auto 0;
  padding: 36px 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.form-card__mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
}

.form-card h1 {
  text-align: center;
  font-size: 26px;
  margin-bottom: 6px;
}

.form-card__sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 24px;
}

.form-card__foot {
  text-align: center;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.label {
  font-size: 14px;
  font-weight: 700;
}

.label .opt {
  color: var(--muted);
  font-weight: 500;
}

.input,
.textarea {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.textarea {
  height: auto;
  min-height: 110px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-50);
}

.input.is-invalid,
.textarea.is-invalid {
  border-color: var(--danger);
}

.field-error {
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

.field-hint {
  color: var(--muted);
  font-size: 13px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
}

.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal-700);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.password {
  position: relative;
}

.password .input {
  padding-right: 48px;
}

.password__toggle {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.password__toggle:hover {
  color: var(--ink);
}

/* Оформлення замовлення */
.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
}

.step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.step__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  margin-bottom: 18px;
}

.step__num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-800);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: border-color 0.15s, background-color 0.15s;
}

.option:hover {
  border-color: var(--teal);
}

.option input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal-700);
}

.option:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-50);
}

.option .icon {
  margin-left: auto;
  color: var(--teal);
}

.login-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  margin-bottom: 16px;
  font-size: 14.5px;
}

/* Успішне замовлення */
.success {
  max-width: 640px;
  margin: 16px auto 0;
  text-align: center;
}

.success__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-700);
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
}

.success .summary {
  position: static;
  text-align: left;
  margin: 24px 0;
}

/* ---------- Кабінет ---------- */
.account {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.account-nav {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}

.account-nav__user {
  padding: 14px 12px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.account-nav__name {
  font-weight: 800;
  font-size: 16px;
}

.account-nav__email {
  color: var(--muted);
  font-size: 13.5px;
  word-break: break-all;
}

.account-nav a,
.account-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14.5px;
  border: 0;
  background: none;
  text-align: left;
}

.account-nav a:hover,
.account-nav button:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.account-nav a.is-active {
  background: var(--teal-50);
  color: var(--teal-800);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.panel + .panel {
  margin-top: 16px;
}

.orders {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.order-row:hover {
  border-color: var(--teal);
  color: var(--ink);
}

.order-row__id {
  font-weight: 800;
}

.order-row__date {
  color: var(--muted);
  font-size: 13.5px;
}

.status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--bg-soft);
  color: var(--ink-2);
  white-space: nowrap;
}

.status--new {
  background: #e8f1fd;
  color: #1f5fa8;
}

.status--processing {
  background: var(--warn-bg);
  color: var(--warn);
}

.status--shipped {
  background: #efeafc;
  color: #5b3fb0;
}

.status--done {
  background: var(--teal-50);
  color: var(--teal-800);
}

.status--cancelled {
  background: var(--danger-bg);
  color: var(--danger);
}

.dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 16px;
  margin: 0;
  font-size: 14.5px;
}

.dl dt {
  color: var(--muted);
}

.dl dd {
  margin: 0;
  font-weight: 600;
}

/* ---------- Про нас / Контакти ---------- */
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.about-hero__lead {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.7;
}

.about-photo {
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  background: var(--teal-50);
  display: grid;
  place-items: center;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-photo__mark {
  width: 55%;
  height: auto;
}

.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.value {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.value__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #fff;
  color: var(--teal-700);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.value h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.value p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.faq {
  max-width: 860px;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .icon {
  transition: transform 0.2s;
  color: var(--muted);
}

.faq details[open] summary .icon {
  transform: rotate(180deg);
}

.faq details p {
  margin: 0 0 18px;
  color: var(--ink-2);
  max-width: 720px;
}

.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-item__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--teal-50);
  color: var(--teal-700);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.contact-item__label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.contact-item__value {
  font-weight: 700;
  font-size: 16px;
}

.contact-item__value a:hover {
  color: var(--teal-700);
}

.hours {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  gap: 2px 18px;
  margin: 2px 0 0;
  font-weight: 700;
}

.hours dt {
  color: var(--ink-2);
  font-weight: 600;
}

.hours dd {
  margin: 0;
}

.map {
  margin-top: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 21 / 9;
  background: var(--bg-soft);
}

.map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.socials {
  display: flex;
  gap: 8px;
}

.socials a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
}

.socials a:hover {
  border-color: var(--teal);
}

/* ---------- Підвал ---------- */
.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding-block: 48px 24px;
  font-size: 14.5px;
}

/* Колонок розділів каталогу може бути від нуля до двох — сітка підлаштовується */
.footer__grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
}

.footer__about {
  color: var(--muted);
  margin: 14px 0 16px;
  max-width: 320px;
}

.footer__title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  color: var(--ink-2);
}

.footer__links li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.footer__links .icon {
  color: var(--teal);
  margin-top: 2px;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Сповіщення «додано в кошик» ---------- */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: min(380px, calc(100vw - 32px));
  padding: 16px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.25s, opacity 0.25s, visibility 0.25s;
}

.toast.is-visible {
  transform: none;
  opacity: 1;
  visibility: visible;
}

.toast__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--teal-800);
  margin-bottom: 12px;
}

.toast__close {
  margin-left: auto;
  width: 32px;
  height: 32px;
}

.toast__product {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.toast__img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 1px solid var(--line);
  object-fit: contain;
  padding: 4px;
}

.toast__name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.toast__price {
  font-weight: 800;
  font-size: 14px;
}

.toast__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ---------- Сторінки помилок ---------- */
.error-page {
  text-align: center;
  padding: 40px 0 20px;
  max-width: 560px;
  margin: 0 auto;
}

.error-page__code {
  font-family: var(--font-brand);
  font-size: 88px;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 8px;
}

.error-page__mark {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
}

/* ---------- Адаптивність ---------- */
@media (max-width: 1100px) {
  .grid--4 {
    grid-template-columns: repeat(3, 1fr);
  }

  .values {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .action__label {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 60px;
  }

  .header__row {
    flex-wrap: wrap;
    gap: 0 8px;
    height: auto;
    padding-bottom: 10px;
  }

  .header__row > .burger,
  .header__row > .logo,
  .header__actions {
    min-height: var(--header-h);
  }

  .logo__mark {
    width: 40px;
    height: 40px;
  }

  .logo__wordmark {
    height: 34px;
  }

  .header .search {
    order: 3;
    flex: 1 0 100%;
    max-width: none;
  }

  .action {
    padding: 0 9px;
  }

  .product,
  .tabs-content,
  .cart,
  .checkout,
  .account,
  .about-hero,
  .contacts {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .gallery,
  .summary {
    position: static;
  }

  .mobile-buy {
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(43, 58, 74, 0.08);
    transform: translateY(110%);
    transition: transform 0.25s;
  }

  .mobile-buy.is-visible {
    transform: none;
  }

  .mobile-buy .price__now {
    font-size: 20px;
  }

  .mobile-buy form {
    flex: 1;
  }

  .has-mobile-buy .footer {
    padding-bottom: 96px;
  }

  .has-mobile-buy .toast {
    bottom: 84px;
  }

  .map {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14.5px;
  }

  .container {
    padding-inline: 16px;
  }

  .logo {
    gap: 8px;
  }

  .logo__mark {
    width: 36px;
    height: 36px;
  }

  .logo__wordmark {
    height: 30px;
  }

  .page {
    padding-block: 16px 48px;
  }

  .section {
    margin-top: 32px;
  }

  .grid,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .card__body {
    padding: 2px 12px 12px;
  }

  .card__title {
    font-size: 13.5px;
  }

  .card__foot {
    padding-top: 10px;
    gap: 6px;
  }

  .card__price {
    min-height: 24px;
  }

  .price__now {
    font-size: 18px;
  }

  .price__old {
    font-size: 12.5px;
  }

  .btn-buy {
    height: 40px;
    font-size: 14px;
  }

  .cats {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    margin-inline: -16px;
    padding: 0 16px 4px;
    scrollbar-width: none;
  }

  .cats::-webkit-scrollbar {
    display: none;
  }

  .cats li {
    flex: 0 0 104px;
  }

  .cat {
    padding: 14px 6px 12px;
    font-size: 13.5px;
  }

  .cat__icon {
    width: 48px;
    height: 48px;
  }

  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -16px;
    padding: 0 16px 4px;
    scrollbar-width: none;
  }

  .chips::-webkit-scrollbar {
    display: none;
  }

  .shop-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .buybox {
    padding: 18px;
  }

  .buybox__price .price__now {
    font-size: 28px;
  }

  .gallery__main {
    padding: 16px;
  }

  .cart-item {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    grid-template-areas:
      'img name remove'
      'img qty sum';
    gap: 8px 14px;
  }

  .cart-item__img {
    grid-area: img;
    width: 72px;
    height: 72px;
    align-self: start;
  }

  .cart-item__info {
    grid-area: name;
  }

  .cart-item .qty {
    grid-area: qty;
    justify-self: start;
  }

  .cart-item__sum {
    grid-area: sum;
    min-width: 0;
  }

  .cart-item__remove {
    grid-area: remove;
    align-self: start;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 28px 20px;
    border: 0;
    box-shadow: none;
    margin-top: 0;
  }

  .step {
    padding: 18px;
  }

  .order-row {
    grid-template-columns: 1fr auto;
  }

  .dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .dl dd {
    margin-bottom: 10px;
  }

  .values {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }
}

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

/* ---------- Адмін-панель ---------- */
.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.admin-head h1 {
  margin: 0;
}

.counter {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--sale);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
}

.stat__label {
  color: var(--ink-2);
  font-weight: 600;
}

.stat__value {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel .table-wrap {
  border: 0;
  border-radius: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  text-align: left;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  white-space: nowrap;
}

.panel .table th {
  background: none;
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table__thumb {
  width: 64px;
}

.table__thumb img,
.table__thumb .placeholder {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.table__title {
  font-weight: 700;
}

.table__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.admin-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.admin-filter .input {
  flex: 1;
  min-width: 220px;
  height: 46px;
}

.admin-filter .select {
  height: 46px;
}

.admin-form .panel h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

.img-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.img-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
}

.img-item img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  background: #fff;
}

.img-item .checkbox {
  font-weight: 600;
  gap: 6px;
}

.img-item .checkbox input {
  width: 16px;
  height: 16px;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.dropzone:hover,
.dropzone.is-over {
  border-color: var(--teal);
  background: var(--teal-50);
}

.dropzone .icon {
  color: var(--teal);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone__files {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-800);
}

.checks {
  display: grid;
  gap: 14px;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.cat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 90px auto;
  gap: 8px;
  align-items: center;
}

.cat-form .input {
  height: 48px;
}

.cat-form__wide {
  grid-column: 1 / -1;
}

.cat-form__name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-rows {
  display: grid;
}

.cat-form--row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.cat-form--row:first-child {
  padding-top: 0;
}

.cat-form--row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.messages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.messages .panel + .panel {
  margin-top: 0;
}

.message.is-unread {
  border-color: var(--teal);
  box-shadow: inset 3px 0 0 var(--teal);
}

@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .cat-form {
    grid-template-columns: 1fr 1fr;
  }

  .cat-form__name,
  .cat-form > .input:first-of-type {
    grid-column: 1 / -1;
  }

  .panel {
    padding: 18px;
  }
}


.chips--sub {
  margin-top: -8px;
}

.chips--sub .chip {
  height: 34px;
  padding: 0 12px;
  font-size: 13.5px;
  background: var(--bg-soft);
  border-color: transparent;
}

.chips--sub .chip:hover {
  border-color: var(--teal);
}

.chips--sub .chip.is-active {
  background: var(--teal-700);
  border-color: var(--teal-700);
  color: #fff;
}

.checks--row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

/* ---------- Головне меню з випадаючим каталогом ---------- */
.mainnav {
  border-top: 1px solid var(--line);
  background: #fff;
}

.mainnav__row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mainnav__list,
.mainnav__pages {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mainnav__list {
  flex: 1;
}

.mainnav__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 48px;
  padding: 0 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.mainnav__link .icon {
  color: var(--teal);
}

.mainnav__link:hover,
.mainnav__link.is-active {
  color: var(--ink);
  border-bottom-color: var(--teal);
}

.mainnav__link--section {
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
}

.mainnav__chevron {
  color: var(--muted) !important;
  transition: transform 0.2s;
}

.mainnav__link--sale {
  color: var(--sale);
}

.mainnav__link--sale .icon {
  color: var(--sale) !important;
}

.mainnav__link--sale:hover,
.mainnav__link--sale.is-active {
  color: var(--sale);
  background: var(--danger-bg);
  border-bottom-color: var(--sale);
}

.mainnav__link--new {
  color: var(--warn);
}

.mainnav__link--new .icon {
  color: var(--warn) !important;
}

.mainnav__link--new:hover,
.mainnav__link--new.is-active {
  color: var(--warn);
  background: var(--warn-bg);
  border-bottom-color: var(--warn);
}

.mainnav__link--sale,
.mainnav__link--new {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

/* Ті самі акценти в мобільному меню */
.drawer__link--sale {
  color: var(--sale);
}

.drawer__link--sale .icon {
  color: var(--sale) !important;
}

.drawer__link--new {
  color: var(--warn);
}

.drawer__link--new .icon {
  color: var(--warn) !important;
}

.mainnav__sep {
  width: 1px;
  height: 22px;
  background: var(--line-strong);
  margin: 0 8px;
}

/* Меню розділу плавно проявляється й від'їжджає — як панель каталогу під бургером */
.mega {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%) translateY(-10px);
  width: min(var(--container), 100vw);
  padding: 0 20px;
  z-index: 50;
  display: flex;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.28s;
}

/* Меню відкривається кліком, а не наведенням: на наведення — лише підказка, що пункт натискається */
.has-mega.is-open .mega {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.has-mega > .mainnav__link {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.has-mega:hover > .mainnav__link {
  background: var(--teal-50);
  color: var(--teal-800);
}

/* Шеврон на наведення трохи опускається — жест «натисни, і відкриється» */
.has-mega:hover .mainnav__chevron {
  transform: translateY(2px);
}

.has-mega.is-open > .mainnav__link {
  background: var(--teal-50);
  border-bottom-color: var(--teal);
}

.has-mega.is-open .mainnav__chevron {
  transform: rotate(180deg);
}

.mega__main {
  flex: 1;
  background: #fff;
  padding: 26px 30px 22px;
  border-radius: 0 0 0 var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  border-top: 0;
  border-right: 0;
  min-height: 280px;
}

/* Посилання «Усі товари для…» над категоріями */
.mega__all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--teal-50);
  color: var(--teal-800);
  font-weight: 800;
  font-size: 14px;
}

.mega__all:hover {
  background: var(--teal-100);
  color: var(--teal-800);
}

.mega__all .icon {
  transition: transform 0.2s;
}

.mega__all:hover .icon {
  transform: translateX(3px);
}

/* Розділ «Іншим тваринам»: ліворуч тварини, праворуч категорії вибраної тварини */
.mega__pets {
  display: grid;
  grid-template-columns: 232px 1fr;
  gap: 24px;
}

.mega__rail {
  list-style: none;
  margin: 0;
  padding: 0 20px 0 0;
  border-right: 1px solid var(--line);
}

.mega__pet {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 14.5px;
  text-align: left;
  transition: background-color 0.18s, color 0.18s;
}

.mega__pet:hover,
.mega__pet.is-active {
  background: var(--teal-50);
  color: var(--teal-800);
}

.mega__pet-photo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(120% 120% at 50% 15%, #fff 0%, #eef0f2 55%, #dfe3e7 100%);
  box-shadow: inset 0 0 0 1px rgba(43, 60, 74, 0.08);
}

.mega__pet-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease-out;
}

.mega__pet:hover .mega__pet-photo img,
.mega__pet.is-active .mega__pet-photo img {
  transform: scale(1.08);
}

.mega__pet-name {
  flex: 1;
  min-width: 0;
}

.mega__pet-arrow {
  color: var(--line-strong) !important;
  transition: transform 0.2s, color 0.2s;
}

.mega__pet:hover .mega__pet-arrow,
.mega__pet.is-active .mega__pet-arrow {
  color: var(--teal) !important;
  transform: translateX(3px);
}

.mega__pane {
  display: none;
}

.mega__pane.is-active {
  display: block;
  animation: mega-pane-in 0.25s ease;
}

@keyframes mega-pane-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.mega__pane-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
}

.mega__pane-title:hover {
  color: var(--teal-700);
}

.mega__cols.mega__cols--pets {
  columns: 2;
  column-gap: 28px;
}

/* Назва категорії в меню тепер веде на сторінку каталогу з цим фільтром */
a.mega__title:hover {
  color: var(--teal-700);
}

.drawer__all {
  display: inline-block;
  margin: 10px 0 2px;
  font-weight: 800;
  color: var(--teal-700);
}

a.drawer__cat:hover {
  color: var(--teal-700);
}

.mega__cols {
  columns: 3;
  column-gap: 36px;
}

.mega__group {
  break-inside: avoid;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 18px;
}

.mega__title {
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 2px;
}

.mega__title--sale {
  color: var(--sale);
}

.mega__link {
  font-size: 14px;
  color: var(--ink-2);
}

.mega__title:hover,
.mega__link:hover {
  color: var(--teal-700);
}

.mega__empty {
  color: var(--ink-2);
  max-width: 520px;
}

.mega__brands {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.mega__brand {
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.02em;
}

.mega__brand:hover {
  border-color: var(--teal);
}

.mega__brand--all {
  border-style: dashed;
  color: var(--muted);
  font-weight: 700;
}

.mega__promo {
  width: 250px;
  flex-shrink: 0;
  background: var(--teal-50);
  border-radius: 0 0 var(--radius) 0;
  box-shadow: var(--shadow-lg);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.mega__promo img {
  width: 96px;
  height: 96px;
  margin-bottom: 4px;
}

.mega__promo-title {
  font-weight: 800;
  font-size: 18px;
  margin: 0;
}

.mega__promo p {
  margin: 0 0 8px;
  color: var(--ink-2);
  font-size: 14px;
}

/* Мобільне меню: розділи з категоріями */
.drawer__group summary {
  cursor: pointer;
  list-style: none;
}

.drawer__group summary::-webkit-details-marker {
  display: none;
}

.drawer__group summary span {
  flex: 1;
}

.drawer__chevron {
  color: var(--muted) !important;
  transition: transform 0.2s;
}

.drawer__group[open] .drawer__chevron {
  transform: rotate(180deg);
}

.drawer__group.is-closing .drawer__chevron {
  transform: rotate(0deg);
}

.drawer__sub {
  display: flex;
  flex-direction: column;
  padding: 0 12px 8px 48px;
}

.drawer__sub a {
  padding: 8px 0;
  font-size: 14.5px;
  color: var(--ink-2);
}

/* ---------- Плитки супер-категорій ---------- */

/* Плитки категорій на сторінці розділу */
.cat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}

.cat-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cat-tile:hover {
  border-color: var(--teal);
}

.cat-tile__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cat-tile__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--teal-50);
  color: var(--teal-700);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.cat-tile__name {
  display: block;
  font-weight: 800;
  font-size: 16px;
}

.cat-tile__count {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

.cat-tile__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 13.5px;
}

.cat-tile__links a {
  color: var(--ink-2);
}

.cat-tile__links a:hover {
  color: var(--teal-700);
  text-decoration: underline;
}

/* ---------- Каталог із фільтрами ---------- */
.listing {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.listing__bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.filters-toggle {
  display: none;
  margin-right: auto;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  background: var(--teal-50);
  color: var(--teal-800);
  font-size: 13.5px;
  font-weight: 700;
}

.active-filter:hover {
  background: var(--teal-100);
  color: var(--teal-800);
}

.grid--listing {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.chips--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips--scroll::-webkit-scrollbar {
  display: none;
}

/* ---------- Бренди ---------- */
.brand-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.brand-letters a {
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  font-weight: 800;
}

.brand-letters a:hover {
  border-color: var(--teal);
}

.brand-group {
  margin-bottom: 24px;
}

.brand-group__letter {
  font-size: 22px;
  color: var(--teal-700);
}

.brand-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 1100px) {
  .mega__promo {
    display: none;
  }

  .mega__main {
    border-radius: 0 0 var(--radius) var(--radius);
    border-right: 1px solid var(--line);
  }

  .mainnav__pages {
    display: none;
  }
}

@media (max-width: 900px) {
  .mainnav {
    display: none;
  }

  .listing {
    grid-template-columns: 1fr;
  }

  .filters-toggle {
    display: inline-flex;
  }

  .cat-tiles {
    grid-template-columns: 1fr;
  }
}

/* ---------- Адмінка: категорії, фільтри ---------- */
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  font-weight: 700;
}

.tab .icon {
  color: var(--teal);
}

.tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.tab.is-active .icon {
  color: var(--teal-100);
}

.inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-form .input {
  flex: 1;
  min-width: 220px;
}

.cat-admin__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-admin__name {
  flex: 1;
  font-weight: 800;
  font-size: 16px;
}

.cat-admin__count {
  white-space: nowrap;
  font-size: 13px;
}

.cat-admin__more {
  margin-top: 10px;
}

.cat-admin__more summary {
  cursor: pointer;
  color: var(--teal-700);
  font-weight: 700;
  font-size: 14px;
}

.cat-admin__actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.subcats {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
}

.subcat-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 70px auto auto auto auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.subcat-row .input {
  height: 40px;
  font-size: 14px;
  padding: 0 10px;
}

.subcat-row__count {
  font-size: 12.5px;
  white-space: nowrap;
}

.subcat-row--new {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 10px;
}

.cat-picker {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.cat-picker summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-weight: 800;
  cursor: pointer;
}

.cat-picker summary .icon {
  color: var(--teal);
}

.cat-picker__body {
  padding: 0 14px 14px;
  display: grid;
  gap: 12px;
}

.cat-picker__parent {
  font-weight: 800;
  margin-bottom: 6px;
}

.cat-picker__group .checks--row {
  padding-left: 28px;
  gap: 6px 18px;
}

.cat-picker__group .checkbox {
  font-weight: 500;
}

@media (max-width: 640px) {
  .subcat-row {
    grid-template-columns: 1fr 1fr auto auto;
  }

  .subcat-row input[name="sort_order"],
  .subcat-row__count {
    display: none;
  }
}

/* ---------- Шапка: стиснення після скролу (як у великих зооритейлерів) ---------- */
.header {
  transition: box-shadow 0.3s ease;
}

.header.is-compact {
  box-shadow: 0 6px 24px rgba(43, 60, 74, 0.08);
}

.header__row {
  transition: height 0.3s ease;
}

.logo__mark,
.logo__wordmark {
  transition: width 0.3s ease, height 0.3s ease;
}

.header.is-compact .header__row {
  height: 64px;
}

.header.is-compact .logo__mark {
  width: 42px;
  height: 42px;
}

.header.is-compact .logo__wordmark {
  height: 34px;
}

/* Бургер: на десктопі виїжджає зліва лише в стиснутій шапці й «штовхає» логотип */
.burger {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 0;
  height: 46px;
  margin-right: -28px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--ink);
  opacity: 0;
  transform: translateX(-16px) scale(0.8);
  pointer-events: none;
  overflow: hidden;
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), margin 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease,
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.15s;
}

.burger:hover {
  background: var(--teal-50);
}

.header.is-compact .burger {
  width: 46px;
  margin-right: 0;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.burger__lines {
  position: relative;
  width: 20px;
  height: 14px;
}

.burger__lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.2s ease, top 0.3s ease;
}

.burger__lines span:nth-child(1) {
  top: 0;
}

.burger__lines span:nth-child(2) {
  top: 6px;
}

.burger__lines span:nth-child(3) {
  top: 12px;
}

.burger[aria-expanded='true'] .burger__lines span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

.burger[aria-expanded='true'] .burger__lines span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.2);
}

.burger[aria-expanded='true'] .burger__lines span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

/* Нижній рядок меню плавно ховається */
.mainnav {
  max-height: 60px;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease, border-color 0.3s ease;
}

.header.is-compact .mainnav {
  max-height: 0;
  opacity: 0;
  border-top-color: transparent;
}

.mainnav__link--section {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  font-size: 15px;
}

/* ---------- Пошук у шапці ---------- */
.search {
  flex: 1;
  position: relative;
  max-width: 680px;
  z-index: 2;
}

.search__box {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search__box:focus-within,
.search.is-open .search__box {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-50);
}

.search__icon {
  margin-left: 14px;
  color: var(--muted);
}

.search__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 10px;
  border: 0;
  background: none;
  font-size: 15.5px;
}

.search__input:focus {
  outline: none;
}

.search__input::placeholder {
  color: #8593a2;
}

.search__input::-webkit-search-cancel-button {
  display: none;
}

.search__clear {
  width: 34px;
  height: 34px;
  margin-right: 4px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.search__clear:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.search__btn {
  align-self: stretch;
  padding: 0 20px;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
  transition: background-color 0.15s, color 0.15s;
}

.search__btn:hover,
.search.is-open .search__btn {
  background: var(--teal-700);
  border-left-color: var(--teal-700);
  color: #fff;
}

/* Випадаюча панель результатів */
.search-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  max-height: min(640px, calc(100vh - 120px));
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 18px;
  animation: panel-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.search-panel__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 8px 22px;
}

.search-panel__grid > :only-child {
  grid-column: 1 / -1;
}

.search-panel__col--cats {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.search-panel__grid > .search-panel__col--cats:only-child {
  padding-left: 0;
  border-left: 0;
}

.search-panel__title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 2px 0 8px;
}

.search-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  margin: 0 -8px;
  border-radius: 12px;
}

.search-item:hover,
.search-item.is-active,
.search-cat:hover,
.search-cat.is-active {
  background: var(--bg-soft);
  color: var(--ink);
}

.search-item__img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.search-item__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.search-item__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.search-item__name {
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-item__price {
  font-weight: 800;
  font-size: 14.5px;
}

.search-item__price.is-sale {
  color: var(--sale);
}

.search-item__price s {
  color: var(--muted);
  font-weight: 500;
  font-size: 12.5px;
}

.search-item__out {
  color: var(--muted);
  font-weight: 500;
  font-size: 12.5px;
}

.search-panel mark {
  background: none;
  color: var(--teal-800);
  font-weight: 800;
}

.search-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin: 0 -10px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
}

.search-cat__icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--teal-50);
  color: var(--teal-700);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.search-cat__name {
  flex: 1;
  line-height: 1.3;
}

.search-cat__count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.search-panel__empty {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 2px 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.search-panel__empty span {
  color: var(--muted);
  font-size: 14px;
}

.search-panel__all {
  margin-top: 14px;
}

/* Затемнення сторінки під відкритими панелями */
.page-dim {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(20, 30, 40, 0.38);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.page-dim.is-visible {
  opacity: 1;
  visibility: visible;
}

/* ---------- Каталог за кнопкою-бургером ---------- */
.catalog-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  padding-top: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.25s;
}

.catalog-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.catalog-panel__box {
  display: flex;
  max-height: calc(100vh - 100px);
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  overflow: hidden;
}

.catalog-panel__tabs {
  width: 250px;
  flex-shrink: 0;
  list-style: none;
  margin: 0;
  padding: 14px 0;
  background: var(--bg-soft);
  overflow-y: auto;
}

.catalog-panel__tab {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 20px;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  font-weight: 800;
  font-size: 15.5px;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.15s;
}

.catalog-panel__tab.is-active {
  background: #fff;
}

.catalog-panel__icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  color: var(--teal-700);
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(43, 60, 74, 0.1);
  flex-shrink: 0;
  transition: background-color 0.15s, color 0.15s;
}

.catalog-panel__tab.is-active .catalog-panel__icon {
  background: var(--teal-700);
  color: #fff;
}

.catalog-panel__name {
  flex: 1;
}

.catalog-panel__arrow {
  color: var(--muted);
  transition: transform 0.2s;
}

.catalog-panel__tab.is-active .catalog-panel__arrow {
  color: var(--ink);
  transform: translateX(3px);
}

.catalog-panel__content {
  flex: 1;
  min-width: 0;
  padding: 24px 30px;
  overflow-y: auto;
}

.catalog-panel__pane {
  display: none;
  animation: pane-in 0.25s ease;
}

.catalog-panel__pane.is-active {
  display: block;
}

@keyframes pane-in {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
}

.catalog-panel .mega__promo {
  border-radius: 0;
  box-shadow: none;
}

/* Мобільне меню: заголовки категорій */
.drawer__cat {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 12px 0 2px;
}

.drawer__cat:first-child {
  padding-top: 2px;
}

@media (max-width: 1100px) {
  .catalog-panel .mega__promo {
    display: none;
  }

  .search__btn {
    padding: 0 14px;
  }
}

@media (max-width: 900px) {
  .burger {
    width: 42px;
    height: 42px;
    margin: 0 0 0 -6px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    background: none;
  }

  .header.is-compact .burger {
    width: 42px;
    margin: 0 0 0 -6px;
  }

  .header.is-compact .header__row {
    height: auto;
  }

  .catalog-panel {
    display: none;
  }

  .search__box {
    height: 46px;
  }

  .search__btn {
    display: none;
  }

  .search-panel {
    left: 0;
    right: 0;
    width: auto !important;
    max-height: calc(100vh - 140px);
    padding: 14px;
  }

  .search-panel__grid {
    grid-template-columns: 1fr;
  }

  .search-panel__col--cats {
    order: -1;
    padding-left: 0;
    border-left: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
  }
}

.subcat-row__seo {
  grid-column: 1 / -1;
  margin: -2px 0 8px;
  font-size: 13px;
}

.subcat-row__seo summary {
  cursor: pointer;
  color: var(--teal-700);
  font-weight: 700;
}

/* ==========================================================
   Вхід / реєстрація
   ========================================================== */
.auth-body {
  background: var(--bg-soft);
}

.auth {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ── Фірмова половина ── */
.auth__brand {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0e6b5c 0%, #128270 30%, #23ad99 60%, #2b3c4a 100%);
  background-size: 220% 220%;
  animation: auth-gradient 16s ease-in-out infinite alternate;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

@keyframes auth-gradient {
  0% {
    background-position: 0% 30%;
  }
  100% {
    background-position: 100% 70%;
  }
}

.auth__brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.18), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(255, 255, 255, 0.12), transparent 45%);
  pointer-events: none;
}

.auth__paws {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth__paw {
  position: absolute;
  color: rgba(255, 255, 255, 0.16);
  animation: auth-float 9s ease-in-out infinite;
  animation-delay: calc(var(--d) * -1);
}

.auth__paw .icon {
  width: var(--s);
  height: var(--s);
}

@keyframes auth-float {
  0%,
  100% {
    transform: translateY(0) rotate(-12deg);
  }
  50% {
    transform: translateY(-22px) rotate(10deg);
  }
}

.auth__brand-inner {
  position: relative;
  z-index: 1;
  max-width: 440px;
}

.auth__mascot {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22), 0 0 0 10px rgba(255, 255, 255, 0.14);
  margin-bottom: 30px;
  animation: auth-bob 4.5s ease-in-out infinite, auth-pop 0.8s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.auth__mascot img {
  width: 128px;
  height: 128px;
}

@keyframes auth-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

@keyframes auth-pop {
  from {
    opacity: 0;
    scale: 0.6;
  }
}

.auth__headline {
  position: relative;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.12;
  margin: 0 0 12px;
  min-height: 1.15em;
}

.auth__swap {
  display: block;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth[data-mode='login'] .auth__swap[data-when='register'],
.auth[data-mode='register'] .auth__swap[data-when='login'] {
  opacity: 0;
  transform: translateY(14px);
}

.auth__sub {
  font-size: 17px;
  line-height: 1.55;
  opacity: 0.88;
  margin: 0 0 26px;
}

.auth__perks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.auth__perks li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  animation: auth-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(0.35s + var(--i) * 0.1s);
}

.auth__perks li > span {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* ── Половина з формами ── */
.auth__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 24px;
}

.auth__top {
  width: 100%;
  max-width: 460px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: auto;
}

.auth__top .logo__mark {
  width: 40px;
  height: 40px;
}

.auth__top .logo__wordmark {
  height: 32px;
}

.auth__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-2);
  padding: 8px 12px 8px 6px;
  border-radius: 10px;
}

.auth__back:hover {
  background: #fff;
  color: var(--ink);
}

.auth__card {
  width: 100%;
  max-width: 460px;
  margin: 32px 0;
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 2px 6px rgba(43, 60, 74, 0.04), 0 30px 60px -20px rgba(43, 60, 74, 0.18);
  padding: 10px 34px 30px;
  animation: auth-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.auth__tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-soft);
  border-radius: 16px;
  padding: 5px;
  margin: 20px 0 26px;
}

.auth__tab-pill {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc(50% - 5px);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(43, 60, 74, 0.1);
  transition: transform 0.45s cubic-bezier(0.3, 1.3, 0.5, 1);
}

.auth[data-mode='register'] .auth__tab-pill {
  transform: translateX(100%);
}

.auth__tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  font-weight: 800;
  font-size: 15px;
  color: var(--muted);
  transition: color 0.25s;
}

.auth__tab:hover {
  color: var(--ink);
}

.auth[data-mode='login'] .auth__tab[data-auth-tab='login'],
.auth[data-mode='register'] .auth__tab[data-auth-tab='register'] {
  color: var(--teal-800);
}

.auth__forms {
  position: relative;
  transition: height 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-form {
  display: none;
}

.auth-form.is-active {
  display: block;
}

.js .auth-form {
  display: block;
  position: absolute;
  inset: 0 0 auto 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(40px);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.35s;
}

.js .auth-form[data-auth-form='login'] {
  transform: translateX(-40px);
}

.js .auth-form.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: none;
}

.auth-form__title {
  font-size: 26px;
  margin: 0 0 4px;
}

.auth-form__sub {
  color: var(--muted);
  margin: 0 0 22px;
}

.auth-form .alert {
  margin-bottom: 16px;
}

.auth-shake {
  animation: auth-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes auth-shake {
  10%,
  90% {
    transform: translateX(-2px);
  }
  20%,
  80% {
    transform: translateX(4px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-7px);
  }
  40%,
  60% {
    transform: translateX(7px);
  }
}

/* Поля з «плаваючими» підписами */
.float {
  position: relative;
  margin-bottom: 14px;
}

.auth-form.is-active .float,
.auth-form.is-active .strength,
.auth-form.is-active .auth-submit {
  animation: auth-rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(0.08s + var(--i, 0) * 0.06s);
}

.float__input {
  width: 100%;
  height: 60px;
  padding: 22px 48px 6px 50px;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  transition: border-color 0.2s, box-shadow 0.25s, background-color 0.2s;
}

.float__input:hover {
  border-color: #b9c6ce;
}

.float__input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 5px var(--teal-50);
}

.float__label {
  position: absolute;
  left: 50px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 15.5px;
  pointer-events: none;
  transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.float__opt {
  font-weight: 400;
  opacity: 0.8;
}

.float__input:focus + .float__label,
.float__input:not(:placeholder-shown) + .float__label {
  top: 17px;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-700);
}

.float__icon {
  position: absolute;
  left: 16px;
  top: 30px;
  transform: translateY(-50%);
  color: #9aa7b3;
  transition: color 0.2s, transform 0.25s;
  display: grid;
}

.float:focus-within .float__icon {
  color: var(--teal-700);
  transform: translateY(-50%) scale(1.08);
}

.float__toggle {
  position: absolute;
  right: 8px;
  top: 30px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  border-radius: 10px;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.float__toggle:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.float__toggle .i-hide,
.float__toggle.is-shown .i-show {
  display: none;
}

.float__toggle.is-shown .i-hide {
  display: block;
}

.float__match {
  position: absolute;
  right: 14px;
  top: 30px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: grid;
  place-items: center;
  transform: translateY(-50%) scale(0);
  transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.float.is-match .float__match {
  transform: translateY(-50%) scale(1);
}

.float.is-invalid .float__input {
  border-color: var(--danger);
  background: var(--danger-bg);
  animation: auth-shake 0.5s both;
}

.float.is-invalid .float__label,
.float.is-invalid .float__icon {
  color: var(--danger);
}

.float__error {
  display: block;
  margin: 6px 4px 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

/* Надійність пароля */
.strength {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -4px 2px 16px;
}

.strength__bars {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.strength__bars span {
  height: 5px;
  border-radius: 5px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.strength__bars span::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--c, var(--teal));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease, background-color 0.3s;
}

.strength[data-score='1'] span:nth-child(-n + 1)::after,
.strength[data-score='2'] span:nth-child(-n + 2)::after,
.strength[data-score='3'] span:nth-child(-n + 3)::after,
.strength[data-score='4'] span:nth-child(-n + 4)::after {
  transform: scaleX(1);
}

.strength[data-score='1'] {
  --c: var(--danger);
}

.strength[data-score='2'] {
  --c: #e08a1e;
}

.strength[data-score='3'] {
  --c: #6bb05b;
}

.strength[data-score='4'] {
  --c: var(--teal);
}

.strength__label {
  min-width: 120px;
  text-align: right;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

.strength[data-score] .strength__label {
  color: var(--c);
}

/* Кнопка з анімацією та «завантаженням» */
.auth-submit {
  position: relative;
  margin-top: 6px;
  height: 58px;
  border-radius: 16px;
  font-size: 16.5px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--teal-700), var(--teal));
  background-size: 160% 100%;
  background-position: 0 0;
  box-shadow: 0 10px 24px -10px rgba(18, 130, 112, 0.7);
  transition: background-position 0.4s ease, box-shadow 0.3s ease, transform 0.15s;
}

.auth-submit:hover {
  background-position: 100% 0;
  box-shadow: 0 14px 30px -10px rgba(18, 130, 112, 0.8);
}

.auth-submit__arrow {
  transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.auth-submit:hover .auth-submit__arrow {
  transform: translateX(5px);
}

.auth-submit__spinner {
  display: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: auth-spin 0.8s linear infinite;
}

.auth-submit.is-loading {
  pointer-events: none;
}

.auth-submit.is-loading .auth-submit__text,
.auth-submit.is-loading .auth-submit__arrow {
  display: none;
}

.auth-submit.is-loading .auth-submit__spinner {
  display: block;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-form__switch {
  text-align: center;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

.auth-form__switch a {
  color: var(--teal-700);
  font-weight: 800;
}

.auth-form__switch a:hover {
  text-decoration: underline;
}

.auth__foot {
  margin: auto 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.auth__foot a {
  font-weight: 700;
  color: var(--ink-2);
}

@media (max-width: 960px) {
  .auth {
    grid-template-columns: 1fr;
  }

  .auth__brand {
    padding: 28px 24px 70px;
    justify-content: flex-start;
  }

  .auth__brand-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 6px 18px;
  }

  .auth__mascot {
    grid-row: span 2;
    width: 88px;
    height: 88px;
    margin: 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2), 0 0 0 6px rgba(255, 255, 255, 0.14);
  }

  .auth__mascot img {
    width: 66px;
    height: 66px;
  }

  .auth__headline {
    font-size: 24px;
    margin: 0;
  }

  .auth__sub {
    font-size: 14.5px;
    margin: 0;
  }

  .auth__perks {
    display: none;
  }

  .auth__panel {
    padding: 0 16px 20px;
    margin-top: -48px;
    position: relative;
    z-index: 2;
  }

  .auth__top {
    display: none;
  }

  .auth__card {
    margin: 0 0 20px;
    padding: 6px 20px 24px;
  }
}

.search__clear[hidden] {
  display: none;
}

/* Популярні категорії (порожній запит) — у дві колонки */
.search-panel__grid > .search-panel__col--cats:only-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
}

.search-panel__grid > .search-panel__col--cats:only-child .search-panel__title {
  grid-column: 1 / -1;
}

.search-panel__grid > .search-panel__col--cats:only-child .search-cat {
  margin: 0;
}

@media (max-width: 640px) {
  .search-panel__grid > .search-panel__col--cats:only-child {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Заголовок на сторінці входу: обидва варіанти в одній «клітинці» — без накладання */
.auth__headline {
  display: grid;
}

.auth__headline .auth__swap {
  grid-area: 1 / 1;
}

@media (max-width: 640px) {
  .grid--listing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* ==========================================================
   Панель фільтрів
   ========================================================== */
.filters {
  position: sticky;
  top: calc(var(--header-h) + 64px);
  max-height: calc(100vh - var(--header-h) - 84px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 18px 18px;
}

.header.is-compact ~ * .filters {
  top: 84px;
}

.filters__head {
  position: sticky;
  top: -6px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 -18px;
  padding: 14px 18px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.filters__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 17px;
}

.filters__title .icon {
  color: var(--teal-700);
}

.filters__count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--teal-700);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  animation: pop-in 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes pop-in {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}

.filters__reset {
  margin-left: auto;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--sale);
  padding: 4px 8px;
  border-radius: 8px;
}

.filters__reset:hover {
  background: #fdeeed;
  color: var(--sale);
}

.filters__close {
  display: none;
}

/* Вибрані фільтри */
.filters__active {
  margin: 14px 0 4px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--teal-50), #f3fbf9);
  border: 1px solid var(--teal-100);
}

.filters__active-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal-800);
  margin-bottom: 8px;
}

.filters__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 30px;
  padding: 0 8px 0 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--teal-100);
  color: var(--teal-800);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(18, 130, 112, 0.08);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  animation: pop-in 0.3s ease both;
}

.fchip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fchip .icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  padding: 2px;
  border-radius: 50%;
  background: var(--teal-50);
  transition: background-color 0.15s, color 0.15s;
}

.fchip:hover {
  border-color: var(--sale);
  color: var(--sale);
}

.fchip:hover .icon {
  background: var(--sale);
  color: #fff;
}

/* Перемикач «Тільки в наявності» */
.switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-soft);
  cursor: pointer;
  transition: background-color 0.2s;
}

.switch:hover {
  background: #eef4f4;
}

.switch__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch__track {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #cfd9de;
  transition: background-color 0.25s;
}

.switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.switch__input:checked + .switch__track {
  background: var(--teal-700);
}

.switch__input:checked + .switch__track .switch__thumb {
  transform: translateX(18px);
}

.switch__input:focus-visible + .switch__track {
  box-shadow: 0 0 0 4px var(--teal-100);
}

.switch__label {
  font-weight: 700;
  font-size: 14.5px;
}

.switch:has(.switch__input:checked) {
  background: var(--teal-50);
}

.switch:has(.switch__input:checked) .switch__label {
  color: var(--teal-800);
}

/* Групи фільтрів */
.filter {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}

.filter:last-of-type {
  border-bottom: 0;
}

.filter__title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 2px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.filter__title::-webkit-details-marker {
  display: none;
}

.filter__title > span:first-child {
  flex: 1;
}

.filter__chevron {
  color: var(--muted);
  transition: transform 0.25s ease;
}

.filter:not([open]) .filter__chevron {
  transform: rotate(-90deg);
}

.filter__badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--teal-700);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  animation: pop-in 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.filter.is-active .filter__title > span:first-child {
  color: var(--teal-800);
}

.filter__options {
  display: grid;
  gap: 2px;
  padding-bottom: 10px;
}

/* Значення фільтра */
/* Заголовок блока фільтрів, який не розкривається (дерево каталогу, пропозиції) */
.filter__title--static {
  cursor: default;
}

.ctree__reset {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--teal-700);
}

.ctree__reset:hover {
  text-decoration: underline;
}

/* Дерево каталогу в панелі фільтрів: розділ → категорія → підкатегорія */
.ctree__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ctree__list--nested {
  margin: 2px 0 8px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}

.ctree__item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  margin: 0 -10px;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  transition: background-color 0.15s, color 0.15s;
}

.ctree__item:hover {
  background: var(--bg-soft);
  color: var(--teal-800);
}

.ctree__item .icon {
  color: var(--teal);
}

.ctree__item--cat,
.ctree__item--sub {
  font-weight: 600;
  color: var(--ink-2);
}

.ctree__item--sub {
  font-size: 14px;
}

.ctree__item.is-active {
  background: var(--teal-50);
  color: var(--teal-800);
}

.ctree__name {
  flex: 1;
  min-width: 0;
}

.ctree__count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ctree__item.is-active .ctree__count {
  color: var(--teal-700);
}

/* Пропозиції — вигляд як у звичайного фільтра, але це посилання */
.fopt--link {
  color: var(--ink);
  font-weight: 600;
}

.fopt__glyph {
  margin-right: 7px;
  color: var(--muted);
}

.fopt--link.is-checked .fopt__glyph {
  color: var(--teal-700);
}

.fopt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: 11px;
  font-size: 14.5px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.fopt:hover {
  background: var(--bg-soft);
}

.fopt__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fopt__box {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 2px solid var(--line-strong);
  background: #fff;
  color: #fff;
  display: grid;
  place-items: center;
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}

.fopt__box svg {
  transform: scale(0);
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.fopt:hover .fopt__box {
  border-color: var(--teal);
}

.fopt__input:focus-visible + .fopt__box {
  box-shadow: 0 0 0 4px var(--teal-100);
}

.fopt__name {
  flex: 1;
  line-height: 1.3;
  transition: color 0.15s;
}

.fopt__count {
  min-width: 26px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transition: background-color 0.2s, color 0.2s;
}

/* Вибране значення — підсвічений рядок, галочка «вистрибує» */
.fopt.is-checked,
.fopt:has(.fopt__input:checked) {
  background: var(--teal-50);
}

.fopt__input:checked + .fopt__box,
.fopt--link.is-checked .fopt__box {
  background: var(--teal-700);
  border-color: var(--teal-700);
  transform: scale(1.05);
}

.fopt__input:checked + .fopt__box svg {
  transform: scale(1);
}

.fopt__input:checked ~ .fopt__name {
  color: var(--teal-800);
  font-weight: 700;
}

.fopt__input:checked ~ .fopt__count {
  background: var(--teal-700);
  color: #fff;
}

.fopt.is-extra {
  display: none;
}

.filter.is-expanded .fopt.is-extra {
  display: flex;
}

.fopt.is-hidden {
  display: none !important;
}

.filter__more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  padding: 0 0 12px;
  color: var(--teal-700);
  font-weight: 800;
  font-size: 13.5px;
}

.filter.is-expanded .filter__more {
  display: none;
}

.filter__search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--muted);
}

.filter__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 14px;
}

.filter__search input:focus {
  outline: none;
}

.filter__search:focus-within {
  box-shadow: 0 0 0 2px var(--teal-100);
}

/* Ціна: подвійний повзунок + поля */
.price-range {
  padding: 2px 0 14px;
}

.price-range__slider {
  position: relative;
  height: 30px;
  margin: 0 10px 10px;
}

.price-range__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 5px;
  border-radius: 5px;
  background: var(--line);
  transform: translateY(-50%);
}

.price-range__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--teal-700), var(--teal));
}

.price-range__slider input[type='range'] {
  position: absolute;
  left: -10px;
  width: calc(100% + 20px);
  top: 0;
  height: 30px;
  margin: 0;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
}

.price-range__slider input[type='range']::-webkit-slider-runnable-track {
  background: none;
  border: 0;
}

.price-range__slider input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--teal-700);
  box-shadow: 0 2px 8px rgba(18, 130, 112, 0.35);
  cursor: grab;
  transition: transform 0.15s;
}

.price-range__slider input[type='range']::-webkit-slider-thumb:hover,
.price-range__slider input[type='range']:active::-webkit-slider-thumb {
  transform: scale(1.15);
}

.price-range__slider input[type='range']::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--teal-700);
  box-shadow: 0 2px 8px rgba(18, 130, 112, 0.35);
  cursor: grab;
}

.price-range__slider input[type='range']::-moz-range-track {
  background: none;
}

.price-range__slider input[type='range']:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 5px var(--teal-100);
}

.price-range__inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 10px;
  border: 1.5px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  font-size: 12.5px;
  color: var(--muted);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.price-field:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-50);
}

.price-field input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 0;
  background: none;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  -moz-appearance: textfield;
}

.price-field input:focus {
  outline: none;
}

.price-field input::-webkit-outer-spin-button,
.price-field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.price-range__dash {
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: var(--line-strong);
  flex-shrink: 0;
}

.price-range__apply {
  margin-top: 10px;
}

.js .price-range__apply {
  display: none;
}

.filters__actions {
  display: none;
}

@media (max-width: 900px) {
  .filters {
    position: fixed;
    inset: 0;
    z-index: 85;
    max-height: none;
    border: 0;
    border-radius: 0;
    padding: 0 16px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    visibility: hidden;
  }

  .filters.is-open {
    transform: none;
    visibility: visible;
  }

  .filters__head {
    top: 0;
    margin: 0 -16px;
    padding: 14px 16px;
  }

  .filters__close {
    display: inline-grid;
  }

  .filters__reset {
    margin-left: auto;
  }

  .filters__reset + .filters__close {
    margin-left: 0;
  }

  .filters__title + .filters__close {
    margin-left: auto;
  }

  .js .price-range__apply {
    display: none;
  }

  .filters__actions {
    display: block;
    position: sticky;
    bottom: 0;
    margin: 0 -16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 20px rgba(43, 60, 74, 0.06);
  }
}

.listing {
  grid-template-columns: 276px minmax(0, 1fr);
}

.filters__reset {
  white-space: nowrap;
  font-size: 13px;
  padding: 4px 6px;
}

/* На десктопі вибрані фільтри вже видно в панелі — дублювати над товарами не треба */
@media (min-width: 901px) {
  .active-filters {
    display: none;
  }
}

/* ==========================================================
   Сортування — власний випадаючий список
   ========================================================== */
.sort {
  position: relative;
  z-index: 5;
}

.sort__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px 0 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.sort__btn::-webkit-details-marker {
  display: none;
}

.sort__btn:hover {
  border-color: var(--teal);
}

.sort[open] .sort__btn,
.sort__btn:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-50);
  outline: none;
}

.sort__lead {
  color: var(--teal-700);
}

.sort__caption {
  color: var(--muted);
  font-weight: 600;
}

.sort__current {
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.sort__chevron {
  color: var(--muted);
  margin-left: 2px;
  transition: transform 0.3s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.sort[open] .sort__chevron {
  transform: rotate(180deg);
  color: var(--teal-700);
}

.sort__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2.5px solid var(--teal-100);
  border-top-color: var(--teal-700);
  animation: auth-spin 0.7s linear infinite;
}

.sort.is-loading .sort__spinner {
  display: block;
}

.sort.is-loading .sort__chevron {
  display: none;
}

.sort__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 250px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  transform-origin: top right;
  animation: sort-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.sort.is-closing .sort__menu {
  animation: sort-out 0.16s ease forwards;
}

@keyframes sort-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.94);
  }
}

@keyframes sort-out {
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
}

.sort__sheet-title {
  display: none;
}

.sort__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
  animation: sort-item 0.3s ease both;
  animation-delay: calc(0.03s + var(--i) * 0.035s);
  transition: background-color 0.15s, color 0.15s;
}

@keyframes sort-item {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
}

.sort__item:hover,
.sort__item:focus-visible {
  background: var(--bg-soft);
  color: var(--ink);
  outline: none;
}

.sort__icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--bg-soft);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background-color 0.2s, color 0.2s, transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.sort__item:hover .sort__icon {
  color: var(--teal-700);
  transform: scale(1.08) rotate(-4deg);
}

.sort__name {
  flex: 1;
}

.sort__check {
  color: var(--teal-700);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s, transform 0.25s;
}

.sort__item.is-active {
  background: var(--teal-50);
  color: var(--teal-800);
  font-weight: 800;
}

.sort__item.is-active .sort__icon {
  background: var(--teal-700);
  color: #fff;
}

.sort__item.is-active .sort__check {
  opacity: 1;
  transform: none;
}

/* Телефон: шторка знизу екрана */
@media (max-width: 640px) {
  .sort__caption {
    display: none;
  }

  .sort__btn {
    height: 40px;
    padding: 0 10px 0 12px;
  }

  .sort[open]::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(20, 30, 40, 0.42);
    animation: fade-in 0.25s ease;
  }

  .sort.is-closing::before {
    animation: fade-out 0.2s ease forwards;
  }

  .sort__menu {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 91;
    min-width: 0;
    padding: 10px 12px calc(16px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    border: 0;
    transform-origin: bottom center;
    animation: sheet-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.05);
  }

  .sort.is-closing .sort__menu {
    animation: sheet-out 0.2s ease forwards;
  }

  .sort__menu::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: var(--line-strong);
    margin: 0 auto 10px;
  }

  .sort__sheet-title {
    display: block;
    font-size: 17px;
    font-weight: 800;
    padding: 4px 12px 10px;
  }

  .sort__item {
    padding: 13px 12px;
    font-size: 15.5px;
  }

  @keyframes sheet-in {
    from {
      transform: translateY(100%);
    }
  }

  @keyframes sheet-out {
    to {
      transform: translateY(100%);
    }
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  /* Без власного шару — шторка й затемнення перекривають навіть шапку */
  .sort {
    z-index: auto;
  }
}

[hidden] {
  display: none !important;
}

/* ---------- Варіанти товару ---------- */
.card__variants {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.vchip {
  height: 28px;
  padding: 0 9px;
  border: 1.5px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s, transform 0.1s;
}

.vchip:hover {
  border-color: var(--teal);
  color: var(--ink);
}

.vchip:active {
  transform: scale(0.95);
}

.vchip.is-active {
  border-color: var(--teal-700);
  background: var(--teal-700);
  color: #fff;
  box-shadow: 0 4px 10px -4px rgba(18, 130, 112, 0.6);
}

.vchip.is-out:not(.is-active) {
  color: var(--muted);
  border-style: dashed;
  text-decoration: line-through;
  text-decoration-color: rgba(95, 111, 128, 0.5);
}

.card__media img.is-swapping {
  opacity: 0;
  transform: scale(0.96);
}

.card__media img {
  transition: transform 0.35s ease, opacity 0.2s ease;
}

/* Вибір варіанту на сторінці товару */
.variants {
  margin: 0 0 18px;
}

.variants__title {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 10px;
}

.variants__title strong {
  color: var(--ink);
  font-weight: 800;
}

.variants__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.variant {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.15s;
}

.variant img {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.variant:not(:has(img)) {
  grid-template-columns: 1fr;
}

.variant:hover {
  border-color: var(--teal);
  color: var(--ink);
  transform: translateY(-1px);
}

.variant__label {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
}

.variant__price {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.variant.is-active {
  border-color: var(--teal-700);
  background: var(--teal-50);
  box-shadow: 0 0 0 3px var(--teal-100);
}

.variant.is-active .variant__label {
  color: var(--teal-800);
}

.variant.is-out {
  opacity: 0.6;
}

.variant.is-out .variant__price::after {
  content: ' · немає';
}
