/* =========================================================================
   HouseUp — responsive & UX layer
   Loaded after main.css / ajax.css. New fixes go here instead of the
   9k-line main.css so they are easy to find and to revert.
   Breakpoints: 576 / 768 / 1024 / 1280.
   ========================================================================= */

/* ── 1. Content is always visible ────────────────────────────────────────
   .scroll-appearance.animate-* starts at opacity:0 + translate(±90%) and
   waits for a scroll listener. On desktop that hid whole blocks (catalog
   tiles, the checkout form in the cart, delivery info) until the user
   scrolled to the exact spot, and pushed the checkout form off-screen to
   the right. Mobile already had this override (main.css); now it applies
   everywhere. A short fade is kept for users who allow motion. */
body .scroll-appearance.animate-opacity,
body .scroll-appearance.animate-top,
body .scroll-appearance.animate-bottom,
body .scroll-appearance.animate-left,
body .scroll-appearance.animate-right {
  opacity: 1;
  -webkit-transform: none;
  -ms-transform: none;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  body .scroll-appearance {
    animation: hu-fade-in 0.4s ease-out both;
  }
}

@keyframes hu-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── 2. Header: solid, sticky, readable ──────────────────────────────── */
.-redesign.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 30, 55, 0.94);
}

/* overflow-x:hidden on an ancestor breaks position:sticky; clip does not. */
.-redesign .site-container,
.site-container {
  overflow-x: clip;
}

/* The logo SVG is black; on the dark header/footer it was nearly invisible. */
.-redesign.header .logo img,
.-redesign.footer .logo img {
  filter: brightness(0) invert(1);
}

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

.-redesign.header .header__btns .btn {
  margin: 0;
}

.-redesign.header .logo {
  width: auto;
  height: 44px;
}

.-redesign.header .logo img {
  width: auto;
  height: 100%;
}

.-redesign .burger {
  flex-shrink: 0;
}

.header__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--white);
  transition: background-color 0.2s;
}

.header__icon-btn:hover,
.header__icon-btn:focus-visible {
  background-color: rgba(255, 255, 255, 0.12);
}

.header__cart-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.header__cart-btn .header__cart-icon {
  flex-shrink: 0;
}

.header__cart-btn .cart-count {
  min-width: 20px;
  height: 20px;
  margin-left: 2px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}

/* Desktop nav already has a "Пошук" item. */
@media (min-width: 1025px) {
  .header__search-btn {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  .-redesign .header__container {
    gap: 12px;
  }

  .-redesign .header__container-right {
    margin-left: auto;
  }

  /* At exactly 1024px the desktop nav was hidden (max-width:1024) and the
     burger too (min-width:1024) — iPad landscape had no menu at all. */
  .-redesign .burger.mobile-show,
  .-redesign .burger,
  .menu.mobile-show {
    display: block !important;
  }

  .-redesign .burger {
    width: 44px;
    height: 44px;
    padding: 9px 4px;
  }
}

@media (max-width: 767px) {
  /* main.css shrinks the cart button to 9px text — unreadable. */
  .-redesign .header__btns .btn.header__cart-btn {
    /* .btn is an 18px bar + two 17px corner triangles = ~52px tall */
    min-width: 0;
    max-width: none;
    height: 18px;
    padding: 0 14px;
    font-size: 13px;
    line-height: 1;
  }

  .-redesign .header__btns {
    gap: 4px;
  }
}

@media (max-width: 380px) {
  .header__cart-btn .header__cart-label {
    display: none;
  }
}

/* ── 3. Mobile menu ──────────────────────────────────────────────────── */
.menu .menu__all-link > a {
  font-weight: 600 !important;
  color: var(--brown) !important;
}

@media (max-width: 1024px) {
  .-redesign .menu__inner .header__nav-list li.menu__all-link {
    margin-bottom: 24px;
  }

  .-redesign .menu__inner .header__nav-list li.has-child > a {
    cursor: pointer;
  }
}

/* ── 4. Empty cart ───────────────────────────────────────────────────── */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 0 24px;
  text-align: center;
}

.cart-empty .back__soon {
  margin: 0;
}

.cart-empty p {
  color: var(--gray);
}

