/**
 * product-window-mobile.css
 * Mobile + desktop layout for aluminium window pages (body.page-window-pro)
 */

/* ── Desktop: global 90% content width (all window pages) ── */
@media (min-width: 769px) {
  /* Nav / footer keep standard site container */
  body.page-window-pro nav.navbar .container,
  body.page-window-pro .navbar .container,
  body.page-window-pro footer .container {
    width: 100% !important;
    max-width: 1280px !important;
  }

  /* Page content columns — 90% of viewport */
  body.page-window-pro .product-detail-hero > .container,
  body.page-window-pro .cluster-hero > .container,
  body.page-window-pro .wm-breadcrumb-wrap .container,
  body.page-window-pro > div[style*="padding: 6rem"] > .container,
  body.page-window-pro section.container,
  body.page-window-pro section .container,
  body.page-window-pro aside.container,
  body.page-window-pro .wm-page-content {
    width: 90% !important;
    max-width: 90% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Remove inline 720/900/960px caps inside sections */
  body.page-window-pro .product-detail-hero .hero-lead,
  body.page-window-pro .product-detail-hero > .container > p[style*="max-width"],
  body.page-window-pro section p[style*="max-width"],
  body.page-window-pro section .container > p[style*="max-width"],
  body.page-window-pro section div[style*="max-width: 900px"],
  body.page-window-pro section div[style*="max-width:900px"],
  body.page-window-pro section div[style*="max-width: 960px"],
  body.page-window-pro section div[style*="max-width:960px"],
  body.page-window-pro section div[style*="max-width:720px"],
  body.page-window-pro section div[style*="max-width: 720px"],
  body.page-window-pro section div[style*="max-width:820px"],
  body.page-window-pro section div[style*="max-width: 820px"],
  body.page-window-pro section .container > div[style*="max-width"] {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Tables use full content column */
  body.page-window-pro section table {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.page-window-pro section [style*="overflow-x"] {
    width: 100%;
    max-width: 100% !important;
  }

  /* Merged config + price table (2-track) */
  body.page-window-pro .wm-config-price-panel {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.15rem;
    margin-top: 1rem;
    box-shadow: 0 4px 16px -10px rgba(15, 23, 42, 0.1);
  }

  body.page-window-pro .wm-config-price-panel > h2 {
    display: none;
  }

  body.page-window-pro .wm-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.page-window-pro .wm-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: #fff;
    border: 1px solid #e2e8f0;
  }

  body.page-window-pro .wm-spec-table thead tr {
    background: #1e3a5f;
    color: #fff;
  }

  body.page-window-pro .wm-spec-table th,
  body.page-window-pro .wm-spec-table td {
    padding: 0.65rem 0.75rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e2e8f0;
    line-height: 1.45;
  }

  body.page-window-pro .wm-spec-table tbody tr:nth-child(even):not(.wm-spec-divider) {
    background: #f8fafc;
  }

  body.page-window-pro .wm-spec-table td strong {
    color: #1d4ed8;
    font-weight: 700;
  }

  body.page-window-pro .wm-spec-table--merged th:last-child,
  body.page-window-pro .wm-spec-table--merged td:last-child {
    white-space: nowrap;
    width: 18%;
  }

  body.page-window-pro .wm-spec-table .wm-spec-divider td {
    background: #334155;
    color: #f8fafc;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 0.5rem 0.75rem;
    border-bottom: none;
  }

  body.page-window-pro .wm-table-note {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
  }

  body.page-window-pro #faqs .wm-faq-a {
    display: block !important;
  }

  body.page-window-pro #faqs .wm-faq-q {
    cursor: default;
    pointer-events: none;
  }

  body.page-window-pro #faqs .wm-faq-q svg {
    display: none;
  }
}

