/*
Theme Name:     Kadence Child – My Safety
Theme URI:      https://mysafety.local/
Description:    Custom child theme for י.מ. בטיחות (My Safety), Hebrew/RTL B2B safety equipment catalog. Brand: orange + charcoal + off-white, AA-accessible.
Author:         Built by friend of the family
Template:       kadence
Version:        1.0.0
Text Domain:    kadence-child
*/

/* ============================================================
   Brand color tokens
   Source of truth: intake/design-direction.md
   ============================================================ */
:root {
  --ms-charcoal: #1F2A37;
  --ms-gray: #4A5563;
  --ms-orange: #F26B21;        /* Brand Orange, matches logo. Buttons + accents. */
  --ms-orange-text: #C2410C;   /* Deep Orange, for orange text/links (passes AA at all sizes). */
  --ms-orange-hover: #A03208;  /* Burnt Orange, hover/focus. */
  --ms-off-white: #F7F7F5;     /* Page background (not pure white). */
  --ms-mist: #E5E5E2;          /* Borders, dividers. */
  --ms-body: #2B2B2B;
  --ms-success: #2E7D32;
  --ms-error: #C62828;
  --ms-warning: #F9A825;
}

/* ============================================================
   Page background, soft off-white per design direction
   ============================================================ */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
body {
  background-color: var(--ms-off-white);
  color: var(--ms-body);
  position: relative;
}

/* ============================================================
   Unbox the content wrapper on our custom-built pages.
   Kadence wraps page content in .content-container.site-container with a
   constrained max-width, and gives the <article> a white .content-bg card
   (rounded corners, shadow). For pages where we own the design fully (home,
   about, contact, legal), we want sections to span edge-to-edge with no
   visible card boundary. List body classes for each page that uses .ms-hero
   or .ms-page-hero. (Kadence's Layout Settings > "Unboxed" achieves the same
   per-page; we do it via CSS so it survives a settings reset.)
   ============================================================ */
body.home .content-container.site-container,
body.page-id-4 .content-container.site-container,   /* home */
body.page-id-6 .content-container.site-container,   /* about */
body.page-id-7 .content-container.site-container,   /* contact */
body.page-id-29 .content-container.site-container,  /* privacy */
body.page-id-30 .content-container.site-container,  /* terms */
body.page-id-31 .content-container.site-container,  /* accessibility */
body.post-type-archive-product .content-container.site-container,
body.tax-product_category .content-container.site-container,
body.single-product .content-container.site-container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