/* ── 5. Accessibility ────────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  /* Bigger tap targets for category levels in the burger menu (were 16px / ~28px rows). */
  .-redesign .menu__inner .header__nav-list li li > a {
    display: inline-block;
    padding: 6px 0;
    font-size: 18px;
    line-height: 1.35;
  }
}

/* =========================================================================
   Stage 2 — catalog: pages, breadcrumbs, chips, product & category grids
   ========================================================================= */

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

/* ── Buttons ─────────────────────────────────────────────────────────── */
.hu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  background-color: var(--gold);
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, opacity 0.2s;
}

.hu-btn:hover {
  background-color: var(--brown);
  color: var(--white);
}

.hu-btn.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.hu-btn--ghost {
  background: transparent;
  border: 1px solid var(--gold);
}

/* ── Page shell ──────────────────────────────────────────────────────── */
.hu-page {
  padding: 24px 0 64px;
  background-color: var(--bg-light);
}

.hu-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--gray);
}

.hu-breadcrumbs a {
  color: var(--gray);
  text-decoration: none;
}

.hu-breadcrumbs a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.hu-breadcrumbs > * + *::before {
  content: '/';
  margin: 0 8px;
  color: var(--light);
}

.hu-breadcrumbs [aria-current] {
  color: var(--blue);
}

.hu-page__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin-bottom: 20px;
}

.hu-page__title {
  margin: 0;
  color: var(--blue);
  font-family: inherit;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  text-transform: none;
  overflow-wrap: anywhere;
}

.hu-page__count {
  color: var(--gray);
  font-size: 14px;
}

.hu-empty {
  padding: 32px 0;
  color: var(--gray);
  font-size: 16px;
}

/* ── Chips (sibling categories) ──────────────────────────────────────── */
.hu-chips {
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 1024px) {
  .hu-chips {
    flex-wrap: wrap;
    overflow: visible;
  }
}

.hu-chip {
  flex-shrink: 0;
  padding: 8px 14px;
  border: 1px solid var(--light);
  background-color: var(--white);
  color: var(--blue);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}

.hu-chip:hover {
  border-color: var(--gold);
}

.hu-chip.is-active {
  border-color: var(--blue);
  background-color: var(--blue);
  color: var(--white);
}

/* ── Toolbar (sorting) ───────────────────────────────────────────────── */
.hu-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--gray);
}

.hu-toolbar select {
  min-height: 40px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--light);
  background-color: var(--white);
  color: var(--blue);
  font: inherit;
}

/* ── Search form ─────────────────────────────────────────────────────── */
.hu-search {
  display: flex;
  gap: 8px;
  max-width: 720px;
  margin-bottom: 24px;
}

.hu-search input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--light);
  background-color: var(--white);
  color: var(--blue);
  font: inherit;
  font-size: 16px; /* 16px stops iOS from zooming in on focus */
}

/* ── Product grid & card ─────────────────────────────────────────────── */
.hu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 768px) {
  .hu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1200px) {
  .hu-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.hu-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--white);
  transition: box-shadow 0.2s, transform 0.2s;
}

.hu-card:hover {
  box-shadow: 0 8px 24px rgba(13, 30, 55, 0.12);
}

.hu-card__img {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: var(--white);
}

.hu-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.hu-card:hover .hu-card__img img {
  transform: scale(1.04);
}

.hu-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  background-color: #d93025;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
}

.hu-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 12px;
}

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

.hu-card__price-current {
  color: var(--blue);
  font-size: 18px;
  font-weight: 700;
}

.hu-card__price-old {
  color: var(--gray);
  font-size: 13px;
}

.hu-card__drop {
  color: #1e7b34;
  font-size: 13px;
  font-weight: 600;
}

.hu-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: var(--blue);
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}

.hu-card__title:hover {
  text-decoration: underline;
}

.hu-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin-top: auto;
  color: var(--gray);
  font-size: 12px;
}

.hu-card__stock {
  color: #1e7b34;
}

.hu-card__buy {
  width: 100%;
  margin-top: 6px;
}

.hu-card__buy.is-added::before {
  content: '✓';
}

@media (max-width: 575px) {
  .hu-card__body {
    padding: 8px 8px 10px;
  }

  .hu-card__price-current {
    font-size: 16px;
  }

  .hu-card__title {
    font-size: 13px;
  }

  .hu-card__buy {
    min-height: 40px;
    padding: 0 8px;
    font-size: 12px;
  }
}

