/*
 Theme Name:   Astra Child
 Theme URI:    https://benfriedhof.de/
 Description:  Child-Theme für Astra. Eigene Startseite + Über-mich-Vorlage und ein globales Dark-Theme im Ben-Friedhof-Look für alle übrigen Seiten (Rechtstexte, Shop, Warenkorb, Kasse, Konto).
 Author:       Ben Friedhof
 Template:     astra
 Version:      1.3.0
 Text Domain:  astra-child
*/

/* ============================================================
   BEN FRIEDHOF – Globales Dark-Theme für Astra + WooCommerce
   ------------------------------------------------------------
   Wirkt NUR auf von Astra gerenderten Seiten (alles unter #page).
   Die Spezial-Templates (Startseite, Über mich) sind self-contained
   und enthalten KEIN #page -> sie werden hier NICHT beeinflusst.
   Inhalte (Rechtstexte etc.) werden nur umgefärbt, nicht verändert.
   ============================================================ */

:root{
  --bf-black:#000; --bf-dark:#0a0a0a; --bf-card:#111; --bf-border:#1a1a1a;
  --bf-red:#c0392b; --bf-red-glow:#e74c3c; --bf-gold:#d4a84b; --bf-gold-dim:#b8932e;
  --bf-white:#f0f0f0; --bf-gray:#888; --bf-gray-light:#aaa; --bf-gray-dark:#333;
}

/* ---------- Grundflächen ---------- */
html, body{ background:#000; }
#page{ background:var(--bf-black); color:var(--bf-white); font-family:'Source Sans 3',sans-serif; font-size:17px; line-height:1.7; }
#page p, #page li, #page dd, #page dt, #page span, #page label,
#page .entry-content, #page address{ color:var(--bf-gray-light); }

/* Astra "Boxed Content": helle Box -> dunkle Karte auf Schwarz */
.ast-separate-container{ background-color:#000 !important; }
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post,
.ast-separate-container .comments-area,
.ast-separate-container .comment-respond,
.single .ast-article-single,
.page .ast-article-single{
  background:var(--bf-dark) !important; box-shadow:none !important;
  border:1px solid var(--bf-border); border-radius:12px;
}

/* ---------- Links ---------- */
#page a{ color:var(--bf-gold); }
#page a:hover{ color:var(--bf-gold-dim); }

/* ---------- Überschriften ---------- */
#page h1, #page h2, #page h3, #page h4, #page h5, #page h6{ color:#fff; }
/* Große Seitentitel im Bebas-Look */
#page .entry-title, #page .ast-archive-title, #page .page-title,
.woocommerce .product_title, .woocommerce-products-header__title{
  font-family:'Bebas Neue',sans-serif !important; letter-spacing:.03em; color:#fff;
}
/* Fließtext-Überschriften gut lesbar (kein Versal-Display) */
#page .entry-content h2, #page .entry-content h3, #page .entry-content h4,
#page .entry-content h5, #page .entry-content h6{
  font-family:'Source Sans 3',sans-serif; font-weight:700; color:#fff;
}

/* ---------- Astra Header ---------- */
#masthead, .main-header-bar, .ast-primary-header-bar, .ast-primary-header,
.ast-above-header, .ast-below-header, .main-header-menu,
.ast-builder-layout-element{ background-color:var(--bf-dark) !important; border-color:var(--bf-border) !important; }
.main-header-bar{ border-bottom:1px solid var(--bf-border) !important; }
.main-header-menu .menu-link, .ast-header-navigation-bar .menu-link,
.ast-builder-menu .menu-item > .menu-link, #ast-mobile-header .menu-link,
.site-title a, .site-title, .ast-mobile-menu-buttons-fill{ color:var(--bf-gray-light) !important; }
.main-header-menu .menu-link:hover,
.ast-builder-menu .menu-item:hover > .menu-link,
.main-header-menu .current-menu-item > .menu-link{ color:#fff !important; }
.ast-builder-menu .sub-menu, .main-header-menu .sub-menu{
  background:var(--bf-card) !important; border-color:var(--bf-border) !important;
}
.ast-mobile-popup-drawer .main-header-menu, #ast-mobile-header{ background:var(--bf-dark) !important; }

/* ---------- Astra Footer ---------- */
.site-footer, .ast-small-footer, .site-primary-footer-wrap, .site-below-footer-wrap,
.footer-adv, [data-section="section-footer-builder"]{
  background-color:var(--bf-dark) !important; color:var(--bf-gray) !important; border-color:var(--bf-border) !important;
}
.site-footer a, .ast-small-footer a, .footer-adv a{ color:var(--bf-gray) !important; }
.site-footer a:hover, .ast-small-footer a:hover{ color:#fff !important; }

/* ---------- Buttons (Astra / Blocks) ---------- */
#page .ast-button, #page .button, #page input[type="submit"],
#page .wp-block-button__link{
  background:var(--bf-red); color:#fff; border:none; border-radius:6px;
  font-weight:700; letter-spacing:.02em;
}
#page .ast-button:hover, #page .button:hover,
#page input[type="submit"]:hover, #page .wp-block-button__link:hover{
  background:var(--bf-red-glow); color:#fff;
}

/* ---------- Formularfelder ---------- */
#page input[type="text"], #page input[type="email"], #page input[type="tel"],
#page input[type="password"], #page input[type="search"], #page input[type="number"],
#page input[type="url"], #page input[type="date"], #page textarea, #page select{
  background:#1a1a1a; color:#fff; border:1px solid var(--bf-gray-dark); border-radius:6px;
}
#page input::placeholder, #page textarea::placeholder{ color:var(--bf-gray); }
#page input:focus, #page textarea:focus, #page select:focus{ border-color:var(--bf-gold); outline:none; }