body.home .entry.content-bg,
body.page-id-4 .entry.content-bg,
body.page-id-6 .entry.content-bg,
body.page-id-7 .entry.content-bg,
body.page-id-29 .entry.content-bg,
body.page-id-30 .entry.content-bg,
body.page-id-31 .entry.content-bg,
body.post-type-archive-product .entry.content-bg,
body.tax-product_category .entry.content-bg,
body.single-product .entry.content-bg {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

body.home .entry-content-wrap,
body.page-id-4 .entry-content-wrap,
body.page-id-6 .entry-content-wrap,
body.page-id-7 .entry-content-wrap,
body.page-id-29 .entry-content-wrap,
body.page-id-30 .entry-content-wrap,
body.page-id-31 .entry-content-wrap,
body.post-type-archive-product .entry-content-wrap,
body.tax-product_category .entry-content-wrap,
body.single-product .entry-content-wrap,
body.home .entry-content,
body.page-id-4 .entry-content,
body.page-id-6 .entry-content,
body.page-id-7 .entry-content,
body.page-id-29 .entry-content,
body.page-id-30 .entry-content,
body.page-id-31 .entry-content,
body.post-type-archive-product .entry-content,
body.tax-product_category .entry-content,
body.single-product .entry-content {
  padding: 0;
  margin: 0;
  max-width: none;
}

/* Hide the duplicate page-title hero that Kadence renders above our custom content */
body.home .entry-hero,
body.page-id-4 .entry-hero,
body.page-id-6 .entry-hero,
body.page-id-7 .entry-hero,
body.page-id-29 .entry-hero,
body.page-id-30 .entry-hero,
body.page-id-31 .entry-hero {
  display: none;
}

/* ============================================================
   AA-compliant focus indicator (overrides Kadence's subtle default)
   ============================================================ */
*:focus-visible {
  outline: 3px solid var(--ms-orange);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================================
   Brand button styles (overrides Kadence Blocks button defaults)
   ============================================================ */
.wp-block-button.is-style-fill .wp-block-button__link,
.kt-button.kb-btn-style-fill,
.button.is-primary,
button[type="submit"].btn-primary {
  background-color: var(--ms-orange);
  border-color: var(--ms-orange);
  color: #ffffff;
  font-weight: 700;        /* must be bold for AA Large at 3:1 contrast */
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 6px;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.wp-block-button.is-style-fill .wp-block-button__link:hover,
.kt-button.kb-btn-style-fill:hover,
.button.is-primary:hover,
button[type="submit"].btn-primary:hover {
  background-color: var(--ms-orange-hover);
  border-color: var(--ms-orange-hover);
}

/* Secondary (outline) button */
.wp-block-button.is-style-outline .wp-block-button__link,
.kt-button.kb-btn-style-outline {
  background-color: transparent;
  border: 1.5px solid var(--ms-charcoal);
  color: var(--ms-charcoal);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 6px;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.kt-button.kb-btn-style-outline:hover {
  background-color: var(--ms-charcoal);
  color: #ffffff;
}

/* ============================================================
   Link color (uses Deep Orange, AA-safe at all sizes)
   ============================================================ */
a {
  color: var(--ms-orange-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover {
  color: var(--ms-orange-hover);
}

/* ============================================================
   Hebrew typography, line-height +0.1 vs Latin equivalents
   No italic. No all-caps.
   ============================================================ */
body, p, li, td, th, label, input, textarea, select, button {
  font-family: 'Heebo', 'Inter', 'Arial Hebrew', sans-serif;
  line-height: 1.65;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Heebo', 'Inter', 'Arial Hebrew', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}
h1 { font-weight: 800; font-size: 44px; line-height: 1.15; }
h2 { font-size: 34px; line-height: 1.2; }
h3 { font-size: 26px; line-height: 1.25; }
h4 { font-size: 20px; font-weight: 600; line-height: 1.3; }
h5 { font-size: 17px; font-weight: 600; line-height: 1.4; }
h6 { font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: 0.5px; }

@media (max-width: 768px) {
  h1 { font-size: 30px; }
  h2 { font-size: 26px; }
  h3 { font-size: 22px; }
  h4 { font-size: 18px; }
  body, p, li { font-size: 16px; }
}

/* ============================================================
   Hebrew italic suppression, design-direction rule
   ============================================================ */
em, i, .italic {
  font-style: normal;
  font-weight: 600;        /* substitute weight for emphasis in Hebrew */
}

/* ============================================================
   Cards / containers, soft borders and shadows
   ============================================================ */
.kt-blocks-card,
.product-card,
.kadence-card {
  background-color: #ffffff;
  border: 1px solid var(--ms-mist);
  border-radius: 8px;
  padding: 24px;
  transition: box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease;
}
.product-card:hover,
.kt-blocks-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  border-color: var(--ms-gray);
}

/* ============================================================
   HERO SECTION, homepage signature
   Combines: dark image background + gradient overlay (right-anchored
   text block) + 3 orange "echo" stripes on the start edge + thin
   top accent line. Mirrors the visual language of the logo.
   ============================================================ */
.ms-hero {
  position: relative;
  width: 100%;
  min-height: 520px;
  background-color: var(--ms-charcoal);
  overflow: hidden;
  display: flex;
  align-items: center;
  isolation: isolate;
}

/* Top accent stripe, full-width thin orange band */
.ms-hero__top-line {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  height: 4px;
  background-color: var(--ms-orange);
  z-index: 3;
}

/* Background image layer */
.ms-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Gradient overlay, anchors readable area on the start (right) side in RTL */
.ms-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to left,
    rgba(31, 42, 55, 0.88) 0%,
    rgba(31, 42, 55, 0.55) 55%,
    rgba(31, 42, 55, 0.05) 100%
  );
}

/* Stripe signature, 3 horizontal orange bars, descending length, RTL start edge */
.ms-hero__stripes {
  position: absolute;
  top: 50%;
  inset-inline-start: 0;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: none;
}
.ms-hero__stripes span {
  display: block;
  height: 7px;
  background-color: var(--ms-orange);
}
.ms-hero__stripes span:nth-child(1) { width: 140px; }
.ms-hero__stripes span:nth-child(2) { width: 90px; }
.ms-hero__stripes span:nth-child(3) { width: 45px; }

/* Inner content container */
.ms-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 80px 48px;
  display: flex;
  justify-content: flex-start;
}

/* Content block, right-anchored in RTL */
.ms-hero__content {
  max-width: 620px;
  width: 50%;
}

.ms-hero__title {
  color: #ffffff;
  font-family: 'Heebo', 'Inter', 'Arial Hebrew', sans-serif;
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 20px;
  letter-spacing: -0.5px;
}
.ms-hero__title .ms-hero__title-em {
  color: var(--ms-orange);
}

.ms-hero__subtitle {
  color: rgba(255, 255, 255, 0.95);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  margin: 0 0 32px;
  max-width: 540px;
}
.ms-hero__subtitle strong {
  font-weight: 700;
  color: #ffffff;
}

.ms-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Promoted to global utility classes so they work anywhere on the site,
   not just inside .ms-hero__cta. Naming is historical. */
.ms-hero__btn-primary {
  display: inline-block;
  background-color: var(--ms-orange);
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 36px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 150ms ease, transform 150ms ease;
  border: 2px solid var(--ms-orange);
}
.ms-hero__btn-primary:hover,
.ms-hero__btn-primary:focus-visible {
  background-color: var(--ms-orange-hover);
  border-color: var(--ms-orange-hover);
  color: #ffffff;
}

.ms-hero__btn-ghost {
  display: inline-block;
  color: #ffffff;
  font-weight: 600;
  font-size: 16px;
  padding: 16px 24px;
  text-decoration: none;
  transition: color 150ms ease;
}
.ms-hero__btn-ghost::after {
  content: "←";
  display: inline-block;
  margin-inline-start: 8px;
  transition: transform 200ms ease;
}
.ms-hero__btn-ghost:hover,
.ms-hero__btn-ghost:focus-visible {
  color: var(--ms-orange);
}
.ms-hero__btn-ghost:hover::after {
  transform: translateX(-4px);
}

/* Tablet */
@media (max-width: 1024px) {
  .ms-hero { min-height: 460px; }
  .ms-hero__title { font-size: 44px; }
  .ms-hero__content { width: 65%; }
}

/* Mobile */
@media (max-width: 768px) {
  .ms-hero { min-height: 380px; }
  .ms-hero__inner { padding: 48px 20px; }
  .ms-hero__bg::after {
    background: linear-gradient(
      to top,
      rgba(31, 42, 55, 0.9) 0%,
      rgba(31, 42, 55, 0.6) 60%,
      rgba(31, 42, 55, 0.25) 100%
    );
  }
  .ms-hero__content { width: 100%; max-width: none; }
  .ms-hero__title { font-size: 32px; line-height: 1.15; }
  .ms-hero__subtitle { font-size: 16px; }
  .ms-hero__cta { gap: 4px; flex-direction: column; align-items: stretch; width: 100%; }
  .ms-hero__cta .ms-hero__btn-primary {
    text-align: center;
    width: 100%;
  }
  .ms-hero__cta .ms-hero__btn-ghost {
    text-align: center;
    width: 100%;
  }
  /* Hide signature stripes on small screens, too cramped */
  .ms-hero__stripes { display: none; }
}

/* ============================================================
   LEGAL PAGES, typography-driven content
   ============================================================ */
.ms-legal__body {
  max-width: 800px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ms-charcoal);
}
.ms-legal__body h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--ms-charcoal);
  margin: 40px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ms-orange);
  display: inline-block;
}
.ms-legal__body p { margin: 0 0 16px; }
.ms-legal__body ul { margin: 0 0 16px; padding-inline-start: 24px; }
.ms-legal__body ul li { margin-bottom: 8px; }
.ms-legal__body a { color: var(--ms-orange-text); }
.ms-legal__body a:hover { color: var(--ms-orange-hover); }

