/* ─── Mobile Startseiten-Reparatur (wird ZULETZT geladen) ───
   Ziel: professioneller, kompakter Mobile-Look für lizenzmarkt.net
   ohne den Desktop (>= 1024px) zu verändern.
   Hinweis: Das Theme nutzt 62.5% Basis → 1rem = 10px. */

/* ─── Scroll-Lock: Off-Canvas-Menü offen ─── */
body.lm-menu-open {
  overflow: hidden;
}

/* ─── Container: mobil schmalere Ränder (mehr Inhalt, weniger Luft) ─── */
@media (max-width: 767px) {
  .lm-container,
  .lm-container--hero {
    width: calc(100% - 32px);
  }
}

/* ═══════════════ HEADER & SUCHLEISTE ═══════════════
   Ursache: Header war bei <=600px überladen (Toggle + Logo + Suche +
   Konto + Warenkorb in einer Zeile → horizontaler Überlauf, maskiert durch
   body overflow-x). Lösung: Suche wandert auf eine eigene, volle zweite
   Zeile; oben bleiben Toggle | Logo | Konto + Warenkorb. */
@media (max-width: 767px) {
  .lm-header {
    height: auto;
  }

  .lm-header__inner {
    flex-wrap: wrap;
    row-gap: 8px;
    padding: 8px 0;
    height: auto;
    width: calc(100% - 32px);
  }

  .lm-mobile-toggle {
    order: 1;
  }

  .lm-header__logo {
    order: 2;
  }

  .lm-header__logo-img-mobile {
    height: 40px;
  }

  .lm-header__actions {
    order: 3;
    flex: 0 1 auto;
    margin-left: auto;
  }

  /* Suche als eigene, volle Zeile (exakt EIN Suchfeld sichtbar) */
  .lm-header-search--header {
    order: 4;
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
  }

  .lm-header-search--header .lm-header-search__form {
    width: 100%;
  }

  .lm-header-search--header .lm-header-search__wrapper {
    flex: 1;
  }

  .lm-header-search--header .lm-header-search__input {
    width: 100%;
    height: 44px;
    min-height: 44px;
    font-size: 16px; /* verhindert iOS-Auto-Zoom bei <16px */
  }

  .lm-header-search--header .lm-header-search__submit {
    display: flex;
    width: 34px;
    height: 34px;
  }

  .lm-header__icon svg {
    width: 22px;
    height: 22px;
  }
}

/* ─── Icon-Obergrenzen (Spec: Header <=32px, global <=32px) ─── */
@media (max-width: 1023px) {
  .lm-header svg,
  .lm-mobile-menu svg {
    max-width: 32px;
    max-height: 32px;
  }

  .lm-mobile-toggle svg,
  .lm-mobile-menu__close svg {
    width: 24px;
    height: 24px;
  }

  /* Suchfeld: 16px gegen iOS-Zoom (bis Tablet) */
  .lm-header-search--header .lm-header-search__input {
    font-size: 16px;
  }
}

/* Suchfeld im Mobile-Menü: 16px gegen iOS-Zoom */
.lm-mobile-menu .lm-header-search__input {
  font-size: 16px;
}

/* ═══════════════ TRUST-LEISTE (Announcement) 2×2 ═══════════════
   Ursache: horizontal scrollende 4er-Leiste. Lösung: kompaktes 2×2-Raster. */
@media (max-width: 600px) {
  .lm-announcement__inner {
    overflow: visible;
  }

  .lm-announcement__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    min-width: 0;
    min-height: 0;
    gap: 6px 10px;
    padding: 10px 0;
  }

  .lm-announcement__item {
    border-right: none;
    padding: 4px 8px;
    justify-content: flex-start;
    white-space: normal;
    gap: 6px;
  }

  .lm-announcement__item strong {
    font-size: 1.2rem;
  }

  .lm-announcement__icon {
    width: 15px;
    height: 15px;
  }
}

/* ═══════════════ HERO: kompakt ═══════════════
   Ursache: Hero wurde auf Mobile ~1280px hoch (4 Checks gestapelt,
   grosse Bühne, grosse Buttons). Lösung: Checks 2×2, Bühne reduziert. */
