/* O-TECH SHIZAI 1.6.2: MOBILE ONLY.
 * No rules outside the phone breakpoint. Desktop remains the original 1.6.0.
 * This file does not modify header, navigation drawers, or account controls.
 */
@media screen and (max-width: 767px) {

  /* Contact: Japanese labels above full-width form fields. */
  .contact-form .jp-contact-form {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 20px 16px 26px !important;
    margin-inline: auto !important;
  }
  .contact-form .contact-form__form {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .jp-contact-form > h1 {
    font-size: clamp(24px, 6vw, 30px) !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
    margin: 0 0 24px !important;
    overflow-wrap: anywhere;
  }
  .jp-contact-form .form-row {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 8px !important;
    margin: 0 0 18px !important;
  }
  .jp-contact-form .form-row > label {
    display: block !important;
    flex: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
  }
  .jp-contact-form .form-row > label span {
    margin-left: 8px !important;
    vertical-align: middle;
  }
  .jp-contact-form .form-row > input,
  .jp-contact-form .form-row > select,
  .jp-contact-form .form-row > textarea,
  .jp-contact-form .form-row > .contact-form__input {
    box-sizing: border-box !important;
    display: block !important;
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto;
    margin: 0 !important;
    padding: 14px 15px !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
  }
  .jp-contact-form .form-row > textarea {
    min-height: 120px !important;
    resize: vertical;
  }
  .jp-contact-form .radio-group {
    box-sizing: border-box !important;
    display: flex !important;
    flex: none !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 12px 24px !important;
  }
  .jp-contact-form .radio-group label {
    display: inline-flex !important;
    flex: none !important;
    align-items: center !important;
    gap: 8px !important;
    width: auto !important;
    min-width: 0 !important;
    white-space: nowrap;
  }
  .jp-contact-form .radio-group input[type="radio"] {
    flex: none !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
  }
  .jp-contact-form button[type="submit"],
  .jp-contact-form input[type="submit"] {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 52px !important;
    margin: 8px 0 0 !important;
  }

  /* Footer quote form, when present. */
  .otech-footer-section { padding: 36px 18px !important; }
  .otech-footer-section .otech-form-heading {
    font-size: clamp(23px, 5.8vw, 30px) !important;
    line-height: 1.4 !important;
    margin: 0 0 20px !important;
  }
  .otech-quote-form .otech-form-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }
  .otech-quote-form .otech-form-row > label {
    display: block !important;
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  .otech-quote-form .otech-form-row > input,
  .otech-quote-form .otech-form-row > select,
  .otech-quote-form .otech-form-row > textarea {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .otech-quote-form .otech-radio-options {
    flex-wrap: wrap !important;
    gap: 12px 18px !important;
  }
  .otech-quote-form button[type="submit"] {
    width: 100% !important;
    margin: 8px 0 0 !important;
  }

  /* Mounting system navigation: normal flow directly after the original header.
   * No sticky, fixed positioning, z-index overlay, or changed Shopify listeners. */
  body.osm-mobile-nav-ready .otech-systems > .otech-sidebar {
    display: none !important;
  }
  body.osm-mobile-nav-ready .osm-mobile-mount-nav {
    position: relative !important;
    display: block !important;
    box-sizing: border-box !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 10px 12px 12px !important;
    z-index: auto !important;
    background: #fff !important;
    border-bottom: 1px solid #e4e9ee !important;
  }
  .osm-mobile-mount-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px 10px !important;
    width: 100% !important;
  }
  .osm-mobile-mount-button {
    display: flex !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    background: #dfe5ec !important;
    color: #16345c !important;
    border: 0 !important;
    border-radius: 16px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    text-align: left !important;
    white-space: normal !important;
    cursor: pointer !important;
    touch-action: manipulation;
  }
  .osm-mobile-mount-button.active {
    background: #1e5a9e !important;
    color: #fff !important;
  }
  .osm-mobile-mount-button:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
    width: calc(50% - 5px) !important;
    justify-self: center !important;
  }

  /* Mounting data blocks and technical tables: reduce enormous source gaps. */
  .otech-systems {
    grid-template-columns: minmax(0, 1fr) !important;
    min-width: 0 !important;
  }
  .otech-systems .otech-main {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 10px 14px 18px !important;
  }
  .otech-systems .otech-hero {
    gap: 18px !important;
    padding: 16px 0 24px !important;
  }
  .otech-systems .otech-description { margin-bottom: 18px !important; }
  .otech-systems .otech-section-head { margin-bottom: 14px !important; }
  .otech-systems .otech-specs-section,
  .otech-systems .otech-components {
    margin: 0 !important;
    padding: 0 0 26px !important;
  }
  .otech-systems .otech-variant-section {
    margin: 0 !important;
    padding: 0 0 22px !important;
    gap: 22px !important;
  }
  .otech-systems .otech-variant-item { gap: 14px !important; }
  .otech-systems .otech-variant-item .otech-section-head { margin-bottom: 0 !important; }
  .otech-systems .otech-install {
    margin: 0 !important;
    padding: 12px 0 20px !important;
  }
  .otech-systems .otech-install-grid { gap: 18px !important; }
  .otech-systems .otech-tab-content.active > :last-child { margin-bottom: 0 !important; }

  /* Catalogue: compact the panel and move the button up, not over content. */
  .otech-lineup {
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 12px 20px !important;
  }
  .otech-lineup > .page-width {
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 20px 16px 22px !important;
    border-radius: 20px !important;
  }
  .otech-lineup .otech-head { margin: 0 0 14px !important; }
  .otech-lineup .otech-grid {
    min-height: 0 !important;
    height: auto !important;
    gap: 14px !important;
    margin: 0 !important;
  }
  .otech-lineup .otech-card { padding: 12px !important; }
  .otech-lineup .otech-image { margin-bottom: 10px !important; }
  .otech-lineup .otech-catalog-btn-wrap {
    min-height: 0 !important;
    margin: 16px 0 0 !important;
    padding: 0 !important;
    gap: 10px !important;
  }
  .otech-lineup .otech-catalog-btn {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 440px !important;
    min-width: 0 !important;
    min-height: 50px !important;
    padding: 13px 15px !important;
    gap: 10px !important;
    font-size: clamp(15px, 4vw, 18px) !important;
    line-height: 1.4 !important;
  }
  .otech-lineup .otech-grid:empty { display: none !important; }
  .otech-lineup .otech-grid:empty + .otech-catalog-btn-wrap { margin-top: 0 !important; }

  /* Tighten product CTA group spacing only on phones. */
  .solar-buttons,
  .b2b-cta,
  .otech-product-options {
    column-gap: 10px !important;
    row-gap: 10px !important;
  }
  .solar-buttons { margin-top: 14px !important; }
  .oem-contact-section { padding-bottom: 36px !important; }
  .oem-contact-header { margin-bottom: 22px !important; }
  .oem-contact-form { padding: 22px 16px !important; gap: 14px !important; }
  .oem-contact-form-row { grid-template-columns: 1fr !important; gap: 14px !important; }
  .oem-contact-submit-wrap { margin: 12px 0 0 !important; }
}
