/* v228 — align the desktop layout with the Shopify reference. Mobile is unchanged. */
@media (min-width: 1101px) {
  body .catalog-search {
    width: min(1000px, calc(100% - 64px)) !important;
    max-width: 1000px !important;
    margin: 12px auto 11px !important;
  }

  body .catalog-search > div {
    min-height: 78px !important;
    padding-inline: 24px !important;
  }

  body .catalog-search input {
    height: 76px !important;
    font-size: 17px !important;
  }

  body .quick-finder {
    padding-block: 15px !important;
  }

  body .finder-inner {
    width: min(1500px, calc(100% - 64px)) !important;
    grid-template-columns: 205px repeat(3, minmax(0, 1fr)) 156px !important;
    gap: 16px !important;
  }

  body .finder-title {
    font-size: 20px !important;
  }

  body .finder-inner select,
  body .finder-inner button {
    height: 65px !important;
    min-height: 65px !important;
    font-size: 16px !important;
  }

  body .finder-inner select {
    padding-inline: 22px 40px !important;
  }

  body .finder-inner button {
    padding-inline: 18px !important;
  }

  body .repair-hero {
    width: min(1550px, calc(100% - 80px)) !important;
    min-height: 432px !important;
    margin: 16px auto 30px !important;
    padding: 30px 30px 28px !important;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.1fr) !important;
    gap: 28px 24px !important;
  }

  body .repair-hero-copy {
    max-width: 560px !important;
  }

  body .repair-hero-visual {
    min-height: 290px !important;
    border-radius: 16px !important;
  }

  body .repair-hero-links {
    gap: 10px !important;
  }

  body .repair-hero-links a {
    min-height: 54px !important;
    font-size: 13px !important;
  }
}

@media (min-width: 1451px) {
  body .header .header-inner {
    width: min(1680px, calc(100% - 96px)) !important;
    max-width: 1680px !important;
    min-width: 0 !important;
    gap: 18px !important;
  }

  body .header .brand {
    width: 330px !important;
    min-width: 330px !important;
    flex: 0 0 330px !important;
  }

  body .header .structure-nav {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    gap: 14px !important;
    white-space: nowrap !important;
  }

  body .header .structure-nav > a,
  body .header .nav-mega > summary {
    font-size: 14px !important;
  }

  body .header .header-phones {
    min-width: 0 !important;
    flex: 0 0 auto !important;
    padding-left: 16px !important;
  }

  body .header .header-phones .header-phone {
    font-size: 14px !important;
  }
}

/* Outrank earlier homepage and category compaction rules. */
@media (min-width: 1101px) {
  body.storefront.home-page > .catalog-search,
  body.storefront.category-page > .catalog-search {
    width: min(1000px, calc(100% - 64px)) !important;
    max-width: 1000px !important;
    margin: 12px auto 11px !important;
  }

  body.storefront.home-page .catalog-search > div,
  body.storefront.category-page .catalog-search > div {
    min-height: 78px !important;
    padding-inline: 24px !important;
  }

  body.storefront.home-page .catalog-search input,
  body.storefront.category-page .catalog-search input {
    height: 76px !important;
    font-size: 17px !important;
  }

  body.storefront.home-page .quick-finder,
  body.storefront.category-page .quick-finder {
    padding-block: 15px !important;
  }

  body.storefront.home-page .finder-inner,
  body.storefront.category-page .finder-inner {
    width: min(1500px, calc(100% - 64px)) !important;
    grid-template-columns: 205px repeat(3, minmax(0, 1fr)) 156px !important;
    gap: 16px !important;
  }

  body.storefront.home-page .finder-title,
  body.storefront.category-page .finder-title {
    font-size: 20px !important;
  }

  body.storefront.home-page .finder-inner select,
  body.storefront.home-page .finder-inner button,
  body.storefront.category-page .finder-inner select,
  body.storefront.category-page .finder-inner button {
    height: 65px !important;
    min-height: 65px !important;
    font-size: 16px !important;
  }

  body.storefront.home-page .finder-inner select,
  body.storefront.category-page .finder-inner select {
    padding-inline: 22px 40px !important;
  }

  body.storefront.home-page .finder-inner button,
  body.storefront.category-page .finder-inner button {
    padding-inline: 18px !important;
  }

  body.storefront.home-page .repair-hero,
  body.storefront.category-page .repair-hero {
    width: min(1550px, calc(100% - 80px)) !important;
    min-height: 432px !important;
    margin: 16px auto 30px !important;
    padding: 30px 30px 28px !important;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.1fr) !important;
    gap: 28px 24px !important;
  }

  body.storefront.home-page .repair-hero-copy,
  body.storefront.category-page .repair-hero-copy {
    max-width: 560px !important;
  }

  body.storefront.home-page .repair-hero-visual,
  body.storefront.category-page .repair-hero-visual {
    min-height: 290px !important;
    border-radius: 16px !important;
  }

  body.storefront.home-page .repair-hero-links,
  body.storefront.category-page .repair-hero-links {
    gap: 10px !important;
  }

  body.storefront.home-page .repair-hero-links a,
  body.storefront.category-page .repair-hero-links a {
    min-height: 54px !important;
    font-size: 13px !important;
  }
}

/* Desktop header correction: Shopify-sized logo and readable navigation, with the phone links kept close to Contact. */
@media (min-width: 1451px) {
  body .header .header-inner {
    width: min(1680px, calc(100% - 96px)) !important;
    max-width: 1680px !important;
    justify-content: flex-start !important;
    gap: 0 !important;
  }

  body .header .brand {
    width: 400px !important;
    min-width: 400px !important;
    flex: 0 0 400px !important;
  }

  body .header .structure-nav {
    flex: 0 1 auto !important;
    gap: 16px !important;
    margin-left: clamp(40px, 4vw, 72px) !important;
  }

  body .header .structure-nav > a,
  body .header .nav-mega > summary {
    font-size: 16px !important;
  }

  body .header .header-phones {
    flex: 0 0 auto !important;
    margin-left: 24px !important;
    padding-left: 18px !important;
  }

  body .header .header-phones .header-phone {
    font-size: 15px !important;
  }
}