/* ── Category tiles ──────────────────────────────────────────────────── */
.hu-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 768px) {
  .hu-cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1200px) {
  .hu-cat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.hu-cat {
  display: flex;
  flex-direction: column;
  background-color: var(--white);
  color: var(--blue);
  text-decoration: none;
  transition: box-shadow 0.2s;
}

.hu-cat:hover {
  box-shadow: 0 8px 24px rgba(13, 30, 55, 0.12);
}

.hu-cat__img {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

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

.hu-cat__name {
  padding: 10px 12px 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

/* ── Pagination ──────────────────────────────────────────────────────── */
.hu-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
}

.hu-pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--light);
  background-color: var(--white);
  color: var(--blue);
  text-decoration: none;
}

.hu-pagination__item:hover {
  border-color: var(--gold);
}

.hu-pagination__item.is-current {
  border-color: var(--blue);
  background-color: var(--blue);
  color: var(--white);
}

.hu-pagination__gap {
  padding: 0 4px;
  color: var(--gray);
}

/* ── Toast ───────────────────────────────────────────────────────────── */
.hu-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(480px, calc(100% - 32px));
  padding: 12px 16px;
  background-color: var(--blue);
  color: var(--white);
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.hu-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.hu-toast.is-error {
  background-color: #b3261e;
}

.hu-toast a {
  color: var(--gold);
  font-weight: 700;
  white-space: nowrap;
}

/* =========================================================================
   Stage 3 — product page: gallery + buy box, description, related, buy bar
   ========================================================================= */

.hu-product__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

@media (min-width: 900px) {
  .hu-product__top {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }
}

/* Gallery: horizontal scroll-snap track (swipe on touch) + thumbnails */
.hu-gallery {
  min-width: 0;
}

.hu-gallery__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background-color: var(--white);
}

.hu-gallery__track::-webkit-scrollbar {
  display: none;
}

.hu-gallery__slide {
  flex: 0 0 100%;
  aspect-ratio: 1 / 1;
  scroll-snap-align: center;
  cursor: zoom-in;
}

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

.hu-gallery__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.hu-gallery__thumb {
  flex: 0 0 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  background-color: var(--white);
  cursor: pointer;
  opacity: 0.7;
}

.hu-gallery__thumb.is-active {
  border-color: var(--gold);
  opacity: 1;
}

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

/* Buy box */
.hu-buy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background-color: var(--white);
}

@media (min-width: 900px) {
  .hu-buy {
    position: sticky;
    top: 96px;
    padding: 28px;
  }
}

.hu-buy__title {
  margin: 0;
  color: var(--blue);
  font-family: inherit;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  text-transform: none;
  overflow-wrap: anywhere;
}

.hu-buy__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  color: var(--gray);
  font-size: 14px;
}

.hu-buy__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.hu-buy__price-current {
  color: var(--blue);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
}

.hu-buy__price-old {
  color: var(--gray);
  font-size: 18px;
}

.hu-buy__btn {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}

.hu-buy__perks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--bg-light);
  list-style: none;
  color: var(--gray);
  font-size: 14px;
  line-height: 1.4;
}

.hu-buy__perks strong {
  color: var(--blue);
}

.hu-buy__perks a {
  color: var(--brown);
  font-weight: 600;
}

/* Sections under the fold */
.hu-product__section {
  margin-top: 40px;
}

.hu-section-title {
  margin: 0 0 16px;
  color: var(--blue);
  font-family: inherit;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  text-transform: none;
}

.hu-richtext {
  max-width: 820px;
  padding: 20px;
  background-color: var(--white);
  color: #2b3442;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.hu-richtext p,
.hu-richtext ul,
.hu-richtext ol {
  margin: 0 0 12px;
}

.hu-richtext ul,
.hu-richtext ol {
  padding-left: 20px;
}

.hu-richtext ul { list-style: disc; }
.hu-richtext ol { list-style: decimal; }

.hu-richtext img {
  max-width: 100%;
  height: auto;
}

.hu-richtext table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* Mobile buy bar */
.hu-buybar {
  display: none;
}

@media (max-width: 899px) {
  .hu-buybar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background-color: var(--white);
    box-shadow: 0 -4px 16px rgba(13, 30, 55, 0.12);
    transform: translateY(110%);
    transition: transform 0.25s ease-out;
  }

  .hu-buybar.is-visible {
    transform: none;
  }

  .hu-buybar__price {
    color: var(--blue);
    font-size: 20px;
    font-weight: 700;
  }

  .hu-buybar .hu-btn {
    flex: 0 1 60%;
  }

  /* keep the footer and the toast clear of the bar */
  .hu-product {
    padding-bottom: 96px;
  }

  .hu-product ~ .hu-toast,
  body:has(.hu-buybar) .hu-toast {
    bottom: 88px;
  }

  body:has(.hu-buybar) .scroll-top {
    bottom: 96px;
  }
}

