/**
 * Theme Name: Pixeldroide Child 2026
 * Author: pixeldroide
 * Author URI: https://www.pixeldroi.de
 * Description: Astra Child Theme – LARS Wildrettungssysteme
 * Version: 2.0.0
 * License: GNU General Public License v2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: pixeldroide-child
 * Template: astra
 */

/* ============================================================
   LARS Wildrettungssysteme – PDP Optimierung v2
   Einfügen in: Child-Theme style.css (ans Ende)
   Selektoren geprüft anhand Dev-Tools (staging.lars-wildretter.de)
   ============================================================ */

/* ----------------------------------------------------------
   DIAGNOSE-TEST: Wenn du diesen roten Rand siehst, lädt die CSS!
   Nach Bestätigung wieder entfernen.
   ---------------------------------------------------------- */
/* body.single-product { outline: 3px solid red !important; } */

/* ----------------------------------------------------------
   CSS-Variablen
   ---------------------------------------------------------- */
:root {
  --lars-green:       #00722d;
  --lars-green-dark:  #005a22;
  --lars-green-light: #e8f5ee;
  --lars-border:      #dde8e1;
  --lars-muted:       #5a5a5a;
  --lars-text:        #1a1a1a;
  --lars-bg-subtle:   #f7faf8;
}

/* ----------------------------------------------------------
   1. PRODUKTTITEL H1
   Echter Selektor: h1.product_title.entry-title
   ---------------------------------------------------------- */
body.single-product h1.product_title.entry-title {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #1a1a1a !important;
  margin-top: 0 !important;
  margin-bottom: 0.6rem !important;
}

/* ----------------------------------------------------------
   2. PREIS
   Echter Selektor: .summary.entry-summary p.price
   ---------------------------------------------------------- */
body.single-product .summary.entry-summary p.price,
body.single-product .summary.entry-summary span.price {
  font-size: clamp(1.5rem, 2.8vw, 2rem) !important;
  font-weight: 700 !important;
  color: var(--lars-green) !important;
  margin-bottom: 0.3rem !important;
  line-height: 1.2 !important;
}

/* ----------------------------------------------------------
   3. LEGAL-PREIS-INFO (MwSt., Versandkosten)
   Echter Selektor: .legal-price-info (div)
   ---------------------------------------------------------- */
body.single-product .legal-price-info {
  font-size: 0.8rem !important;
  color: var(--lars-muted) !important;
  margin-bottom: 0.2rem !important;
  line-height: 1.5 !important;
}

body.single-product .legal-price-info a {
  color: var(--lars-green) !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

/* ----------------------------------------------------------
   4. LIEFERZEIT & VERFÜGBARKEIT
   Echter Selektor: .wc-gzd-additional-info (p-Tags)
   ---------------------------------------------------------- */
body.single-product .summary .wc-gzd-additional-info {
  font-size: 0.8125rem !important;
  color: var(--lars-muted) !important;
  margin-top: 0 !important;
  margin-bottom: 0.25rem !important;
  line-height: 1.5 !important;
}

body.single-product .summary p.in-stock {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: var(--lars-green) !important;
  margin-bottom: 0.25rem !important;
}

body.single-product .summary p.out-of-stock {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: #c0392b !important;
  margin-bottom: 0.25rem !important;
}

/* ----------------------------------------------------------
   5. PERSONALISIERUNGS-TEXT (Short Description Bereich)
   Echter Selektor: .woocommerce-product-details__short-description
   ---------------------------------------------------------- */
body.single-product .woocommerce-product-details__short-description {
  font-size: 0.875rem !important;
  color: var(--lars-muted) !important;
  line-height: 1.6 !important;
  margin-bottom: 0.75rem !important;
}

/* ----------------------------------------------------------
   6. FORM / CART-BEREICH
   Echter Selektor: form.cart_group (nicht form.cart!)
   ---------------------------------------------------------- */
body.single-product form.cart_group {
  margin-top: 0.75rem !important;
  margin-bottom: 0 !important;
}

/* Checkbox – individuelle Beschriftung */
body.single-product form.cart_group input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  accent-color: var(--lars-green) !important;
  vertical-align: middle !important;
  margin-right: 6px !important;
  cursor: pointer !important;
}

