/* ==========================================================================
   OLB_THEME_PAGE v0.1 (runtime 0.13.0) – temasider (fx /frokostfavoritter/)
   Fælles styling for alle temasider. Indholdet (tekster, billeder, varevalg)
   ligger i Bricks; kopiér siden og skift indhold for et nyt tema.

   Genbruger fra forsiden (OLB_HOME_ADAPTER): hero + .olb-trust i hero-sektionen,
   .olb-home-section__head, .olb-carousel, lodret sektionsrytme.
   Ejer:
     .olb-home-section__copy   overskrift + intro i sektionshovedet
     .olb-section-intro        introlinje under overskriften
     .olb-theme-row            karrusel (5 varer) + inspirationskort
     .olb-theme-editorial      inspirationskort (billede + titel + tekst)
     .olb-theme-steps          "Sådan gør du" – 3 trin
   ========================================================================== */

/* ---------- Sektionshoved med intro */
.olb-home-section__head:has(.olb-home-section__copy) {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-1, 0.25rem) var(--space-3);
}
.olb-home-section__copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-1, 0.25rem);
  flex: 1 1 20rem;
  min-inline-size: 0;
}
html body .olb-home-section__copy > * { margin: 0 !important; }
.olb-section-intro { max-inline-size: 48rem; }
/* "Se alle"-link uden adresse vises ikke (ingen døde links). */
.olb-home-section__more[href="#"],
.olb-home-section__more[href=""],
.olb-home-section__more:has(> a[href="#"]) { display: none; }

/* ---------- Række: karrusel + inspirationskort */
.olb-theme-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  inline-size: 100%;
}
.olb-theme-row > * { min-inline-size: 0; }
@media (min-width: 1024px) {
  .olb-theme-row {
    grid-template-columns: minmax(0, 5fr) minmax(0, 1fr);
    align-items: stretch;
  }
  .olb-theme-row .olb-carousel { --olb-carousel-n: 5; }
}

/* ---------- Inspirationskort
   Mobil/tablet: vandret kort under karrusellen (billede til venstre).
   Desktop: samme højde som produktkortene, billede øverst. */
.olb-theme-editorial {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  overflow: hidden;
  min-inline-size: 0;
  border: var(--border-card);
  border-radius: var(--radius-card);
  background: var(--color-surface, #fff);
}
.olb-theme-editorial:not(:has(img)) { grid-template-columns: minmax(0, 1fr); }
.olb-theme-editorial__img,
.olb-theme-editorial img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  min-block-size: 7rem;
  max-inline-size: none;
  object-fit: cover;
}
.olb-theme-editorial__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-1, 0.25rem);
  padding: var(--space-3);
  min-inline-size: 0;
}
html body .olb-theme-editorial__title { margin: 0 !important; font-size: 1.125rem; line-height: 1.25; }
.olb-theme-editorial__text { margin: 0; font-size: 0.9375rem; line-height: 1.45; }
@media (min-width: 1024px) {
  .olb-theme-editorial {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    margin-block-end: var(--space-1); /* flugter med karrusellens bund */
  }
  .olb-theme-editorial__img,
  .olb-theme-editorial img { block-size: auto; min-block-size: 0; aspect-ratio: 4 / 3; }
  .olb-theme-editorial__body { justify-content: flex-start; }
}

/* ---------- Sådan gør du – 3 trin */
.olb-theme-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  inline-size: 100%;
}
@media (min-width: 768px) {
  .olb-theme-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
}
.olb-theme-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--space-3);
  row-gap: 0.125rem;
  align-items: start;
  padding: var(--space-3);
  border: var(--border-card);
  border-radius: var(--radius-card);
  background: var(--color-surface, #fff);
}
.olb-theme-step__num {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  inline-size: 2.25rem;
  block-size: 2.25rem;
  margin: 0;
  border-radius: 50%;
  background: var(--color-link);
  color: #fff;
  font-weight: 700;
  line-height: 1;
}
html body .olb-theme-step__title { margin: 0 !important; font-size: 1.0625rem; line-height: 1.3; }
.olb-theme-step__text { margin: 0; font-size: 0.9375rem; line-height: 1.45; }

/* ---------- Lodret rytme (samme som forsiden) */
html body .olb-section:has(.olb-theme-steps) {
  padding-block: var(--space-4) 0 !important;
  margin-block: 0 !important;
  min-block-size: 0 !important;
}
html body .olb-section:has(.olb-theme-steps) > .brxe-container,
html body .olb-section:has(.olb-theme-row) > .brxe-container {
  padding-block: 0 !important;
  row-gap: var(--space-2) !important;
}
html body .olb-section:is(:has(.olb-theme-steps), :has(.olb-theme-row)):last-child {
  padding-block-end: var(--space-5, var(--space-4)) !important;
}
/* Ankre (#favoritter, #inspiration) lander under den faste header. */
.olb-section[id] { scroll-margin-block-start: 7rem; }

