/**
 * Buchhandlung Books — Frontend Styles
 *
 * All design tokens bridge to Elementor global settings (site-settings.json).
 *
 * Custom color IDs  →  --e-global-color-{id}
 *   af66e52  Brand Blue      #202684
 *   c8bbc15  Brand Rose      #F78DA7
 *   858138f  Gold            #C9A84C
 *   96a04dc  Cream           #FAF7F2
 *   66cf46a  Warm White      #FFFDF9
 *   a68689a  Ink Dark        #1A1A2E
 *   e266ad5  Ink Light       #3D3D5C
 *   22f8d1d  Divider         rgba(32,38,132,0.15)
 *   2ca626e  Brand Blue Med  #2D339C
 *
 * Custom typography IDs  →  --e-global-typography-{id}-font-family
 *   17a2004  Heading 2                  Literata 300 italic
 *   56cd56e  Serif — Book/Event Title   Literata 400 italic
 *   acf41ea  Serif — Subtitle/Caption   Literata 400
 *   03402c6  Small Caps — Eyebrow       Literata 400 uppercase 0.25em
 *   96c6cf9  Body — Default             Jost 300
 *   55b17e2  Micro / Badge              Jost 400 uppercase 0.1em
 *
 * All selectors are scoped under .bh-* to avoid theme collisions.
 */

/* ── Root tokens ───────────────────────────────────────────────────────────── */
:root {
  /* Colors — Elementor global color IDs with hex fallbacks */
  --bh-primary:    var(--e-global-color-af66e52, #202684);  /* Brand Blue */
  --bh-secondary:  var(--e-global-color-c8bbc15, #F78DA7);  /* Brand Rose */
  --bh-cream:      var(--e-global-color-96a04dc, #FAF7F2);  /* Cream */
  --bh-warm-white: var(--e-global-color-66cf46a, #FFFDF9);  /* Warm White */
  --bh-ink:        var(--e-global-color-a68689a, #1A1A2E);  /* Ink Dark */
  --bh-ink-light:  var(--e-global-color-e266ad5, #3D3D5C);  /* Ink Light */
  --bh-rule:       var(--e-global-color-22f8d1d, rgba(32, 38, 132, 0.15)); /* Divider */
  --bh-gold:       var(--e-global-color-858138f, #C9A84C);  /* Gold */

  /* Typography font-families — Elementor global typography IDs with fallbacks */
  --bh-font-heading:  var(--e-global-typography-17a2004-font-family, 'Literata');  /* Heading 2 */
  --bh-font-serif:    var(--e-global-typography-56cd56e-font-family, 'Literata');  /* Book / Event Title */
  --bh-font-caption:  var(--e-global-typography-acf41ea-font-family, 'Literata');  /* Subtitle / Caption */
  --bh-font-eyebrow:  var(--e-global-typography-03402c6-font-family, 'Literata');  /* Small Caps — Eyebrow */
  --bh-font-body:     var(--e-global-typography-96c6cf9-font-family, 'Jost');      /* Body — Default */
  --bh-font-badge:    var(--e-global-typography-55b17e2-font-family, 'Jost');      /* Micro / Badge */
}

/* ── Shared utilities ──────────────────────────────────────────────────────── */
.bh-no-books,
.bh-editor-notice {
  font-family: var(--bh-font-body), sans-serif;
  font-size: 14px;
  color: var(--bh-ink-light);
  font-style: italic;
  padding: 20px 0;
}

/* ── Section label (Nouveautés header) ─────────────────────────────────────── */
.bh-section-label {
  font-family: var(--bh-font-eyebrow), Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--bh-ink-light);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
}
.bh-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bh-rule);
}

/* ── Section header (Staff Picks) ─────────────────────────────────────────── */
.bh-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--bh-rule);
  padding-bottom: 20px;
}
.bh-section-title {
  font-family: var(--bh-font-heading), Georgia, serif;
  font-size: 42px;
  font-weight: 300;
  color: var(--bh-primary);
  font-style: italic;
  margin: 0;
}
.bh-section-subtitle {
  font-family: var(--bh-font-eyebrow), Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--bh-ink-light);
  text-transform: uppercase;
}

/* ── Hero-Right Preset ─────────────────────────────────────────────────────── */
/*                                                                              */
/*  Applied when the Elementor "Hero-Right Preset" toggle is ON.               */
/*  Faithfully matches the design language of div.hero-right in                */
/*  buchhandlung-list.html:                                                     */
/*    Fonts   : Space Mono (labels/meta) · DM Serif Display (titles/captions)  */
/*              Unbounded (decorative initial)                                  */
/*    Colors  : Elementor global tokens throughout (no hardcoded hex)           */
/*    Borders : 5px solid --bh-ink on wrapper, 3px on cards and cover          */
/*    Hover   : translateY(-8px) — mirrors .book:hover in the HTML design      */
/*                                                                              */
/*  Individual Elementor style controls override these values when set.         */
/* ─────────────────────────────────────────────────────────────────────────── */

/* Wrapper */
.bh-nouveautes-wrap.bh-style-hero {
  background-color: var(--bh-cream);
  padding: 48px;
  border-bottom: 5px solid var(--bh-ink);
}

/* Section label */
.bh-nouveautes-wrap.bh-style-hero .bh-section-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--bh-primary);
  text-transform: uppercase;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bh-nouveautes-wrap.bh-style-hero .bh-section-label::after {
  content: '';
  flex: 1;
  height: 5px;
  background: var(--bh-ink);
}