/* ============================================================
   PAGE HERO, subpage banner (About, Contact, etc.)
   ============================================================ */
.ms-page-hero {
  background: linear-gradient(135deg, var(--ms-charcoal) 0%, #2d3a4a 100%);
  color: #ffffff;
  padding: 80px 0 96px;
  position: relative;
  overflow: hidden;
}
.ms-page-hero__top-line {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  height: 4px;
  background: var(--ms-orange);
}
.ms-page-hero__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
.ms-page-hero__inner .ms-eyebrow {
  color: var(--ms-orange);
  margin-bottom: 12px;
}
.ms-page-hero__title {
  font-size: 44px;
  font-weight: 800;
  margin: 4px 0 16px;
  color: #ffffff;
  line-height: 1.2;
}
.ms-page-hero__lead {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0;
}
@media (max-width: 768px) {
  .ms-page-hero { padding: 56px 0 64px; }
  .ms-page-hero__inner { padding: 0 20px; }
  .ms-page-hero__title { font-size: 30px; }
  .ms-page-hero__lead { font-size: 16px; }
}

/* ============================================================
   ABOUT PAGE, 2-column layout
   ============================================================ */
.ms-about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.ms-about__col h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--ms-charcoal);
  margin: 0 0 16px;
  position: relative;
  padding-bottom: 12px;
}
.ms-about__col h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 48px;
  height: 3px;
  background: var(--ms-orange);
}
.ms-about__col p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ms-charcoal);
  margin: 0 0 16px;
}
@media (max-width: 768px) {
  .ms-about__inner { grid-template-columns: 1fr; gap: 40px; }
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.ms-contact__inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) {
  .ms-contact__inner { grid-template-columns: 1fr; gap: 40px; }
}

.ms-contact__info h2,
.ms-contact__form-wrap h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--ms-charcoal);
  margin: 0 0 24px;
}

.ms-contact__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid var(--ms-mist);
  border-radius: 10px;
  margin-bottom: 12px;
  text-decoration: none;
  color: var(--ms-charcoal);
  transition: border-color 150ms ease, transform 150ms ease;
}
a.ms-contact__row:hover {
  border-color: var(--ms-orange);
  transform: translateX(-3px);
}
.ms-contact__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(242, 107, 33, 0.1);
  color: var(--ms-orange);
  flex-shrink: 0;
}
.ms-contact__row-label {
  font-size: 13px;
  color: var(--ms-gray);
  font-weight: 500;
  margin-bottom: 2px;
}
.ms-contact__row-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--ms-charcoal);
  direction: ltr;
}

.ms-contact__form-wrap {
  background: #ffffff;
  border: 1px solid var(--ms-mist);
  border-radius: 12px;
  padding: 32px;
}
.ms-contact__form-lead {
  color: var(--ms-gray);
  font-size: 15px;
  margin: -16px 0 24px;
}

/* ============================================================
   LEAD FORM (custom HTML form, admin-ajax handler)
   ============================================================ */
.ms-lead-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ms-lead-form__honey {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
  overflow: hidden;
  opacity: 0;
}
.ms-lead-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .ms-lead-form__row { grid-template-columns: 1fr; }
}
.ms-lead-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ms-lead-form__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ms-charcoal);
}
.ms-lead-form__req {
  color: var(--ms-orange-text);
  margin-inline-start: 2px;
}
.ms-lead-form input[type="text"],
.ms-lead-form input[type="email"],
.ms-lead-form input[type="tel"],
.ms-lead-form select,
.ms-lead-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--ms-mist);
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ms-charcoal);
  background: #ffffff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.ms-lead-form input:hover,
.ms-lead-form select:hover,
.ms-lead-form textarea:hover { border-color: var(--ms-gray); }
.ms-lead-form input:focus,
.ms-lead-form select:focus,
.ms-lead-form textarea:focus {
  outline: none;
  border-color: var(--ms-orange);
  box-shadow: 0 0 0 3px rgba(242, 107, 33, 0.18);
}
.ms-lead-form textarea { min-height: 110px; resize: vertical; }
.ms-lead-form select { cursor: pointer; }

