:root {
  --green: #4b7a1c;
  --green-dark: #3c6316;
  --green-soft: #eef5e6;
  --blue-price: #1f5fbf;
  --sale: #e53935;
  --text: #1c1f24;
  --muted: #6b7280;
  --line: #e6e8ec;
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --cream: #f4efe6;
  --dark: #1a1d21;
  --radius: 8px;
  --shadow: 0 2px 10px rgba(28, 31, 36, 0.06);
  --container: 1200px;
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
ul { list-style: none; }

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

/* Topbar */
.topbar {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.topbar__row {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar__note {
  color: var(--green);
  font-weight: 600;
}

.topbar__links {
  margin-left: auto;
  display: flex;
  gap: 18px;
}

.topbar__links a:hover { color: var(--green); }

.topbar__lang {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar__lang button {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-weight: 500;
}

.topbar__lang button.is-active {
  color: var(--green);
  font-weight: 700;
}

/* Header */
.header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

body.mega-open .header {
  z-index: 95;
}

.header__row {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto auto minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding-block: 10px;
}

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

.logo img {
  display: block;
  height: 52px;
  width: auto;
}

.logo--light img {
  height: 46px;
  filter: brightness(0) invert(1);
}

.logo__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo__copy strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo__copy small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  transition: background .2s, transform .15s;
}

.btn:active { transform: scale(.98); }

.btn-catalog {
  background: var(--green);
  color: #fff;
  padding: 12px 16px;
  white-space: nowrap;
}

.btn-catalog:hover { background: var(--green-dark); }

.btn-primary {
  background: var(--green);
  color: #fff;
  padding: 13px 26px;
  font-size: 14px;
}

.btn-primary:hover { background: var(--green-dark); }

.search {
  display: flex;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.search input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  outline: none;
  min-width: 0;
}

.search button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  cursor: pointer;
  height: 44px;
}

.search button:hover { color: var(--green); }

.header__phone {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
}

.header__phone a {
  font-size: 15px;
  font-weight: 800;
}

.header__phone span {
  font-size: 11px;
  color: var(--muted);
}

.header__actions {
  display: flex;
  gap: 6px;
}

.ha {
  min-width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--muted);
}

.ha svg { color: var(--text); }
.ha:hover,
.ha:hover svg { color: var(--green); }

.ha__icon { position: relative; display: grid; place-items: center; }

.badge {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-style: normal;
  display: grid;
  place-items: center;
}

.badge[hidden] {
  display: grid !important;
  visibility: hidden;
}

/* Category nav */
.catnav {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.catnav ul {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 26px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.catnav ul::-webkit-scrollbar {
  display: none;
}

.catnav a {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  padding: 12px 0;
}

.catnav a:hover { color: var(--green); }
.catnav a.is-sale,
.catnav a.sale { color: var(--sale); }

/* Hero (PHP-шаблон) */
.hero__grid {
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(120deg, #f2f5ef 0%, #e9efe3 45%, #f7f8f5 100%);
  border: 1px solid #e2e8da;
}

.hero__slide {
  display: none;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 12px;
}

.hero__slide.is-active { display: grid; }

.hero__copy {
  padding: clamp(20px, 4vw, 48px) clamp(16px, 4vw, 40px);
}

.hero__copy h1 {
  font-size: clamp(24px, 6vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 12px;
}

.hero__copy p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  max-width: 420px;
  margin-bottom: 20px;
}

.hero__slide > img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

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

.products--catalog {
  grid-template-columns: repeat(3, 1fr);
}

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

.filters__head {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.filters__head h2 { font-size: 16px; font-weight: 800; }

.filters__close {
  border: 0;
  background: none;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}

.filters__form fieldset {
  border: 0;
  margin-bottom: 16px;
}

.filters__form legend {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.filters-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 60;
}

@media (max-width: 900px) {
  .catalog-filters-toggle { display: inline-flex; }
  .filters__head { display: flex; }
  .filters {
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 88vw);
    height: 100vh;
    z-index: 70;
    overflow-y: auto;
    transform: translateX(-110%);
    transition: transform 0.2s;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
  }
  .filters.is-open { transform: translateX(0); }
  .products--catalog { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 901px) {
  .products--catalog { grid-template-columns: repeat(3, 1fr); }
}

.promo__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  align-items: center;
  border-radius: 16px;
  overflow: hidden;
  background: var(--cream);
  border: 1px solid #e8dfd2;
  padding: clamp(20px, 4vw, 36px);
}

.promo__inner h2 {
  font-size: clamp(22px, 5vw, 32px);
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 16px;
}

.promo__inner img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 12px;
}

.benefits__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.benefits__grid h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.benefits__grid p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.cat img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 12px;
}

.cat span {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.hero { padding: 24px 0 8px; }

.hero__slider {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(120deg, #f2f5ef 0%, #e9efe3 45%, #f7f8f5 100%);
  border: 1px solid #e2e8da;
  min-height: 360px;
}

.hero__track { position: relative; min-height: 360px; }

.hero__slide {
  display: none;
  grid-template-columns: 1fr 1.15fr;
  align-items: center;
  min-height: 360px;
}

.hero__slide.is-active { display: grid; }

.hero__text {
  padding: 48px 28px 48px 56px;
  position: relative;
  z-index: 1;
}

.hero__text h1,
.hero__text h2,
.hero__text .hero__title {
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 14px;
}

.hero__text p {
  color: var(--muted);
  font-size: 15px;
  max-width: 360px;
  margin-bottom: 26px;
}

.hero__visual {
  height: 100%;
  min-height: 360px;
}

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

.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.hero__arrow--prev { left: 14px; }
.hero__arrow--next { right: 14px; }

.hero__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 3;
}

.hero__dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: #c5c9bc;
  cursor: pointer;
}

.hero__dots button.is-active { background: var(--green); }

/* Sections */
.section { padding: 44px 0; }
.section--soft { background: var(--bg-soft); }

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section__head h2,
.section h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: 0;
}

.section__head .more::after {
  content: '→';
  font-size: 15px;
  line-height: 1;
  transition: transform 0.15s ease;
}

.more:hover {
  color: var(--green-dark);
}

.section__head .more:hover::after {
  transform: translateX(3px);
}

/* Categories */
.cats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  transition: transform .2s;
}