/* ---------- v0.2 (runtime 0.13.1): "Sådan gør du" som billedbanner (.olb-theme-howto)
   Bricks: section#inspiration > container > div.olb-theme-howto >
           div.olb-theme-howto__media (billede) + div.olb-theme-howto__inner
           (sektionshoved + div.olb-theme-steps med 3 × .olb-theme-step).
   Billedet tones 60 % ned; tekst hvid; trin som lyse glaskort med store guldtal.
   Uden wrapperen (.olb-theme-howto) vises trinene som almindelige kort (v0.1). */
.olb-theme-howto {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  inline-size: 100%;
  border-radius: var(--radius-card);
  background: #1f2a2e;
  color: #fff;
}
.olb-theme-howto__media { position: absolute; inset: 0; z-index: -2; }
.olb-theme-howto__media img,
.olb-theme-howto__img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  max-inline-size: none;
  object-fit: cover;
  object-position: center;
}
.olb-theme-howto::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(20 26 28 / 0.6);
}
.olb-theme-howto__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-3);
}
@media (min-width: 768px) {
  .olb-theme-howto__inner { padding: var(--space-5, var(--space-4)) var(--space-5, var(--space-4)); gap: var(--space-4); }
}
html body .olb-theme-howto .olb-section__heading,
html body .olb-theme-howto h2 { color: #fff !important; }
.olb-theme-howto .olb-section-intro { color: rgb(255 255 255 / 0.88); }
html body .olb-theme-howto .olb-home-section__head { margin: 0 !important; }

.olb-theme-howto .olb-theme-steps { counter-reset: none; }
.olb-theme-howto .olb-theme-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-1, 0.25rem);
  padding: var(--space-3);
  border: 1px solid rgb(255 255 255 / 0.28);
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 0.1);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  transition: transform .2s ease, background .2s ease;
}
.olb-theme-howto .olb-theme-step:hover { transform: translateY(-3px); background: rgb(255 255 255 / 0.16); }
.olb-theme-howto .olb-theme-step__num {
  display: block;
  inline-size: auto;
  block-size: auto;
  margin: 0 0 var(--space-1, 0.25rem);
  border-radius: 0;
  background: none;
  color: #c9a227;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgb(0 0 0 / 0.35);
}
html body .olb-theme-howto .olb-theme-step__title { color: #fff !important; font-size: 1.125rem; }
.olb-theme-howto .olb-theme-step__text { color: rgb(255 255 255 / 0.88); }
/* Pil mellem trinene (fra 768 px) */
@media (min-width: 768px) {
  .olb-theme-howto .olb-theme-step:not(:last-child)::after {
    content: "→";
    position: absolute;
    inset-inline-end: calc(-1 * var(--space-3) + 0.1rem);
    inset-block-start: 50%;
    transform: translate(50%, -50%);
    z-index: 1;
    display: grid;
    place-items: center;
    inline-size: 1.75rem;
    block-size: 1.75rem;
    border-radius: 50%;
    background: #c9a227;
    color: #1f2a2e;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
  }
}
@media (prefers-reduced-motion: reduce) { .olb-theme-howto .olb-theme-step { transition: none; } }

/* ---------- v0.2.1 (runtime 0.13.2): pilen mellem trinene blev dækket af næste kort
   (glaskortene er hver sin stablingskontekst). Tidligere trin ligger nu øverst,
   og pilen tegnes som en chevron i stedet for et tegn. Lidt mere luft i banneret. */
.olb-theme-howto .olb-theme-step:nth-child(1) { z-index: 3; }
.olb-theme-howto .olb-theme-step:nth-child(2) { z-index: 2; }
.olb-theme-howto .olb-theme-step:nth-child(3) { z-index: 1; }
@media (min-width: 768px) {
  .olb-theme-howto .olb-theme-step:not(:last-child)::after {
    content: "";
    inline-size: 1.75rem;
    block-size: 1.75rem;
    background:
      linear-gradient(#c9a227, #c9a227) padding-box;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.3);
  }
  .olb-theme-howto .olb-theme-step:not(:last-child)::before {
    content: "";
    position: absolute;
    inset-inline-end: calc(-1 * var(--space-3) + 0.1rem);
    inset-block-start: 50%;
    z-index: 2;
    inline-size: 0.45rem;
    block-size: 0.45rem;
    border-block-start: 2px solid #1f2a2e;
    border-inline-end: 2px solid #1f2a2e;
    transform: translate(0.58rem, -50%) rotate(45deg);
  }
}
.olb-theme-howto__inner { padding: var(--space-5, var(--space-4)) var(--space-4); }
@media (min-width: 1024px) {
  .olb-theme-howto__inner { padding: var(--space-5, var(--space-4)) var(--space-5, var(--space-4)); }
}

/* ---------- v0.2.2 (runtime 0.13.3): "Flere temaer" på temasider – med 2 kort fylder de bredden. */
@media (min-width: 768px) {
  .olb-themes:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .olb-themes:has(> :nth-child(2):last-child) .olb-theme-card { grid-template-columns: 12rem minmax(0, 1fr); grid-template-rows: none; }
  .olb-themes:has(> :nth-child(2):last-child) .olb-theme-card__img,
  .olb-themes:has(> :nth-child(2):last-child) .olb-theme-card img { block-size: 100%; min-block-size: 9rem; }
}