@media (max-width: 767px) {
  .lm-hero__inner {
    gap: 24px;
  }

  .lm-hero__content {
    padding: 24px 0 0;
  }

  .lm-hero__badge {
    font-size: 1.15rem;
    padding: 6px 12px;
    margin-bottom: 14px;
  }

  .lm-hero h1 {
    font-size: clamp(3.2rem, 8.6vw, 4.2rem);
    letter-spacing: -0.03em;
  }

  .lm-hero__lead {
    font-size: 1.45rem;
    line-height: 1.5;
    margin: 14px 0 20px;
  }

  .lm-hero__actions {
    flex-direction: column;
    gap: 10px;
  }

  .lm-hero__actions .lm-btn,
  .lm-hero__actions .lm-btn--hero-secondary {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  /* Checks 2×2 statt gestapelt */
  .lm-hero__checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-top: 20px;
    margin-bottom: 4px;
  }

  .lm-hero__checks span {
    font-size: 1.25rem;
  }

  .lm-hero__checks span svg {
    width: 15px;
    height: 15px;
  }

  /* Bühne */
  .lm-hero__stage {
    min-height: 0;
    padding-bottom: 20px;
  }

  .lm-hero-stage {
    padding: 20px;
    gap: 16px;
  }

  .lm-hero-stage__product {
    gap: 14px;
    padding: 12px;
  }

  .lm-hero-stage__product img {
    width: 84px;
    height: 84px;
  }

  .lm-hero-stage__product-name {
    font-size: 1.5rem;
  }

  .lm-hero-stage__product-price {
    font-size: 1.8rem;
  }

  .lm-hero-stage__product-price del {
    font-size: 1.2rem;
  }

  .lm-hero-stage__offers {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .lm-hero-stage__offer {
    gap: 8px;
    padding: 8px 10px;
  }

  .lm-hero-stage__offer img {
    width: 44px;
    height: 44px;
  }

  .lm-hero-stage__offer-name {
    font-size: 1.15rem;
  }

  .lm-hero-stage__offer-price {
    font-size: 1.2rem;
    gap: 6px;
  }

  .lm-hero-stage__offer-pct {
    font-size: 1.05rem;
  }
}

@media (max-width: 389px) {
  /* Kompaktere Wortmarke, damit Toggle+Logo+Konto+Warenkorb in eine Zeile passen */
  .lm-header__logo-img-mobile {
    height: 30px;
  }

  .lm-hero-stage__offers {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .lm-hero-stage__product {
    padding: 10px 12px;
    gap: 12px;
  }

  .lm-hero-stage__product img {
    width: 64px;
    height: 64px;
  }

  .lm-hero-stage__offer img {
    width: 38px;
    height: 38px;
  }

  .lm-hero-stage {
    padding: 16px;
    gap: 12px;
  }
}

/* ─── Button-Padding-Resets (Astra setzt global padding auf button) ─── */
.lm-flash-slider__arrow,
.lm-header-search__submit {
  padding: 0;
}

/* ═══════════════ BENEFITS 2×2 ═══════════════ */
@media (max-width: 600px) {
  .lm-benefits__grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 24px 0;
  }

  .lm-benefit {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px 12px;
  }

  .lm-benefit__icon {
    width: 34px;
    height: 34px;
    margin-bottom: 2px;
  }

  .lm-benefit__icon svg {
    width: 18px;
    height: 18px;
  }

  .lm-benefit strong {
    font-size: 1.25rem;
  }

  .lm-benefit small {
    font-size: 1.1rem;
    line-height: 1.35;
  }
}

@media (max-width: 339px) {
  .lm-benefits__grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════ KATEGORIEN: 2 Spalten kompakt ═══════════════ */
@media (max-width: 767px) {
  .lm-category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .lm-category-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 14px;
  }

  .lm-category-card__icon {
    width: 44px;
    height: 44px;
  }

  .lm-category-card__icon svg {
    width: 24px;
    height: 24px;
  }

  .lm-category-card__name {
    font-size: 1.35rem;
  }

  .lm-category-card__count {
    font-size: 1.15rem;
  }

  .lm-category-card__cta {
    display: none;
  }
}

@media (max-width: 389px) {
  .lm-category-card {
    gap: 8px;
    padding: 12px 10px;
  }

  .lm-category-card__icon {
    width: 36px;
    height: 36px;
  }

  .lm-category-card__icon svg {
    width: 20px;
    height: 20px;
  }

  .lm-category-card__name {
    font-size: 1.2rem;
  }

  .lm-category-card__count {
    font-size: 1.1rem;
  }
}

/* ═══════════════ PRODUKTGRID: 1 Spalte, horizontale Karten ═══════════════
   Spec: Bild 90–110px links, Inhalt rechts, Preis + Button darunter. */
@media (max-width: 600px) {
  .lm-product-grid,
  .woocommerce ul.products {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .lm-product-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .lm-product-card__image {
    grid-column: 1;
    grid-row: 1 / 3;
    aspect-ratio: 1 / 1;
    border-bottom: none;
    border-right: 1px solid var(--lm-border);
  }

  .lm-product-card__image img {
    padding: 8px;
  }

  .lm-product-card__body {
    grid-column: 2;
    grid-row: 1;
    padding: 12px 14px 8px 12px;
    gap: 4px;
  }

  .lm-product-card__brand {
    font-size: 1.1rem;
  }

  .lm-product-card__title {
    font-size: 1.3rem;
    -webkit-line-clamp: 2;
  }

  .lm-product-card__meta {
    font-size: 1.05rem;
    padding-top: 2px;
  }

  .lm-product-card__footer {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 14px 14px;
  }

  .lm-product-card__footer .lm-price {
    font-size: 1.5rem;
  }

  .lm-product-card__cta,
  .lm-product-card__footer .button {
    width: 100%;
    min-height: 44px;
    font-size: 1.3rem;
  }
}

/* ═══════════════ Sektionen: Typografie & Abstände ═══════════════ */
@media (max-width: 767px) {
  .lm-section {
    padding: 44px 0;
  }

  .lm-section-heading {
    margin-bottom: 24px;
  }

  .lm-section-heading h2 {
    font-size: clamp(2.2rem, 5.5vw, 2.8rem);
  }

  .lm-eyebrow {
    font-size: 1.1rem;
  }

  .lm-text-link {
    font-size: 1.3rem;
    min-height: 40px;
  }

  /* Text-Mindestgrösse 11px (Spec) */
  .lm-badge {
    font-size: 1.1rem;
  }

  .lm-cart-count {
    font-size: 1.1rem;
  }

  .lm-flash-deals__heading h2 {
    font-size: clamp(2.2rem, 5.5vw, 2.8rem);
  }

  .lm-flash-deals__subtitle {
    font-size: 1.35rem;
  }

  .lm-flash-deals__status {
    font-size: 1.2rem;
    padding: 7px 12px;
  }

  .lm-flash-deals__status svg {
    width: 14px;
    height: 14px;
  }

  .lm-flash-deals__heading-actions .lm-text-link {
    font-size: 1.3rem;
  }

  .lm-flash-deals-section {
    padding-bottom: 40px;
  }
}

/* How it works – kompakt */
@media (max-width: 767px) {
  .lm-how-step {
    padding: 24px 18px;
  }

  .lm-how-step__number {
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    font-size: 1.7rem;
  }

  .lm-how-step h3 {
    font-size: 1.45rem;
  }

  .lm-how-step p {
    font-size: 1.25rem;
  }
}

/* Why – kompakt */
@media (max-width: 767px) {
  .lm-why-card {
    padding: 24px 18px;
  }

  .lm-why-card__icon {
    width: 36px;
    height: 36px;
    margin-bottom: 14px;
  }

  .lm-why-card__icon svg {
    width: 20px;
    height: 20px;
  }

  .lm-why-card h3 {
    font-size: 1.45rem;
  }

  .lm-why-card p {
    font-size: 1.25rem;
  }
}

/* ─── Text-Mindestgrösse 11px (Spec) – auch Desktop-Kleinteile ─── */
.lm-nav-badge {
  font-size: 1.1rem;
}

.lm-cart-count {
  font-size: 1.1rem;
}

.lm-hero-stage__offer-pct {
  font-size: 1.1rem;
}

.lm-flash-timer__unit small {
  font-size: 1.1rem;
}

.lm-badge--digital,
.lm-badge {
  font-size: 1.1rem;
}

/* ═══════════════ BLITZ REDESIGN: MOBILE SLIDER (1 Karte) ═══════════════
   Exakt 1 vollständige Karte, 16px Seitenabstand, Swipe statt Pfeilen,
   Pagination sichtbar, kein horizontaler Overflow. */
@media (max-width: 767px) {
  .lm-flash-deals-section {
    padding-bottom: 40px;
  }

  .lm-flash-deals__header {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    margin-bottom: 20px;
  }

  .lm-flash-deals__heading h2 {
    font-size: 2.6rem;
  }

  .lm-flash-deals__subtitle {
    font-size: 1.4rem;
  }

  /* Countdown unter der Überschrift (Reflow), automatische Breite */
  .lm-flash-deals__side {
    align-items: stretch;
    gap: 14px;
    order: 2;
  }

  .lm-flash-deals__heading-actions {
    justify-content: flex-start;
    gap: 12px;
  }

  .lm-flash-deals__status {
    font-size: 1.2rem;
    padding: 7px 13px;
  }

  .lm-flash-timer {
    margin: 0;
    align-self: flex-start;
    padding: 10px 12px 12px;
    gap: 6px;
  }

  .lm-flash-timer__label {
    font-size: 1.05rem;
  }

  .lm-flash-timer__time {
    grid-template-columns: repeat(4, minmax(42px, 1fr));
    column-gap: 2px;
  }

  .lm-flash-timer__unit {
    padding: 4px 6px;
  }

  .lm-flash-timer__unit b {
    font-size: 2.4rem;
  }

  .lm-flash-timer__unit small {
    font-size: 1.1rem;
  }

  .lm-flash-timer__col {
    font-size: 1.8rem;
  }

  /* Slider: 1 Karte, volle Container-Inhaltsbreite */
  .lm-flash-slider {
    --spv: 1;
    --slider-gap: 16px;
  }

  .lm-flash-slider__viewport {
    flex: 1 1 100%;
    width: 100%;
    overflow: hidden;
  }

  .lm-flash-slider__track {
    gap: 16px;
  }

  .lm-flash-slider__slide {
    flex: 0 0 calc((100% - 0 * var(--slider-gap)) / 1);
    max-width: 100%;
  }

  /* Pfeile mobil ausblenden: Navigation via Swipe + Pagination */
  .lm-flash-slider__arrow {
    display: none;
  }

  .lm-flash-slider__footer {
    margin-top: 18px;
    justify-content: space-between;
    gap: 12px;
  }

  .lm-flash-slider__progress {
    width: 110px;
    max-width: 45%;
  }

  /* Karten auf Mobil: Bild kompakter, Button voll breit */
  .lm-flash-card {
    padding: 14px;
    border-radius: 18px;
  }

  .lm-flash-card__media {
    height: 200px;
  }

  .lm-flash-card__title {
    font-size: 1.7rem;
    min-height: 6.63rem;
  }

  .lm-flash-card__price ins.lm-flash-card__new {
    font-size: 2.1rem;
  }

  .lm-flash-card__cta {
    min-height: 48px;
    font-size: 1.35rem;
  }
}

/* ═══════════════ BLITZ REDESIGN: KLEINSTE BREITEN (320–340) ═══════════════ */
@media (max-width: 389px) {
  .lm-flash-timer__time {
    grid-template-columns: repeat(4, minmax(34px, 1fr));
  }

  .lm-flash-timer__unit {
    padding: 3px 4px;
  }

  .lm-flash-timer__unit b {
    font-size: 1.9rem;
  }

  .lm-flash-timer__unit small {
    font-size: 1.1rem;
  }

  .lm-flash-timer__col {
    font-size: 1.4rem;
  }

  .lm-flash-card__media {
    height: 180px;
  }

  .lm-flash-card__title {
    min-height: 6.63rem;
  }

  .lm-flash-card__cta {
    font-size: 1.3rem;
    padding: 0 10px;
  }
}

/* ═══════════════ ROUND 2: BENEFITS HELL (Kontrast) ═══════════════
   Ursache: dunkle Glas-Karten mit dunklem Text = schlechter Kontrast.
   Lösung: heller Grund, dunkler Text, Icon giftgrün, sichtbarer Rand. */
@media (max-width: 767px) {
  .lm-benefits {
    background: linear-gradient(160deg, var(--lm-mint-soft) 0%, #ffffff 100%);
    border-top: 1px solid var(--lm-mint-border);
  }

  .lm-benefit {
    background: #ffffff;
    border: 1px solid var(--lm-mint-border);
    box-shadow: var(--lm-shadow-sm);
  }

  .lm-benefit:hover {
    border-color: var(--lm-neon);
  }

  .lm-benefit__icon {
    background: var(--lm-neon-soft);
    color: var(--lm-neon);
  }

  .lm-benefit strong {
    color: #14231a;
  }

  .lm-benefit small {
    color: #4f5f56;
  }
}

/* ═══════════════ ROUND 2: HERO-STAGE CTA ═══════════════ */
@media (max-width: 767px) {
  .lm-hero-stage__product {
    flex-wrap: wrap;
    align-items: center;
  }

  .lm-hero-stage__product-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 0 18px;
    background: var(--lm-neon);
    color: #07160c;
    font-size: 1.45rem;
    font-weight: 700;
    border-radius: 10px;
  }

  .lm-hero-stage__product-cta:hover {
    background: var(--lm-neon-hover);
  }
}

/* ═══════════════ ROUND 2: TYPOGRAFIE-RICHTWERTE ═══════════════ */
@media (max-width: 767px) {
  body {
    font-size: 16px;
    line-height: 1.55;
  }

  .lm-hero h1 {
    font-size: clamp(3.4rem, 10vw, 4.8rem);
  }

  .lm-section-heading h2,
  .lm-flash-deals__heading h2 {
    font-size: clamp(2.8rem, 7vw, 3.6rem);
  }

  .lm-how-step h3,
  .lm-why-card h3 {
    font-size: 2rem;
  }

  .lm-flash-card__title {
    font-size: 1.7rem;
  }

  .lm-hero-stage__product-name {
    font-size: 1.6rem;
  }

  .lm-hero-stage__product-price {
    font-size: 1.9rem;
  }
}

/* ═══════════════ ROUND 2: FLOATING-BUTTONS + SAFE-AREA ═══════════════ */
.lm-float-btn {
  position: fixed;
  z-index: 999;
  bottom: calc(12px + env(safe-area-inset-bottom));
}

.lm-float-btn--help {
  left: 12px;
}

.lm-float-btn--help a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  background: linear-gradient(135deg, #42eb5f, #20d95a);
  color: #001d13;
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(32, 217, 90, 0.32);
}

.lm-float-btn--help a svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 340px) {
  .lm-float-btn--help {
    display: none;
  }
}

/* Zurück-nach-oben: Safe-Area-Abstand rechts unten */
@media (max-width: 767px) {
  #ast-scroll-top.ast-scroll-to-top-right {
    right: calc(12px + env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  #ast-scroll-top {
    width: 44px;
    height: 44px;
  }
}

/* Safe-Area oben (Notch): Header- und Inhaltsabstände */
@supports (padding-top: env(safe-area-inset-top)) {
  .lm-header__inner {
    padding-top: max(8px, env(safe-area-inset-top));
  }
}

/* ═══════════════ BLITZ REDESIGN: KARTEN-BUTTONS (min-height 48px) ═══════════════ */
@media (max-width: 767px) {
  .lm-product-card__cta,
  .lm-product-card__footer a.button,
  .lm-product-card__footer .button {
    min-height: 46px;
    border-radius: 10px;
  }

  .lm-flash-card__cta {
    min-height: 48px;
    border-radius: 13px;
  }
}
