/* ACS — мобільні доробки (підключається останнім) */
button, input, select, textarea { font-family: inherit; }
html { -webkit-text-size-adjust: 100%; }
img, video, svg { max-width: 100%; }
@media (max-width: 480px) {
  footer .container { grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; gap: 24px 16px !important; }
  footer, footer a, footer li { overflow-wrap: anywhere; }
  .tile-weight, .pw-btn, .cat-tab, .brand-chip { min-height: 32px; }
  .tile-weight { min-width: 38px; padding-left: 10px; padding-right: 10px; display: inline-flex; align-items: center; justify-content: center; }
  .pw-btn { min-height: 40px; }
  input[type="text"], input[type="tel"], input[type="email"], input[type="password"], input[type="number"], textarea, select { font-size: 16px; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  h1, h2, h3 { overflow-wrap: break-word; }
}
@media (max-width: 340px) {
  .container { padding-left: 14px; padding-right: 14px; }
}

/* ===== Мобільні виправлення 05.11.2026 ===== */
/* Сторінка не «їздить» вліво-вправо (clip не ламає sticky-шапку) */
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }

@media (max-width: 520px) {
  /* Кнопка «Заявка» у шапці: текст рівно по центру, чітка без розмитої тіні */
  .header-actions .btn-amber {
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    gap: 0 !important; height: 36px; padding: 0 14px !important; line-height: 1 !important;
    box-shadow: none !important; transform: none !important; flex-shrink: 0;
  }
  .header-actions .btn-amber::after { display: block; line-height: 1; font-size: 13px !important; letter-spacing: .01em; }

  /* Hero: «Переглянути продукцію» і «Зв'язатися» — однакові, на всю ширину, текст по центру */
  .hero-cta { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
  .hero-cta .btn, .hero-cta .call-widget.hero-connect .call-trigger {
    display: flex !important; width: 100%; min-height: 52px; padding: 0 20px !important;
    align-items: center !important; justify-content: center !important; text-align: center !important;
    font-size: 15.5px !important; line-height: 1.2; box-sizing: border-box;
  }
  .hero-cta .btn-amber { box-shadow: 0 4px 12px rgba(245,166,35,.25) !important; transform: none !important; }
  .hero-cta .call-widget.hero-connect { display: block !important; width: 100%; margin: 0 !important; }
  .hero-cta .call-widget.hero-connect .call-menu { left: 0 !important; right: 0 !important; min-width: 0; }

  /* Кошик-попап: без горизонтального прокручування, все вміщується в рамку */
  .acs-cart-modal-overlay { padding: 14px; overscroll-behavior: contain; }
  .acs-cart-modal { overflow-x: hidden !important; overscroll-behavior: contain; touch-action: pan-y; padding: 24px 16px !important; }
  .acs-cart-modal h3 { font-size: 20px; padding: 0 36px; }
  .acs-cart-modal-item { grid-template-columns: 60px minmax(0,1fr) auto !important; gap: 0 12px !important; align-items: start !important; }
  .acs-cart-modal-item > * { min-width: 0; }
  .acs-cart-modal-item-media, .acs-cart-modal-item-media img { width: 60px !important; height: 60px !important; }
  .acs-cart-modal-item-info { grid-column: 2; grid-row: 1; }
  .acs-cart-modal-item-name { overflow-wrap: anywhere; }
  .acs-cart-modal-item-remove { grid-column: 3; grid-row: 1; align-self: start; justify-self: end; margin: -6px -4px 0 0; }
  .acs-cart-modal-item-price { grid-column: 3; grid-row: 1; align-self: end; justify-self: end; padding-bottom: 11px; }

  /* Кошик-сторінка: компактний рядок товару */
  .cart-item { grid-template-columns: 64px minmax(0,1fr) auto !important; gap: 10px 12px !important; align-items: center !important; padding: 12px !important; }
  .cart-item > * { min-width: 0; }
  .cart-item > :first-child { grid-row: 1 / 3; align-self: start; }
  .cart-item > :first-child, .cart-item > :first-child img, .cart-item > img { width: 64px !important; height: 64px !important; }
  .cart-item > :nth-child(2) { grid-column: 2 / 4; grid-row: 1; }
  .cart-item > .qty-stepper { grid-column: 2; grid-row: 2; justify-self: start; }
  .cart-item > :nth-child(4) { grid-column: 3; grid-row: 2; }
  .cart-item-name { overflow-wrap: anywhere; }

  .qty-stepper { flex-shrink: 0; }
  .acs-cart-modal .qty-stepper button, .cart-item .qty-stepper button { width: 36px !important; height: 40px !important; }
  .acs-cart-modal .qty-stepper input, .cart-item .qty-stepper input { width: 40px !important; height: 40px !important; }

  /* Новини: назва компанії не розривається */
  .news-hero h1 { font-size: min(34px, 8.4vw) !important; }
}
.nowrap { white-space: nowrap; }

/* Партнери: картка без файлу логотипу — назва як логотип */
.pc-logo-text { display: flex; align-items: center; justify-content: center; height: 100%; aspect-ratio: 2 / 1; max-width: 100%; background: #fff; border-radius: 6px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 26px; letter-spacing: .04em; color: #0B3D62; }

/* 2026-11-06: дрібні екрани — без горизонтального переповнення */
@media (max-width: 420px) {
  .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
  .stat { min-width: 0; overflow-wrap: anywhere; padding-left: 16px; padding-right: 16px; }
  footer h4 { letter-spacing: .02em; overflow-wrap: normal; word-break: keep-all; }
}

/* ============================================================
   UI Taste Craft Polish (Anti-UI-Slop & Design Consistency)
   ============================================================ */
/* 1. Selection & Text Rendering */
::selection {
  background: #0B3D62;
  color: #FFFFFF;
}
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}

/* 2. Tabular Numerals for Price, Specs, Totals & Steppers */
.product-price,
.cart-item-price,
.cart-summary-total,
.order-total,
.stat .num,
.spec-table td:last-child,
.dilution-table td:last-child,
.badge,
.qty-stepper input,
.order-summary-mini-price,
.acs-cart-modal-item-price,
.acs-cart-modal-total-value {
  font-variant-numeric: tabular-nums;
}

/* 3. Keyboard Focus & Accessibility (Locked Brand Accent) */
:focus-visible {
  outline: 2px solid var(--amber, #F5A623) !important;
  outline-offset: 2px !important;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none !important;
  border-color: var(--amber, #F5A623) !important;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.22) !important;
}

/* 4. Motion & Reduced Motion Support */
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 5. Tactile Micro-Interactions & Tap Highlight */
* {
  -webkit-tap-highlight-color: transparent;
}
.btn:active,
.btn-amber:active,
.btn-add-cart:active,
.btn-outline:active {
  transform: scale(0.98);
}
.icon-btn:active {
  transform: scale(0.94);
}

/* 6. Header Cart Vector Icon & Badge Optical Alignment */
.icon-btn .icon-cart-svg {
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}
.icon-btn .badge.cart-badge {
  top: -3px;
  right: -3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  border-radius: 9px;
}
.badge.cart-badge.badge-empty {
  opacity: 0.45;
}

/* 7. Cart Empty State & News Metadata Alignment */
.cart-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.article-meta span {
  display: inline-flex;
  align-items: center;
}

/* 8. Monolithic Layout, Cards & Elevation Harmony */
.tile-card {
  border-radius: 14px !important;
}
.cat-card,
.news-card,
.partner-card,
.benefit-card,
.order-card,
.checkout-card {
  border-radius: var(--radius, 18px);
}
.tile-card:hover,
.cat-card:hover,
.benefit-card:hover,
.partner-card:hover,
.order-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(11, 61, 98, 0.10);
}

/* Monolithic image aspect & containment */
.tile-photo img,
.product-gallery img {
  object-fit: contain !important;
}
.news-card .nc-media img,
.cat-media,
.ab-photo img {
  object-fit: cover !important;
}

/* Monolithic header & utility flow rhythm */
.cart-wrap,
.checkout-wrap {
  padding-top: 24px !important;
}
#checkoutSection,
#cartWrap {
  padding-top: 0;
}



/* ============================================================
   12.11.2026 — шапка завжди закріплена, мобільне меню під шапкою,
   картки каталогу вирівняні
   ============================================================ */
/* Горизонтальне обрізання лише на <html> (переходить у viewport),
   body без overflow — інакше iPhone/Safari перестає тримати sticky-шапку */
html { overflow-x: hidden; }
@supports (overflow-x: clip) { html { overflow-x: clip; } }
body { overflow: visible !important; max-width: 100%; }
html.acs-scroll-lock { overflow: hidden !important; }
.site-header-fixed { position: -webkit-sticky; position: sticky; top: 0; z-index: 100; }

/* Мобільне меню відкривається точно під шапкою (висоту рахує js/mobile.js) */
@media (max-width: 900px) {
  nav.primary.mobile-open {
    position: fixed !important; top: var(--acs-hdr-h, 114px) !important;
    left: 0; right: 0; bottom: 0; max-height: none !important;
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  }
  .nav-backdrop { top: var(--acs-hdr-h, 114px) !important; }
}

/* Картки каталогу: фото+назва зверху, вага/наявність/ціна/«Купити» —
   на одному рівні в усіх картках ряду */
.tile-card > .tile-link { flex: 1 1 auto; display: flex; flex-direction: column; }
.tile-card > .tile-link .tile-name { margin-bottom: 12px; }
.tile-card .tile-weights { flex-wrap: nowrap; }
.tile-card .tile-cta { margin-top: 0; }
@media (max-width: 640px) {
  .tile-grid { align-items: stretch; }
  .tile-grid .tile-card > .tile-link .tile-name { margin-bottom: 10px; }
  .tile-grid .tile-weights { gap: 4px; }
  .tile-grid .tile-weight { min-width: 0 !important; padding-left: 8px !important; padding-right: 8px !important; }
}
@media (max-width: 360px) {
  .tile-grid .tile-weights { flex-wrap: wrap; }
}
