/**
 * product-louver-mobile.css
 * Mobile + shared layout for metal louvers hub / product / guide pages
 * (body.silo-metal-louvers, body.page-louver-pro).
 * Layout-only: titles, meta, JSON-LD, analytics, and crawlable copy stay
 * in the DOM (visually tightened on small screens).
 */

/* ── Hub: product cards before calc / keyword rail on mobile ── */
.louver-hub-main-flow {
  display: block;
}

@media (max-width: 768px) {
  body.silo-metal-louvers .cluster-breadcrumb {
    padding-top: 0.35rem;
  }

  body.silo-metal-louvers .container > .cluster-prose[style] {
    font-size: 0.78rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  body.silo-metal-louvers .cluster-hero--hub-slim {
    padding: 0.55rem 0 0.7rem;
  }

  body.silo-metal-louvers .cluster-hero--hub-slim h1 {
    font-size: 1.22rem !important;
    line-height: 1.22 !important;
  }

  body.silo-metal-louvers .cluster-hero--hub-slim .cluster-hero-sub {
    font-size: 0.8rem !important;
    line-height: 1.45 !important;
  }

  body.silo-metal-louvers .cluster-hero-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    margin-top: 0.55rem;
  }

  body.silo-metal-louvers .cluster-hero-cta a {
    text-align: center;
    font-size: 0.72rem !important;
    padding: 0.55rem 0.4rem !important;
  }

  body.silo-metal-louvers .cluster-hero--hub-slim .cluster-hero-media {
    max-height: 140px;
    overflow: hidden;
    border-radius: 10px;
  }

  body.silo-metal-louvers .cluster-hero--hub-slim .catalog-hero-product-img {
    max-height: 140px;
    width: 100%;
    object-fit: cover;
  }

  .louver-hub-main-flow {
    display: flex;
    flex-direction: column;
  }

  .louver-hub-main-flow > #louver-products {
    order: 1;
  }

  .louver-hub-main-flow > #wmCatalogCalc {
    order: 2;
  }

  .louver-hub-main-flow > #louver-city-rates {
    order: 3;
  }

  body.silo-metal-louvers #louver-city-rates {
    padding: 0.65rem 0 0.5rem !important;
  }

  body.silo-metal-louvers #louver-city-rates .cluster-h2 {
    font-size: 1.05rem !important;
  }

  body.silo-metal-louvers .wm-keyword-map-lead {
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
  }

  body.silo-metal-louvers .catalog-hub-section--priority {
    padding-top: 0.45rem !important;
    padding-bottom: 0.85rem !important;
  }

  body.silo-metal-louvers .catalog-hub-lead {
    font-size: 0.78rem !important;
    margin-bottom: 0.55rem !important;
  }

  body.silo-metal-louvers .catalog-hub-group-title {
    font-size: 0.92rem !important;
    margin: 0.65rem 0 0.4rem !important;
  }

  body.silo-metal-louvers .catalog-hub-grid--square {
    gap: 0.45rem !important;
  }

  body.silo-metal-louvers .catalog-hub-card--square .catalog-hub-card-body {
    padding: 0.45rem 0.5rem !important;
  }

  body.silo-metal-louvers .catalog-hub-card--square .catalog-hub-card-body strong {
    font-size: 0.78rem !important;
  }

  body.silo-metal-louvers .catalog-hub-card--square .catalog-hub-card-body span {
    font-size: 0.68rem !important;
  }

  body.silo-metal-louvers .catalog-calc-section {
    padding: 0.65rem 0 0.75rem !important;
  }

  body.silo-metal-louvers .catalog-calc-section .cluster-h2 {
    font-size: 1.05rem !important;
    margin-bottom: 0.35rem !important;
  }

  body.silo-metal-louvers .catalog-calc-intro {
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
  }

  /* Long SEO blocks stay crawlable — visually tighten */
  body.silo-metal-louvers .cluster-section,
  body.silo-metal-louvers .cluster-section-alt,
  body.silo-metal-louvers .catalog-eeat-block,
  body.silo-metal-louvers .cluster-faq-section {
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
  }

  body.silo-metal-louvers .cluster-h2 {
    font-size: 1.08rem !important;
  }

  body.silo-metal-louvers .cluster-prose,
  body.silo-metal-louvers .cluster-prose p {
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
  }

  body.silo-metal-louvers .cluster-hero:not(.cluster-hero--hub-slim) {
    padding: 0.65rem 0 0.85rem !important;
  }

  body.silo-metal-louvers .cluster-hero:not(.cluster-hero--hub-slim) h1 {
    font-size: 1.28rem !important;
    line-height: 1.22 !important;
  }

  body.silo-metal-louvers .cluster-hero:not(.cluster-hero--hub-slim) .cluster-hero-sub {
    font-size: 0.8rem !important;
    line-height: 1.45 !important;
  }

  body.silo-metal-louvers .cluster-hero:not(.cluster-hero--hub-slim) .cluster-hero-media {
    max-height: 150px;
    overflow: hidden;
    border-radius: 10px;
  }

  body.silo-metal-louvers .cluster-hero:not(.cluster-hero--hub-slim) .catalog-hero-product-img {
    max-height: 150px;
    width: 100%;
    object-fit: cover;
  }
}