.ms-lead-form__submit-row {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ms-lead-form__submit {
  padding: 16px 32px;
  font-size: 16px;
  position: relative;
  cursor: pointer;
  border: 0;
  font-family: inherit;
}
.ms-lead-form__submit.is-loading .ms-lead-form__submit-text { opacity: 0; }
.ms-lead-form__submit-spinner {
  display: none;
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: ms-spin 700ms linear infinite;
}
.ms-lead-form__submit.is-loading .ms-lead-form__submit-spinner { display: block; }
@keyframes ms-spin { to { transform: rotate(360deg); } }

.ms-lead-form__privacy {
  font-size: 12px;
  color: var(--ms-gray);
  margin: 0;
  text-align: center;
}
.ms-lead-form__privacy a { color: var(--ms-orange-text); }

.ms-lead-form__feedback {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  display: none;
}
.ms-lead-form__feedback.is-success {
  display: block;
  background: rgba(46, 125, 50, 0.1);
  color: var(--ms-success);
  border: 1px solid rgba(46, 125, 50, 0.3);
}
.ms-lead-form__feedback.is-error {
  display: block;
  background: rgba(198, 40, 40, 0.1);
  color: var(--ms-error);
  border: 1px solid rgba(198, 40, 40, 0.3);
}

/* ============================================================
   LEAD FORM SUCCESS CARD
   Replaces the form on successful submit. Animated checkmark + a
   "what's next" list keep the visitor engaged and reassured rather
   than a flat one-line confirmation.
   ============================================================ */
.ms-lead-success {
  background: #ffffff;
  border: 1px solid var(--ms-mist);
  border-radius: 12px;
  padding: 40px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 350ms ease, transform 350ms ease;
}
.ms-lead-success.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.ms-lead-success::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  height: 4px;
  background: var(--ms-orange);
}
.ms-lead-success__inner {
  max-width: 520px;
  margin: 0 auto;
}

/* Animated checkmark */
.ms-lead-success__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(46, 125, 50, 0.1);
  color: var(--ms-success);
  margin-bottom: 20px;
}
.ms-lead-success__check svg {
  display: block;
}
.ms-lead-success__check-circle {
  stroke-dasharray: 158;
  stroke-dashoffset: 158;
  animation: ms-success-circle 600ms ease-out 100ms forwards;
}
.ms-lead-success__check-mark {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: ms-success-mark 350ms ease-out 600ms forwards;
}
@keyframes ms-success-circle {
  to { stroke-dashoffset: 0; }
}
@keyframes ms-success-mark {
  to { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ms-lead-success__check-circle,
  .ms-lead-success__check-mark {
    animation: none;
    stroke-dashoffset: 0;
  }
}

.ms-lead-success__title {
  font-size: 28px;
  font-weight: 800;
  color: var(--ms-charcoal);
  margin: 0 0 8px;
  line-height: 1.25;
}
.ms-lead-success__name {
  /* Filled by JS with the contact name. Stays empty if no name. */
  color: var(--ms-orange-text);
}
.ms-lead-success__subtitle {
  font-size: 17px;
  color: var(--ms-gray);
  margin: 0 0 32px;
  line-height: 1.55;
}

/* What's next */
.ms-lead-success__next {
  background: var(--ms-off-white);
  border: 1px solid var(--ms-mist);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 28px;
  text-align: start;
}
.ms-lead-success__next-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ms-orange-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}
.ms-lead-success__bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ms-lead-success__bullets li {
  position: relative;
  padding-inline-start: 28px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ms-charcoal);
}
.ms-lead-success__bullets li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ms-orange);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 7l3 3 5-6' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
}

/* Bottom CTAs */
.ms-lead-success__meanwhile {
  font-size: 14px;
  color: var(--ms-gray);
  margin: 0 0 16px;
}
.ms-lead-success__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.ms-lead-success__home-link {
  font-size: 14px;
  color: var(--ms-gray);
  text-decoration: underline;
  font-weight: 500;
}
.ms-lead-success__home-link:hover {
  color: var(--ms-orange-text);
}

@media (max-width: 600px) {
  .ms-lead-success { padding: 32px 20px; }
  .ms-lead-success__title { font-size: 24px; }
  .ms-lead-success__next { padding: 20px; }
  .ms-lead-success__bullets li { font-size: 14px; }
}

/* ============================================================
   MAIN content wrapper
   ============================================================ */
.ms-main {
  min-height: 50vh;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.ms-breadcrumb {
  font-size: 14px;
  color: var(--ms-gray);
  margin: 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.ms-breadcrumb a {
  color: var(--ms-gray);
  text-decoration: none;
  transition: color 150ms ease;
}
.ms-breadcrumb a:hover { color: var(--ms-orange-text); }
.ms-breadcrumb span[aria-hidden] { color: var(--ms-mist); }
.ms-breadcrumb > span:last-child { color: var(--ms-charcoal); font-weight: 600; }

/* ============================================================
   PRODUCT GRID + CARD
   ============================================================ */
.ms-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}
@media (max-width: 1024px) { .ms-products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ms-products-grid { grid-template-columns: 1fr; } }

.ms-product-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--ms-mist);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.ms-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--ms-gray);
}

.ms-product-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--ms-off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ms-product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}
.ms-product-card__no-img {
  color: var(--ms-mist);
}
.ms-product-card__badge {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  background: var(--ms-orange);
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 1;
}

.ms-product-card__body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ms-product-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ms-charcoal);
  margin: 0 0 8px;
  line-height: 1.3;
}
.ms-product-card__desc {
  font-size: 14px;
  color: var(--ms-gray);
  line-height: 1.55;
  margin: 0 0 16px;
  flex: 1;
}
.ms-product-card__cta {
  font-size: 14px;
  font-weight: 700;
  color: var(--ms-orange-text);
  transition: color 150ms ease;
}
.ms-product-card:hover .ms-product-card__cta {
  color: var(--ms-orange-hover);
}

/* ============================================================
   ARCHIVE PAGES (categories + products)
   ============================================================ */