body.single-product form.cart_group label {
  font-size: 0.875rem !important;
  color: var(--lars-text) !important;
  cursor: pointer !important;
  vertical-align: middle !important;
}

/* Menge + Button: nebeneinander, gleichmäßige Höhe */
body.single-product form.cart_group .quantity,
body.single-product form.grouped_form .quantity {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-right: 10px !important;
}

body.single-product .quantity input.qty {
  width: 58px !important;
  height: 46px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  text-align: center !important;
  border: 2px solid var(--lars-border) !important;
  border-radius: 6px !important;
  color: var(--lars-text) !important;
}

body.single-product .quantity input.qty:focus {
  border-color: var(--lars-green) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(0,114,45,0.15) !important;
}

body.single-product .quantity .minus,
body.single-product .quantity .plus {
  width: 34px !important;
  height: 46px !important;
  font-size: 1.2rem !important;
  border: 2px solid var(--lars-border) !important;
  background: #fff !important;
  color: var(--lars-text) !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  line-height: 1 !important;
  transition: background 0.15s, border-color 0.15s !important;
}

body.single-product .quantity .minus:hover,
body.single-product .quantity .plus:hover {
  background: var(--lars-green-light) !important;
  border-color: var(--lars-green) !important;
}

/* WARENKORB-BUTTON */
body.single-product .single_add_to_cart_button.button,
body.single-product button.single_add_to_cart_button {
  height: 46px !important;
  min-width: 180px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  background-color: var(--lars-green) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 0 1.5rem !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  cursor: pointer !important;
  transition: background-color 0.2s !important;
  vertical-align: middle !important;
}

body.single-product .single_add_to_cart_button.button:hover,
body.single-product button.single_add_to_cart_button:hover {
  background-color: var(--lars-green-dark) !important;
}

/* ----------------------------------------------------------
   7. STAFFELPREISTABELLE
   Echter Selektor: div.awdr-bulk-customizable-table > table.wdr-bulk-table-msg.sar-table
   ---------------------------------------------------------- */
body.single-product div.awdr-bulk-customizable-table {
  margin-top: 1rem !important;
  margin-bottom: 0.75rem !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  border: 1px solid var(--lars-border) !important;
}

body.single-product div.awdr-bulk-customizable-table table.wdr-bulk-table-msg {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 0.875rem !important;
}

/* Tabellen-Header */
body.single-product div.awdr-bulk-customizable-table thead.wdr-bulk-table_thead tr,
body.single-product div.awdr-bulk-customizable-table thead tr {
  background-color: var(--lars-green) !important;
}

body.single-product div.awdr-bulk-customizable-table thead th {
  color: #fff !important;
  padding: 0.55rem 0.9rem !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  text-align: left !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  border: none !important;
}

/* Tabellen-Body */
body.single-product div.awdr-bulk-customizable-table tbody tr:nth-child(even) {
  background-color: var(--lars-bg-subtle) !important;
}

body.single-product div.awdr-bulk-customizable-table tbody tr:hover {
  background-color: var(--lars-green-light) !important;
}

body.single-product div.awdr-bulk-customizable-table tbody td {
  padding: 0.5rem 0.9rem !important;
  border-top: 1px solid var(--lars-border) !important;
  color: var(--lars-text) !important;
  font-size: 0.875rem !important;
}

/* ----------------------------------------------------------
   8. RABATT-INFO BEREICH (2%-Rabatt Hinweise)
   ---------------------------------------------------------- */
body.single-product .summary p strong,
body.single-product .summary .wdr-discount-info {
  font-size: 0.9375rem !important;
}

