/* =========================================================================
   BVD Moderne Produktseiten – Frontend-Styles  (v1.5)
   Kadence-Theme + Elementor + PVT-Preistabelle (table.variant).
   Preis-Tabelle wird als vertikale Ticket-Karten dargestellt (wie im Entwurf).
   Akzentfarbe aus --bvd-accent (per Plugin gesetzt).
   ========================================================================= */

:root{
  --bvd-accent:#ff0099;
  --bvd-accent-dark:#d1007f;
  --bvd-ink:#15181f;
  --bvd-body:#3a3f4a;
  --bvd-muted:#7a8091;
  --bvd-line:#e8eaf0;
  --bvd-card:#ffffff;
  --bvd-soft:#fbfcff;
  --bvd-ok:#128a4a;   --bvd-ok-bg:#e4f5ec;
  --bvd-low:#b7791f;  --bvd-low-bg:#fdf3e2;
  --bvd-out:#c0392b;  --bvd-out-bg:#fbeae8;
  --bvd-radius:16px;
}

/* -------------------------------------------------------------------------
   1) PREIS-/TICKET-TABELLE (PVT: table.variant) als Ticket-Karten
   ---------------------------------------------------------------------- */
body.bvd-mps table.variant{
  display:block; width:100%; border:none !important; background:transparent !important;
  border-collapse:separate !important; margin:6px 0 10px;
}
/* Kopfzeile ausblenden – die Karten sind selbsterklärend */
body.bvd-mps table.variant thead{
  position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0);
}
body.bvd-mps table.variant tbody{display:block;}

/* Jede Ticket-Kategorie = eine Karte
   Anordnung:  [ Name          |  Preis ]
               [ Bestand       |  Menge ]
               [   In den Warenkorb (volle Breite)   ]  */
body.bvd-mps table.variant tr.pvt-tr{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:12px 16px;
  border:1px solid var(--bvd-line);
  border-radius:16px;
  background:var(--bvd-card);
  box-shadow:0 8px 24px -18px rgba(24,32,64,.28);
  padding:18px 20px;
  margin:0 0 12px;
}
body.bvd-mps table.variant tr.pvt-tr td{
  border:none !important; padding:0 !important; background:transparent !important;
  vertical-align:middle; width:auto !important; display:block;
}
/* PVT blendet auf dem Handy je Zelle ein Spalten-Label über ::before ein
   („Kategorie/Bestand/Preis/Menge/Aktion") – in unseren Karten ausblenden */
body.bvd-mps table.variant tr.pvt-tr td::before,
body.bvd-mps table.variant tr.pvt-tr td::after{
  content:none !important; display:none !important;
}
/* 1) Kategorie-Name – oben links */
body.bvd-mps table.variant tr.pvt-tr td:nth-child(1){
  grid-column:1; grid-row:1; justify-self:start;
  font-size:18px; font-weight:700; color:var(--bvd-ink); line-height:1.25;
}
/* 3) Preis – oben rechts (groß) */
body.bvd-mps table.variant tr.pvt-tr td:nth-child(3){grid-column:2; grid-row:1; justify-self:end;}
/* 2) Bestand – zweite Zeile links */
body.bvd-mps table.variant tr.pvt-tr td:nth-child(2){grid-column:1; grid-row:2; justify-self:start;}
/* 4) Menge – zweite Zeile rechts */
body.bvd-mps table.variant tr.pvt-tr td:nth-child(4){grid-column:2; grid-row:2; justify-self:end;}
/* 5) Button – dritte Zeile, volle Breite */
body.bvd-mps table.variant tr.pvt-tr td:nth-child(5){grid-column:1 / -1; grid-row:3; justify-self:stretch;}
body.bvd-mps table.variant tr.pvt-tr td:nth-child(5) .pvtfw_variant_table_cart_btn,
body.bvd-mps table.variant tr.pvt-tr td:nth-child(5) .button.alt{width:100%;}

/* Preis */
body.bvd-mps table.variant .woocommerce-Price-amount{
  font-size:24px; font-weight:800; color:var(--bvd-ink); letter-spacing:-.01em; white-space:nowrap;
}

