/* Production-only corrections. The original visual system remains authoritative. */
html,
body { overflow-x: clip; }
img, video, svg { max-width: 100%; }
img { height: auto; }
button, a, input, select, textarea { touch-action: manipulation; }
.button, .header-cta, .cart-link, .mobile-menu-toggle, .catalog-tool-btn,
.product-card-add, .product-qty-btn, .checkout-submit { min-height: 44px; }
input, select, textarea { font-size: max(16px, 1em); }
.product-card h3, .product-title, .cart-item-title, .checkout-line strong {
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  :root {
    --site-header-top: 8px;
    --site-header-space: 18px;
  }
  .section { scroll-margin-top: var(--site-header-offset); }
  .hero-visual, .hero-showcase, .showcase-media { min-width: 0; }
  .catalog-layout, .catalog-results, .cart-layout, .checkout-layout { min-width: 0; }
  .catalog-toolbar, .hero-actions { align-items: stretch; }
  .hero-actions .button, .checkout-submit { width: 100%; }
  .product-card-image, .category-product, .featured-product-card img {
    object-fit: cover;
  }
}

@media (max-width: 390px) {
  .site-header { max-width: calc(100vw - 16px); }
  .catalog-toolbar-actions { width: 100%; }
  .catalog-tool-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Targeted visual repairs after cross-device audit. */
.section { scroll-margin-top: calc(var(--site-header-offset, 112px) + 12px); }
.catalog-controls { position: relative; top: auto; }
.intro-grid--story h2 { font-size: clamp(2.15rem, 4vw, 3.2rem); line-height: 1.05; }
@media (min-width: 981px) {
  .intro-grid--story {
    grid-template-columns: minmax(280px, .72fr) minmax(0, 1.45fr);
    align-items: start;
    gap: clamp(34px, 5vw, 72px);
  }
  .intro-grid--story .section-heading { grid-column: auto; margin: 0; }
  .intro-grid--story .about-story { max-width: none; }
}

.about-story { box-sizing: border-box; width: 100%; }
.services-section--bottom { padding-bottom: 36px; }
.contact-section { padding-top: 36px; }

.catalog-sidebar-wrap,
.cart-summary-wrap { align-self: stretch; }
.catalog-sidebar { position: sticky; top: var(--catalog-sidebar-top); }
.cart-summary:not([hidden]) { position: sticky; top: calc(var(--site-header-offset, 112px) + 12px); }

.cart-layout:has(#cartEmpty:not([hidden])) { display: block; max-width: 720px; }
.cart-empty { padding: 32px 26px; }
.cart-empty h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); }

.footer-panel { grid-template-columns: minmax(280px, .9fr) minmax(0, 1.4fr); }
.footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.footer-grid .footer-col { min-width: 0; }

@media (max-width: 980px) {
  .intro-grid--story { gap: 24px; }
  .intro-grid--story .section-heading { margin-bottom: 0; }
  .about-story { padding: 24px 22px; }
  .catalog-sidebar { position: fixed; top: auto; }
  .cart-summary:not([hidden]) { position: static; }
  .cart-page .cart-layout { grid-template-areas: "main" "summary"; }
  .cart-layout .cart-main { grid-area: main; }
  .cart-layout .cart-summary-wrap { grid-area: summary; }
}

@media (max-width: 720px) {
  .services-section--bottom { padding-bottom: 24px; }
  .contact-section { padding-top: 24px; }
  .cart-empty { padding: 26px 18px; }
  .cart-empty .button { min-width: 0; width: 100%; }
  .footer-panel { display: block; padding: 0; }
  .footer-brand, .footer-col { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 0; }
  .footer-col { border-left: 0; border-top: 1px solid var(--line); }
  .cookie-banner-inner { flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; }
  .cookie-banner-text { font-size: .75rem; line-height: 1.35; }
  .cookie-banner-accept { width: auto; height: 44px; min-width: 92px; padding-inline: 12px; }
  .floating-cta { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 12px; overflow: visible; }
  .floating-cta strong { font-size: .92rem; }
  .floating-cta span { display: none; }
  .floating-cta .button { margin: 0; min-height: 42px; padding-inline: 14px; }
}

/* Keep the final footer and conversion controls identical across both brands. */
.conversion-cta-close {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  aspect-ratio: 1;
}

@media (max-width: 768px) {
  .footer-panel {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 22px;
    padding: 22px 18px;
  }

  .footer-brand,
  .footer-col {
    padding: 0;
  }

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

  .footer-col {
    border: 0;
  }

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

@media (max-width: 359px) {
  .footer-grid,
  .site-footer.footer--compact .footer-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* Strict shared production geometry: catalog, filters, footer and consent. */
.footer-brand .brand-mark img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.lead-form .consent-checkbox {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 14px;
}

.lead-form .consent-checkbox input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 2px 0 0;
  padding: 0;
}

.lead-form .consent-checkbox span {
  min-width: 0;
  text-align: left;
}

@media (max-width: 980px) {
  .catalog-hero {
    min-height: 0;
    margin: 0 0 8px;
    padding: 14px 0 6px;
  }

  .catalog-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 10vw, 2.65rem);
    line-height: 1;
  }

  .catalog-section {
    padding-top: 8px !important;
  }

  .catalog-controls {
    margin-top: 0;
  }

  .catalog-tool-btn.catalog-filter-toggle {
    position: relative;
  }

  .catalog-filter-count {
    position: absolute;
    top: -7px;
    right: -7px;
    z-index: 2;
  }

  .catalog-sidebar {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1500;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: 100vw !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%) !important;
    overflow: hidden;
  }

  .catalog-sidebar.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) !important;
  }

  #sidebarFilters {
    max-height: none !important;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .catalog-page .product-card-media {
    position: relative;
    height: 188px !important;
    padding: 0 !important;
    overflow: hidden;
  }

  .catalog-page .product-card-media .product-card-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    object-fit: cover !important;
    object-position: center;
  }

  .footer-nav {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .footer-nav a,
  .footer-contacts a,
  .footer-contacts span {
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .footer-bottom-copy {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: center;
  }

  .footer-bottom-copy p {
    margin: 0;
  }

  .product-detail {
    padding-top: 0 !important;
  }

  .product-gallery {
    height: clamp(280px, 82vw, 360px) !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: hidden;
  }

  .product-detail-media {
    position: absolute;
    inset: 0;
  }

  .product-gallery img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .product-gallery-badge {
    display: none !important;
  }
}