/* Grüne Checkmarks vor den Rabatt-Listeneinträgen */
body.single-product .summary ul li,
body.single-product .summary .wdr-info li {
  font-size: 0.875rem !important;
  color: var(--lars-muted) !important;
  margin-bottom: 0.25rem !important;
  line-height: 1.5 !important;
}

/* ----------------------------------------------------------
   9. AST-SINGLE-PRODUCT-EXTRAS (Astra Zusatz-Bereich)
   ---------------------------------------------------------- */
body.single-product .ast-single-product-extras {
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

/* ----------------------------------------------------------
   10. GESAMTABSTAND SUMMARY-BEREICH
   ---------------------------------------------------------- */
body.single-product .summary.entry-summary {
  padding-top: 0 !important;
}

/* Abstände zwischen den Blöcken via direktes Kind-Spacing */
body.single-product .summary.entry-summary > * {
  margin-top: 0 !important;
}

/* ----------------------------------------------------------
   11. MOBILE (max-width: 768px)
   ---------------------------------------------------------- */
@media (max-width: 768px) {

  body.single-product h1.product_title.entry-title {
    font-size: 1.3rem !important;
  }

  body.single-product .summary.entry-summary p.price {
    font-size: 1.4rem !important;
  }

  /* Button auf volle Breite */
  body.single-product .single_add_to_cart_button.button,
  body.single-product button.single_add_to_cart_button {
    width: 100% !important;
    min-width: unset !important;
    height: 52px !important;
    margin-top: 0.5rem !important;
  }

  body.single-product form.cart_group .quantity {
    margin-right: 0 !important;
    margin-bottom: 0.5rem !important;
  }

  body.single-product div.awdr-bulk-customizable-table thead th {
    font-size: 0.75rem !important;
    padding: 0.45rem 0.6rem !important;
  }

  body.single-product div.awdr-bulk-customizable-table tbody td {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.8125rem !important;
  }
}

/* ============================================================
   ENDE
   ============================================================ */
   
/* ==========================================================================
   WOOCOMMERCE PRODUCT TABS
   ========================================================================== */

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    padding: 0.5em 1em;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
    background-color: rgb(123, 194, 145);
    color: whitesmoke;
}

.woocommerce-tabs ul {
    background: whitesmoke;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    font-size: 14px !important;
    font-weight: 500 !important;
}

.yikes-custom-woo-tab-title {
    display: none !important;
}

.woocommerce div.product .woocommerce-tabs .panel {
    background-color: whitesmoke !important;
    padding: 1em;
    font-size: 15px;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
    margin-bottom: 0;
    border-bottom: 4px solid rgb(123, 194, 145);
    border-top: 0;
}


/* ==========================================================================
   HEADER – DESKTOP
   Below-Header wird normal angezeigt (Warenkorb, Login, etc.)
   ========================================================================== */

/* Login Icon ausblenden – nur Warenkorb soll sichtbar sein */
.ast-account-item-wrap {
    display: none !important;
}

/* Logo über Balken und Breadcrumb klickbar */
header .custom-logo-link img {
    position: absolute;
    z-index: 5;
}

/* Keine graue Linie unter dem Header */
.main-header-bar {
    border-bottom-style: none;
}


/* ==========================================================================
   HEADER – MOBILE
   Alles im Astra-Header ausblenden – Superfly übernimmt Navigation
   ========================================================================== */