/* Verfügbarkeit / Bestand als Badge */
body.bvd-mps .stock{
  display:inline-flex; align-items:center; gap:7px;
  font-size:13px; font-weight:700; padding:6px 12px; border-radius:999px; margin:0; line-height:1.2;
}
body.bvd-mps .stock::before{content:""; width:8px; height:8px; border-radius:50%; background:currentColor;}
body.bvd-mps .stock.in-stock{color:var(--bvd-ok); background:var(--bvd-ok-bg);}
body.bvd-mps .stock.available-on-backorder{color:var(--bvd-low); background:var(--bvd-low-bg);}
body.bvd-mps .stock.out-of-stock{color:var(--bvd-out); background:var(--bvd-out-bg);}

/* Mengen-Auswahl (PVT: .pvt-qty-input) */
body.bvd-mps .pvt-qty-input{
  display:inline-flex; align-items:center; overflow:hidden;
  border:1px solid var(--bvd-line); border-radius:11px; background:#fff;
}
body.bvd-mps .pvt-qty-input input{
  height:44px; width:44px; border:none !important; text-align:center;
  font-size:16px; font-weight:700; color:var(--bvd-ink); background:#fff; box-shadow:none !important;
}
body.bvd-mps .pvt-qty-input button,
body.bvd-mps .pvt-qty-input .plus,
body.bvd-mps .pvt-qty-input .minus,
body.bvd-mps .pvt-qty-input a{
  width:42px; height:44px; border:none !important; background:#fff !important;
  color:var(--bvd-ink) !important; font-size:19px; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center; text-decoration:none;
}
body.bvd-mps .pvt-qty-input button:hover,
body.bvd-mps .pvt-qty-input .plus:hover,
body.bvd-mps .pvt-qty-input .minus:hover{background:#f1f3fa !important;}

/* „In den Warenkorb"-Button */
body.bvd-mps .pvtfw_variant_table_cart_btn,
body.bvd-mps table.variant .button.alt{
  background:var(--bvd-accent) !important; color:#fff !important;
  border:none !important; border-radius:12px !important;
  font-size:15px !important; font-weight:700 !important;
  min-height:48px; padding:0 22px !important; text-transform:none !important; letter-spacing:0 !important;
  box-shadow:0 10px 22px -12px var(--bvd-accent); transition:background .15s, transform .05s;
  white-space:nowrap;
}
body.bvd-mps .pvtfw_variant_table_cart_btn:hover,
body.bvd-mps table.variant .button.alt:hover{background:var(--bvd-accent-dark) !important;}
body.bvd-mps .pvtfw_variant_table_cart_btn:active{transform:translateY(1px);}

/* Wenn die Karten in einer schmalen Spalte stehen: Button volle Breite */
@media (max-width:520px){
  body.bvd-mps table.variant tr.pvt-tr td:nth-child(5){grid-column:1 / -1; justify-self:stretch;}
  body.bvd-mps .pvtfw_variant_table_cart_btn,
  body.bvd-mps table.variant .button.alt{width:100%;}
}

/* -------------------------------------------------------------------------
   1d) „Tickets"-Panel (per JS um die Preistabelle gelegt)
   Kopf mit „Tickets" + „ab X €"; Karten mit Aktiv-Hervorhebung.
   Panel-Optik nur auf dem Handy – Desktop bleibt wie gehabt.
   ---------------------------------------------------------------------- */
body.bvd-mps .bvd-tickets__head{display:none;}
/* Preis neben der „Tickets"-Überschrift ausblenden (nur Titel zeigen) */
body.bvd-mps .bvd-tickets__from{display:none !important;}
/* aktive/angetippte Karte hervorheben (wie im Entwurf) */
body.bvd-mps table.variant tr.pvt-tr:focus-within{
  border-color:var(--bvd-accent);
  box-shadow:0 0 0 2px rgba(255,0,153,.16), 0 10px 26px -18px rgba(24,32,64,.3);
}

@media (max-width:900px){
  /* „Preise"-Überschrift aus – der Panel-Kopf „Tickets" ersetzt sie */
  body.bvd-mps .bvd-twocol__right .elementor-widget-heading{display:none;}
  body.bvd-mps .bvd-tickets{
    background:#f7f8fb; border:1px solid var(--bvd-line); border-radius:18px;
    padding:14px 10px 8px; text-align:left;
  }
  body.bvd-mps .bvd-tickets__head{
    display:flex; align-items:baseline; justify-content:flex-start; gap:10px; margin:2px 6px 12px;
  }
  body.bvd-mps .bvd-tickets__title{font-size:20px; font-weight:800; color:var(--bvd-ink); letter-spacing:-.01em;}
  body.bvd-mps .bvd-tickets__from{font-size:14px; font-weight:600; color:var(--bvd-muted); white-space:nowrap;}
  body.bvd-mps .bvd-tickets table.variant tr.pvt-tr{background:#fff;}
  /* rechte Spalte: volle Breite für „Tickets"-Panel und Info-Kasten
     - seitliches Padding der Elementor-Container aufheben
     - DCE-Skalierung (scale 0.9) und Versätze zurücksetzen */
  body.bvd-mps .bvd-twocol__right .e-con,
  body.bvd-mps .bvd-twocol__right .e-con-inner{padding-left:0 !important; padding-right:0 !important;}
  body.bvd-mps .bvd-twocol__right .elementor-widget-container{transform:none !important; margin-left:0 !important; margin-right:0 !important;}
  body.bvd-mps .bvd-twocol__right .dce-transforms,
  body.bvd-mps .bvd-twocol__right .dce-transforms-wrap,
  body.bvd-mps .bvd-twocol__right .elementor-shortcode,
  body.bvd-mps .bvd-twocol__right .pvtfw_init_variation_table,
  body.bvd-mps .bvd-twocol__right .pvtfw_variant_table_block{
    width:100% !important; max-width:100% !important; margin-left:0 !important; margin-right:0 !important; transform:none !important;
  }
}

/* Überschrift „Preise" etwas ruhiger */
body.bvd-mps .product_title{letter-spacing:-.01em;}
body.bvd-mps .woocommerce-product-details__short-description{font-size:15px; line-height:1.65; color:var(--bvd-body);}

/* ACF-Infozeilen (Ermäßigung/Platzauswahl/Versandart): ein gemeinsamer grauer Kasten */
body.bvd-mps .dynamic-content-for-elementor-acf .tx-before{font-weight:700; color:var(--bvd-ink); margin-right:5px;}

/* Fallback: einzelne ACF-Zeile ohne gemeinsamen Kasten -> dezenter Chip */
body.bvd-mps .dynamic-content-for-elementor-acf:has(.tx-before){
  line-height:1.3; font-size:14px; color:var(--bvd-body);
}

/* Der Info-Kasten (per JS um die drei Info-Zeilen gelegt) */
body.bvd-mps .bvd-infobox{
  background:#f4f5f8; border:1px solid var(--bvd-line);
  border-radius:14px; padding:2px 16px; margin-top:14px;
  box-sizing:border-box;
}
body.bvd-mps .bvd-infobox > .elementor-element{margin:0 !important; width:100% !important; max-width:100% !important;}
/* Jede Zeile im Kasten – volle Breite, kein Button */
body.bvd-mps .bvd-infobox .dynamic-content-for-elementor-acf:has(.tx-before){
  display:block; background:transparent; border:none; border-radius:0;
  padding:11px 2px; margin:0; font-size:14.5px;
}
/* Dünne Trennlinie zwischen den Zeilen (jede außer der ersten) */
body.bvd-mps .bvd-infobox > .elementor-element + .elementor-element .dynamic-content-for-elementor-acf:has(.tx-before){
  border-top:1px solid #e2e4ec;
}

/* Social-Icons (Elementor Share Buttons) – klein, unter dem Preis, zentriert */
body.bvd-mps .elementor-widget-share-buttons{margin-top:16px;}
body.bvd-mps .elementor-share-buttons{display:flex; flex-wrap:wrap; gap:8px; justify-content:center;}
body.bvd-mps .elementor-share-btn{
  width:32px !important; height:32px !important;
  border-radius:9px !important; overflow:hidden;
  box-shadow:0 5px 14px -9px rgba(16,19,28,.5);
  transition:transform .12s ease, box-shadow .12s ease;
}
body.bvd-mps .elementor-share-btn .elementor-share-btn__icon{width:32px !important; height:32px !important; display:flex; align-items:center; justify-content:center;}
body.bvd-mps .elementor-share-btn .elementor-share-btn__icon i,
body.bvd-mps .elementor-share-btn .elementor-share-btn__icon svg{font-size:14px !important; width:14px !important; height:14px !important;}
body.bvd-mps .elementor-share-btn:hover{transform:translateY(-2px); box-shadow:0 9px 18px -10px rgba(16,19,28,.5);}
/* Titel/Überschrift der Share-Sektion (falls vorhanden) mittig */
body.bvd-mps .bvd-twocol__right .elementor-widget-share-buttons{text-align:center;}

/* -------------------------------------------------------------------------
   2) EVENT-BANNER (Shortcode [bvd_event_banner])
   ---------------------------------------------------------------------- */
.bvd-hero{position:relative; height:360px; overflow:hidden; background:#12263a; border-radius:var(--bvd-radius); margin:8px auto 6px; max-width:1140px;}
.bvd-hero .bvd-hero-img{
  position:absolute; top:0; bottom:0; right:5%; height:100%; width:auto; max-width:72%;
  object-fit:contain; z-index:1;
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.35) 12%,#000 30%,#000 72%,rgba(0,0,0,.35) 90%,transparent 100%);
          mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.35) 12%,#000 30%,#000 72%,rgba(0,0,0,.35) 90%,transparent 100%);
}
.bvd-hero .bvd-hero-scrim{position:absolute; inset:0; z-index:2; background:linear-gradient(90deg,#12263a 0%,#12263a 24%,rgba(18,38,58,.6) 42%,rgba(18,38,58,.15) 58%,rgba(18,38,58,0) 72%);}
.bvd-hero .bvd-hero-back{position:absolute; top:22px; left:30px; z-index:4; display:inline-flex; align-items:center; gap:6px; color:rgba(255,255,255,.92) !important; font-size:14px; font-weight:600; text-decoration:none;}
.bvd-hero .bvd-hero-back svg{width:16px; height:16px;}
.bvd-hero .bvd-hero-cap{position:absolute; left:30px; right:30px; top:0; bottom:0; z-index:3; display:flex; flex-direction:column; justify-content:center; max-width:66%;}
.bvd-hero .bvd-hero-chip{align-self:flex-start; background:var(--bvd-accent); color:#fff; font-size:11.5px; font-weight:700; letter-spacing:.4px; text-transform:uppercase; padding:6px 12px; border-radius:999px; margin-bottom:14px;}
.bvd-hero .bvd-hero-title{color:#fff !important; font-size:34px; line-height:1.12; font-weight:800; letter-spacing:-.02em; margin:0 0 6px; text-shadow:0 2px 18px rgba(0,0,0,.35);}
.bvd-hero .bvd-hero-subtitle{color:var(--bvd-accent) !important; font-size:16px; font-weight:700; font-style:italic; letter-spacing:.02em; margin:0 0 12px; text-transform:uppercase;}
.bvd-hero .bvd-hero-rating{display:flex; align-items:center; gap:10px; color:#ffc93c; font-size:18px; letter-spacing:1px; margin:0 0 12px;}
.bvd-hero .bvd-hero-rating .bvd-stars-empty{color:rgba(255,255,255,.4);}
.bvd-hero .bvd-hero-rating small{color:rgba(255,255,255,.85); font-size:13px; font-weight:600; letter-spacing:0;}
.bvd-hero .bvd-hero-facts{display:flex; flex-direction:column; gap:9px;}
.bvd-hero .bvd-hero-facts span{display:flex; align-items:center; gap:9px; font-size:14.5px; font-weight:500; color:rgba(255,255,255,.95);}
.bvd-hero .bvd-hero-facts svg{width:17px; height:17px; flex:none; color:#fff; opacity:.9;}

@media (max-width:782px){
  /* Handy-Banner: Bild oben (Chip darüber), Titel/Datum/Ort auf Weiß darunter */
  .bvd-hero{
    display:block; height:auto; min-height:0; background:#fff;
    border:1px solid var(--bvd-line); border-radius:18px; overflow:hidden;
    box-shadow:0 14px 34px -22px rgba(16,19,28,.5); margin:10px 12px 16px;
  }
  .bvd-hero .bvd-hero-back{display:none;}
  .bvd-hero .bvd-hero-img{
    position:relative; right:auto; width:100%; max-width:100%; height:190px; object-fit:cover; display:block;
    -webkit-mask-image:none; mask-image:none;
  }
  .bvd-hero .bvd-hero-scrim{display:none;}
  .bvd-hero .bvd-hero-chip{
    position:absolute; top:12px; left:12px; z-index:5; margin:0;
    background:rgba(255,255,255,.95); color:var(--bvd-ink);
    box-shadow:0 4px 12px -6px rgba(0,0,0,.45);
  }
  .bvd-hero .bvd-hero-cap{
    position:static; inset:auto; max-width:100%; display:block;
    padding:16px 18px 18px; text-align:left; background:#fff;
  }
  .bvd-hero .bvd-hero-title{color:#15181f !important; font-size:22px; line-height:1.2; text-shadow:none; margin:0 0 12px;}
  .bvd-hero .bvd-hero-subtitle{display:none;}
  .bvd-hero .bvd-hero-rating{justify-content:flex-start;}
  .bvd-hero .bvd-hero-facts{align-items:flex-start; gap:10px;}
  .bvd-hero .bvd-hero-facts span{color:#3a3f4a; font-size:14.5px;}
  .bvd-hero .bvd-hero-facts svg{color:var(--bvd-accent); opacity:1;}
}

/* -------------------------------------------------------------------------
   2c) ZWEI-SPALTEN-LAYOUT (per JS: Beschreibung links, Ticket-Karte rechts)
   ---------------------------------------------------------------------- */
body.bvd-mps .bvd-twocol{
  display:flex; gap:40px; align-items:flex-start;
  max-width:1180px; margin:8px auto 0; padding:0 20px; box-sizing:border-box;
}
body.bvd-mps .bvd-twocol__left{flex:1 1 auto; min-width:0;}
body.bvd-mps .bvd-twocol__right{flex:0 0 380px; width:380px; position:sticky; top:24px;}
/* verschobene Elementor-Container die volle Spaltenbreite nutzen lassen */
body.bvd-mps .bvd-twocol__left > *,
body.bvd-mps .bvd-twocol__right > *{width:100% !important; max-width:100% !important; margin-left:0 !important; margin-right:0 !important;}

@media (max-width:900px){
  /* Handy: eine Spalte, Ticket-Karte (Preis) zuerst, alles über volle Breite */
  body.bvd-mps .bvd-twocol{flex-direction:column; gap:16px; text-align:center; padding:0 10px;}
  body.bvd-mps .bvd-twocol__right{order:-1; flex-basis:auto; width:100%; position:static;}
  body.bvd-mps .bvd-twocol__left{width:100%;}
  /* Überschriften „Preise" / „Beschreibung" mittig */
  body.bvd-mps .bvd-twocol .elementor-heading-title{text-align:center !important;}
  /* Info-Kasten: volle Breite, Zeilen innen sauber links (Label: Wert) */
  body.bvd-mps .bvd-infobox{text-align:left; width:100%; margin-left:0; margin-right:0;}
  /* Ticket-Karte: volle Breite */
  body.bvd-mps table.variant tr.pvt-tr{text-align:left; padding:16px;}
}
/* sehr schmale Handys: Name/Preis dürfen umbrechen statt zu quetschen */
@media (max-width:380px){
  body.bvd-mps table.variant .woocommerce-Price-amount{font-size:21px;}
  body.bvd-mps table.variant tr.pvt-tr td:nth-child(1){font-size:16.5px;}
}

/* -------------------------------------------------------------------------
   3) FESTE KAUFLEISTE (Handy) – per JS erzeugt
   ---------------------------------------------------------------------- */
.bvd-sticky{
  position:fixed; left:0; right:0; bottom:0; z-index:99999;
  display:none; align-items:center; gap:14px;
  background:rgba(255,255,255,.97); backdrop-filter:blur(10px);
  border-top:1px solid var(--bvd-line);
  padding:12px 16px calc(12px + env(safe-area-inset-bottom));
  box-shadow:0 -6px 20px -12px rgba(16,19,28,.3);
}
.bvd-sticky.is-visible{display:flex;}
.bvd-sticky .bvd-sticky-price{font-size:19px; font-weight:800; color:var(--bvd-ink); white-space:nowrap; line-height:1.1;}
.bvd-sticky .bvd-sticky-price small{display:block; font-size:11px; font-weight:600; color:var(--bvd-muted); text-transform:uppercase; letter-spacing:.3px;}
.bvd-sticky .bvd-sticky-btn{flex:1; border:none; cursor:pointer; height:50px; border-radius:12px; background:var(--bvd-accent); color:#fff; font-size:15px; font-weight:700; display:flex; align-items:center; justify-content:center; gap:8px;}
.bvd-sticky .bvd-sticky-btn:hover{background:var(--bvd-accent-dark);}
.bvd-sticky .bvd-sticky-btn svg{width:19px; height:19px;}

@media (max-width:782px){
  body.bvd-mps.bvd-has-sticky{padding-bottom:80px;}
}