/* =========================================================================
   Stage 4 — cart & checkout
   ========================================================================= */

.hu-cart__orders-link {
  margin-left: auto;
  color: var(--brown);
  font-size: 14px;
  font-weight: 600;
}

.hu-cart__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

@media (min-width: 1024px) {
  .hu-cart__layout {
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 32px;
    align-items: start;
  }
}

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

/* One cart line: [img] [name/meta] [qty] [sum] [x] */
.hu-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto auto 40px;
  grid-template-areas: "img info qty sum remove";
  align-items: center;
  gap: 12px 16px;
  padding: 12px;
  background-color: var(--white);
}

.hu-line__img     { grid-area: img; display: block; width: 72px; height: 72px; }
.hu-line__info    { grid-area: info; min-width: 0; }
.hu-qty           { grid-area: qty; }
.hu-line__sum     { grid-area: sum; }
.hu-line__remove  { grid-area: remove; }

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

.hu-line__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--blue);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.hu-line__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-top: 4px;
  color: var(--gray);
  font-size: 13px;
}

.hu-line__sum {
  min-width: 90px;
  color: var(--blue);
  font-size: 17px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.hu-line__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--gray);
  transition: color 0.2s, background-color 0.2s;
}

.hu-line__remove:hover {
  background-color: #fdecea;
  color: #b3261e;
}

@media (max-width: 767px) {
  /* [img] [name/meta      ] [x]
     [img] [qty]       [sum]      */
  .hu-line {
    grid-template-columns: 72px minmax(0, 1fr) auto 36px;
    grid-template-areas:
      "img info info remove"
      "img qty  sum  sum";
    gap: 8px 12px;
  }

  .hu-line__sum {
    min-width: 0;
  }

  .hu-line__remove {
    width: 36px;
    height: 36px;
    align-self: start;
  }
}

/* Quantity stepper */
.hu-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--light);
}

.hu-qty__btn {
  width: 40px;
  height: 40px;
  border: 0;
  background-color: var(--bg-light);
  color: var(--blue);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.hu-qty__btn:hover {
  background-color: var(--gold);
}

.hu-qty__value {
  min-width: 40px;
  color: var(--blue);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

/* Checkout card: dark, so the existing .form / .input styles from
   main.css (built for the dark "consult" section) keep working. */
.hu-checkout {
  padding: 20px;
  background-color: var(--blue);
  color: var(--white);
}

@media (min-width: 1024px) {
  .hu-checkout {
    position: sticky;
    top: 96px;
    padding: 28px;
  }
}

.hu-checkout__title {
  margin: 0 0 12px;
  color: var(--white);
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  text-transform: none;
}

.hu-checkout__items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--light);
  font-size: 13px;
  line-height: 1.4;
}

.hu-checkout__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 16px;
}

.hu-checkout__total strong {
  color: var(--gold);
  font-size: 26px;
}

.hu-checkout__total--drop {
  margin-top: 0;
  padding-top: 8px;
  border-top: 0;
  font-size: 14px;
}

.hu-checkout__total--drop strong {
  font-size: 20px;
}

.hu-checkout .hu-checkout__form {
  width: 100%;
  max-width: none;
  margin: 8px 0 0;
}

.hu-checkout .hu-checkout__form .input {
  width: 100%;
}

.hu-checkout .hu-checkout__form textarea {
  min-height: 110px;
}

.hu-checkout .hu-checkout__form #g-recaptcha {
  max-width: 100%;
  overflow: hidden;
}

.hu-checkout .hu-checkout__form button[type="submit"] {
  width: 100%;
  margin: 24px 0 16px;
}

.hu-line .hu-qty {
  justify-self: start;
}

