/* Site-wide mobile — prevent horizontal page scroll */

html {
  overflow-x: clip;
  max-width: 100%;
}

body {
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
}

img,
video,
iframe,
embed,
svg,
canvas {
  max-width: 100%;
}

/* Grids and flex children must be allowed to shrink */
.hero-inner,
.hero-left,
.hero-right,
.intro-grid,
.product-grid,
.trust-grid,
.footer-top,
.catalog-section__inner,
.catalog-grid,
.catalog-card,
.product-purchase,
.product-purchase__buttons,
.cart-page__inner,
.cart-line,
.about-section__inner,
.about-premium-bar__inner,
.founder-royal,
.founder-royal__grid,
.team-grid,
.about-heritage__inner {
  min-width: 0;
}

@media (max-width: 768px) {
  .page-hero-spacer {
    height: 72px;
  }

  .nav-inner,
  nav.scrolled .nav-inner {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .nav-logo-name {
    font-size: 18px;
  }

  .nav-logo-tag {
    font-size: 9px;
  }

  .hero:not(.hero--video) .hero-inner {
    padding-left: 16px !important;
    padding-right: 16px !important;
    gap: 0;
    width: 100%;
  }

  .hero--video .hero-inner--video {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .hero-left {
    padding-right: 0;
    width: 100%;
  }

  .hero-headline {
    font-size: clamp(34px, 9vw, 48px);
    overflow-wrap: anywhere;
  }

  .hero-sub {
    font-size: 15px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary,
  .hero-actions .btn-cta {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 16px 20px;
    margin-top: 28px;
  }

  .stat-divider {
    display: none;
  }

  .stat {
    min-width: calc(50% - 12px);
    flex: 1 1 calc(50% - 12px);
  }

  .color-wheel-wrap {
    width: min(300px, 86vw) !important;
    height: min(300px, 86vw) !important;
    max-width: 100%;
  }

  .section {
    padding: 72px 16px !important;
    width: 100%;
  }

  .products-inner,
  .trust-inner,
  .palette-section {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .products-section,
  .trust-section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 16px;
    margin-bottom: 36px;
  }

  .section-header .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .palette-strip {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: auto !important;
    gap: 0;
  }

  .palette-block {
    min-height: 72px;
    flex: unset !important;
  }

  .palette-block:hover {
    flex: unset !important;
  }

  .palette-block-name {
    opacity: 1;
    font-size: 9px;
    white-space: normal;
    line-height: 1.2;
  }

  /* Inline grids from extracted section HTML */
  #colours [style*="grid-template-columns"],
  #contact [style*="grid-template-columns"],
  section[id] [style*="grid-template-columns:repeat(3"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #contact iframe,
  .cta-section iframe {
    width: 100% !important;
    max-width: 100%;
    min-height: 240px;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .cta-section {
    padding: 72px 16px !important;
  }

  .cta-section::before {
    width: min(420px, 100vw);
    height: min(420px, 100vw);
  }

  .cta-actions {
    width: 100%;
  }

  .cta-actions a,
  .cta-actions button {
    width: 100%;
    justify-content: center;
  }

  footer {
    padding: 48px 16px 24px !important;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .catalog-section {
    padding: 32px 12px 88px;
  }

  .catalog-section__inner {
    padding: 0 4px;
  }

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

  .catalog-header__title {
    font-size: clamp(30px, 8vw, 42px);
  }

  .product-modal {
    padding: 12px;
    align-items: flex-end;
  }

  .product-modal__panel {
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
  }

  .cart-page {
    padding: 32px 12px 88px;
  }

  .cart-page__inner {
    padding: 0 4px;
  }

  .cart-line__title {
    font-size: 18px;
    overflow-wrap: anywhere;
  }

  .about-company,
  .about-leadership,
  .about-heritage {
    padding-left: 0;
    padding-right: 0;
  }

  .about-section__inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .about-premium-bar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .about-premium-bar__value {
    font-size: clamp(26px, 7vw, 36px);
  }

  .founder-royal {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }

  .founder-royal__grid {
    padding: 48px 20px 28px;
  }

  .founder-royal__name {
    font-size: clamp(28px, 7vw, 40px);
  }

  .cart-float-btn {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 400px) {
  .palette-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    min-width: 100%;
    flex: 1 1 100%;
  }

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