/* Final, source-order-safe responsive rules for EVO PACK. */
.mobile-quote-menu { display: none; }
@media (max-width: 760px) {
  html, body { max-width: 100%; }
  img, svg, video { max-width: 100%; height: auto; }
  button, input, select, textarea { max-width: 100%; }
  input, select, textarea { font-size: 16px; }

  /* Home: overrides the editorial desktop declarations authored after its first media query. */
  body:has(.site-header) .site-header .nav { gap: 12px; min-height: 68px; height: auto; padding-block: 10px; }
  body:has(.site-header) .site-header .logo { width: clamp(132px, 42vw, 164px); max-width: 48%; }
  body:has(.site-header) .hero { min-height: 0; background-position: 60% center; }
  body:has(.site-header) .hero-inner { min-height: 0; padding-block: 80px 90px; display: block; }
  body:has(.site-header) .hero-copy { max-width: 100%; }
  body:has(.site-header) .hero h1 { font-size: clamp(35px, 9vw, 58px); line-height: 1.08; letter-spacing: -.055em; max-width: 100%; overflow-wrap: normal; }
  body:has(.site-header) .hero p { font-size: 15px; line-height: 1.7; max-width: 100%; }
  body:has(.site-header) .hero-kicker { font-size: 10px; line-height: 1.5; letter-spacing: .1em; }
  body:has(.site-header) .hero-footer { left: 23px; right: 23px; flex-wrap: wrap; gap: 10px; }
  body:has(.site-header) .section { padding-block: 64px; }
  body:has(.site-header) .section-top h2,
  body:has(.site-header) .manifesto-copy h2,
  body:has(.site-header) .signature h2,
  body:has(.site-header) .cta h2 { font-size: clamp(32px, 8vw, 44px); line-height: 1.12; letter-spacing: -.035em; }
  body:has(.site-header) .category-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
  body:has(.site-header) .category-card { min-height: 0; }
  body:has(.site-header) .category-image { height: 240px; }
  body:has(.site-header) .category-content { padding: 24px; }
  body:has(.site-header) .manifesto-inner,
  body:has(.site-header) .signature-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
  body:has(.site-header) .manifesto-image { height: 330px; }
  body:has(.site-header) .manifesto-stats { flex-wrap: wrap; gap: 22px; }
  body:has(.site-header) .actions { gap: 12px; }
  body:has(.site-header) .btn { min-width: 0; max-width: 100%; padding: 15px 18px; gap: 12px; }

  /* Catalogue and detail layouts. */
  body:has(.catalog) .hero h1 { font-size: clamp(35px, 9vw, 54px); line-height: 1.09; overflow-wrap: break-word; }
  body:has(.catalog) .hero-grid { padding-inline: 22px; }
  body:has(.catalog) .product-info h3 { font-size: 17px; min-height: 0; }
  body:has(.catalog) .specs { min-width: 0; }
  .ed-header { padding: 16px 20px; gap: 14px; }
  .ed-header .ed-logo img { width: min(165px, 44vw); }
  .ed-header .navlinks { display: flex; flex-wrap: wrap; width: 100%; gap: 10px 14px; min-width: 0; }
  .ed-header .navlinks a { font-size: 11px; }
  .ed-hero { min-height: 0; padding: 64px 20px; }
  .ed-hero h1 { font-size: clamp(35px, 8.5vw, 52px); line-height: 1.12; overflow-wrap: anywhere; }
  .ed-section { padding: 60px 20px; }
  .ed-section h2 { font-size: clamp(30px, 7.5vw, 43px); }
  .ed-grid { grid-template-columns: minmax(0, 1fr); }
  .ed-grid article { padding: 23px; min-height: 0; }

  /* Multi-product RFQ: keep the item, carton input and remove action inside the card. */
  body:has(#items) .wrap { padding-inline: 20px; }
  body:has(#items) .nav { gap: 12px; display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: space-between; }
  body:has(#items) .nav img { width: min(165px, 44vw); }
  body:has(#items) .mobile-quote-menu { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 7px 12px; color: #fff; border: 1px solid #7b838e; background: transparent; font-size: 13px; font-weight: 800; cursor: pointer; }
  body:has(#items) .links { display: none; width: 100%; flex: 0 0 100%; flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 0 16px; border-top: 1px solid #343b44; }
  body:has(#items) .links.mobile-open { display: flex; }
  body:has(#items) .links > * { display: block; flex: 0 0 auto; padding: 10px 0; }
  body:has(#items) .links .evo-lang { display: inline-flex; width: fit-content; }
  body:has(#items) .hero h1 { font-size: clamp(34px, 8.5vw, 50px); line-height: 1.12; letter-spacing: -.035em; overflow-wrap: anywhere; }
  body:has(#items) .layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding-block: 45px; }
  body:has(#items) .panel { min-width: 0; padding: 20px; }
  body:has(#items) .panel h2 { font-size: clamp(23px, 6vw, 29px); }
  body:has(#items) .item { grid-template-columns: minmax(0, 1fr) 62px 30px; gap: 8px; }
  body:has(#items) .item > div { min-width: 0; }
  body:has(#items) .item a, body:has(#items) .item small { overflow-wrap: anywhere; }
  body:has(#items) .item input { min-width: 0; padding: 8px 2px; }

  /* New category pages: deliberate single-column mobile reading order. */
  body:has(.related) header { gap: 12px; padding: 16px 20px; }
  body:has(.related) header img { width: 150px; }
  body:has(.related) nav { gap: 10px 14px; font-size: 12px; }
  body:has(.related) .hero { padding: 65px 20px; }
  body:has(.related) h1 { font-size: clamp(33px, 8.5vw, 48px); letter-spacing: -.03em; overflow-wrap: anywhere; }
  body:has(.related) .section { padding: 55px 20px; }
  body:has(.related) .grid { display: grid; grid-template-columns: minmax(0, 1fr); }
  body:has(.related) .related a { max-width: 100%; }
  body:has(.related) .tablewrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Additional content blocks and bilingual variants. */
  .evo-content { padding: 55px 20px; }
  .evo-content h2 { font-size: clamp(30px, 7.5vw, 43px); overflow-wrap: anywhere; }
  .evo-content-grid { grid-template-columns: minmax(0, 1fr); }
  .evo-seo-links { display: flex; flex-wrap: wrap; min-width: 0; }
  .evo-seo-links a { max-width: 100%; overflow-wrap: anywhere; }
  html[lang=ar] h1, html[lang=ar] h2 { letter-spacing: 0 !important; }
}
@media (max-width: 370px) {
  body:has(.site-header) .hero h1,
  body:has(.catalog) .hero h1,
  body:has(#items) .hero h1 { font-size: 34px; }
  body:has(.site-header) .hero-kicker { font-size: 9px; }
  body:has(#items) .item { grid-template-columns: minmax(0, 1fr) 54px 28px; }
  body:has(#items) .panel { padding: 16px; }
}