/* Grid */
.bh-nouveautes-wrap.bh-style-hero .bh-nouveautes-grid {
  gap: 20px;
}

/* Book card — mirrors .book hover behaviour from the HTML design */
.bh-nouveautes-wrap.bh-style-hero .bh-book-card {
  border: 3px solid var(--bh-ink);
  background: var(--bh-warm-white);
  transition: transform 0.3s, box-shadow 0.3s;
}

.bh-nouveautes-wrap.bh-style-hero .bh-book-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 0 var(--bh-primary);
}

/* Cover */
.bh-nouveautes-wrap.bh-style-hero .bh-book-cover {
  border-bottom: 3px solid var(--bh-ink);
  background: var(--bh-primary);
}

/* Suppress scale zoom — the HTML design lifts books, it does not zoom them */
.bh-nouveautes-wrap.bh-style-hero .bh-book-card:hover .bh-cover-img {
  transform: none;
}

/* Language badge */
.bh-nouveautes-wrap.bh-style-hero .bh-cover-lang-badge {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 3px 8px;
  border: 2px solid var(--bh-ink);
  top: 10px;
  right: 10px;
}

.bh-nouveautes-wrap.bh-style-hero .bh-badge-fr { background: var(--bh-secondary);  color: var(--bh-ink); }
.bh-nouveautes-wrap.bh-style-hero .bh-badge-it { background: var(--bh-primary);     color: var(--bh-warm-white); }
.bh-nouveautes-wrap.bh-style-hero .bh-badge-de { background: var(--bh-warm-white);  color: var(--bh-ink); }
.bh-nouveautes-wrap.bh-style-hero .bh-badge-en { background: var(--bh-ink);         color: var(--bh-warm-white); }

/* CSS-only cover inner (no image fallback) */
.bh-nouveautes-wrap.bh-style-hero .bh-cover-inner {
  padding: 16px 14px;
}

.bh-nouveautes-wrap.bh-style-hero .bh-cover-inner::before {
  background: none;
}

/* Decorative initial — Unbounded matches the HTML's large bold display numbers */
.bh-nouveautes-wrap.bh-style-hero .bh-cover-decoration {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: 80px;
  font-style: normal;
  opacity: 0.08;
  color: #fff;
}

.bh-nouveautes-wrap.bh-style-hero .bh-cover-title {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--bh-warm-white);
}

.bh-nouveautes-wrap.bh-style-hero .bh-cover-author {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(255, 253, 249, 0.55); /* --bh-warm-white at 55% */
  margin-top: 6px;
}

/* Meta block below cover */
.bh-nouveautes-wrap.bh-style-hero .bh-book-meta {
  padding: 16px 18px;
  margin-top: 0;
}

/* Staff-pick label */
.bh-nouveautes-wrap.bh-style-hero .bh-staff-pick {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--bh-secondary);
  margin-bottom: 8px;
}

.bh-nouveautes-wrap.bh-style-hero .bh-staff-pick::before {
  content: '★';
  font-size: 8px;
}

/* Caption */
.bh-nouveautes-wrap.bh-style-hero .bh-book-caption {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--bh-ink);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .bh-nouveautes-wrap.bh-style-hero {
    padding: 32px 24px;
  }
}

@media (max-width: 600px) {
  .bh-nouveautes-wrap.bh-style-hero {
    padding: 24px 16px;
  }
}

/* ── ═══════════════════════════════════════════════════════════════════════ ── */
/*    NOUVEAUTÉS GRID                                                           */
/* ── ═══════════════════════════════════════════════════════════════════════ ── */

