/* Startseite: uebersichtliche Angebotsraster statt 3D-Karussell.
   Gilt nur innerhalb von #top (Header/Kategorie-Leiste bleiben unberuehrt).
   Farben ausschliesslich ueber die Site-Tokens aus styles.css (Hell/Dunkel). */

/* -- Ruhiger Hero: keine Glasflaeche, kein Video, keine Deko-Formen ------- */
html #top.hero--local.has-shelves { padding-block: 28px 48px; background: var(--bg); }
html #top.hero--local.has-shelves::before,
html #top.hero--local.has-shelves::after,
html #top.hero--local.has-shelves .hero-ambient-video,
html #top.hero--local.has-shelves .hero-ambient-wash,
html #top.hero--local.has-shelves .hero-note,
html #top.hero--local.has-shelves .home-editorial-hint,
html #top.hero--local.has-shelves #hero-feed { display: none !important; }

html #top.hero--local.has-shelves .hero-container { max-width: none; padding-inline: clamp(16px, 2.5vw, 48px); }
html #top.hero--local.has-shelves .hero-content {
  padding: 0; border: 0; border-radius: 0; background: none;
  box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
html #top.hero--local.has-shelves #local-hero {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
  gap: 20px 40px; align-items: end;
}
html #top.hero--local.has-shelves #hero-rotator { order: 1; }
html #top.hero--local.has-shelves .hero-place-input { order: 2; }
html #top.hero--local.has-shelves .hero-title {
  max-width: 26ch; min-block-size: 0; margin: 0 0 10px;
  font-size: clamp(1.6rem, 2.8vw, 2.25rem); line-height: 1.15; letter-spacing: -0.01em;
}
html #top.hero--local.has-shelves .subtitle {
  min-block-size: 0; max-width: 60ch; margin: 0 0 18px;
  font-size: 1rem; line-height: 1.55; color: var(--muted);
}
html #top.hero--local.has-shelves .home-editorial-actions { margin: 0 0 14px; }
html #top.hero--local.has-shelves .store-badges--hero { margin: 0; }

/* -- Abschnitte ---------------------------------------------------------- */
.hs {
  box-sizing: border-box; width: 100%; max-width: none; margin: 32px 0 0;
  padding-inline: clamp(16px, 2.5vw, 48px); display: grid; gap: 40px;
}
/* styles.css gibt jeder <section> grosses Seiten-Padding - hier nicht. */
#home-shelves .hs-shelf { min-width: 0; margin: 0; padding: 0; min-height: 0; }
.hs-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--border);
}
.hs-titles { min-width: 0; }
#home-shelves .hs-title { margin: 0; text-align: start; font-size: 1.25rem; font-weight: 700; line-height: 1.3; color: var(--text); }
.hs-sub { margin: 4px 0 0; font-size: .875rem; color: var(--muted); }
.hs-all {
  flex: none; font-size: .9rem; font-weight: 600; color: var(--text);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong);
}
.hs-all:hover { text-decoration-color: currentColor; }

/* -- Raster -------------------------------------------------------------- */
.hs-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px 16px;
}
.hs-card { min-width: 0; }
.hs-link { display: block; color: inherit; text-decoration: none; border-radius: 12px; }
.hs-link:focus-visible { outline: 2px solid #6C5CE7; outline-offset: 3px; }
.hs-photo {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.hs-photo img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .2s ease-out, transform .25s ease-out;
}
.hs-photo.is-loaded img { opacity: 1; }
.hs-link:hover .hs-photo img { transform: scale(1.03); }
.hs-badge {
  position: absolute; inset-inline-start: 8px; top: 8px;
  padding: 3px 8px; border-radius: 6px; background: #6C5CE7; color: #fff;
  font-size: .72rem; font-weight: 600; line-height: 1.3;
}
.hs-name {
  margin: 10px 0 4px; font-size: .95rem; font-weight: 600; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.hs-link:hover .hs-name { text-decoration: underline; text-underline-offset: 2px; }
.hs-meta {
  margin: 0; display: flex; justify-content: space-between; gap: 8px;
  font-size: .8rem; line-height: 1.4; color: var(--muted);
}
.hs-cat { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-dist { flex: none; font-weight: 600; color: var(--text); }

/* Ladeplatzhalter in Kachelform: Layout springt nicht, wenn Daten kommen. */
.hs-card--skeleton .hs-photo { animation: hs-pulse 1.4s ease-in-out infinite; }
.hs-line { height: 12px; margin-top: 10px; border-radius: 4px; background: var(--surface-2); animation: hs-pulse 1.4s ease-in-out infinite; }
.hs-line--short { width: 55%; margin-top: 6px; }
@keyframes hs-pulse { 50% { opacity: .55; } }

.hs-status { margin: 0; padding: 20px 0; color: var(--muted); font-size: .95rem; }
.hs-retry, .hs-choose {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px;
  padding: 8px 14px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
}
.hs-retry:hover, .hs-choose:hover { border-color: #6C5CE7; }
.hs-retry:focus-visible, .hs-choose:focus-visible { outline: 2px solid #6C5CE7; outline-offset: 2px; }

/* "In deiner Naehe" ohne Ort: kurzer Hinweis statt leerem Raster. */
.hs-prompt { display: none; }
.hs-shelf--prompt .hs-prompt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
  padding: 18px 20px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface);
}
.hs-shelf--prompt .hs-prompt p { margin: 0; color: var(--text); }
.hs-shelf--prompt .hs-grid,
.hs-shelf--prompt .hs-sub { display: none; }

html #top.hero--local.has-shelves .trust-container { max-width: none; margin: 32px 0 0; padding-inline: clamp(16px, 2.5vw, 48px); }

@media (max-width: 860px) {
  html #top.hero--local.has-shelves #local-hero { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 520px) {
  html #top.hero--local.has-shelves { padding-block: 20px 36px; }
  html #top.hero--local.has-shelves .hero-container, .hs, html #top.hero--local.has-shelves .trust-container { padding-inline: 16px; }
  .hs { gap: 32px; margin-top: 24px; }
  .hs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  #home-shelves .hs-title { font-size: 1.1rem; }
  /* Mobil: Angebote schnell erreichbar - Intro kompakt, linksbuendig. */
  html #top.hero--local.has-shelves #local-hero { gap: 16px; }
  html #top.hero--local.has-shelves #hero-rotator,
  html #top.hero--local.has-shelves .hero-title { text-align: start; }
  html #top.hero--local.has-shelves .hero-title { font-size: 1.55rem; margin-bottom: 14px; }
  html #top.hero--local.has-shelves .subtitle,
  html #top.hero--local.has-shelves .store-badges--hero { display: none; }
  html #top.hero--local.has-shelves .home-editorial-actions {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0;
  }
  html #top.hero--local.has-shelves .home-editorial-actions .btn {
    width: auto; min-width: 0; margin: 0; padding: 12px 10px; font-size: .9rem; white-space: normal;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hs-photo img, .hs-card--skeleton .hs-photo, .hs-line { transition: none; animation: none; }
  .hs-link:hover .hs-photo img { transform: none; }
}