@media (max-width: 921px) {

    /* Warenkorb-Icon im Header bleibt sichtbar */

    /* Astra eigener Mobile-Burger ausblenden */
    .menu-toggle,
    .ast-mobile-menu-trigger-minimal,
    .ast-mobile-menu-trigger-default,
    button[class*="menu-toggle"],
    .main-header-bar .ast-mobile-header-wrap .ast-builder-grid-row > div:not(.ast-flex-1) {
        display: none !important;
    }

    /* Astra Mobile Navigation (Dropdown) ausblenden */
    #ast-mobile-header,
    .ast-mobile-header-content,
    .ast-header-break-point .main-header-bar-navigation {
        display: none !important;
    }

    /* Login Icon auch mobil */
    .ast-account-item-wrap {
        display: none !important;
    }

    /* Hauptheader-Leiste auf Mobile: nur Logo zeigen, alles andere weg */
    .main-header-bar .ast-builder-grid-row .ast-grid-right-section,
    .main-header-bar .ast-builder-grid-row .ast-grid-center-section {
        display: none !important;
    }

    /* Sicherstellen dass Logo/linke Sektion sichtbar bleibt */
    .main-header-bar .ast-builder-grid-row .ast-grid-left-section {
        display: flex !important;
    }

    /* Below-Header auf Mobile auch sichtbar lassen (Cart!) */

    /* Sticky CTA / Superfly – genug Abstand nach unten damit nix überlagert */
    body {
        padding-bottom: 0 !important;
    }
}


/* ==========================================================================
   SLIDE CART – LARS Wildretter
   ========================================================================== */

/* Header Bereich */
#astra-mobile-cart-drawer .astra-cart-drawer-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid #e8e8e8 !important;
}

/* Titel */
#astra-mobile-cart-drawer .astra-cart-drawer-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a3a1a !important;
}

/* Schließen-Button */
#astra-mobile-cart-drawer .astra-cart-drawer-close {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #1a3a1a !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 16px 20px !important;
    margin: 0 !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
}
#astra-mobile-cart-drawer .astra-cart-drawer-close::after {
    content: "Schließen" !important;
}

/* Produkt-Zeile */
#astra-mobile-cart-drawer .elementor-menu-cart__product {
    display: grid !important;
    grid-template-columns: 65px 1fr !important;
    gap: 12px !important;
    padding: 14px 20px !important;
    border-bottom: 1px solid #e8e8e8 !important;
    position: relative !important;
}

/* Produktbild */
#astra-mobile-cart-drawer .elementor-menu-cart__product-image img {
    width: 65px !important;
    height: 65px !important;
    object-fit: cover !important;
    border-radius: 4px !important;
}

/* Rechte Spalte */
#astra-mobile-cart-drawer .elementor-menu-cart__product-details {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

/* Produktname */
#astra-mobile-cart-drawer .elementor-menu-cart__product-name a {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1a3a1a !important;
    line-height: 1.3 !important;
}

/* Mülleimer */
#astra-mobile-cart-drawer .elementor-menu-cart__product-remove a,
#astra-mobile-cart-drawer .elementor-menu-cart__product-remove .remove_from_cart_button {
    position: absolute !important;
    bottom: 14px !important;
    right: 20px !important;
    top: auto !important;
    font-size: 0 !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
}
#astra-mobile-cart-drawer .elementor-menu-cart__product-remove a::before,
#astra-mobile-cart-drawer .elementor-menu-cart__product-remove .remove_from_cart_button::before {
    content: "⌫" !important;
    font-size: 0 !important;
}
#astra-mobile-cart-drawer .elementor-menu-cart__product-remove a::after,
#astra-mobile-cart-drawer .elementor-menu-cart__product-remove .remove_from_cart_button::after {
    content: "" !important;
    display: inline-block !important;
    width: 22px !important;
    height: 22px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3Cpath d='M9 6V4h6v2'/%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
}

/* Menge + Preis */
#astra-mobile-cart-drawer .elementor-menu-cart__product-price {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    color: #444 !important;
    margin-top: auto !important;
    padding-top: 6px !important;
}

/* Zwischensumme */
#astra-mobile-cart-drawer .elementor-menu-cart__subtotal {
    border-top: 2px solid #00722d !important;
    padding: 16px 20px 4px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a3a1a !important;
}

/* inkl. MwSt. Text */
#astra-mobile-cart-drawer .elementor-menu-cart__subtotal::after {
    content: "inkl. 19 % MwSt. zzgl. Versandkosten" !important;
    display: block !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #666 !important;
    margin-top: 4px !important;
}

/* Footer Buttons */
#astra-mobile-cart-drawer .elementor-menu-cart__footer-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 16px 20px 28px !important;
}