.bh-nouveautes-grid {
  display: grid;
  gap: 28px;
}
.bh-nouveautes-grid.bh-cols-2 { grid-template-columns: repeat(2, 1fr); }
.bh-nouveautes-grid.bh-cols-3 { grid-template-columns: repeat(3, 1fr); }
.bh-nouveautes-grid.bh-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Book card (Nouveauté) ─────────────────────────────────────────────────── */
.bh-book-card {
  transition: transform 0.3s ease;
}
.bh-book-card:hover {
  transform: translateY(-4px);
}

.bh-book-cover-link {
  display: block;
  text-decoration: none;
}

.bh-book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  position: relative;
  overflow: hidden;
  display: block;
  background: var(--bh-primary);
}

/* Real cover image */
.bh-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.bh-book-card:hover .bh-cover-img {
  transform: scale(1.04);
}

/* CSS cover inner layout */
.bh-cover-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 16px;
  position: relative;
}
.bh-cover-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

/* Language badge */
.bh-cover-lang-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--bh-font-badge), sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  padding: 4px 8px;
  z-index: 1;
  text-transform: uppercase;
}
.bh-badge-fr {
  background: var(--bh-secondary);
  color: var(--bh-primary);
}
.bh-badge-it {
  background: var(--bh-primary);
  color: var(--bh-cream);
}
.bh-badge-de {
  background: #A8C8F0;
  color: var(--bh-primary);
}
.bh-badge-en {
  background: #8FD5A6;
  color: var(--bh-primary);
}

/* Decorative large initial */
.bh-cover-decoration {
  position: absolute;
  top: 20px;
  left: 16px;
  font-family: var(--bh-font-heading), Georgia, serif;
  font-size: 72px;
  line-height: 1;
  opacity: 0.1;
  color: #fff;
  font-style: italic;
}

/* Cover title & author (on CSS covers) */
.bh-cover-title {
  font-family: var(--bh-font-serif), Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}
.bh-cover-author {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

/* Book meta (below cover) */
.bh-book-meta {
  margin-top: 12px;
}
/* Genre / section, title and author — same treatment as the staff-pick card,
   so a book looks the same wherever it is shown. */
.bh-book-genre {
  font-family: var(--bh-font-eyebrow), Georgia, serif;
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--bh-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.bh-book-title {
  font-family: var(--bh-font-serif), Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--bh-ink);
  line-height: 1.2;
  margin-bottom: 4px;
}
.bh-book-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}
.bh-book-title a:hover {
  color: var(--bh-primary);
}
.bh-book-author {
  font-size: 16px;
  color: var(--bh-ink-light);
  letter-spacing: 0.05em;
  font-weight: 300;
  margin-bottom: 10px;
}
.bh-staff-pick {
  font-family: var(--bh-font-badge), sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--bh-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.bh-staff-pick::before {
  content: '★';
  font-size: 8px;
}
.bh-book-caption {
  font-family: var(--bh-font-caption), Georgia, serif;
  font-size: 14px;
  color: var(--bh-ink-light);
  line-height: 1.5;
  font-style: italic;
}

/* ── ═══════════════════════════════════════════════════════════════════════ ── */
/*    STAFF PICKS GRID                                                          */
/* ── ═══════════════════════════════════════════════════════════════════════ ── */

/* Section wrapper — spacing/background provided by the Elementor section holding the widget */

.bh-picks-grid {
  display: grid;
  gap: 32px;
}
.bh-picks-grid.bh-cols-2 { grid-template-columns: repeat(2, 1fr); }
.bh-picks-grid.bh-cols-3 { grid-template-columns: repeat(3, 1fr); }
.bh-picks-grid.bh-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Pick card ─────────────────────────────────────────────────────────────── */
.bh-pick-card {
  /* no background: inherit from parent section */
}

.bh-pick-cover-link {
  display: block;
  text-decoration: none;
}

.bh-pick-cover {
  aspect-ratio: 2 / 3;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--bh-primary);
}

.bh-pick-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.bh-pick-card:hover .bh-pick-cover-img {
  transform: scale(1.04);
}