/* ---------- Tabellen (z.B. Versandarten, Bezahlmöglichkeiten) ---------- */
#page table, #page th, #page td{ border-color:var(--bf-border) !important; }
#page th{ color:#fff; }

/* ============================================================
   WooCommerce
   ============================================================ */

/* Shop-Loop / Produktkacheln */
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product{
  background:var(--bf-card); border:1px solid var(--bf-border); border-radius:12px;
  padding:16px; transition:border-color .3s, transform .3s;
}
.woocommerce ul.products li.product:hover{ border-color:var(--bf-gray-dark); transform:translateY(-3px); }
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2{ color:#fff; font-weight:700; }
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price, .woocommerce div.product span.price{ color:var(--bf-gold) !important; }
.woocommerce ul.products li.product .price del, .woocommerce div.product p.price del{ color:var(--bf-gray); }
.woocommerce span.onsale{ background:var(--bf-red); color:#fff; }

/* WooCommerce Buttons */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce a.button.alt, .woocommerce button.button.alt,
.woocommerce #respond input#submit, .woocommerce .single_add_to_cart_button,
.woocommerce #place_order, .woocommerce-cart .wc-proceed-to-checkout a.checkout-button{
  background:var(--bf-red) !important; color:#fff !important; border:none !important;
  border-radius:6px !important; font-weight:700 !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover,
.woocommerce #place_order:hover, .woocommerce .checkout-button:hover{ background:var(--bf-red-glow) !important; }

/* Einzelprodukt */
.woocommerce div.product .woocommerce-tabs ul.tabs li{ background:var(--bf-card); border-color:var(--bf-border); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active{ background:var(--bf-dark); }
.woocommerce div.product .woocommerce-tabs ul.tabs li a{ color:var(--bf-gray-light); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{ color:#fff; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before{ border-color:var(--bf-border); }
.woocommerce .star-rating span, .woocommerce p.stars a{ color:var(--bf-gold); }
.woocommerce div.product form.cart .quantity .qty{ background:#1a1a1a; color:#fff; border-color:var(--bf-gray-dark); }

/* Hinweise / Notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews,
.woocommerce .woocommerce-message, .woocommerce .woocommerce-info{
  background:var(--bf-card) !important; color:var(--bf-white) !important; border-top-color:var(--bf-gold) !important;
}
.woocommerce-error{ border-top-color:var(--bf-red) !important; }
.woocommerce-message::before, .woocommerce-info::before{ color:var(--bf-gold); }
.woocommerce-error::before{ color:var(--bf-red); }

/* Warenkorb / Shop-Tabellen */
.woocommerce table.shop_table{ background:var(--bf-card); border-color:var(--bf-border); border-radius:10px; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td{ border-color:var(--bf-border) !important; color:var(--bf-gray-light); }
.woocommerce table.shop_table thead th{ color:#fff; }
.woocommerce-cart table.cart img{ border-radius:4px; }
.cart_totals h2, .woocommerce .cart-collaterals .cart_totals{ color:#fff; }

/* Kasse / Checkout */
.woocommerce-checkout #payment{ background:var(--bf-card) !important; border-radius:10px; }
.woocommerce-checkout #payment ul.payment_methods{ border-color:var(--bf-border); }
.woocommerce-checkout #payment div.payment_box{ background:var(--bf-dark) !important; color:var(--bf-gray-light); }
.woocommerce-checkout #payment div.payment_box::before{ border-bottom-color:var(--bf-dark) !important; }
.woocommerce-checkout-review-order, .woocommerce form .form-row label{ color:var(--bf-gray-light); }
.select2-container--default .select2-selection--single{ background:#1a1a1a !important; border-color:var(--bf-gray-dark) !important; color:#fff; }
.select2-container--default .select2-selection--single .select2-selection__rendered{ color:#fff; }
.select2-dropdown{ background:var(--bf-card); color:#fff; border-color:var(--bf-border); }
.select2-results__option--highlighted{ background:var(--bf-red) !important; }

/* Mein Konto */
.woocommerce-MyAccount-navigation ul li{ border-color:var(--bf-border); }
.woocommerce-MyAccount-navigation ul li a{ color:var(--bf-gray-light); }
.woocommerce-MyAccount-navigation ul li.is-active a{ color:var(--bf-gold); }

/* Sortierung / Ergebnisanzahl / Breadcrumb */
.woocommerce .woocommerce-result-count, .woocommerce .woocommerce-ordering{ color:var(--bf-gray); }
.woocommerce-breadcrumb{ color:var(--bf-gray); }
.woocommerce-breadcrumb a{ color:var(--bf-gold); }

/* ============================================================
   v1.2 – Shop-Feinschliff, Sidebar aus, MailerLite-Badge aus,
          Formatauswahl deutlicher
   ============================================================ */

/* --- MailerLite-"Newsletter"-Badge (Embed) ueberall ausblenden --- */
/* Betrifft NUR das MailerLite-Embed, nicht die eigenen Formulare der Landingpages. */
.ml-form-embedContainer,
div[class*="ml-subscribe-form"]{ display:none !important; }

/* --- Sidebar (Suchen/Recent Posts/...) ausblenden + volle Breite (CSS-Fallback) --- */
#secondary, .widget-area.secondary, .ast-separate-container #secondary{ display:none !important; }
.ast-separate-container #primary,
#content #primary,
.ast-separate-container.ast-right-sidebar #primary,
.ast-separate-container.ast-left-sidebar #primary{ width:100% !important; margin:0 auto !important; }

/* --- Produktbild begrenzen (Desktop + Mobile) --- */
.woocommerce div.product div.images{ max-width:360px; }
.woocommerce div.product div.images img{
  max-height:480px; width:auto !important; display:block; margin:0 auto;
}
@media(min-width:993px){
  /* Bild schmaler, Beschreibung breiter */
  .woocommerce div.product div.images{ width:38%; }
  .woocommerce div.product div.summary{ width:58%; }
}
@media(max-width:600px){
  .woocommerce div.product div.images{ max-width:280px; margin:0 auto 10px; float:none; }
  .woocommerce div.product div.images img{ max-height:320px; }
}

/* --- Mehr Luft im Shop --- */
.woocommerce div.product .summary > *{ margin-bottom:1.1rem; }
.woocommerce div.product .woocommerce-tabs{ margin-top:2.5rem; padding-top:1.5rem; border-top:1px solid var(--bf-border); }
.woocommerce .related.products, .woocommerce .upsells.products{ margin-top:3rem; padding-top:1.75rem; border-top:1px solid var(--bf-border); }
.woocommerce .related.products > h2, .woocommerce .upsells.products > h2{ margin-bottom:1.5rem; }
.woocommerce ul.products li.product{ margin-bottom:1.75rem; }
.woocommerce-cart .cart-collaterals, .woocommerce-checkout .col2-set{ margin-top:1rem; }

/* --- Formatauswahl (Variation) deutlich hervorheben --- */
.woocommerce div.product form.cart .variations{
  margin:0 0 1.3rem; border:1px solid var(--bf-border); border-radius:10px;
  background:var(--bf-card); border-collapse:separate;
}
.woocommerce div.product form.cart .variations .label{
  color:#fff; font-weight:700; text-transform:uppercase; letter-spacing:.05em;
  padding:14px 16px; vertical-align:middle;
}
.woocommerce div.product form.cart .variations .value{ padding:10px 16px 14px; }
.woocommerce div.product form.cart .variations select{
  width:100%; max-width:100%; background:#1a1a1a; color:#fff;
  border:2px solid var(--bf-gold); border-radius:6px;
  padding:13px 42px 13px 14px; font-size:16px; min-height:50px;
  -webkit-appearance:none; -moz-appearance:none; appearance:none; cursor:pointer;
  background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d4a84b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 14px center;
}
.woocommerce div.product form.cart .variations select:focus{ border-color:var(--bf-gold-dim); outline:none; }
.woocommerce div.product form.cart .reset_variations{ color:var(--bf-gray); font-size:13px; }

/* Solange kein Format gewaehlt ist: Button sichtbar "gesperrt" */
.woocommerce div.product form.cart .single_add_to_cart_button.disabled,
.woocommerce div.product form.cart .single_add_to_cart_button.wc-variation-selection-needed{
  opacity:.45 !important; cursor:not-allowed;
}
/* Hinweis "Bitte zuerst ein Format waehlen" unter der Auswahl */
.woocommerce div.product form.cart .variations + .single_variation_wrap .woocommerce-variation-add-to-cart.woocommerce-variation-add-to-cart-disabled::before{
  content:"Bitte zuerst ein Format wählen.";
  display:block; color:var(--bf-gold); font-size:14px; font-weight:600; margin-bottom:10px;
}

/* ============================================================
   v1.3 – Einheitliches Menü, Abstand oben, Produkttitel,
          Shop-Spacing, PayPal-Hinweis aus
   ============================================================ */

/* --- Astra-Header auf normalen Seiten ausblenden (eigener Header kommt per Hook) --- */
#masthead{ display:none !important; }

/* --- Einheitlicher Header (.bf-header) – identisch zu Start-/Über-mich-Seite --- */
.bf-header{ position:sticky; top:0; z-index:90; background:rgba(0,0,0,.92); backdrop-filter:blur(10px); border-bottom:1px solid var(--bf-border); }
.bf-header-inner{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 20px; max-width:1040px; margin:0 auto; }
.bf-brand{ font-family:'Bebas Neue',sans-serif; font-size:24px; letter-spacing:.08em; color:#fff !important; text-decoration:none; line-height:1; white-space:nowrap; }
.bf-brand span{ color:var(--bf-red); }
.bf-nav{ display:flex; align-items:center; gap:24px; }
.bf-header .bf-nav a.bf-nav-link{ font-size:15px; font-weight:600; color:var(--bf-gray-light) !important; text-decoration:none; letter-spacing:.02em; transition:color .2s; }
.bf-header .bf-nav a.bf-nav-link:hover{ color:#fff !important; }
.bf-header .bf-nav a.bf-nav-cta{ font-size:14px; font-weight:700; color:var(--bf-gold) !important; border:1px solid var(--bf-gold); padding:8px 16px; border-radius:5px; text-decoration:none; transition:all .2s; white-space:nowrap; }
.bf-header .bf-nav a.bf-nav-cta:hover{ background:var(--bf-gold); color:var(--bf-black) !important; }
@media(max-width:560px){
  .bf-header .bf-nav .bf-nav-hide-mobile{ display:none; }
  .bf-header-inner{ padding:11px 16px; }
}

/* --- Abstand zwischen Header und Inhalt (Desktop hatte zu wenig) --- */
#page #content{ padding-top:40px; }
@media(max-width:600px){ #page #content{ padding-top:24px; } }

/* --- Produkttitel (Einzelprodukt) deutlich größer --- */
.woocommerce div.product .product_title,
.woocommerce div.product h1.product_title,
.woocommerce div.product h1.entry-title{
  font-family:'Bebas Neue',sans-serif !important;
  font-size:clamp(34px,5vw,54px) !important; line-height:1.02 !important;
  letter-spacing:.03em; color:#fff !important; margin:0 0 .35em !important;
}

/* --- Shop: mehr Luft (verstärkt) --- */
.woocommerce-page #content .ast-container,
.single-product #content .ast-container{ padding-top:8px; }
.woocommerce div.product{ margin-top:8px; }
.woocommerce div.product .summary{ padding-top:4px; }
.woocommerce ul.products{ margin-top:1rem !important; }
.woocommerce ul.products li.product{ margin-bottom:2rem !important; }
.woocommerce-products-header{ margin-bottom:1.25rem; }
.woocommerce .woocommerce-result-count{ margin-bottom:1.25rem; }

/* --- PayPal "Bezahlen Sie nach 30 Tagen"-Werbebanner ausblenden --- */
/* (Die echten Bezahl-Buttons bleiben erhalten – nur das Promo-Messaging geht.) */
.ppcp-messages, [data-pp-message], .pcp-messages, .wc-ppcp-messages,
.ppc-button-wrapper .ppcp-messages, .woocommerce-shop .ppcp-messages,
.ppcp-messages-PayLater, div[id^="ppcp-messages"]{ display:none !important; }