/* ── My orders / order success ───────────────────────────────────────── */
.hu-success {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
  padding: 16px 20px;
  border-left: 4px solid #1e7b34;
  background-color: #e8f5ec;
  color: #14532d;
  font-size: 15px;
}

.hu-success strong {
  font-size: 18px;
}

.hu-orders {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

@media (min-width: 1024px) {
  .hu-orders {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
  }
}

.hu-orders__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hu-order {
  padding: 16px 20px;
  background-color: var(--white);
}

.hu-order__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.hu-order__date {
  color: var(--blue);
  font-weight: 700;
}

.hu-order__status {
  padding: 4px 10px;
  background-color: var(--bg-light);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}

.hu-order__status--received,
.hu-order__status--confirm { background-color: #e8f5ec; color: #14532d; }
.hu-order__status--cancel,
.hu-order__status--returned { background-color: #fdecea; color: #8c1d18; }
.hu-order__status--shipping { background-color: #fff4d6; color: #6b4e00; }

.hu-order__items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.hu-order__items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--gray);
}

.hu-order__items a {
  color: var(--blue);
}

.hu-note {
  padding: 20px;
  background-color: var(--white);
  color: var(--gray);
  font-size: 14px;
  line-height: 1.55;
}

.hu-note p {
  margin: 0 0 12px;
}

.hu-note__title {
  margin: 0 0 12px;
  color: var(--blue);
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  text-transform: none;
}

.hu-empty .hu-btn {
  margin-top: 12px;
}

/* =========================================================================
   Stage 5 — home page
   ========================================================================= */

/* Hero: was a fixed 843px tall block (a whole phone screen of empty
   blue) with the banner dimmed to 60%. */
.-redesign .promo.promo-main.hu-hero {
  height: auto;
  min-height: clamp(380px, 62vh, 620px);
  margin-top: 0;
  padding: 48px 0;
}

.promo.promo-main.hu-hero .promo__bg {
  z-index: 0;
  overflow: hidden;
}

.promo.promo-main.hu-hero .promo__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 0.75;
}

/* The decorative slanted panel (bgMainLeft.png) overflowed the shorter
   hero onto the categories and covered the buttons. */
.-redesign .hu-hero .promo__info::after,
.-redesign .hu-hero .promo__info::before,
.-redesign .hu-hero .promo-text-box::after,
.-redesign .hu-hero .promo-text-box::before {
  content: none;
}

.hu-hero .container {
  position: relative;
  z-index: 2;
}

.promo.promo-main.hu-hero .promo__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  width: auto;
  height: auto;
  opacity: 1;
  background: linear-gradient(90deg, rgba(13, 30, 55, 0.85) 0%, rgba(13, 30, 55, 0.35) 70%, rgba(13, 30, 55, 0.1) 100%);
}

.promo.promo-main.hu-hero .promo__bg::before {
  display: none;
}

.hu-hero .promo__info {
  max-width: 620px;
}

.-redesign .hu-hero .promo__info .promo__title.title-h1 h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(32px, 6vw, 64px);
  line-height: 1.1;
}

.hu-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hu-btn--light {
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--white);
}

.hu-btn--light:hover {
  border-color: var(--gold);
  background-color: transparent;
  color: var(--gold);
}

@media (max-width: 575px) {
  .-redesign .promo.promo-main.hu-hero {
    min-height: 340px;
    padding: 32px 0;
  }

  .hu-hero__actions .hu-btn {
    flex: 1 1 100%;
  }
}

/* Generic home section */
.hu-section {
  padding: 48px 0;
  background-color: var(--bg-light);
}

.hu-section + .hu-section {
  padding-top: 0;
}

.hu-section__head {
  margin-bottom: 20px;
}

.hu-section__head .hu-section-title {
  margin-bottom: 4px;
}

.hu-section__lead {
  margin: 0;
  color: var(--gray);
  font-size: 15px;
}

/* Main categories as compact icon tiles */
.hu-cat-icons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 768px) {
  .hu-cat-icons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 1200px) {
  .hu-cat-icons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.hu-cat-icon {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid transparent;
  background-color: var(--white);
  color: var(--blue);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hu-cat-icon:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(13, 30, 55, 0.08);
}

.hu-cat-icon__img {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}

.hu-cat-icon__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hu-cat-icon__name {
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

@media (max-width: 575px) {
  .hu-cat-icon {
    gap: 8px;
    padding: 10px;
  }

  .hu-cat-icon__img {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }

  .hu-cat-icon__name {
    font-size: 13px;
  }
}

/* Horizontal row of cards (recently viewed): swipe on mobile */
.hu-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 44%);
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 8px;
}