.ms-archive__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px 80px;
}
.ms-archive__header {
  text-align: start;
  margin: 24px 0 40px;
}
.ms-archive__title {
  font-size: 40px;
  font-weight: 800;
  color: var(--ms-charcoal);
  margin: 8px 0 12px;
}
.ms-archive__desc {
  font-size: 17px;
  color: var(--ms-gray);
  margin: 0;
  max-width: 720px;
  line-height: 1.6;
}
.ms-archive__cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.ms-cat-pill {
  display: inline-block;
  padding: 8px 20px;
  background: #ffffff;
  border: 1.5px solid var(--ms-mist);
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ms-charcoal);
  transition: all 150ms ease;
}
.ms-cat-pill:hover {
  border-color: var(--ms-orange);
  color: var(--ms-orange-text);
}
.ms-cat-pill.is-active {
  background: var(--ms-charcoal);
  border-color: var(--ms-charcoal);
  color: #ffffff;
}
.ms-empty {
  text-align: center;
  padding: 64px 20px;
  background: #ffffff;
  border: 1px solid var(--ms-mist);
  border-radius: 12px;
  margin: 32px 0;
}
.ms-empty p { color: var(--ms-gray); font-size: 17px; margin: 8px 0; }
.ms-empty .ms-hero__btn-primary { margin-top: 24px; }
.ms-pagination { margin-top: 40px; text-align: center; }
.ms-pagination .nav-links { display: inline-flex; gap: 8px; }
.ms-pagination .page-numbers {
  display: inline-flex;
  min-width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid var(--ms-mist);
  border-radius: 6px;
  text-decoration: none;
  color: var(--ms-charcoal);
  font-weight: 600;
}
.ms-pagination .page-numbers:hover,
.ms-pagination .page-numbers.current {
  background: var(--ms-orange);
  border-color: var(--ms-orange);
  color: #ffffff;
}

/* ============================================================
   SINGLE PRODUCT
   ============================================================ */
.ms-product-detail__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px 80px;
}
.ms-product-detail__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin: 32px 0 56px;
  align-items: start;
}
@media (max-width: 900px) {
  .ms-product-detail__grid { grid-template-columns: 1fr; gap: 32px; }
}

.ms-product-detail__gallery {
  position: sticky;
  top: 100px;
}
@media (max-width: 900px) { .ms-product-detail__gallery { position: static; } }
.ms-product-detail__main-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--ms-mist);
  border-radius: 12px;
  padding: 32px;
  display: block;
}
.ms-product-detail__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.ms-product-detail__thumbs img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--ms-mist);
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  transition: border-color 150ms ease;
}
.ms-product-detail__thumbs img:hover { border-color: var(--ms-orange); }
.ms-product-detail__no-img {
  background: #ffffff;
  border: 1px solid var(--ms-mist);
  border-radius: 12px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ms-mist);
}

.ms-product-detail__title {
  font-size: 36px;
  font-weight: 800;
  color: var(--ms-charcoal);
  line-height: 1.2;
  margin: 8px 0 16px;
}
.ms-product-detail__badge {
  display: inline-block;
  background: var(--ms-orange);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.ms-product-detail__sku {
  color: var(--ms-gray);
  font-size: 15px;
  margin: 0 0 16px;
}
.ms-product-detail__short {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ms-charcoal);
  margin: 0 0 28px;
}
.ms-product-detail__cta-card {
  background: var(--ms-off-white);
  border: 1px solid var(--ms-mist);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}
.ms-product-detail__cta-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ms-charcoal);
  margin: 0 0 4px;
}
.ms-product-detail__cta-text {
  color: var(--ms-gray);
  font-size: 14px;
  margin: 0 0 16px;
}
.ms-product-detail__cta-card .ms-hero__btn-primary {
  display: block;
  text-align: center;
  width: 100%;
  margin-bottom: 12px;
}
.ms-product-detail__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ms-charcoal);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 0;
}
.ms-product-detail__phone svg { color: var(--ms-orange); }
.ms-product-detail__phone:hover { color: var(--ms-orange-text); }
.ms-product-detail__datasheet {
  display: block;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ms-mist);
  color: var(--ms-orange-text);
  font-weight: 600;
  text-decoration: underline;
}

.ms-product-detail__section {
  margin: 56px 0;
}
.ms-product-detail__section h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--ms-charcoal);
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ms-orange);
  display: inline-block;
}
.ms-product-detail__long-desc {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ms-charcoal);
  max-width: 820px;
}
.ms-product-detail__long-desc p { margin: 0 0 16px; }

.ms-product-detail__specs {
  width: 100%;
  max-width: 820px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--ms-mist);
  border-radius: 8px;
  overflow: hidden;
}
.ms-product-detail__specs th,
.ms-product-detail__specs td {
  padding: 14px 20px;
  text-align: start;
  font-size: 15px;
  border-bottom: 1px solid var(--ms-mist);
}
.ms-product-detail__specs tr:last-child th,
.ms-product-detail__specs tr:last-child td { border-bottom: 0; }
.ms-product-detail__specs th {
  background: var(--ms-off-white);
  font-weight: 600;
  color: var(--ms-charcoal);
  width: 40%;
  border-inline-end: 1px solid var(--ms-mist);
}
.ms-product-detail__specs td { color: var(--ms-charcoal); }

/* ============================================================
   GENERIC SECTION + EYEBROW (used across many pages)
   ============================================================ */
.ms-section {
  padding: 96px 0;
}
.ms-section__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
.ms-section__header {
  text-align: center;
  margin-bottom: 56px;
  max-width: 720px;
  margin-inline-start: auto;
  margin-inline-end: auto;
}
.ms-section__title {
  font-size: 40px;
  font-weight: 800;
  margin: 8px 0 16px;
  color: var(--ms-charcoal);
  line-height: 1.2;
}
.ms-section__lead {
  font-size: 18px;
  color: var(--ms-gray);
  line-height: 1.6;
  margin: 0;
}
.ms-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ms-orange-text);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
@media (max-width: 768px) {
  .ms-section { padding: 64px 0; }
  .ms-section__inner { padding: 0 20px; }
  .ms-section__title { font-size: 28px; }
  .ms-section__header { margin-bottom: 40px; }
}