.cat:hover { transform: translateY(-3px); }

.cat__img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.cat__img img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

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

/* Products */
.products {
  display: grid;
  gap: 14px;
}

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

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}

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

.card__fav {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(28, 31, 36, 0.08);
}

.card__top {
  position: relative;
  margin-bottom: 10px;
}

.card__top .card__media {
  margin-bottom: 0;
}

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card__actions {
  margin-top: auto;
  padding-top: 10px;
}

.card__actions .btn {
  width: 100%;
  padding: 11px 12px;
  font-size: 13px;
}

.card__rating .stars {
  color: #e5e7eb;
}

.card__rating .stars .on {
  color: #f0a100;
}

.card__fav.is-active,
.card__fav:hover { color: var(--sale); border-color: #f3c4c1; }

.card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}

.card__media {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  background: linear-gradient(180deg, #fafafa, #f2f3f5);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.card__media img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  transition: transform .3s;
}

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

.card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.stars { color: #f0a100; letter-spacing: 1px; }

.card__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.card__price {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.card__price strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.card__price s {
  font-size: 12px;
  color: var(--sale);
}

.card__cart {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.card__cart:hover { background: var(--green-dark); }

.card__cart:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Benefits */
.benefits {
  background: var(--green-soft);
  border-block: 1px solid #dde8d0;
  padding: 28px 0;
}

.benefits__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.benefit {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.benefit__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fff;
  color: var(--green);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #d7e4c8;
}

.benefit strong,
.benefit h3 {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

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

/* Promo */
.promo { padding: 8px 0 44px; }

.promo__banner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 240px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--cream);
}

.promo__media {
  background: #243026;
  position: relative;
}

.promo__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .85;
  min-height: 240px;
}

.promo__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 48px;
}

.promo__content h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

/* Reviews */
.reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

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

.review .stars {
  color: #e5e7eb;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.review .stars .on { color: #f0a100; }

.review p {
  font-size: 14px;
  color: #374151;
  margin-bottom: 14px;
}

.review__product {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.review__product:hover { color: var(--green); }

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

/* Footer */
.footer {
  background: var(--dark);
  color: #9ca3af;
  padding: 52px 0 24px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer h2,
.footer h4 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 14px;
  font-weight: 700;
}

.footer ul li + li { margin-top: 8px; }
.footer a:hover { color: #fff; }

.logo--light .logo__copy strong { color: #fff; }
.logo--light .logo__copy small { color: #9ca3af; }

.social {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2a2e33;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.social a:hover { background: var(--green); }

.pay {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.pay span {
  background: #2a2e33;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 5px;
}

.footer__copy {
  border-top: 1px solid #2f343a;
  padding-top: 18px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.pay-label {
  margin-top: 14px;
  font-size: 12px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--dark);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  z-index: 100;
}

.toast[hidden] { display: none; }

.flash {
  max-width: var(--container);
  margin: 12px auto 0;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.flash--success { background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0; }
.flash--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Responsive */
@media (max-width: 1100px) {
  .header__phone { display: none; }
  .header__row {
    grid-template-columns: auto auto minmax(180px, 1fr) auto;
  }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .products--5 { grid-template-columns: repeat(3, 1fr); }
  .products--8 { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 860px) {
  .topbar__links { display: none; }

  .topbar__row {
    min-height: 44px;
    gap: 10px;
  }

  .topbar__note {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    line-height: 1.3;
  }

  .topbar__lang {
    margin-left: auto;
    flex-shrink: 0;
  }

  .header {
    position: sticky;
    top: 0;
  }

  .header__row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo actions"
      "catalog catalog";
    gap: 10px;
    padding-block: 8px;
    min-height: 0;
  }

  .logo { grid-area: logo; min-width: 0; }
  .logo img { height: 40px; }

  .catalog-wrap { grid-area: catalog; width: 100%; min-width: 0; }
  .btn-catalog {
    width: 100%;
    justify-content: center;
    padding: 11px 14px;
    font-size: 13px;
  }

  .catalog-wrap:has(.mega:not([hidden])) {
    display: block;
  }

  .mega {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    width: auto;
    z-index: 95;
    margin: 8px 0 0;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    border: 1px solid var(--line);
    background: #fff;
    max-height: min(62vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mega__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 8px;
  }

  .mega__item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 90px;
    padding: 10px 6px;
    text-align: center;
    font-size: 11px;
    line-height: 1.25;
    border-radius: 10px;
    background: #fff;
  }

  .mega__item span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
  }

  .mega__item img {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }

  .mega__item--all {
    flex-direction: row;
    justify-content: center;
    align-self: start;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0 14px;
    font-size: 14px;
    grid-column: 1 / -1;
  }

  .mega__item--all span {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  .search { display: none; }

  .header__actions {
    grid-area: actions;
    gap: 2px;
    align-self: start;
  }

  .ha {
    min-width: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 10px;
  }

  .ha span:not(.ha__icon):not(.badge),
  .ha #auth-label { display: none !important; }

  .ha__icon svg { width: 20px; height: 20px; }

  .catnav .container {
    width: 100%;
    max-width: none;
    padding-inline: 0;
  }

  .catnav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
    min-height: 0;
    padding: 10px 16px 12px;
  }

  .catnav li { flex: 0 0 auto; }

  .catnav a {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: normal;
    max-width: 100%;
  }

  .catnav a.sale {
    background: #fff4f4;
    border-color: #f3c4c1;
  }

  .hero__slide.is-active,
  .promo__inner,
  .promo__banner { grid-template-columns: 1fr; }

  .hero__copy { padding: 20px 16px 8px; order: 1; }
  .hero__copy p { font-size: 13px; margin-bottom: 16px; }
  .hero__slide > img {
    order: 2;
    min-height: 180px;
    max-height: 220px;
    border-radius: 0 0 14px 14px;
  }

  .hero__text,
  .promo__content { padding: 28px 24px; }

  .hero__visual,
  .promo__media img { min-height: 220px; }

  .promo__inner {
    padding: 20px 16px;
    gap: 14px;
  }

  .promo__inner img {
    max-height: 200px;
  }

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

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

  .benefits__row,
  .reviews { grid-template-columns: 1fr 1fr; }

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

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

  .section { padding: 28px 0; }
  .section__head h2,
  .section h2 { font-size: 22px; }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, var(--container));
  }

  .cats,
  .benefits__row,
  .benefits__grid,
  .reviews,
  .footer__grid,
  .products--5,
  .products--8 { grid-template-columns: 1fr 1fr; }

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

  .card { padding: 10px; }
  .card__title { font-size: 13px; }

  .catnav ul { padding-inline: 12px; }
  .catnav a { font-size: 11px; padding: 10px 12px; min-height: 44px; }

  .mega {
    padding: 8px;
    max-height: min(62vh, 420px);
  }

  .mega__grid { gap: 6px; }

  .mega__item {
    min-height: 82px;
    padding: 8px 4px;
    font-size: 10px;
  }

  .mega__item img {
    width: 28px;
    height: 28px;
  }

  .mega__item--all {
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    font-size: 14px;
    padding: 0 12px;
  }

  .btn-primary { padding: 12px 18px; font-size: 13px; }
}

/* Interactive layer */
[hidden] { display: none !important; }

body.no-scroll { overflow: hidden; }

.ha {
  border: 0;
  background: none;
  cursor: pointer;
}

.cat {
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.nav-link {
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  padding: 12px 0;
  color: var(--text);
}

.nav-link:hover { color: var(--green); }
.nav-link.is-sale { color: var(--sale); }

.card__media {
  border: 0;
  width: 100%;
  cursor: pointer;
  font: inherit;
}

.card__title a,
.card__title button {
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: inherit;
  padding: 0;
}

.card__title a:hover,
.card__title button:hover { color: var(--green); }

.card__brand {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.card__badge--sale { background: var(--sale); }
.card__badge--new { background: var(--green); }
.card__badge--out { background: #6b7280; }
.card__badge--low { background: #c27803; }

.card__badge {
  position: static;
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}

.card--out { opacity: 0.72; }
.card__cart:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.badge--fav { background: var(--sale); }

.catalog-wrap { position: relative; }

.mega {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  padding: 16px;
  z-index: 80;
}

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

@media (min-width: 861px) {
  .mega {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(720px, 80vw);
  }

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

.mega__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.mega__item:hover { border-color: var(--green); background: var(--green-soft); }

.mega__item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.mega__item--all {
  justify-content: center;
  grid-column: 1 / -1;
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.mega__item--all:hover,
.mega__item--all:focus-visible {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}

.search { position: relative; overflow: visible; }

.search__drop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 70;
  max-height: 320px;
  overflow: auto;
}

.search__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 13px;
}

.search__item:last-child { border-bottom: 0; }
.search__item:hover { background: var(--bg-soft); }

.search__item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: var(--bg-soft);
  border-radius: 6px;
}

.search__empty {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 26, 0.45);
  z-index: 90;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: #fff;
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
}

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

.drawer__head h2 {
  font-size: 18px;
  font-weight: 800;
}

.drawer__close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-soft);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.drawer__body {
  flex: 1;
  overflow: auto;
  padding: 16px 20px;
}

.drawer__foot {
  border-top: 1px solid var(--line);
  padding: 16px 20px 20px;
}

.line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.line img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: var(--bg-soft);
  border-radius: 8px;
}

.line__title {
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.line__title:hover { color: var(--green); }

.line__price {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 8px;
}

.line__qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px 6px;
}

.line__qty button {
  width: 24px;
  height: 24px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 16px;
}

.line__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal__card {
  width: min(480px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  position: relative;
  max-height: min(90vh, 900px);
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal__card--product { width: min(820px, 100%); }

.modal__card h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
  padding-right: 36px;
}

.modal__card .drawer__close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.modal--lightbox {
  padding: 0;
  z-index: 120;
}

.lightbox {
  position: relative;
  width: min(96vw, 1100px);
  height: min(92vh, 900px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 48px 12px 36px;
}

.lightbox__stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.lightbox__stage img {
  max-width: 100%;
  max-height: min(82vh, 780px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.lightbox__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
}

.lightbox__nav {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.lightbox__nav:hover {
  background: #fff;
}

.lightbox__counter {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20, 22, 26, 0.72);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .lightbox {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    padding: 44px 8px 28px;
    height: 100%;
    width: 100%;
  }

  .lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }

  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }

  .lightbox__stage img {
    max-height: calc(100vh - 120px);
  }
}

.modal__card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
}

.modal__card input,
.catalog-page__tools select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  font-weight: 500;
}

.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 12px; }

.btn-ghost {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.btn-outline {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 12px 16px;
  min-height: 44px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.btn-outline:hover,
.btn-outline.is-active,
.js-fav.btn-outline.is-active {
  border-color: var(--green);
  color: var(--green-dark);
  background: var(--green-soft);
}

.btn-outline:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-ghost.is-active { color: var(--sale); }

.text-btn {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  margin-top: 10px;
  text-decoration: underline;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 28px 10px;
}

.sum-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 14px;
}

.sum-row--total {
  font-size: 16px;
  margin: 12px 0 16px;
}

.product-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.product-view__media {
  background: var(--bg-soft);
  border-radius: 12px;
  display: grid;
  place-items: center;
  min-height: 280px;
}

.product-view__media img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.product-view__desc {
  color: var(--muted);
  font-size: 14px;
  margin: 10px 0 16px;
}

.product-view__desc.prose {
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  max-width: none;
}

.product-view__desc.prose p {
  color: var(--muted);
  margin-bottom: 12px;
}

.product-view__desc.prose h2 {
  margin: 18px 0 10px;
  font-size: 18px;
}

.product-view__desc.prose h3,
.product-view__desc.prose h4 {
  margin: 14px 0 8px;
  font-size: 16px;
}

.product-view__desc.prose ul,
.product-view__desc.prose ol {
  color: var(--muted);
}

.product-view__price {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.product-view__price strong {
  font-size: 24px;
  font-weight: 800;
}

.product-view__price s {
  font-size: 16px;
  color: var(--sale);
}

.product-view__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.info-text {
  white-space: pre-line;
  color: #374151;
  line-height: 1.6;
}

.catalog-page {
  padding: 28px 0 56px;
  min-height: 60vh;
}

.catalog-page__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.catalog-page__head h1 {
  font-size: 28px;
  font-weight: 800;
  margin-right: auto;
}

.link-back {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
}

.catalog-page__tools label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.catalog-page__layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (min-width: 901px) {
  .filters {
    position: sticky;
    top: 90px;
  }
}

.filter-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.filter-btn.is-active,
.filter-btn:hover {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-dark);
}

.products--catalog {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .catalog-page__layout { grid-template-columns: 1fr; }
  .products--catalog { grid-template-columns: repeat(2, 1fr); }
  .product-view { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .products--catalog { grid-template-columns: 1fr; }
  .line {
    grid-template-columns: 56px 1fr;
  }
  .line__right {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* Сторінки магазину: контракт теми через змінні */
#app {
  min-height: 50vh;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: var(--line);
}

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

.catalog-count {
  font-size: 13px;
  color: var(--muted);
  margin-right: auto;
}

.catalog-active {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.catalog-active__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.catalog-active__chip:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.catalog-active__reset {
  font-size: 12px;
  font-weight: 700;
  color: var(--green-dark);
  text-decoration: underline;
}

.filters__form label > span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.filters__form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.filters {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  gap: 12px;
}

.filters__title {
  font-size: 15px;
  font-weight: 800;
}

.filters fieldset {
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  margin: 28px 0 12px;
  padding: 14px;
  border-radius: 10px;
  background: var(--bg-soft);
}

.filters legend {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  transform: translateY(calc(-100% - 8px));
  display: block;
  width: auto;
  font-size: 13px;
  font-weight: 700;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

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

.filters select,
.filters input[type="number"],
.promo-form input,
.page-checkout input,
.choice {
  width: 100%;
}

.filters select,
.filter-price input,
.promo-form input,
.page-checkout input[type="text"],
.page-checkout input[type="tel"] {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font: inherit;
}

.filter-actions { margin-top: 8px; }

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}

.pagination a {
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.pagination a.is-active,
.pagination a:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.page-product,
.page-cart,
.page-checkout,
.page-account,
.page-order,
.page-info,
.page-catalog {
  padding: 28px 0 56px;
}

.pdp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.pdp__main {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 360px;
  display: grid;
  place-items: center;
}

.pdp__main img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.pdp__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.pdp__thumb {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  cursor: pointer;
}

.pdp__thumb.is-active { border-color: var(--green); }

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

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

.pdp__info h1 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  margin: 6px 0 8px;
}

.pdp__price {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.pdp__price strong {
  font-size: 28px;
  font-weight: 800;
}

.pdp__price s { color: var(--sale); }

.pdp__desc {
  color: #374151;
  margin-bottom: 16px;
}

.pdp__qty {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.pdp__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.stock { font-size: 13px; font-weight: 700; margin: 8px 0; }
.stock--in { color: var(--green); }
.stock--low { color: #c27803; }
.stock--out { color: var(--sale); }

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

.pdp-block { margin-top: 36px; }

.pdp-block h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 14px;
}

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

.specs th,
.specs td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
}

.specs th {
  width: 40%;
  color: var(--muted);
  font-weight: 600;
}

.cart-layout,
.checkout-layout,
.account-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.cart-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--bg-soft);
  position: sticky;
  top: 90px;
}

.promo-form {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.promo-form input {
  flex: 1;
  min-width: 0;
  width: auto;
}

.free-hint {
  font-size: 12px;
  color: var(--green-dark);
  margin-bottom: 10px;
}

.guest-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.checkout-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.checkout-steps li {
  font-size: 12px;
  font-weight: 700;
  padding: 8px;
  border-bottom: 3px solid var(--line);
  color: var(--muted);
}

.checkout-steps li.is-active {
  color: var(--green);
  border-color: var(--green);
}

.checkout-steps li.is-done { border-color: var(--green); }

.page-checkout label,
.page-checkout .choice {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
}

.choice {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
  cursor: pointer;
}

.choice input { width: auto; margin-top: 4px; }

.chk-nav {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.account-grid { grid-template-columns: 260px 1fr; }

.account-page__container {
  max-width: 1100px;
}

.account-page h1 {
  margin-bottom: 20px;
  font-size: 28px;
  font-weight: 800;
}

.account-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.account-card--guest {
  display: block;
  max-width: 420px;
}

.account-card__lead {
  margin-bottom: 14px;
  color: var(--muted);
}

.account-card__name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.account-card__email {
  font-size: 14px;
  color: var(--muted);
}

.account-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.account-section__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.account-section h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}

.account-section__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dark);
}

.account-favorites__grid {
  gap: 16px;
}

.account-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.account-sidebar {
  position: sticky;
  top: 90px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: var(--bg-soft);
}

.account-sidebar__user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.account-sidebar__avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.account-sidebar__name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}

.account-sidebar__email {
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}

.account-nav {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.account-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: background 0.15s ease, color 0.15s ease;
}

.account-nav__link:hover,
.account-nav__link.is-active {
  background: #fff;
  color: var(--green-dark);
}

.account-nav__badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  display: inline-grid;
  place-items: center;
}

.account-main {
  display: grid;
  gap: 28px;
  min-width: 0;
}

.account-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  scroll-margin-top: 88px;
}

.account-panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.account-panel__head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.account-panel__meta {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dark);
  display: inline-grid;
  place-items: center;
}

.profile-card {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.profile-row:last-child { border-bottom: 0; }

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

.profile-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.profile-form {
  display: grid;
  gap: 14px;
}

.profile-block {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.profile-block h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.profile-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.person-name-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.profile-form .person-name-grid label,
.profile-grid label,
.profile-block > label {
  display: grid;
  gap: 6px;
}

.profile-form .person-name-grid span,
.profile-grid label span,
.profile-block > label span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.profile-form input[type="text"],
.profile-form input[type="email"],
.profile-form input[type="tel"] {
  width: 100%;
  min-height: 44px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.profile-input--locked {
  background: #fff;
  color: var(--muted);
  cursor: default;
}

.profile-sub {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.profile-form .np-fields {
  margin: 0;
  background: #fff;
}

.profile-form .fieldset-box .np-fields {
  margin-left: 0;
}

.profile-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-form-actions .btn {
  min-height: 44px;
  min-width: 180px;
}

.profile-since {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

@media (min-width: 720px) {
  .profile-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.orders-list--cards { gap: 12px; }

.order-card-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.order-card-item:hover {
  border-color: var(--green);
  box-shadow: 0 4px 14px rgba(75, 122, 28, 0.08);
  transform: translateY(-1px);
}

.order-card-item__top,
.order-card-item__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.order-card-item__id {
  font-weight: 800;
  font-size: 16px;
}

.order-card-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--muted);
}

.order-card-item__items {
  font-size: 13px;
  color: var(--muted);
}

.order-card-item__total {
  font-size: 16px;
  color: var(--green-dark);
}

.order-card-item__more {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
}

.order-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.order-status--pending {
  background: #fff7ed;
  color: #c2410c;
}

.order-status--processing {
  background: #eff6ff;
  color: #1d4ed8;
}

.order-status--done {
  background: #ecfdf3;
  color: #166534;
}

.order-status--cancelled {
  background: #fef2f2;
  color: #991b1b;
}

.account-guest {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.account-auth {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  background: var(--bg-soft);
}

.account-auth__lead {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 15px;
}

.account-auth__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.account-auth__tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.account-auth__tab.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.account-auth__form label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
}

.account-auth__form input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.account-auth__note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.account-guest__aside {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 22px;
  background: #fff;
}

.account-guest__aside h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
}

.account-guest__aside ul {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 24px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.empty-state--compact {
  padding: 28px 20px;
  gap: 14px;
}

.empty-state--fav .empty-state__icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #e11d48;
  margin-bottom: 6px;
  border: 1px solid var(--line);
}

.empty-state__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-state__text {
  max-width: 360px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 18px;
}

.orders-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.order-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.order-row:last-child {
  border-bottom: 0;
}

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

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

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

.order-row__total {
  white-space: nowrap;
  text-align: right;
}

.order-items { margin: 12px 0 16px; padding-left: 18px; list-style: disc; }
.order-num { margin-bottom: 8px; }

.page-info .prose,
.info-html {
  max-width: 720px;
  line-height: 1.7;
  color: #374151;
}

.info-html p { margin-bottom: 12px; }
.page-info h1 { margin-bottom: 16px; font-size: 28px; font-weight: 800; }
.page-cart h1,
.page-checkout h1,
.page-account h1,
.page-order h1 { margin-bottom: 18px; font-size: 28px; font-weight: 800; }

.page-account h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 20px 0 12px;
}

.a.btn, a.btn { text-decoration: none; }

@media (max-width: 900px) {
  .pdp,
  .cart-layout,
  .checkout-layout,
  .account-grid,
  .account-layout,
  .account-guest { grid-template-columns: 1fr; }

  .account-sidebar {
    position: static;
  }

  .account-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .account-nav__link {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    font-size: 12px;
    padding: 12px 8px;
    min-height: 44px;
  }

  .account-sidebar__logout { margin-top: 4px; }

  .cart-summary { position: static; }
  .checkout-steps { grid-template-columns: 1fr 1fr; }
  .filters { flex-direction: column; }
}

/* PHP-магазин: додаткові стилі */
.topbar__lang a {
  color: var(--muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
}

.topbar__lang a.is-active {
  color: var(--green);
  font-weight: 700;
}

.drawer-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) max-content 44px;
  gap: 10px 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.drawer-item img {
  border-radius: 8px;
  object-fit: cover;
}

.drawer-item__info {
  min-width: 0;
}

.drawer-item__info a {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.drawer-item__info p {
  font-size: 13px;
  color: var(--muted);
}

.drawer-item__total {
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  padding-top: 2px;
}

.drawer-item__remove {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.drawer-item__remove:hover {
  color: var(--sale);
  border-color: var(--sale);
}

.drawer-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 700;
}

.prose {
  max-width: 760px;
  line-height: 1.7;
}

.prose p { margin-bottom: 14px; }

.prose h2 {
  margin: 28px 0 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.prose h2:first-of-type { margin-top: 10px; }

.prose h3 {
  margin: 20px 0 10px;
  font-size: 17px;
  font-weight: 700;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: 8px;
}

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

.prose a {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover { color: var(--green-dark); }

.prose strong { font-weight: 700; }

.pager {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.pager a {
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 600;
}

.pager a.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.account-card,
.order-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 24px;
  background: var(--bg-soft);
}

.orders-list { display: grid; gap: 10px; }

.order-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.summary-row span {
  flex: 1;
  min-width: 0;
}

.summary-row strong {
  flex-shrink: 0;
  white-space: nowrap;
  text-align: right;
}

.summary-row.total {
  font-size: 18px;
  font-weight: 800;
  border-bottom: 0;
  margin-top: 8px;
}

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

.cart-item img {
  border-radius: 8px;
  object-fit: cover;
}

.cart-item__qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item__qty button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.filters select {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.checkout-form > label,
.checkout-form fieldset {
  display: block;
  margin-bottom: 14px;
}

.checkout-form fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
  background: transparent;
  min-width: 0;
}

.checkout-form legend {
  display: block;
  width: 100%;
  font-size: 15px;
  font-weight: 700;
  padding: 0;
  margin: 0 0 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  line-height: 1.35;
}

.checkout-hint {
  margin: -4px 0 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.checkout-form .person-name-grid {
  margin-bottom: 12px;
}

.checkout-form .person-name-grid label {
  display: grid;
  gap: 6px;
  margin: 0;
}

.checkout-form .person-name-grid span,
.checkout-form .checkout-phone span {
  font-size: 13px;
  font-weight: 600;
}

.checkout-form .checkout-phone {
  display: grid;
  gap: 6px;
  margin: 0;
}

.checkout-form fieldset > .checkout-phone + .checkout-phone {
  margin-top: 12px;
}

.checkout-form .person-name-grid input,
.checkout-form .checkout-phone input {
  margin-top: 0;
}

.checkout-form .fieldset-box {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 14px 16px;
}

.checkout-form .fieldset-box .np-fields,
.checkout-form .fieldset-box .courier-fields {
  margin-left: 0;
  background: #fff;
}

.checkout-form input[type="text"],
.checkout-form input[type="tel"],
.checkout-form input[type="email"] {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.checkout-form .radio {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.checkout-form .radio:last-child {
  margin-bottom: 0;
}

.checkout-form .radio:hover {
  background: rgba(255, 255, 255, 0.65);
}

.checkout-form .radio:has(input:checked) {
  background: #fff;
  border-color: var(--line);
}

.checkout-form .radio input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--green);
}

.checkout-form .radio span {
  font-size: 14px;
  line-height: 1.4;
}

.radio {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}

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

.delivery-block + .delivery-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.np-fields,
.courier-fields {
  display: grid;
  margin: 8px 0 0 28px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  gap: 10px;
}

/* Поля доставки — JS ставить [hidden], глобальне правило вже ховає */
.checkout-form #np-fields,
.checkout-form #courier-fields,
.profile-form #profile-np-fields {
  display: grid;
}

.courier-only-note {
  margin: 0;
  font-size: 13px;
  color: var(--green);
  font-weight: 600;
}

.np-fields[hidden],
.courier-fields[hidden] {
  display: none !important;
}

.np-field {
  position: relative;
  display: grid;
  gap: 6px;
}

.np-field span {
  font-size: 13px;
  font-weight: 600;
}

.np-type-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.np-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.np-type input {
  accent-color: var(--green);
}

.np-type:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-dark);
}

.np-suggest {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.np-suggest button {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
}

.np-suggest button:hover {
  background: var(--green-soft);
}

.checkout-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.checkout-form .radio em {
  font-style: normal;
  color: var(--green-dark);
  font-weight: 700;
}

@media (max-width: 900px) {
  .cart-item {
    grid-template-columns: 72px 1fr;
    grid-template-areas:
      "thumb info"
      "qty qty"
      "total remove";
  }
  .cart-item img { grid-area: thumb; }
  .cart-item > div:first-of-type { grid-area: info; }
  .cart-item__qty { grid-area: qty; }
  .cart-item__total { grid-area: total; }
  .cart-item .js-cart-remove { grid-area: remove; justify-self: end; }
  .cart-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }
}

/* === Сторінка товару, картки, хлібні крихти === */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}

.breadcrumbs a:hover { color: var(--green); }
.breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 600; }

.product-page { padding-top: 16px; }

.product-view {
  align-items: start;
  gap: 32px;
}

.product-view__gallery {
  display: grid;
  gap: 12px;
}

.product-view__media {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 320px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.product-view__media:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.product-view__zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.product-view__media img {
  width: min(100%, 420px);
  height: auto;
  max-height: 380px;
  object-fit: contain;
}

.product-view__thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.product-view__thumb {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  cursor: pointer;
}

.product-view__thumb.is-active {
  border-color: var(--green);
  box-shadow: 0 0 0 2px var(--green-soft);
}

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

.product-view__info h1 {
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 10px;
}

.product-view__meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.product-view__rating { margin-bottom: 12px; }

.product-view__stock {
  font-size: 14px;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 12px;
}

.product-view__stock--low { color: #c27803; }

.product-view__buy {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.qty-field__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.qty-field__control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.qty-field__btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: var(--bg-soft);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.qty-field__control input {
  width: 56px;
  height: 44px;
  border: 0;
  text-align: center;
  font-weight: 700;
  -moz-appearance: textfield;
}

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

.product-view__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.product-view__actions .btn {
  padding: 12px 14px;
  font-size: 13px;
}

.specs--product {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.specs--product h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
}

.specs__list {
  display: grid;
  gap: 0;
}

.specs__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.specs__row dt {
  color: var(--muted);
  font-weight: 600;
}

.specs__row dd {
  font-weight: 600;
}

.product-reviews,
.related-products {
  margin-top: 36px;
}

.product-reviews {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.product-reviews--solo .product-reviews__layout {
  grid-template-columns: minmax(0, 420px);
  justify-content: start;
}

.product-reviews--solo .review-compose {
  position: static;
  padding: 14px 16px;
}

.product-reviews__hint {
  color: var(--muted);
  font-size: 13px;
}

.product-reviews__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.product-reviews h2,
.related-products h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 6px;
}

.product-reviews__summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.product-reviews__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 16px;
  align-items: start;
}

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

.reviews-empty {
  padding: 28px 20px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: center;
  color: var(--muted);
}

.review-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.review-card__top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.review-card__avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
}

.review-card__author {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.review-card__date {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.review-card__text {
  margin: 0;
  line-height: 1.65;
  color: var(--text);
}

.stars--static {
  display: inline-flex;
  gap: 2px;
  color: #e5e7eb;
  font-size: 14px;
}

.stars--static .on { color: #f0a100; }

.review-compose {
  position: sticky;
  top: 90px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--bg-soft);
}

.review-compose h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
}

.review-form--compact label {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
}

.review-form--compact input,
.review-form--compact textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  background: #fff;
}

.review-form--compact textarea {
  resize: vertical;
  min-height: 84px;
}

.review-form__rating--inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.review-form__rating--inline > span {
  flex-shrink: 0;
}

.review-form label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
}

.review-form input,
.review-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.review-form textarea {
  resize: vertical;
  min-height: 110px;
}

.star-rating-input {
  display: inline-flex;
  gap: 4px;
}

.star-rating-input__btn {
  border: 0;
  background: none;
  padding: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  font-size: 22px;
  line-height: 1;
  color: #e5e7eb;
  cursor: pointer;
  transition: transform 0.12s ease, color 0.12s ease;
}

.star-rating-input__btn.is-active,
.star-rating-input__btn:hover,
.star-rating-input__btn.is-hover {
  color: #f0a100;
}

.star-rating-input__btn:hover { transform: scale(1.08); }

.review-form__note {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  text-align: left;
}

.review-form--compact .btn {
  padding: 11px 14px;
  font-size: 14px;
}

@media (max-width: 900px) {
  .product-reviews {
    padding: 14px;
    border-radius: 12px;
  }

  .product-reviews__layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .product-reviews--solo .product-reviews__layout {
    grid-template-columns: 1fr;
  }

  .review-compose {
    position: static;
    order: -1;
    padding: 12px 14px;
  }

  .product-reviews__head {
    margin-bottom: 10px;
  }

  .product-reviews h2 {
    font-size: 18px;
  }

  .breadcrumbs {
    font-size: 12px;
    gap: 6px;
    margin-bottom: 12px;
  }

  .product-page .section {
    padding-top: 8px;
  }
}

.card__fav.is-active,
.js-fav.is-active {
  color: var(--sale);
  border-color: #f3c4c1;
  background: #fff7f7;
}

@media (max-width: 900px) {
  .product-view {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .product-view__media {
    min-height: 240px;
    padding: 16px;
  }

  .product-view__actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .card__price strong { font-size: 15px; }
  .card__brand { font-size: 10px; }
}

/* Каскад: мобільний overlay фільтрів і mega має бути після базових правил */
@media (max-width: 900px) {
  .filters {
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 88vw);
    height: 100vh;
    z-index: 70;
    overflow-y: auto;
    transform: translateX(-110%);
    transition: transform 0.2s;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
  }
  .filters.is-open { transform: translateX(0); }
}

@media (max-width: 860px) {
  .mega {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    width: auto;
    z-index: 95;
    margin: 8px 0 0;
    padding: 10px;
    max-height: min(62vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mega__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 8px;
  }

  .mega__item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 90px;
    padding: 10px 6px;
    text-align: center;
    font-size: 11px;
    line-height: 1.25;
  }

  .mega__item img {
    width: 34px;
    height: 34px;
  }

  .mega__item--all {
    flex-direction: row;
    justify-content: center;
    align-self: start;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0 14px;
    font-size: 14px;
  }
}

@media (max-width: 560px) {
  .mega {
    padding: 8px;
    max-height: min(62vh, 420px);
  }

  .mega__grid { gap: 6px; }

  .mega__item {
    min-height: 82px;
    padding: 8px 4px;
    font-size: 10px;
  }

  .mega__item img {
    width: 28px;
    height: 28px;
  }

  .mega__item--all {
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    font-size: 14px;
    padding: 0 12px;
  }
}

.np-track {
  margin: 20px 0 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.np-track h2 {
  font-size: 18px;
  margin: 0 0 14px;
}

.np-track__steps {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.np-track__step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #6b7280);
}

.np-track__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d1d5db;
  flex-shrink: 0;
}

.np-track__step.is-done { color: var(--green, #4b7a1c); }
.np-track__step.is-done .np-track__dot { background: var(--green, #4b7a1c); }
.np-track__step.is-current { color: #1d4ed8; }
.np-track__step.is-current .np-track__dot { background: #1d4ed8; }
.np-track__steps[data-problem="1"] .np-track__step.is-current { color: #991b1b; }
.np-track__steps[data-problem="1"] .np-track__step.is-current .np-track__dot { background: #991b1b; }

.np-track__card {
  display: grid;
  gap: 10px;
}

.np-track__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.np-track__row span { color: var(--muted, #6b7280); }
.np-track__ttn { letter-spacing: 0.02em; }
.np-track__copy {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}
.np-track__link { margin-top: 4px; justify-self: start; min-height: 44px; }
.np-track__wait { margin: 0; font-size: 14px; }

.order-card-item__np {
  display: block;
  font-size: 12px;
  color: var(--muted, #6b7280);
  margin-top: 6px;
}

@media (min-width: 701px) {
  .np-track { padding: 20px; }
  .np-track__steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }
  .np-track__step {
    flex-direction: column;
    text-align: center;
    font-size: 12px;
  }
}