/* Hover overlay with bookseller quote */
.bh-pick-cover-overlay {
  position: absolute;
  inset: 0;
  background: var(--bh-primary);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bh-pick-card:hover .bh-pick-cover-overlay {
  opacity: 0.85;
}
.bh-overlay-text {
  font-family: var(--bh-font-serif), Georgia, serif;
  font-size: 13px;
  font-style: italic;
  color: var(--bh-cream);
  text-align: center;
  padding: 24px;
  line-height: 1.6;
}

/* Pick card metadata */
.bh-pick-lang {
  font-family: var(--bh-font-eyebrow), Georgia, serif;
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--bh-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.bh-pick-title {
  font-family: var(--bh-font-serif), Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--bh-ink);
  line-height: 1.2;
  margin-bottom: 4px;
}
.bh-pick-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}
.bh-pick-title a:hover {
  color: var(--bh-primary);
}
.bh-pick-author {
  font-size: 16px;
  color: var(--bh-ink-light);
  letter-spacing: 0.05em;
  font-weight: 300;
  margin-bottom: 10px;
}
.bh-pick-quote {
  font-family: var(--bh-font-caption), Georgia, serif;
  font-size: 13px;
  font-style: italic;
  color: var(--bh-ink-light);
  line-height: 1.5;
  border-left: 2px solid var(--bh-secondary);
  padding-left: 12px;
}

/* ── ═══════════════════════════════════════════════════════════════════════ ── */
/*    CUSTOMER PICKS GRID (Kundenempfehlungen)                                  */
/* ── ═══════════════════════════════════════════════════════════════════════ ── */

.bh-customer-picks-grid {
  display: grid;
  gap: 32px;
}
.bh-customer-picks-grid.bh-cols-2 { grid-template-columns: repeat(2, 1fr); }
.bh-customer-picks-grid.bh-cols-3 { grid-template-columns: repeat(3, 1fr); }
.bh-customer-picks-grid.bh-cols-4 { grid-template-columns: repeat(4, 1fr); }

.bh-customer-pick-card {
  position: relative;
}

.bh-customer-pick-cover-link {
  display: block;
  text-decoration: none;
}

.bh-customer-pick-cover {
  aspect-ratio: 2 / 3;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--bh-primary);
}

.bh-customer-pick-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.bh-customer-pick-card:hover .bh-customer-pick-cover-img {
  transform: scale(1.04);
}

/* The "Kundenempfehlung" heart badge */
.bh-customer-pick-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  background: var(--bh-secondary);
  color: var(--bh-primary);
  font-family: var(--bh-font-badge), sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}
.bh-customer-pick-badge-icon {
  font-size: 12px;
  line-height: 1;
}

/* Metadata below the cover */
.bh-customer-pick-tag {
  font-family: var(--bh-font-badge), sans-serif;
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--bh-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.bh-customer-pick-title {
  font-family: var(--bh-font-serif), Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--bh-ink);
  line-height: 1.2;
  margin-bottom: 4px;
}
.bh-customer-pick-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}
.bh-customer-pick-title a:hover {
  color: var(--bh-primary);
}
.bh-customer-pick-author {
  font-size: 14px;
  color: var(--bh-ink-light);
  letter-spacing: 0.05em;
  font-weight: 300;
  margin-bottom: 10px;
}
.bh-customer-pick-quote,
.bh-customer-pick-caption {
  font-family: var(--bh-font-caption), Georgia, serif;
  font-size: 13px;
  font-style: italic;
  color: var(--bh-ink-light);
  line-height: 1.5;
  border-left: 2px solid var(--bh-secondary);
  padding-left: 12px;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .bh-picks-grid.bh-cols-4,
  .bh-customer-picks-grid.bh-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .bh-nouveautes-grid.bh-cols-2,
  .bh-nouveautes-grid.bh-cols-3,
  .bh-nouveautes-grid.bh-cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .bh-picks-grid.bh-cols-3,
  .bh-picks-grid.bh-cols-4,
  .bh-customer-picks-grid.bh-cols-3,
  .bh-customer-picks-grid.bh-cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .bh-section-header {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
  }
  .bh-section-title { font-size: 32px; }
  .bh-customer-pick-badge {
    font-size: 8px;
    padding: 4px 8px 4px 6px;
  }
}

@media (max-width: 480px) {
  .bh-picks-grid.bh-cols-2,
  .bh-picks-grid.bh-cols-3,
  .bh-picks-grid.bh-cols-4,
  .bh-customer-picks-grid.bh-cols-2,
  .bh-customer-picks-grid.bh-cols-3,
  .bh-customer-picks-grid.bh-cols-4 {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .bh-pick-quote,
  .bh-customer-pick-quote { display: none; }
  .bh-customer-pick-badge .bh-customer-pick-badge-text { display: none; }
  .bh-customer-pick-badge {
    padding: 4px 6px;
  }
  .bh-nouveautes-grid {
    gap: 14px;
  }
}

@media (max-width: 380px) {
  .bh-picks-grid,
  .bh-customer-picks-grid { grid-template-columns: 1fr; max-width: 280px; margin: 0 auto; }
  .bh-nouveautes-grid { grid-template-columns: 1fr; max-width: 220px; margin: 0 auto; }
}