@media (max-width: 768px) {
  /* Breadcrumb / cross-links — tight to title */
  body.page-window-pro .wm-breadcrumb-wrap,
  body.page-window-pro > div[style*="padding: 6rem 0 1rem"] {
    padding: 4.75rem 0 0.35rem !important;
  }

  body.page-window-pro .wm-breadcrumb-wrap nav,
  body.page-window-pro > div[style*="padding: 6rem 0 1rem"] nav {
    font-size: 0.72rem !important;
    line-height: 1.35 !important;
  }

  /* SEO / product hero */
  body.page-window-pro .product-detail-hero,
  body.page-window-pro .cluster-hero {
    padding: 0.5rem 0 1rem !important;
  }

  body.page-window-pro .product-detail-hero .section-label,
  body.page-window-pro .cluster-hero .section-label {
    font-size: 0.68rem !important;
    margin-bottom: 0.25rem !important;
    display: block;
  }

  body.page-window-pro .product-detail-hero h1,
  body.page-window-pro .cluster-hero h1 {
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
    margin: 0.2rem 0 0.45rem !important;
  }

  body.page-window-pro .product-detail-hero .hero-lead,
  body.page-window-pro .product-detail-hero > .container > p:first-of-type,
  body.page-window-pro .cluster-hero > .container > p {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
    margin: 0 !important;
  }

  body.page-window-pro .hero-cta-row {
    margin: 0.65rem 0 0.85rem !important;
    gap: 0.45rem !important;
  }

  body.page-window-pro .hero-cta-row .btn {
    padding: 0.55rem 0.85rem !important;
    font-size: 0.78rem !important;
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }

  body.page-window-pro .product-detail-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  body.page-window-pro .product-hero-price-card {
    display: none !important;
  }

  /* Config + price merged panel (2-track prototype) */
  body.page-window-pro .wm-config-price-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 0.65rem;
    box-shadow: 0 4px 16px -10px rgba(15, 23, 42, 0.12);
  }

  body.page-window-pro .wm-config-price-panel > h2 {
    font-size: 0.92rem !important;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.55rem !important;
    line-height: 1.25;
  }

  body.page-window-pro .wm-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 0.55rem;
  }

  body.page-window-pro .wm-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72rem;
    min-width: 280px;
  }

  body.page-window-pro .wm-spec-table thead tr {
    background: #1e3a5f;
    color: #fff;
  }

  body.page-window-pro .wm-spec-table th,
  body.page-window-pro .wm-spec-table td {
    padding: 0.45rem 0.5rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e2e8f0;
    line-height: 1.35;
  }

  body.page-window-pro .wm-spec-table tbody tr:nth-child(even) {
    background: #f8fafc;
  }

  body.page-window-pro .wm-spec-table td strong {
    color: #1d4ed8;
    font-weight: 700;
  }

  body.page-window-pro .wm-spec-table--compact {
    margin-top: 0.35rem;
    min-width: 0;
  }

  body.page-window-pro .wm-spec-table--compact thead tr {
    background: #334155;
  }

  body.page-window-pro .wm-table-note {
    margin: 0.45rem 0 0;
    font-size: 0.65rem;
    color: #64748b;
    line-height: 1.4;
  }

  /* Calculator section — compact, hide redundant headings */
  body.page-window-pro .window-price-calc-section,
  body.page-window-pro section:has(.calc-mobile-pro) {
    padding: 0.85rem 0 0.65rem !important;
    background: #f8fafc !important;
  }

  body.page-window-pro .window-price-calc-section .section-title,
  body.page-window-pro section:has(.calc-mobile-pro) > .container > .section-title,
  body.page-window-pro section:has(.calc-mobile-pro) > .container > p:not(.wm-table-note) {
    display: none !important;
  }

  /* EEAT trust — cards hidden, compact trust bar only */
  body.page-window-pro .eeat-block {
    padding: 0.35rem 0 !important;
    border: none !important;
    background: transparent !important;
  }

  body.page-window-pro .eeat-block .container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body.page-window-pro .eeat-strip {
    display: none !important;
  }

  body.page-window-pro .eeat-trust-bar {
    margin-top: 0 !important;
    padding: 0.38rem 0.5rem !important;
    gap: 0.28rem 0.45rem !important;
    font-size: 0.66rem !important;
    line-height: 1.3 !important;
    border-radius: 8px !important;
  }

  body.page-window-pro .eeat-trust-bar span {
    font-size: 0.66rem !important;
    white-space: normal !important;
    gap: 0.25rem !important;
  }

  body.page-window-pro .eeat-trust-bar svg {
    width: 11px !important;
    height: 11px !important;
  }

  body.page-window-pro .eeat-trust-bar em {
    font-size: 0.92em !important;
  }

  /* Price range + content sections */
  body.page-window-pro .wm-price-range-section {
    padding: 0.65rem 0 1.25rem !important;
    background: #fff !important;
  }

  body.page-window-pro .wm-price-range-section .section-title {
    font-size: 1.05rem !important;
    margin-bottom: 0.45rem !important;
    line-height: 1.25;
  }

  body.page-window-pro .wm-price-range-section .range-lead {
    font-size: 0.8rem !important;
    line-height: 1.5 !important;
    margin-bottom: 0.55rem !important;
  }

  body.page-window-pro .wm-deep-content {
    padding: 1.25rem 0 !important;
  }

  body.page-window-pro .wm-deep-content h2 {
    font-size: 1.1rem !important;
    margin-bottom: 0.65rem !important;
  }

  body.page-window-pro .wm-deep-content h3 {
    font-size: 0.92rem !important;
    margin: 0.85rem 0 0.35rem !important;
    color: #0f172a;
  }

  body.page-window-pro .wm-deep-content p,
  body.page-window-pro .wm-deep-content li {
    font-size: 0.82rem !important;
    line-height: 1.55 !important;
    color: #334155;
  }

  body.page-window-pro .wm-deep-content ul {
    padding-left: 1.1rem;
    margin: 0.35rem 0 0.65rem;
  }

  body.page-window-pro .wm-use-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.55rem 0 0.75rem;
  }

  body.page-window-pro .wm-use-tag {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.28rem 0.5rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
  }

  body.page-window-pro .wm-explore-next {
    padding: 0.85rem 0.75rem !important;
    margin: 0 0 1rem !important;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
  }

  body.page-window-pro .wm-explore-next p:first-child {
    font-size: 0.72rem !important;
    margin-bottom: 0.35rem !important;
  }

  body.page-window-pro .wm-explore-next p:last-child {
    font-size: 0.78rem !important;
    line-height: 1.55 !important;
  }

  /* FAQ accordion */
  body.page-window-pro #faqs {
    padding: 1.25rem 0 !important;
  }

  body.page-window-pro #faqs .section-title {
    font-size: 1.05rem !important;
    margin-bottom: 0.55rem !important;
  }

  body.page-window-pro #faqs .wm-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.45rem;
    overflow: hidden;
    background: #fff;
  }

  body.page-window-pro #faqs .wm-faq-q {
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.65rem;
    background: #fff;
    border: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e3a8a;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.45rem;
    line-height: 1.35;
    cursor: pointer;
  }

  body.page-window-pro #faqs .wm-faq-q svg {
    flex-shrink: 0;
    margin-top: 0.15rem;
    transition: transform 0.2s ease;
    color: #64748b;
  }

  body.page-window-pro #faqs .wm-faq-item.is-open .wm-faq-q svg {
    transform: rotate(180deg);
  }

  body.page-window-pro #faqs .wm-faq-a {
    display: none;
    padding: 0 0.65rem 0.6rem;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #334155;
  }

  body.page-window-pro #faqs .wm-faq-item.is-open .wm-faq-a {
    display: block;
  }

  body.page-window-pro #faqs .wm-faq-a p {
    margin: 0 !important;
  }

  body.page-window-pro .wm-spec-table .wm-spec-divider td {
    background: #334155;
    color: #f8fafc;
    font-weight: 600;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 0.4rem 0.5rem;
  }

  /* Tighter content sections */
  body.page-window-pro #types-design-options,
  body.page-window-pro #price-breakdown,
  body.page-window-pro #comparison,
  body.page-window-pro #best-use-cases {
    padding: 1.25rem 0 !important;
  }

  body.page-window-pro #types-design-options .section-title,
  body.page-window-pro #price-breakdown .section-title,
  body.page-window-pro #comparison .section-title {
    font-size: 1.05rem !important;
  }

  /* Non-gold SEO pages: calculator visually before price-range copy */
  body.page-window-pro .wm-window-primary-flow {
    display: flex;
    flex-direction: column;
  }

  body.page-window-pro .wm-window-primary-flow > #window-price-calculator {
    order: 1;
  }

  body.page-window-pro .wm-window-primary-flow > #aluminium-window-price-range,
  body.page-window-pro .wm-window-primary-flow > #aluminium-system-intro {
    order: 2;
  }

  body.page-window-pro .wm-window-primary-flow > #system-rate-comparison {
    order: 3;
  }

  /* Product-detail pages: options/calc before gallery photos */
  body.page-window-pro .product-detail-grid {
    display: flex !important;
    flex-direction: column !important;
  }

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

  body.page-window-pro .product-detail-grid > .product-image-gallery ~ div,
  body.page-window-pro .product-detail-grid > div:not(.product-image-gallery) {
    order: 1 !important;
  }

  body.page-window-pro .product-main-image,
  body.page-window-pro .product-main-image-container img {
    max-height: 168px !important;
    object-fit: cover !important;
  }
}