/* ============================================================
   CATEGORIES GRID, 4 tiles
   ============================================================ */
.ms-categories__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.ms-category-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid var(--ms-mist);
  border-radius: 12px;
  padding: 32px 28px;
  text-decoration: none;
  color: inherit;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  position: relative;
  overflow: hidden;
}
.ms-category-card::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 4px;
  height: 0;
  background: var(--ms-orange);
  transition: height 250ms ease;
}
.ms-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--ms-gray);
}
.ms-category-card:hover::before {
  height: 100%;
}
.ms-category-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(242, 107, 33, 0.1);
  color: var(--ms-orange);
  border-radius: 12px;
  margin-bottom: 20px;
}
.ms-category-card__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ms-charcoal);
  margin: 0 0 12px;
}
.ms-category-card__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ms-gray);
  margin: 0 0 20px;
  flex: 1;
}
.ms-category-card__cta {
  font-size: 14px;
  font-weight: 700;
  color: var(--ms-orange-text);
  transition: color 150ms ease;
}
.ms-category-card:hover .ms-category-card__cta {
  color: var(--ms-orange-hover);
}
@media (max-width: 1024px) {
  .ms-categories__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .ms-categories__grid { grid-template-columns: 1fr; gap: 16px; }
  .ms-category-card { padding: 24px 20px; }
}

/* ============================================================
   WHY US, 3-column differentiation
   ============================================================ */
.ms-why {
  background: #ffffff;
}
.ms-why__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.ms-why__item {
  text-align: center;
}
.ms-why__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: var(--ms-charcoal);
  color: var(--ms-orange);
  border-radius: 50%;
  margin-bottom: 20px;
}
.ms-why__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ms-charcoal);
  margin: 0 0 12px;
}
.ms-why__desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ms-gray);
  margin: 0;
}
@media (max-width: 768px) {
  .ms-why__grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ============================================================
   CTA STRIP, orange-tinted band before footer
   ============================================================ */
.ms-cta-strip {
  background: linear-gradient(135deg, var(--ms-charcoal) 0%, #2d3a4a 100%);
  position: relative;
  overflow: hidden;
}
.ms-cta-strip::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  height: 4px;
  background: var(--ms-orange);
}
.ms-cta-strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.ms-cta-strip__text { flex: 1; min-width: 280px; }
.ms-cta-strip__title {
  color: #ffffff;
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
  line-height: 1.25;
}
.ms-cta-strip__lead {
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  margin: 0;
}
.ms-cta-strip__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
/* Phone with 3-stripe signature underneath (echoes logo + hero motif).
   The stripes are descending in length, matching our brand visual identity.
   On hover the stripes brighten and the text shifts to orange. */
.ms-cta-strip__phone {
  position: relative;
  display: inline-block;
  color: #ffffff;
  font-weight: 800;
  font-size: 22px;
  text-decoration: none;
  padding: 6px 4px 22px;
  letter-spacing: 0.5px;
  transition: color 200ms ease, transform 200ms ease;
}
.ms-cta-strip__phone::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  height: 16px;
  background:
    linear-gradient(var(--ms-orange), var(--ms-orange)) 0 0 / 100% 3px no-repeat,
    linear-gradient(var(--ms-orange), var(--ms-orange)) 0 6px / 65% 3px no-repeat,
    linear-gradient(var(--ms-orange), var(--ms-orange)) 0 12px / 30% 3px no-repeat;
  transition: opacity 200ms ease, transform 200ms ease;
  opacity: 0.85;
}
.ms-cta-strip__phone:hover,
.ms-cta-strip__phone:focus-visible {
  color: var(--ms-orange);
  transform: translateY(-1px);
}
.ms-cta-strip__phone:hover::after,
.ms-cta-strip__phone:focus-visible::after {
  opacity: 1;
  transform: translateY(2px);
}
@media (max-width: 768px) {
  .ms-cta-strip__title { font-size: 22px; }
  .ms-cta-strip__inner { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   HEADER (custom, replaces Kadence parent)
   ============================================================ */
.ms-skip-link {
  position: absolute;
  top: -40px;
  inset-inline-start: 0;
  background: var(--ms-charcoal);
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
  text-decoration: none;
}
.ms-skip-link:focus {
  top: 0;
  outline: 3px solid var(--ms-orange);
}

/* Header scales CONTINUOUSLY with scroll position - no snap states, no
   transitions, no flicker. JS sets --shrink to a value 0..1 mapped from
   scrollY across a 0..200px range. Every property below interpolates
   linearly using calc() and the shrink ratio. The visual result: as you
   scroll down, the header smoothly compacts in real time; as you scroll
   back up, it grows back at the same rate. */
.ms-header {
  --shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: color-mix(in srgb, var(--ms-off-white), #ffffff calc(var(--shrink) * 100%));
  border-bottom: 1px solid rgba(229, 229, 226, var(--shrink));
  box-shadow: 0 2px 8px rgba(0, 0, 0, calc(0.06 * var(--shrink)));
}

.ms-header__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  /* 150px when --shrink=0, drops to 64px when --shrink=1 */
  height: calc(150px - 86px * var(--shrink));
  display: flex;
  align-items: center;
  gap: 24px;
}

.ms-header__logo {
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
}
.ms-header__logo img {
  /* 120px when --shrink=0, drops to 44px when --shrink=1 */
  max-height: calc(120px - 76px * var(--shrink));
  width: auto;
  display: block;
}
.ms-header__logo-text {
  font-weight: 800;
  font-size: 20px;
  color: var(--ms-charcoal);
}

.ms-header__nav {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  margin-inline-start: 24px;
}
.ms-header__nav .ms-menu,
.ms-header__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  align-items: center;
}
.ms-header__nav .ms-menu a,
.ms-header__nav ul a {
  display: inline-block;
  padding: 12px 16px;
  color: var(--ms-charcoal);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border-radius: 4px;
  transition: color 150ms ease, background-color 150ms ease;
}
.ms-header__nav .ms-menu a:hover,
.ms-header__nav ul a:hover,
.ms-header__nav .current-menu-item > a,
.ms-header__nav .current_page_item > a {
  color: var(--ms-orange-text);
  background-color: rgba(242, 107, 33, 0.06);
}

.ms-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Language switcher (Polylang) — pill button with dropdown */
.ms-header__lang {
  position: relative;
}
.ms-header__lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid var(--ms-mist);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ms-charcoal);
  transition: border-color 150ms ease, color 150ms ease;
}
.ms-header__lang-toggle:hover,
.ms-header__lang-toggle[aria-expanded="true"] {
  border-color: var(--ms-orange);
  color: var(--ms-orange-text);
}
.ms-header__lang-toggle svg { color: var(--ms-orange); }
.ms-header__lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--ms-mist);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  min-width: 140px;
  display: none;
  z-index: 200;
}
.ms-header__lang[data-open="true"] .ms-header__lang-menu { display: block; }
.ms-header__lang-menu a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--ms-charcoal);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  transition: background 120ms ease;
}
.ms-header__lang-menu a:hover { background: rgba(242, 107, 33, 0.08); color: var(--ms-orange-text); }
.ms-header__lang-menu a.is-current { background: var(--ms-charcoal); color: #ffffff; }

.ms-header__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ms-charcoal);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 6px;
  transition: color 150ms ease;
}
.ms-header__phone:hover { color: var(--ms-orange-text); }
.ms-header__phone-text { direction: ltr; }