/* Kasse Button – Grün */
#astra-mobile-cart-drawer .elementor-menu-cart__footer-buttons .elementor-button:last-child {
    background: #00722d !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 14px !important;
    border-radius: 4px !important;
    text-align: center !important;
    width: 100% !important;
}

/* Warenkorb anzeigen – Outline */
#astra-mobile-cart-drawer .elementor-menu-cart__footer-buttons .elementor-button:first-child {
    background: #ffffff !important;
    color: #00722d !important;
    border: 2px solid #00722d !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    padding: 12px !important;
    border-radius: 4px !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Kasse Button Prefix-Text */
#astra-mobile-cart-drawer .elementor-menu-cart__footer-buttons .elementor-button:last-child::before {
    content: "🔒 Jetzt sicher zur" !important;
    font-size: 16px !important;
}


/* ==========================================================================
   WOOCOMMERCE – PRODUKT & SHOP
   ========================================================================== */

/* Kein Klick auf Produktbilder */
.woocommerce-product-gallery__image {
    pointer-events: none;
}

/* Bei Bundle: doppelte MwSt und Lieferzeit weg */
.bundle_wrap .legal-price-info {
    visibility: hidden;
}

/* Pfeile Produkt-Thumbnails (Iconic WooThumbs) */
.iconic-woothumbs-images__arrow,
.iconic-woothumbs-zoom-next,
.iconic-woothumbs-zoom-prev {
    z-index: 10;
}


/* ==========================================================================
   STICKY ADD TO CART – ASTRA PRO (Desktop mit Superfly Offset)
   Superfly-Menü = 280px permanent links sichtbar auf Desktop
   ========================================================================== */

/* Desktop: Bar beginnt nach dem Superfly-Menü */
@media (min-width: 922px) {

    /* Höchste Spezifität: body + voller Selektor-Pfad */
    body .ast-sticky-add-to-cart,
    body .ast-sticky-add-to-cart.top,
    body .ast-sticky-add-to-cart.top.is-active,
    body div.ast-sticky-add-to-cart {
        left: 280px !important;
        right: 0 !important;
        width: auto !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }

    /* Inner Container: volle verfügbare Breite */
    body .ast-sticky-add-to-cart .ast-container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    body .ast-sticky-add-to-cart .ast-sticky-add-to-cart-content {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        gap: 15px !important;
    }

    /* Produktname: Platz lassen, sauber abschneiden wenn nötig */
    body .ast-sticky-add-to-cart .ast-sticky-add-to-cart-title-wrap {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }
}

/* Mobile: volle Breite, kein Offset */
@media (max-width: 921px) {
    body .ast-sticky-add-to-cart,
    body .ast-sticky-add-to-cart.top,
    body .ast-sticky-add-to-cart.top.is-active {
        left: 0 !important;
        width: 100% !important;
    }
}

/* Button-Styling – LARS grün */
body .ast-sticky-add-to-cart .single_link_to_cart_button,
body .ast-sticky-add-to-cart a.single_link_to_cart_button {
    background-color: #00722d !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    padding: 8px 20px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

body .ast-sticky-add-to-cart .single_link_to_cart_button:hover,
body .ast-sticky-add-to-cart a.single_link_to_cart_button:hover {
    background-color: #005a24 !important;
}

/* Preis im Sticky Bar */
body .ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-price {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}


/* ==========================================================================
   CHECKOUT
   ========================================================================== */

/* "Ihre Bestellung" Heading */
.woocommerce-page.woocommerce-checkout form #order_review_heading {
    border: none !important;
    float: none;
    clear: both;
    width: 100%;
    padding-left: 0 !important;
    padding-top: 0 !important;
    margin-top: 1.5em !important;
}

/* Abstände Preiskalkulation */
.woocommerce table.shop_table,
.woocommerce-page table.shop_table {
    padding: 1em;
}

/* Abstand unter Jetzt-kaufen-Button */
#order_review {
    padding-bottom: 2em !important;
}
