/* V9.8.2 responsive finishing pass: product detail, quote/contact, client area.
   Scoped rules intentionally override legacy declarations without changing desktop. */
@media (max-width: 900px) {
  body.si-site-v5 .si-hilti-product .si-hilti-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-gallery,
  body.si-site-v5 .si-hilti-product .si-hilti-summary,
  body.si-site-v5 .si-hilti-product .si-hilti-price {
    min-width: 0;
    max-width: 100%;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-summary {position: static;}
  body.si-site-v5 .si-auth-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    background: transparent;
  }
  body.si-site-v5 .si-auth-grid > .si-auth-card {
    min-width: 0;
    width: 100%;
    border: 1px solid #d9e0e4;
    border-radius: 10px;
  }
  body.si-site-v5 .si-auth-grid .si-auth-card #loginform input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    padding: 0;
  }
  body.si-site-v5 .contact-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  body.si-site-v5 .contact-form-panel {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}
@media (max-width: 640px) {
  /* Product detail. Avoid two-column squeezes and preserve a reachable CTA. */
  body.single-product.si-site-v5 {padding-bottom: calc(76px + env(safe-area-inset-bottom));}
  body.si-site-v5 .si-hilti-product .si-hilti-hero-grid {
    width: 100%;
    min-width: 0;
    gap: 22px;
    padding-top: 13px;
    padding-bottom: 32px;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-stage {
    min-width: 0;
    min-height: 0;
    height: clamp(255px, 82vw, 385px);
  }
  body.si-site-v5 .si-hilti-product .si-hilti-slide img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 22px;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-summary h1 {
    font-size: clamp(27px, 8vw, 36px)!important;
    line-height: 1.12!important;
    overflow-wrap: anywhere;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-sku {
    flex-wrap: wrap;
    overflow-wrap: anywhere;
    gap: 8px;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-option {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-option small {grid-column: 1;}
  body.si-site-v5 .si-hilti-product .si-hilti-buyrow {
    grid-template-columns: minmax(68px, 84px) minmax(0, 1fr);
    gap: 13px;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-buyrow input {
    min-width: 0;
    font-size: 16px;
    border-radius: 7px;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-price {
    overflow-wrap: anywhere;
    line-height: 1.45;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-primary,
  body.si-site-v5 .si-hilti-product .si-hilti-secondary {
    min-height: 49px;
    padding: 12px 16px;
    border-radius: 7px!important;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-anchorbar .wrap {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    gap: 22px;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-data>div {
    grid-template-columns: minmax(0,1fr);
    overflow-wrap: anywhere;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-compatible-list,
  body.si-site-v5 .si-hilti-product .si-hilti-related,
  body.si-site-v5 .si-hilti-product .si-hilti-service-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body.si-site-v5 .si-hilti-product .si-hilti-mobile-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    width: 100%;
    max-width: 100vw;
    padding: 10px max(14px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-right));
    box-sizing: border-box;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-mobile-cta span {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-mobile-cta strong {
    max-width: 100%;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.si-site-v5 .si-hilti-product .si-hilti-mobile-cta button {
    flex: none;
    width: auto;
    min-width: 106px;
    min-height: 44px;
    padding: 10px 13px;
    border-radius: 7px;
    font-size: 12px;
    white-space: nowrap;
  }
  /* Inquiry: one readable field per row, including file upload and consent. */
  body.si-site-v5 .contact-layout {gap: 22px; min-width: 0;}
  body.si-site-v5 .contact-form-panel {
    padding: 22px 17px;
    border-radius: 10px;
  }
  body.si-site-v5 .contact-form-panel .form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }
  body.si-site-v5 .contact-form-panel .field {min-width: 0;}
  body.si-site-v5 .contact-form-panel .field input,
  body.si-site-v5 .contact-form-panel .field select,
  body.si-site-v5 .contact-form-panel .field textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 49px;
    font-size: 16px;
    border-radius: 7px;
  }
  body.si-site-v5 .contact-form-panel input[type="file"] {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    font-size: 13px;
    padding: 10px;
    overflow: hidden;
  }
  body.si-site-v5 .contact-form-panel input[type="file"]::file-selector-button {
    padding: 9px 10px;
    margin-right: 10px;
    max-width: 100%;
    border: 1px solid #c9d5db;
    border-radius: 5px;
    background: #fff;
    font-size: 12px;
  }
  body.si-site-v5 .contact-form-panel .inquiry-selection,
  body.si-site-v5 .contact-form-panel .form-divider {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  body.si-site-v5 .contact-form-panel .consent {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    line-height: 1.55;
    font-size: 13px;
  }
  body.si-site-v5 .contact-form-panel .consent input[type="checkbox"] {
    width: 19px;
    height: 19px;
    min-width: 19px;
    min-height: 19px;
    flex: 0 0 19px;
    margin: 2px 0 0;
    padding: 0;
  }
  body.si-site-v5 .contact-form-panel .consent span {min-width: 0;}
  body.si-site-v5 .contact-form-panel [data-inquiry-submit] {
    width: 100%;
    min-height: 51px;
    justify-content: center;
    gap: 12px;
    white-space: normal;
    text-align: center;
  }
  /* Client Hub: two distinct cards, correctly-sized login and checkbox. */
  body.si-site-v5 .si-portal-hero {
    padding: 70px 0 42px;
  }
  body.si-site-v5 .si-portal-hero h1 {
    font-size: clamp(36px, 9.1vw, 53px);
    line-height: 1.07;
    letter-spacing: -.045em;
    overflow-wrap: break-word;
  }
  body.si-site-v5 .si-portal-proof {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin-top: 26px;
  }
  body.si-site-v5 .si-portal-proof span {
    width: 100%;
    min-width: 0;
    font-size: 12px;
  }
  body.si-site-v5 .si-auth-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  body.si-site-v5 .si-auth-grid > .si-auth-card {
    padding: 25px 18px;
  }
  body.si-site-v5 .si-auth-grid .si-auth-card h2 {
    font-size: clamp(27px, 7vw, 37px);
    line-height: 1.12;
    margin-bottom: 20px;
  }
  body.si-site-v5 .si-auth-grid .si-stack-form,
  body.si-site-v5 .si-auth-grid #loginform {
    min-width: 0;
    width: 100%;
  }
  body.si-site-v5 .si-auth-grid input:not([type="checkbox"]),
  body.si-site-v5 .si-auth-grid select,
  body.si-site-v5 .si-auth-grid textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 49px;
    border-radius: 7px;
    font-size: 16px;
  }
  body.si-site-v5 .si-auth-grid .si-auth-card #loginform input[type="checkbox"] {
    appearance: auto;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    vertical-align: middle;
  }
  body.si-site-v5 .si-auth-grid .login-remember label {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  body.si-site-v5 .si-auth-grid #wp-submit,
  body.si-site-v5 .si-auth-grid .si-stack-form button[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 49px;
    white-space: normal;
  }
  body.si-site-v5 .si-portal-metrics,
  body.si-site-v5 .si-machine-grid,
  body.si-site-v5 .si-favorite-grid,
  body.si-site-v5 .si-request-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  body.si-site-v5 .si-doc-list article {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  body.si-site-v5 .si-machine-card,
  body.si-site-v5 .si-request-list article,
  body.si-site-v5 .si-favorite-card {
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 19px;
  }
}
@media (max-width: 370px) {
  body.si-site-v5 .si-hilti-product .si-hilti-mobile-cta button {
    min-width: 100px;
    font-size: 11px;
    padding-inline: 9px;
  }
  body.si-site-v5 .contact-form-panel {padding-inline: 14px;}
}