.ms-header__cta {
  display: inline-block;
  background-color: var(--ms-orange);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 150ms ease;
}
.ms-header__cta:hover {
  background-color: var(--ms-orange-hover);
  color: #ffffff;
}

.ms-header__hamburger {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.ms-header__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--ms-charcoal);
  transition: transform 200ms ease, opacity 200ms ease;
}

/* Mobile drawer */
.ms-mobile-menu {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 100vh;
  background: rgba(31, 42, 55, 0.5);
  z-index: 1000;
  opacity: 0;
  transition: opacity 250ms ease;
  overflow: hidden;
  pointer-events: none;
}
.ms-mobile-menu.is-open { opacity: 1; pointer-events: auto; }
.ms-mobile-menu__inner {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  height: 100vh;
  width: min(360px, 90vw);
  background: #ffffff;
  padding: 24px;
  transform: translateX(-100%);
  transition: transform 250ms ease;
  overflow-y: auto;
}
[dir="rtl"] .ms-mobile-menu__inner { transform: translateX(100%); }
.ms-mobile-menu.is-open .ms-mobile-menu__inner { transform: translateX(0); }
.ms-mobile-menu__close {
  background: transparent;
  border: 0;
  font-size: 32px;
  cursor: pointer;
  color: var(--ms-charcoal);
  padding: 4px 12px;
  margin-bottom: 16px;
}
.ms-mobile-menu__list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
.ms-mobile-menu__list li { border-bottom: 1px solid var(--ms-mist); }
.ms-mobile-menu__list a {
  display: block;
  padding: 16px 8px;
  color: var(--ms-charcoal);
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
}
.ms-mobile-menu__phone,
.ms-mobile-menu__cta {
  display: block;
  text-align: center;
  padding: 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  margin-bottom: 12px;
}
.ms-mobile-menu__phone {
  border: 1.5px solid var(--ms-charcoal);
  color: var(--ms-charcoal);
  direction: ltr;
}
.ms-mobile-menu__cta {
  background: var(--ms-orange);
  color: #fff;
}

@media (max-width: 1024px) {
  .ms-header__inner {
    padding: 0 20px;
    gap: 12px;
    /* 110px when --shrink=0, drops to 60px when --shrink=1 */
    height: calc(110px - 50px * var(--shrink));
  }
  .ms-header__logo img {
    /* 88px when --shrink=0, drops to 40px when --shrink=1 */
    max-height: calc(88px - 48px * var(--shrink));
  }

  .ms-header__nav,
  .ms-header__phone,
  .ms-header__cta { display: none; }
  .ms-header__hamburger { display: flex; margin-inline-start: auto; }
  .ms-header__logo { flex: 1; }
  .ms-header__actions { gap: 4px; }
}

/* ============================================================
   FOOTER (custom, replaces Kadence parent)
   ============================================================ */
.ms-footer {
  background-color: var(--ms-charcoal);
  color: rgba(255, 255, 255, 0.85);
  padding-top: 64px;
}
.ms-footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 48px;
}
@media (max-width: 1024px) {
  .ms-footer__inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .ms-footer__inner { grid-template-columns: 1fr; gap: 32px; padding: 0 20px; }
}

.ms-footer__logo {
  display: inline-block;
  background: #ffffff;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  text-decoration: none;
}
.ms-footer__logo img { max-width: 160px; height: auto; display: block; }

.ms-footer__tagline {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px;
  line-height: 1.3;
}
.ms-footer__about-mini {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
}

.ms-footer__heading {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
  text-transform: none;
}