/* ── Product calculator pages ── */
@media (min-width: 769px) {
  body.page-louver-pro .product-detail-hero > .container,
  body.page-louver-pro section .container,
  body.page-louver-pro .wm-page-content {
    width: 90%;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  body.page-louver-pro > div[style*="padding: 6rem 0 1rem"] {
    padding: 4.55rem 0 0.25rem !important;
  }

  body.page-louver-pro > div[style*="padding: 6rem 0 1rem"] nav {
    font-size: 0.72rem !important;
  }

  body.page-louver-pro .product-detail-hero {
    padding: 0.35rem 0 0.65rem !important;
  }

  body.page-louver-pro .seo-hub-back {
    margin-bottom: 0.35rem !important;
    font-size: 0.78rem !important;
  }

  body.page-louver-pro .product-detail-hero > .container {
    display: flex;
    flex-direction: column;
  }

  body.page-louver-pro .wm-louver-hero-intro {
    order: 1;
    margin-bottom: 0.45rem !important;
  }

  body.page-louver-pro .wm-louver-hero-intro h1 {
    font-size: 1.22rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.35rem !important;
  }

  body.page-louver-pro .wm-louver-hero-intro .section-label {
    font-size: 0.68rem !important;
    margin-bottom: 0.2rem !important;
  }

  body.page-louver-pro .wm-louver-hero-intro > p {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
  }

  body.page-louver-pro .wm-louver-hero-cta {
    order: 2;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem !important;
    margin: 0.35rem 0 0.5rem !important;
  }

  body.page-louver-pro .wm-louver-hero-cta .btn {
    padding: 0.58rem 0.45rem !important;
    font-size: 0.7rem !important;
    text-align: center;
    justify-content: center;
  }

  body.page-louver-pro .wm-louver-hero-cta .btn:nth-child(3) {
    grid-column: 1 / -1;
  }

  body.page-louver-pro .wm-louver-rate-panel {
    order: 3;
    margin-bottom: 0.5rem !important;
    padding: 0.65rem 0.55rem !important;
  }

  body.page-louver-pro .wm-louver-rate-panel > p {
    font-size: 0.78rem !important;
    margin-bottom: 0.4rem !important;
    line-height: 1.4 !important;
  }

  body.page-louver-pro .wm-louver-rate-panel table {
    font-size: 0.7rem !important;
  }

  body.page-louver-pro .wm-louver-rate-panel th,
  body.page-louver-pro .wm-louver-rate-panel td {
    padding: 0.35rem 0.4rem !important;
  }

  /* Calculator + gallery — calc first on mobile */
  body.page-louver-pro .product-detail-grid {
    order: 4;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  body.page-louver-pro .product-detail-grid > .product-image-gallery {
    order: 2 !important;
  }

  body.page-louver-pro .product-detail-grid > .wm-louver-calc-col,
  body.page-louver-pro .product-detail-grid > div:last-child,
  body.page-louver-pro .product-detail-grid > div:nth-child(2) {
    order: 1 !important;
  }

  body.page-louver-pro .product-main-image {
    max-height: 150px !important;
    object-fit: cover !important;
    border-radius: 10px;
  }

  body.page-louver-pro .product-detail-grid > div:nth-child(2) > p,
  body.page-louver-pro .wm-louver-calc-col > p {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.55rem !important;
  }

  body.page-louver-pro .product-detail-grid > div:nth-child(2) > div[style*="linear-gradient(135deg, rgba(240"],
  body.page-louver-pro .wm-louver-calc-col > div[style*="linear-gradient(135deg, rgba(240"] {
    padding: 0.65rem !important;
    margin-bottom: 0.55rem !important;
  }

  body.page-louver-pro .price-calculator-container {
    margin-top: 0.25rem;
  }

  body.page-louver-pro .wm-explore-next {
    order: 5;
    margin: 0.35rem 0 0.55rem !important;
    padding: 0.5rem 0.55rem !important;
  }

  body.page-louver-pro .product-image-gallery .product-description-section,
  body.page-louver-pro .product-image-gallery .key-features-section,
  body.page-louver-pro .product-image-gallery > div[style*="margin-top: 2rem"] {
    margin-top: 0.55rem !important;
    padding: 0.65rem !important;
  }
}
