/* ==========================================================================
   Mobile Clean-Up Layer
   Loaded after mobile-layout.css. Phone/tablet only (<= 980px).
   Goal: less on screen, no "placard" frames behind photos, calmer type,
   one slim action bar instead of two floating pills.
   Desktop is untouched.
   ========================================================================== */

@media (max-width: 980px) {

  /* ---------- Global rhythm ---------- */
  body.mobile-shell-ready {
  }

  main h2 {
    font-size: clamp(1.45rem, 6.4vw, 1.9rem) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.01em;
  }

  /* Pull the oversized "section" headlines down to a calm size */
  .about h2,
  .cta h2,
  .social-proof-strip h2,
  .home-sitelinks h2,
  .services-hero-panel h1,
  .service-copy h2,
  .catalog-heading h1,
  .catalog-heading h2 {
    font-size: clamp(1.45rem, 6.4vw, 1.9rem) !important;
    line-height: 1.15 !important;
    max-width: none !important;
  }

  .about,
  .cta,
  .social-proof-strip,
  .home-sitelinks {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }

  .about .container,
  .cta .container,
  .home-sitelinks .container,
  .social-proof-strip .container {
    text-align: left !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .about p,
  .home-sitelinks .section-intro,
  .services-hero-panel p,
  .service-copy p {
    font-size: 1rem !important;
    line-height: 1.55 !important;
    color: rgba(255, 255, 255, 0.78) !important;
  }

  /* Buttons: no red glow halo, full-width, consistent */
  main .btn,
  main .btn-secondary {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    max-width: none !important;
    min-height: 50px;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-shadow: none !important;
    border-radius: 10px !important;
  }

  main .btn::before,
  main .btn::after {
    display: none !important;
  }

  /* ---------- Home hero: keep the logo beside the headline, just stop
     "supply" from breaking mid-word ---------- */
  .hero .hero-content h1.split-hero-headline {
    font-size: clamp(2.2rem, 10.5vw, 3.6rem) !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
  }

  .hero .hero-content h1.split-hero-headline .hero-line {
    white-space: nowrap !important;
  }

  /* ---------- Trust strip: simple list, no boxes inside boxes ---------- */
  .home-trust-strip {
    padding: 8px 20px 28px !important;
    background: transparent !important;
  }

  .home-trust-strip .home-trust-inner {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 18px 16px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .home-trust-strip .home-trust-item {
    display: block !important;
    padding: 0 0 0 12px !important;
    background: transparent !important;
    border: 0 !important;
    border-left: 2px solid #c40000 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
  }

  .home-trust-strip .home-trust-icon {
    display: none !important;
  }

  .home-trust-strip .home-trust-item strong {
    display: block !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.05em !important;
    line-height: 1.25 !important;
    margin: 0 0 2px !important;
  }

  .home-trust-strip .home-trust-item span:not(.home-trust-icon) {
    display: block !important;
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
    color: rgba(255, 255, 255, 0.6) !important;
  }

  /* ---------- Home link cards → clean list rows ---------- */
  .home-sitelinks-grid {
    display: block !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 16px !important;
  }

  .home-sitelink-card {
    position: relative;
    display: block !important;
    padding: 16px 32px 16px 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
    text-align: left !important;
  }

  .home-sitelink-card::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid rgba(255, 255, 255, 0.5);
    border-right: 2px solid rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) rotate(45deg);
  }

  .home-sitelink-card h3 {
    font-size: 1.05rem !important;
    margin: 0 !important;
    line-height: 1.25 !important;
  }

  /* One line of description max — keeps rows tight */
  .home-sitelink-card p {
    margin: 3px 0 0 !important;
    font-size: 0.86rem !important;
    line-height: 1.4 !important;
    color: rgba(255, 255, 255, 0.55) !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Collapsible "Shop material families" header: plain row, small chevron */
  .home-sitelinks-toggle > summary {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left !important;
    padding: 0 !important;
  }

  .home-sitelinks-toggle-title {
    font-size: clamp(1.3rem, 5.8vw, 1.7rem) !important;
    line-height: 1.2 !important;
    text-align: left !important;
  }

  .home-sitelinks-toggle-control {
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  /* Bundle photos: 2x2 thumbnails instead of four full-screen photos */
  .bundle-photo-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin: 18px 0 20px !important;
  }

  .bundle-photo-grid img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    margin: 0 !important;
  }

  /* Reviews: swipeable row instead of three tall stacked cards */
  .customer-reviews-grid {
    display: flex !important;
    gap: 12px !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 18px -20px 0 !important;
    padding: 0 20px 6px !important;
    scrollbar-width: none;
  }

  .customer-reviews-grid::-webkit-scrollbar {
    display: none;
  }

  .customer-review-card {
    flex: 0 0 82% !important;
    scroll-snap-align: start;
    padding: 18px !important;
    background: #141617 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    margin: 0 !important;
  }

  .customer-review-card blockquote {
    font-size: 0.92rem !important;
    line-height: 1.5 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .social-proof-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-top: 20px !important;
  }

  .social-proof-actions .btn {
    font-size: 0.88rem !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    margin: 0 !important;
  }

  /* ---------- Products: remove the placard behind photos ---------- */
  .catalog-card,
  .catalog-link-card {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
    height: auto !important;
  }

  .catalog-card::before,
  .catalog-card::after {
    display: none !important;
  }

  .catalog-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 22px 12px !important;
  }

  .catalog-grid > * {
    grid-column: auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .catalog-card .catalog-image {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    max-height: none !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 10px !important;
    transform: none !important;
  }

  .catalog-card h2,
  .catalog-card h3 {
    margin: 8px 0 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.25 !important;
    text-align: left !important;
    letter-spacing: 0 !important;
  }

  .catalog-card p {
    display: none !important;
  }

  .catalog-heading h1,
  .catalog-heading h2 {
    text-align: left !important;
  }

  /* Products surface: drop its own panel frame too */
  body.products-catalog-page .product-mode-surface {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* ---------- Services: photos without frames, copy left-aligned ---------- */
  .service-section {
    padding: 0 0 32px !important;
    margin: 0 0 32px !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
  }

  .service-section .service-image {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: cover !important;
    border: 0 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    max-width: none !important;
  }

  .service-copy {
    text-align: left !important;
    padding: 14px 0 0 !important;
    background: transparent !important;
    border: 0 !important;
  }

  .services-hero-panel {
    text-align: left !important;
  }

  /* ---------- Follow-up fixes ---------- */
  .home-sitelinks-toggle > summary {
    flex-direction: row !important;
    padding: 16px 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .home-sitelinks-toggle-title {
    max-width: none !important;
    margin: 0 !important;
    font-size: 1.15rem !important;
  }

  .home-sitelinks-toggle-control {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: none !important;
  }

  .home-sitelinks-toggle-icon {
    width: 18px !important;
    height: 18px !important;
  }

  .home-sitelinks-toggle[open] > .home-sitelinks-grid {
    border-top: 0;
    margin-top: 0 !important;
  }

  .home-bundles-highlight .section-intro,
  .section-intro {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
  }

  body > main > .cta {
    min-height: 0 !important;
    padding: 40px 20px 44px !important;
  }

  body > main > .cta::before {
    display: none !important;
  }

  body > main > .cta .container {
    text-align: left !important;
    padding: 0 !important;
  }

  body > main > .cta h2 {
    max-width: none !important;
    margin: 0 0 8px !important;
    font-size: clamp(1.6rem, 7vw, 2.1rem) !important;
    line-height: 1.1 !important;
    text-shadow: none !important;
  }

  body > main > .cta p {
    margin: 0 !important;
    font-size: 1rem !important;
    color: rgba(255, 255, 255, 0.78) !important;
    text-shadow: none !important;
  }

  body > main > .cta .btn {
    width: 100% !important;
    margin-top: 20px !important;
    padding: 14px 20px !important;
    font-size: 1rem !important;
    box-shadow: none !important;
  }

  .social-proof-strip .container > h2,
  .about .container > h2 {
    padding: 0 !important;
    margin-left: 0 !important;
    text-align: left !important;
  }

  .customer-reviews-grid {
    margin-left: 0 !important;
    margin-right: -20px !important;
    padding-left: 0 !important;
  }

  /* ---------- Products: higher-specificity overrides (beat styles.css) ---------- */
  body.products-catalog-page .catalog-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 22px 12px !important;
  }

  body.products-catalog-page .catalog-grid > .catalog-card {
    grid-column: auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: left !important;
    overflow: visible !important;
  }

  body.products-catalog-page .catalog-grid > .catalog-card .catalog-image {
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    object-position: center !important;
    padding: 0 !important;
    border-radius: 10px !important;
    background: #1a1c1d !important;
    transform: none !important;
  }

  body.products-catalog-page .catalog-grid > .catalog-card h2,
  body.products-catalog-page .catalog-grid > .catalog-card h3 {
    margin: 8px 0 0 !important;
    padding: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.25 !important;
    text-align: left !important;
  }

  body.products-catalog-page .catalog-heading h1,
  body.products-catalog-page .catalog-heading h2 {
    font-size: clamp(1.4rem, 6vw, 1.8rem) !important;
    text-align: left !important;
  }

  /* ---------- Services: higher-specificity overrides ---------- */
  body .services-page .service-section {
    gap: 12px !important;
    padding: 0 0 28px !important;
    margin: 0 0 28px !important;
  }

  body .services-page .service-image {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 10 !important;
    object-fit: cover !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    max-width: none !important;
  }

  body .services-page .service-copy {
    text-align: left !important;
  }

  body .services-page .service-copy h2 {
    max-width: none !important;
    margin: 0 0 6px !important;
    font-size: clamp(1.4rem, 6.2vw, 1.8rem) !important;
    line-height: 1.15 !important;
    text-align: left !important;
  }

  body .services-page .service-copy p,
  body .services-page .service-copy p:last-child {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    text-align: left !important;
    color: rgba(255, 255, 255, 0.75) !important;
  }

  body .services-page .services-hero-panel,
  body .services-page .services-hero-panel * {
    text-align: left !important;
  }

  body .services-page .services-hero-panel h1 {
    font-size: clamp(1.7rem, 7.5vw, 2.2rem) !important;
  }

  body .services-page .services-hero-panel p {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    margin-left: 0 !important;
  }

  /* Services: beat the final centered rules in styles.css */
  html body .services-page .service-story .service-section {
    gap: 12px !important;
    padding: 0 0 28px !important;
  }

  html body .services-page .service-story .service-section > .service-image,
  html body .services-page .service-story #scale-production > .service-image,
  html body .services-page .service-story .service-section > .service-image-processing {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 10 !important;
    object-fit: cover !important;
    border-radius: 10px !important;
    background: #1a1c1d !important;
  }

  html body .services-page .service-story .service-section > .service-copy,
  html body .services-page .service-story .service-section > .service-copy h2,
  html body .services-page .service-story .service-section > .service-copy p,
  html body .services-page .service-story .service-section > .service-copy p:last-child,
  html body .services-page .services-hero-panel p:last-child {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left !important;
  }

  html body .services-page .service-story .service-section > .service-copy p:last-child,
  html body .services-page .services-hero-panel p:last-child {
    font-size: 1rem !important;
    line-height: 1.5 !important;
  }

  /* Hero: darker wash so text and trust list read cleanly over the pipe photo */
  .hero {
    min-height: 0 !important;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(6, 7, 8, 0.55) 0%, rgba(6, 7, 8, 0.82) 100%) !important;
  }

  /* ---------- Interior pages: calmer headlines everywhere ---------- */
  html body main h1 {
    font-size: clamp(1.8rem, 8.2vw, 2.4rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.015em !important;
    max-width: none !important;
  }

  html body main .catalog-eyebrow {
    font-size: 0.72rem !important;
    letter-spacing: 0.14em !important;
    margin-bottom: 8px !important;
  }

  /* Product family pages (aluminum, stainless, bollards, decking...):
     drop the panel frames; sections separated by thin rules instead */
  html body.product-family-body .product-family-hero,
  html body.product-family-body .product-family-card,
  html body.product-family-body .product-family-content {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  html body.product-family-body .product-family-hero {
    padding: 24px 20px 8px !important;
    margin: 0 !important;
  }

  html body.product-family-body .product-family-content {
    padding: 0 20px 24px !important;
    margin: 0 !important;
    gap: 0 !important;
  }

  html body.product-family-body .product-family-card {
    padding: 24px 0 !important;
    margin: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  html body.product-family-body .product-family-card h2 {
    font-size: 1.2rem !important;
    margin: 0 0 10px !important;
  }

  html body.product-family-body .product-family-card li {
    font-size: 0.98rem !important;
    line-height: 1.55 !important;
    color: rgba(255, 255, 255, 0.78) !important;
  }

  html body.product-family-body .product-family-hero p {
    font-size: 1rem !important;
    line-height: 1.55 !important;
    color: rgba(255, 255, 255, 0.8) !important;
  }

  html body.product-family-body .product-family-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-top: 20px !important;
  }

  html body.product-family-body .product-family-actions .btn {
    font-size: 0.9rem !important;
    padding: 12px 8px !important;
    margin: 0 !important;
    text-align: center !important;
  }

  html body.product-family-body .product-family-image {
    border-radius: 10px !important;
    box-shadow: none !important;
    margin-top: 20px !important;
  }

  /* ---------- Contact: less framing ---------- */
  html body.contact-page-body .contact-panel,
  html body.contact-page-body .contact-info-panel,
  html body.contact-page-body .contact-jump-panel {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  html body.contact-page-body .contact-panel-header,
  html body.contact-page-body .contact-panel-header * {
    text-align: left !important;
  }

  html body.contact-page-body .contact-panel-header p {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    color: rgba(255, 255, 255, 0.78) !important;
  }

  html body.contact-page-body .order-disclaimer {
    background: transparent !important;
    border: 0 !important;
    border-left: 2px solid #c40000 !important;
    border-radius: 0 !important;
    padding: 0 0 0 14px !important;
    font-size: 0.88rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
  }

  /* ---------- About: smaller hero, smaller emblem ---------- */
  .story-hero .story-hero-logo {
    width: 96px !important;
    max-width: 96px !important;
    height: auto !important;
    margin: 20px 0 0 !important;
  }

  .story-hero,
  .story-hero-copy {
    text-align: left !important;
  }

  .story-hero-copy p,
  .story-chapter p {
    font-size: 1rem !important;
    line-height: 1.55 !important;
  }

  .story-chapter h2 {
    font-size: 1.35rem !important;
  }

  /* Headlines on pages whose h1 rules carry class specificity */
  html body .product-family-copy h1,
  html body .contact-panel-header h1,
  html body .contact-panel h1,
  html body .bollards-copy h1,
  html body .catalog-heading h1,
  html body .story-hero h1 {
    font-size: clamp(1.8rem, 8.2vw, 2.4rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.015em !important;
    max-width: none !important;
  }

  /* Remove the framed "placard" around feature photos (bollards, decking,
     grating, bundles, Birmingham pages) */
  html body .bollards-image-card,
  html body .steel-bundles-image-card,
  html body .birmingham-hero-figure {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  html body .bollards-image-card img,
  html body .steel-bundles-image-card img,
  html body .birmingham-hero-figure img {
    width: 100% !important;
    border: 0 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    margin: 0 0 12px !important;
  }

  html body .bollards-image-card p,
  html body .steel-bundles-image-card p,
  html body .birmingham-hero-figure figcaption {
    padding: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    color: rgba(255, 255, 255, 0.7) !important;
  }

  /* Proof chips: one quiet line instead of stacked boxed tags */
  html body .bollards-proof,
  html body .steel-bundles-proof,
  html body .birmingham-proof-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px 14px !important;
  }

  html body .bollards-proof > *,
  html body .steel-bundles-proof > *,
  html body .birmingham-proof-pills > * {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.08em !important;
    color: rgba(255, 255, 255, 0.6) !important;
  }

  html body .bollards-proof > *::before,
  html body .steel-bundles-proof > *::before,
  html body .birmingham-proof-pills > *::before {
    content: "✓ ";
    color: #e2352b;
  }

  /* Info cards on bollards / decking / grating / bundles → plain sections */
  html body .bollards-card,
  html body .steel-bundles-card {
    padding: 22px 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  html body .bollards-card h2,
  html body .bollards-card h3,
  html body .steel-bundles-card h2,
  html body .steel-bundles-card h3 {
    font-size: 1.2rem !important;
    text-align: left !important;
  }
}