.ms-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ms-footer__list a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 15px;
  transition: color 150ms ease;
}
.ms-footer__list a:hover { color: var(--ms-orange); }

.ms-footer__list--contact li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.ms-footer__list--contact svg { color: var(--ms-orange); flex-shrink: 0; }

.ms-footer__social {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.ms-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  transition: background 150ms ease, color 150ms ease;
}
.ms-footer__social a:hover {
  background: var(--ms-orange);
  color: #ffffff;
}

.ms-footer__certs {
  max-width: 1240px;
  margin: 48px auto 0;
  padding: 24px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}
.ms-footer__cert-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.3px;
}

.ms-footer__bottom {
  background: rgba(0, 0, 0, 0.25);
  margin-top: 24px;
  padding: 18px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}
.ms-footer__bottom-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.ms-footer__bottom-inner p { margin: 0; }
.ms-footer__bottom a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}
.ms-footer__bottom a:hover { color: var(--ms-orange); }
@media (max-width: 600px) {
  .ms-footer__bottom-inner { flex-direction: column; padding: 0 20px; text-align: center; }
}

/* ============================================================
   MOBILE POLISH PASS
   Final cleanup for tablet (≤900px) and phone (≤600px / ≤400px) breakpoints.
   Plugs gaps left by section-by-section media queries and ensures:
   - Tap targets ≥ 44px
   - Form inputs ≥ 16px font (no iOS zoom-on-focus)
   - Tighter horizontal padding (precious 20px on small phones)
   - Smaller display fonts where they overflow
   - Phone CTA stripes scale down
   ============================================================ */

@media (max-width: 900px) {
  /* Single product page layout adjustments */
  .ms-product-detail__title { font-size: 28px; }
  .ms-product-detail__main-img { padding: 16px; }
  .ms-product-detail__inner { padding: 0 20px 64px; }
  .ms-product-detail__section h2 { font-size: 20px; }
  .ms-product-detail__cta-card { padding: 20px; }
}

@media (max-width: 768px) {
  /* Contact form wrap, less padding so inputs aren't cramped */
  .ms-contact__form-wrap { padding: 20px; border-radius: 8px; }
  .ms-contact__form-lead { margin: -8px 0 20px; }

  /* Archive headers a bit smaller */
  .ms-archive__title { font-size: 28px; }
  .ms-archive__inner { padding: 0 20px 56px; }
  .ms-archive__cat-pills { gap: 6px; }
  .ms-cat-pill { padding: 6px 14px; font-size: 13px; }

  /* Breadcrumb wrap on small */
  .ms-breadcrumb { font-size: 13px; }

  /* Page hero on subpages, even tighter */
  .ms-page-hero__title { line-height: 1.2; }

  /* Legal pages */
  .ms-legal__body { font-size: 16px; }
  .ms-legal__body h2 { font-size: 20px; margin-top: 32px; }

  /* About section heading underline, shorter */
  .ms-about__col h2 { font-size: 24px; }
  .ms-about__col h2::after { width: 36px; }

  /* CTA strip phone, scale down stripe widths so they fit narrow */
  .ms-cta-strip__phone { font-size: 20px; }
  .ms-cta-strip__phone::after { height: 14px; }
  .ms-cta-strip__phone::after {
    background:
      linear-gradient(var(--ms-orange), var(--ms-orange)) 0 0 / 100% 3px no-repeat,
      linear-gradient(var(--ms-orange), var(--ms-orange)) 0 5px / 65% 3px no-repeat,
      linear-gradient(var(--ms-orange), var(--ms-orange)) 0 10px / 30% 2px no-repeat;
  }

  /* CTA strip title smaller */
  .ms-cta-strip__title { font-size: 22px; line-height: 1.25; }

  /* Footer, tighter spacing on phone */
  .ms-footer { padding-top: 48px; }
  .ms-footer__inner { gap: 28px; }
  .ms-footer__certs { padding: 20px; gap: 8px; font-size: 12px; }
  .ms-footer__certs span { display: inline-block; }
}

@media (max-width: 480px) {
  /* Very small phones (iPhone SE 375px area) — final tweaks */
  .ms-hero__title { font-size: 28px; }
  .ms-page-hero__title { font-size: 26px; }
  .ms-section__title { font-size: 24px; }

  /* Product detail title */
  .ms-product-detail__title { font-size: 24px; }
  .ms-product-detail__cta-card .ms-hero__btn-primary { padding: 14px 20px; font-size: 15px; }

  /* Hero subtitle */
  .ms-hero__subtitle { font-size: 15px; }

  /* CTA primary button mobile-stretched everywhere */
  .ms-hero__btn-primary {
    padding: 14px 24px;
    font-size: 15px;
  }

  /* Contact rows tighter padding */
  .ms-contact__row { padding: 12px 14px; gap: 12px; }
  .ms-contact__icon { width: 40px; height: 40px; }

  /* Footer category badge wrap */
  .ms-footer__cert-badge { font-size: 11px; padding: 3px 8px; }

  /* Form labels lighter */
  .ms-lead-form__label { font-size: 13px; }
}

/* Tap target safety: ensure all primary interactive elements are at least 44x44 */
.ms-header__hamburger,
.ms-mobile-menu__close,
.ms-header__phone,
.ms-header__cta,
.ms-cat-pill,
.ms-product-card,
.ms-contact__row,
.ms-hero__btn-primary,
.ms-hero__btn-ghost {
  min-height: 44px;
}

/* Prevent horizontal overflow from any unexpectedly-wide child */
html, body { max-width: 100%; }
img, video { max-width: 100%; height: auto; }

/* ============================================================
   Reduce motion preference, respect prefers-reduced-motion
   ============================================================ */
@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;
  }
}
