/* Spanish typography adjustments; structure and brand styling remain shared. */
:root:lang(es) { --vesta-language-line-height: 1.55; --vesta-language-letter-spacing: -0.005em; }
:lang(es) :where(h1, h2, h3, .button, .btn) { hyphens: auto; overflow-wrap: anywhere; }
:lang(es) h1 { hyphens: none; overflow-wrap: normal; word-break: normal; }
:lang(es) .hero h1 { font-size: clamp(33px, 4.2vw, 50px); line-height: 0.96; }
:lang(es) :where(p, li, dd, label, input, textarea, select) { line-height: var(--vesta-language-line-height); }
/* Navigation labels may wrap at spaces, but never inside a word.  The header
 * owns its responsive breakpoint; language CSS must not turn Spanish labels
 * into vertical fragments such as "EM-PRE-SA". */
:lang(es) .main-menu > a,
:lang(es) .main-menu .mega-wrap > a {
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}
:lang(es) .main-menu { column-gap: clamp(0.72rem, 1vw, 1.25rem); }

/* Keep the desktop Spanish navigation readable: longer translated labels
 * may wrap at spaces, but never collapse into one letter per line. */
@media (min-width: 1025px) {
  :lang(es) .nav-inner { gap: 18px; }
  :lang(es) .main-menu {
    gap: clamp(0.8rem, 1.35vw, 1.2rem);
    font-size: clamp(11px, 0.82vw, 13px);
    letter-spacing: 0.01em;
  }
  :lang(es) .main-menu > a,
  :lang(es) .main-menu .mega-wrap > a {
    white-space: nowrap;
    hyphens: none;
    overflow-wrap: normal;
    word-break: normal;
  }
}
:lang(es) .explore-tab { min-height: 44px; padding-block: 0.6rem; font-size: 12px; }
:lang(es) .application-row .tag { font-size: 11px; }
:lang(es) .product-family span,
:lang(es) .product-category-group .tag { font-size: 11px; line-height: 1.3; }
:lang(es) .hero-boundary span,
:lang(es) .role-top b,
:lang(es) .menu-button b { font-size: 11px; line-height: 1.25; }
:lang(es) .mobile-menu,
:lang(es) .about-factory-carousel-thumbnails button { min-height: 44px; }
:lang(es) .footer-link-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}
:lang(es) .cw-product-compare-actions .btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}
:lang(es) .vesta-assistant-launcher-input-wrap,
:lang(es) .vesta-assistant-launcher-input,
:lang(es) .vesta-assistant-launcher-submit { min-height: 44px; }
:lang(es) .vesta-assistant-launcher-input-wrap,
:lang(es) .vesta-assistant-launcher-input { height: 44px; }
:lang(es) .vesta-assistant-launcher-submit {
  width: 44px;
  height: 44px;
}
:lang(es) .privacy-consent input[type="checkbox"] {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}
@media (max-width: 380px) {
  :lang(es) .vesta-language-switcher-menu {
    right: -24px;
    min-width: 0;
    width: min(240px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }
  :lang(es) .vesta-language-switcher-menu .vesta-language-unavailable small {
    white-space: normal;
    text-align: right;
  }
}
@media (max-width: 430px) {
  :lang(es) .contact-hero h1 { font-size: clamp(31px, 9vw, 38px); }
}

/* The Kitchen & Bath Spanish H1 is wider than the 348px viewport at the
 * shared 44px application-heading size. Keep this adjustment page- and
 * locale-scoped so English and other application pages remain unchanged. */
@media (max-width: 360px) {
  html[lang^="es"] body.page-id-18 .application-hero h1 {
    font-size: 40px;
    line-height: 0.94;
  }
}

/* Existing Spanish Wholesale route: keep the shared hero grid within the
 * narrow viewport after localized labels increase their min-content width. */
@media (max-width: 560px) {
  :lang(es) .wholesale-hero-grid > *,
  :lang(es) .wholesale-range-board,
  :lang(es) .wholesale-hero-copy {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  :lang(es) .wholesale-actions .btn,
  :lang(es) .wholesale-product-actions a {
    max-width: 100%;
    white-space: normal;
  }
}