.hu-row > * {
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .hu-row {
    grid-auto-columns: calc((100% - 40px) / 3);
    gap: 20px;
  }
}

@media (min-width: 1200px) {
  .hu-row {
    grid-auto-columns: calc((100% - 100px) / 6);
  }
}

/* =========================================================================
   Stage 5 — info pages (contacts, delivery, about, cooperation, blog, reviews)
   ========================================================================= */

/* Contacts: card with details + map side by side (stacked on mobile). */
.hu-contacts__grid {
  display: grid;
  gap: 24px;
}

.hu-contacts__card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  background-color: var(--white);
  border: 1px solid var(--light);
}

.hu-contacts__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.hu-contacts__item img {
  flex-shrink: 0;
  margin-top: 2px;
  filter: brightness(0) saturate(100%) invert(12%) sepia(31%) saturate(1500%) hue-rotate(190deg);
}

.hu-contacts__label {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray);
}

.hu-contacts__item p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--blue);
}

.hu-contacts__item a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.hu-contacts__item a:hover {
  color: var(--brown);
}

.hu-contacts__map {
  min-height: 320px;
  background-color: var(--light);
}

.hu-contacts__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
}

@media (min-width: 900px) {
  .hu-contacts__grid {
    grid-template-columns: minmax(320px, 400px) 1fr;
  }

  .hu-contacts__map,
  .hu-contacts__map iframe {
    min-height: 460px;
  }
}

/* Info-page heroes (.promo-medicaid): were a full screen of empty blue
   with a "scroll down" arrow that pointed to "#". */
.-redesign .promo.promo-medicaid,
.promo.promo-medicaid {
  margin-top: 0;
  min-height: clamp(260px, 40vh, 420px);
  padding: 48px 0;
}

.promo.promo-medicaid > .section-arrow {
  display: none;
}

@media (max-width: 767px) {
  .-redesign .promo.promo-medicaid,
  .promo.promo-medicaid {
    min-height: 0;
    padding: 32px 0;
  }
}

/* Blog / reviews empty state on the light background. */
.hu-info-empty {
  padding: 48px 0;
  background-color: var(--bg-light);
}

.hu-info-empty p {
  max-width: 560px;
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--blue);
}

/* Footer on phones: tidy columns, contacts on a full row, socials and
   copyright stacked instead of squeezed side by side. */
@media (max-width: 767px) {
  .-redesign .footer-wrapper {
    grid-column-gap: 20px;
  }

  .-redesign .footer-links {
    row-gap: 16px;
  }

  .-redesign .footer-links a {
    font-size: 16px;
  }

  .-redesign .footer-contacts {
    grid-column: 1 / -1;
  }

  .-redesign .footer-contacts p {
    max-width: none;
  }

  .-redesign .footer-mob-follow {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .-redesign .footer-mob-follow .footer-follow ul {
    display: flex;
    gap: 20px;
  }

  .-redesign .footer-mob-follow .footer-copyright {
    max-width: none;
  }
}

/* Footer logo: the SVG artwork sat centred inside a 170px-wide box, so it
   looked misaligned with the left-aligned copyright and columns. */
.-redesign.footer .footer-logo-box .logo,
.-redesign.footer .footer-mob-logo .logo {
  display: inline-flex;
  justify-content: flex-start;
  margin: 0;
}

.-redesign.footer .footer-logo-box .logo img,
.-redesign.footer .footer-mob-logo .logo img {
  width: auto;
  height: 48px;
}

.-redesign .footer-copyright {
  max-width: none;
}

.-redesign .footer-mob-logo {
  margin-bottom: 28px;
}

/* ── Info pages (returns, offers) ────────────────────────────────────── */
.hu-page__intro {
  max-width: 820px;
  margin: 0 0 24px;
  color: #2b3442;
  font-size: 16px;
  line-height: 1.6;
}

.hu-info__section {
  margin-bottom: 28px;
}

.hu-info__section .hu-richtext {
  border-radius: 12px;
}

.hu-richtext a {
  color: var(--blue);
  text-decoration: underline;
}
