/* Car Care Customs — belastbare Geometrie fuer Mobile, Split View und Foldables. */
html,
body {
  max-width: 100%;
}

body {
  min-width: 0;
}

/* Die grossen Leistungskarten brauchen in der mittleren Fold-/Tabletbreite mehr
   Raum als ein starres 6/3/3-Raster. */
@media (min-width: 901px) and (max-width: 1180px) {
  .home-vision .service-grid--focus {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .home-vision .service-card--ceramic {
    min-height: 540px;
    grid-column: 1 / -1;
  }

  .home-vision .service-card--ppf,
  .home-vision .service-card--underbody {
    min-height: 580px;
    grid-column: span 6;
  }

  .home-vision .service-card--underbody .service-card__body {
    width: 100%;
  }
}

/* Dunkle Inszenierungen behalten auch nach den allgemeinen Textregeln ihren
   vorgesehenen Kontrast. */
.home-vision .home-dryice__copy > p,
.ccc-pride .ccc-pride__lead {
  color: rgba(244, 242, 238, .76);
}

/* Das Bild der Keramik-Signatur darf die Textspalte nicht auf deren volle Hoehe
   auseinanderziehen. */
.home-vision .signature-media {
  align-self: start;
}

@media (max-width: 640px) {
  /* Lange Bereichszeilen duerfen als Worte umbrechen, nicht als Buchstabenraster. */
  .ccc-marketing-page .hero .kicker,
  .ccc-marketing-page .section-title > span,
  .ccc-marketing-page .gv-eyebrow {
    max-width: 100%;
    letter-spacing: clamp(.13em, .7vw, .22em);
    line-height: 1.5;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
  }

  .ccc-marketing-page .hero .kicker {
    font-size: clamp(.59rem, 2.65vw, .7rem);
  }
}

@media (max-width: 680px) {
  .home-vision .signature-media {
    width: min(100%, 620px);
  }

  .home-vision .signature-media img {
    height: auto;
    min-height: 0;
    max-height: 360px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }

  .dryice-page .system-card h3 {
    max-width: 100%;
    font-size: clamp(1.72rem, 8.8vw, 2.35rem);
    hyphens: auto;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .dryice-page .dryice-interior__price-card h4 {
    max-width: 100%;
    font-size: clamp(1.55rem, 7vw, 2rem);
    hyphens: manual;
    overflow-wrap: normal;
    word-break: normal;
  }
}

@media (max-width: 430px) {
  .protection-lab__tabs {
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .protection-lab__tabs button {
    min-width: 0;
    min-height: 62px;
    padding: 11px 7px;
    column-gap: 6px;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .protection-lab__tabs button > span {
    font-size: .6rem;
  }

  .protection-lab__tabs button strong {
    min-width: 0;
    font-size: clamp(.66rem, 3.25vw, .82rem);
    overflow-wrap: anywhere;
  }

  .protection-lab__tabs button small {
    display: none;
  }
}

@media (max-width: 480px) {
  .chiptuning-page .hero-subtitle {
    max-width: 100%;
    font-size: .6rem;
    letter-spacing: .14em;
    line-height: 1.55;
    overflow-wrap: normal;
    word-break: normal;
    white-space: normal;
  }

  .chiptuning-page .hero-content h1 {
    max-width: 100%;
    font-size: clamp(2.25rem, 11vw, 3rem);
    letter-spacing: -.055em;
    overflow-wrap: normal;
    word-break: normal;
  }
}

/* Kurze Querformate: Kopfzeile und Inhaltsflaeche teilen sich den Platz sauber. */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 620px) {
  :root {
    --ccc-header-height: 60px;
  }

  .home-vision .site-header,
  .ppf-page .site-header,
  .underbody-page .site-header {
    min-height: 60px;
  }

  .underbody-page .site-header {
    gap: 12px;
    padding: 5px max(18px, env(safe-area-inset-right)) 5px max(18px, env(safe-area-inset-left));
  }

  .underbody-page .site-header .brand img {
    width: 40px;
    height: 40px;
  }

  .underbody-page .site-header .brand small {
    display: none;
  }

  .underbody-page .site-header .nav-cta {
    padding: 9px 13px;
  }

  .home-vision .header-inner,
  .ppf-page .header-inner {
    min-height: 60px;
  }

  .home-vision .main-nav,
  .ppf-page .main-nav {
    top: 60px;
  }

  .mobile-contact {
    gap: 6px;
    padding: 5px 10px max(5px, env(safe-area-inset-bottom));
  }

  .mobile-contact a,
  .home-vision .mobile-contact a {
    min-height: 38px;
    font-size: .64rem;
  }

  .home-vision .site-header .brand img,
  .ppf-page .site-header .brand img {
    width: 40px;
    height: 40px;
  }

  .home-vision .site-header .brand small,
  .ppf-page .site-header .brand small {
    display: none;
  }

  .ccc-marketing-page {
    --navH: 60px;
    --tickerH: 34px;
  }

  .ccc-marketing-page .navbar.ccc-site-header {
    height: var(--ccc-header-height) !important;
    min-height: var(--ccc-header-height) !important;
  }

  .ccc-marketing-page .navbar .nav-logo img {
    height: 40px;
  }

  .ccc-marketing-page .navbar .nav-brand small {
    display: none;
  }

  .ccc-marketing-page .ticker {
    height: var(--tickerH);
    padding-block: 8px;
  }

  .ccc-marketing-page .ticker .track {
    font-size: .54rem;
    letter-spacing: .22em;
  }

  .ccc-marketing-page main > .hero,
  .ccc-marketing-page main > header.hero {
    min-height: 620px !important;
    align-items: flex-start !important;
    overflow: clip !important;
    padding-top: calc(var(--ccc-header-height) + 30px) !important;
    padding-bottom: 48px !important;
  }

  .ccc-marketing-page main > .hero h1 {
    font-size: clamp(2.55rem, 8.2vw, 4.4rem) !important;
    line-height: .9 !important;
  }

  .ccc-marketing-page main > .hero p {
    font-size: .9rem !important;
    line-height: 1.58 !important;
  }

  /* Trockeneis: die zweite Navigationszeile wird im flachen Foldable einzeilig. */
  .dryice-page .dryice-header__inner {
    width: min(100% - 20px, 1320px);
    min-height: 58px;
    gap: 8px 10px;
    padding-block: 5px;
    grid-template-areas: "brand nav cta";
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .dryice-page .dryice-header .brand {
    grid-area: brand;
    gap: 7px;
  }

  .dryice-page .dryice-header .brand img {
    width: 36px;
    height: 36px;
  }

  .dryice-page .dryice-header .brand strong {
    font-size: .76rem;
  }

  .dryice-page .dryice-header .brand small {
    display: none;
  }

  .dryice-page .dryice-nav {
    grid-area: nav;
    justify-content: center;
    gap: 0;
    overflow: hidden;
  }

  .dryice-page .dryice-nav a {
    min-height: 36px;
    padding: 7px 6px;
    font-size: .59rem;
    letter-spacing: 0;
  }

  .dryice-page .header-cta {
    grid-area: cta;
    min-height: 38px;
    padding: 8px 11px;
    font-size: .61rem;
  }

  /* PPF bleibt zweispaltig, statt einen fast 1000 px hohen Mobile-Hero zu erzwingen. */
  .ppf-page .ppf-hero {
    min-height: 640px;
    height: 640px;
    padding-top: 60px;
  }

  .ppf-page .ppf-hero__inner {
    min-height: 580px;
    align-items: start;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  }

  .ppf-page .ppf-hero__copy {
    max-width: none;
    padding: 30px 0 32px;
  }

  .ppf-page .ppf-hero__copy h1 {
    max-width: 12ch;
    margin-bottom: 12px;
    font-size: clamp(2.15rem, 6vw, 3.35rem);
    line-height: .88;
  }

  .ppf-page .ppf-hero__copy > p {
    margin-bottom: 14px;
    font-size: .78rem;
    line-height: 1.46;
  }

  .ppf-page .ppf-hero__actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .ppf-page .ppf-hero__actions .button {
    width: auto;
    min-height: 38px;
    padding: 8px 10px;
    font-size: .59rem;
    line-height: 1.2;
  }

  .ppf-page .ppf-hero__trust {
    gap: 6px 10px;
    margin-top: 14px;
    padding-top: 10px;
  }

  .ppf-page .ppf-hero__trust span {
    font-size: .52rem;
    line-height: 1.35;
  }

  .ppf-page .ppf-hero__media {
    top: 60px;
    right: 0;
    bottom: 0;
    left: auto;
    width: 52%;
    height: auto;
    clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
  }

  /* Unterboden: genug Raum fuer den Text, aber kein drei Viewports hoher Einstieg. */
  .underbody-page .hero {
    min-height: 640px;
    align-items: end;
    padding: 92px max(20px, env(safe-area-inset-right)) 48px max(20px, env(safe-area-inset-left));
  }

  .underbody-page .hero h1 {
    font-size: clamp(2.4rem, 7.8vw, 4rem);
  }
}

/* Engste Split-View-Breiten: keine min-content-bedingten Ausreißer. */
@media (max-width: 360px) {
  .home-vision .direction-card__copy h3,
  .home-vision .service-card__body h3 {
    max-width: 100%;
    font-size: clamp(1.82rem, 10.8vw, 2.08rem);
    hyphens: auto;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  /* Metadaten stehen im normalen Kartenfluss. Dadurch kollidieren Preiszeile
     und Ueberschrift selbst bei 280 px Split View nicht. */
  .home-vision .service-card--ceramic,
  .home-vision .service-card--ppf,
  .home-vision .service-card--underbody {
    display: flex;
    min-height: 520px;
    justify-content: flex-start;
    flex-direction: column;
  }

  .home-vision .service-card__top {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    align-items: flex-start;
    margin: 22px 18px 0;
  }

  .home-vision .service-card__top > span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .home-vision .service-card__body,
  .home-vision .service-card--underbody .service-card__body {
    width: 100%;
    margin-top: auto;
    padding: 24px 18px 26px;
  }

  .ppf-page .header-inner {
    gap: 6px;
    padding-inline: 10px;
  }

  .ppf-page .site-header .brand-copy {
    display: none;
  }

  .ppf-page .ppf-hero__inner,
  .ppf-page .ppf-hero__copy,
  .ppf-page .ppf-hero__copy > * {
    min-width: 0;
    max-width: 100%;
  }

  .ppf-page .ppf-hero__copy h1 {
    max-width: 100%;
    font-size: clamp(2.05rem, 11vw, 2.4rem);
    letter-spacing: -.06em;
    line-height: .9;
    overflow-wrap: normal;
    word-break: normal;
  }

  .ppf-page .ppf-honesty,
  .ppf-page .ppf-honesty__inner,
  .ppf-page .ppf-honesty__inner > *,
  .ppf-page .ppf-honesty__inner > div {
    min-width: 0;
    max-width: 100%;
  }

  .ppf-page .ppf-honesty h2 {
    max-width: 100%;
    font-size: 2rem;
    letter-spacing: -.055em;
    line-height: .93;
    overflow-wrap: normal;
    word-break: normal;
  }

  .ccc-interior-page main > .hero,
  .ccc-interior-page main > header.hero {
    height: auto;
    min-height: 100svh;
    align-items: flex-start;
    overflow: visible;
    padding: 112px 0 52px;
  }

  .ccc-interior-page .hero-content {
    width: 100%;
    min-width: 0;
    padding-inline: 16px;
  }

  .ccc-interior-page .hero-subtitle {
    margin-bottom: 12px;
    font-size: .6rem;
    letter-spacing: .22em;
    line-height: 1.45;
  }

  .ccc-interior-page .hero-content h1 {
    margin-bottom: 16px;
    font-size: 2.25rem;
    letter-spacing: -.055em;
    line-height: .9;
  }

  .ccc-interior-page .hero-copy {
    font-size: .84rem;
    line-height: 1.58;
  }

  .chiptuning-page .section {
    padding-inline: 14px;
  }

  .chiptuning-page .blueprint-wrap {
    padding: 20px 12px;
  }

  .chiptuning-page .bp-title {
    font-size: .8rem;
    letter-spacing: .08em;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
  }

  .chiptuning-page .process-grid,
  .chiptuning-page .pricing-grid,
  .chiptuning-page .step,
  .chiptuning-page .step > *,
  .chiptuning-page .price-card {
    min-width: 0;
    max-width: 100%;
  }

  .chiptuning-page .step {
    column-gap: 12px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .chiptuning-page .step-num {
    width: 42px;
    height: 42px;
    min-width: 42px;
    margin: 0;
    grid-row: 1 / span 2;
  }

  .chiptuning-page .step h4,
  .chiptuning-page .step p {
    min-width: 0;
    grid-column: 2;
  }

  .chiptuning-page .price-card {
    min-height: 0;
    padding: 40px 18px;
  }

  .chiptuning-page .switch,
  .chiptuning-page .btn-luxury,
  .chiptuning-page .modebar {
    max-width: 100%;
  }

  .underbody-page .price-catalog__body > header {
    min-width: 0;
    max-width: 100%;
  }

  .underbody-page .price-catalog__body > header h2 {
    max-width: 100%;
    font-size: clamp(1.5rem, 8vw, 1.8rem);
    letter-spacing: -.045em;
    line-height: 1.02;
    overflow-wrap: normal;
    word-break: normal;
  }
}

@media (max-width: 300px) {
  .underbody-page .price-catalog__body > header h2 {
    font-size: 1.35rem;
  }
}

/* Interne Tabellen dürfen scrollen; ihre Karten selbst bleiben im Viewport. */
.underbody-page .price-catalog__body,
.underbody-page .price-catalog__body > *,
.underbody-page .price-catalog__group,
.underbody-page .price-catalog__heading,
.underbody-page .price-catalog__scroll,
.underbody-page .price-catalog__split {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 720px) and (orientation: landscape) and (max-height: 360px) {
  .dryice-page .dryice-nav a:not([aria-current="page"]) {
    color: rgba(240, 235, 227, .58);
  }

  .ccc-marketing-page main > .hero,
  .ppf-page .ppf-hero,
  .underbody-page .hero {
    min-height: 580px;
  }

  .ppf-page .ppf-hero__copy {
    padding: 18px 0 24px;
  }

  .ppf-page .ppf-hero__copy h1 {
    max-width: none;
    font-size: clamp(1.7rem, 4.2vw, 2.15rem);
    line-height: .9;
  }

  .ppf-page .ppf-hero__trust {
    margin-top: 10px;
    padding-top: 8px;
  }

  .mobile-contact {
    padding-block: 2px max(2px, env(safe-area-inset-bottom));
  }

  .mobile-contact a,
  .home-vision .mobile-contact a {
    min-height: 32px;
  }
}

@media print {
  .ccc-responsive-only {
    display: none !important;
  }
}
