/* ========================================
   Poppins Font Family - Lokal gehostet
   ======================================== */

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   Poppins global anwenden
   ======================================== */

body {
    font-family: 'Poppins', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif !important;
}

/* ========================================
   Produkt-Beschreibungen mit Icons
   ======================================== */
.header-left a.logo img {
    object-fit: contain !important;
}


.product.attribute.description .value ul {
    padding-left: 0px !important;
    padding-inline-start: 0px !important;
    list-style: none;
}

.product.attribute.description .value ul li {
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    line-height: 1.6;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
}

.product.attribute.description .value ul li:before {
    content: '✓';
    position: absolute;
    left: 0;
    font-size: 20px;
    font-weight: 600;
    color: #4CAF50;
}

/* ========================================
   Quelle Input
   ======================================== */

#quelle_dv {
    display: flex;
    align-items: center;
    gap: 10px;
}

#quelle_dv input#quelle {
    width: 3em;
    text-align: center;
}

/* ========================================
   Helper Classes
   ======================================== */

.a-center {
    text-align: center;
}

.a-left {
    text-align: left;
}

.a-right {
    text-align: right;
}

/* ========================================
   Grouped Product Table - Desktop
   ======================================== */

/* Colgroup überschreiben */
#super-product-table colgroup col {
    width: auto !important;
}

/* Tabelle Basis */
#super-product-table {
    width: 100%;
    table-layout: auto;
}

#super-product-table td,
#super-product-table th {
    padding: 10px;
    vertical-align: middle;
}

#super-product-table th {
    background: #f5f5f5;
}

#super-product-table thead th[colspan] {
    text-align: center;
}

/* Spalte 1: Radio Button / Anzahl */
#super-product-table td.col.qty,
#super-product-table th:nth-child(1) {
    width: 80px;
    min-width: 80px;
    text-align: center !important;
}

.grouped .col.qty .control.qty {
    height: 100%;
    width: 100%;
}

.col.qty input[type="radio"] {
    margin: 0 auto;
    vertical-align: middle;
}

/* Spalte 2: Verpackungsgröße */
#super-product-table td.col.a-right.grouppackung,
#super-product-table td.col.auswahl,
#super-product-table th:nth-child(2) {
    width: auto;
    min-width: 100px;
    text-align: right;
}

/* Spalte 3: "à" - schmälste Spalte */
#super-product-table td.groupa,
#super-product-table th:nth-child(3) {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    white-space: nowrap;
    text-align: center;
    padding: 10px 5px;
}

/* Spalte 4: Preis */
#super-product-table td.col.a-center,
#super-product-table td.col.price,
#super-product-table th:nth-child(4) {
    width: 100px;
    min-width: 100px;
    text-align: center;
}

/* Spalte 5: Grundpreis - flexibel */
#super-product-table td.col.grundpeis,
#super-product-table th:nth-child(5) {
    width: auto;
    white-space: normal;
    text-align: right;
    font-size: 0.9rem;
}

/* Number Input verstecken */
#super-product-table .control.qty input[type="number"],
input[name^="super_group"][type="number"],
#super-product-table input[type="number"] {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    visibility: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

/* Selected Row */
#super-product-table tr.selected {
    background-color: #f0f8ff;
}

/* Price Styling */
.table.grouped .price-box .price {
    font-size: 1rem;
    font-weight: 600;
}

/* ========================================
   Versandtabelle
   ======================================== */

.versand {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    display: block;
    overflow-x: auto;
}

.versand .kopf {
    vertical-align: middle;
    text-align: center;
    border: 1px solid;
    padding: 3px 10px;
}

.versand .mitte {
    vertical-align: middle;
    text-align: center;
    border: 1px solid;
    padding: 3px;
}

.versand .links {
    vertical-align: middle;
    text-align: left;
    border: 1px solid;
    padding: 3px;
}

.v-box {
    font-size: 0.9rem;
}

.lieferung-uebersicht h2 {
    margin: 0px;
}

/* ========================================
   Kategorie- und Produktansicht
   ======================================== */

.breadcrumbs {
    height: 30px;
}

.page-wrapper > .breadcrumbs .items {
    padding: 0px !important;
}

.product-item-name a {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.minimal-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin: 0;
}

.minimal-price .price-label,
.minimal-price .price-container {
    display: inline;
}

.catalog-category-view .product-item .price-box .price-label {
    font-size: 1.0rem;
}

.catalog-category-view .price-box .price {
    font-size: 1.0rem;
}

info.type6 .product.name {
    padding-right: 0px;
}

/* ========================================
   Footer
   ======================================== */

.zahlungsarten {
    display: flex;
    flex-wrap: wrap;
    max-height: 40px;
    max-width: 100%;
}

.footer ul {
    display: flex;
    gap: 15px;
}

/* ========================================
   Grouped Product Table - Desktop
   ======================================== */

/* Wrapper mit Scroll für Notfall */
.table-wrapper.grouped {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* KRITISCH: Colgroup komplett überschreiben */
#super-product-table colgroup col {
    width: auto !important;
}

#super-product-table colgroup col:nth-child(1) {
    width: 60px !important;
}

#super-product-table colgroup col:nth-child(3) {
    width: 20px !important;
}

#super-product-table colgroup col:nth-child(4) {
    width: 100px !important;
}

/* Tabelle Basis */
#super-product-table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
}

#super-product-table td,
#super-product-table th {
    padding: 8px 5px;
    vertical-align: middle;
    box-sizing: border-box;
    overflow: hidden;
}

#super-product-table th {
    background: #f5f5f5;
    text-transform: none;
}

#super-product-table thead th[colspan] {
    text-align: center;
}

/* Spalte 1: Radio Button */
#super-product-table td.col.qty,
#super-product-table th:nth-child(1) {
    width: 60px !important;
    max-width: 60px !important;
    text-align: center !important;
    padding: 8px 3px !important;
}

.col.qty .control.qty {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Spalte 2: Verpackungsgröße */
#super-product-table td.col.a-right.grouppackung,
#super-product-table td.col.auswahl,
#super-product-table th:nth-child(2) {
    text-align: right;
    padding-right: 5px !important;
}

/* Spalte 3: "à" - MUSS SCHMAL SEIN */
#super-product-table td.groupa,
#super-product-table th:nth-child(3) {
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    padding: 8px 2px !important;
    text-align: center !important;
    overflow: hidden !important;
}

/* Spalte 4: Preis */
#super-product-table td.col.a-center,
#super-product-table td.col.price,
#super-product-table th:nth-child(4) {
    width: 100px !important;
    max-width: 100px !important;
    text-align: center;
    white-space: nowrap;
}

/* Spalte 5: Grundpreis - flexibel */
#super-product-table td.col.grundpeis,
#super-product-table th:nth-child(5) {
    text-align: right;
    font-size: 0.85rem;
    white-space: nowrap;
    padding-right: 8px !important;
}

/* Number Input verstecken */
#super-product-table .control.qty input[type="number"],
input[name^="super_group"][type="number"],
#super-product-table input[type="number"] {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    visibility: hidden !important;
}

/* Selected Row */
#super-product-table tr.selected {
    background-color: #f0f8ff;
}

/* Price Styling */
.table.grouped .price-box .price {
    font-size: 1rem;
    font-weight: 600;
}

/* Responsive < 1200px */
@media (max-width: 1199px) {
    #super-product-table {
        font-size: 0.9rem;
    }
    
    #super-product-table td,
    #super-product-table th {
        padding: 6px 3px;
    }
    
    #super-product-table colgroup col:nth-child(1) {
        width: 50px !important;
    }
    
    #super-product-table td.col.qty {
        width: 50px !important;
        max-width: 50px !important;
    }
    
    #super-product-table colgroup col:nth-child(3) {
        width: 18px !important;
    }
    
    #super-product-table td.groupa {
        width: 18px !important;
        min-width: 18px !important;
        max-width: 18px !important;
        padding: 6px 1px !important;
    }
    
    #super-product-table td.col.grundpeis {
        font-size: 0.8rem;
        white-space: normal;
    }
}

/* Tablet: 768px - 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    #super-product-table {
        font-size: 0.85rem;
    }
    
    #super-product-table colgroup col:nth-child(3) {
        width: 15px !important;
    }
    
    #super-product-table td.groupa {
        width: 15px !important;
        min-width: 15px !important;
        max-width: 15px !important;
    }
    
    .table.grouped .price-box .price {
        font-size: 0.95rem;
    }
}

/* Thead th direkt stylen um colspan zu überschreiben */
#super-product-table thead th:nth-child(1) {
    width: auto !important;
}

#super-product-table thead th:nth-child(2) {
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    padding: 8px 2px !important;
}

#super-product-table thead th:nth-child(3) {
    width: 100px !important;
}

#super-product-table thead th:nth-child(4) {
    width: auto !important;
}

/* Mobile - Sehr kleine Bildschirme: max 640px */
@media (max-width: 640px) {
    /* Tabellen-Struktur BEHALTEN */
    .table-wrapper.grouped {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #super-product-table {
        width: 100% !important;
        min-width: 100% !important; /* KEINE feste Mindestbreite mehr */
        display: table !important;
        table-layout: fixed !important;
    }
    
    #super-product-table thead {
        display: table-header-group !important;
    }
    
    #super-product-table thead tr {
        display: table-row !important;
    }
    
    #super-product-table thead th {
        display: table-cell !important;
        padding: 5px 2px !important;
    }
    
    #super-product-table tbody {
        display: table-row-group !important;
    }
    
    #super-product-table tbody tr {
        display: table-row !important;
    }
    
    #super-product-table tbody td {
        display: table-cell !important;
        padding: 5px 2px !important;
    }
    
    #super-product-table tbody td:before {
        content: none !important;
        display: none !important;
    }
    
    #super-product-table caption {
        display: table-caption !important;
        padding: 6px !important;
    }
    
    /* Spalte 1: Radio - minimal */
    #super-product-table colgroup col:nth-child(1) {
        width: 30px !important;
    }
    
    #super-product-table td.col.qty,
    #super-product-table th:nth-child(1) {
        width: 30px !important;
        max-width: 30px !important;
        padding: 3px 1px !important;
    }
    
    /* Spalte 2: Größe - kompakt */
    #super-product-table colgroup col:nth-child(2) {
        width: 23% !important;
    }
    
    #super-product-table td.col.a-right.grouppackung,
    #super-product-table td.col.auswahl,
    #super-product-table th:nth-child(2) {
        width: 23% !important;
        padding: 5px 3px !important;
    }
    
    /* Spalte 3: à - minimal */
    #super-product-table colgroup col:nth-child(3) {
        width: 12px !important;
    }
    
    #super-product-table td.groupa,
    #super-product-table th:nth-child(3) {
        width: 12px !important;
        min-width: 12px !important;
        max-width: 12px !important;
        padding: 3px 1px !important;
    }
    
    /* Spalte 4: Preis - kompakt */
    #super-product-table colgroup col:nth-child(4) {
        width: 22% !important;
    }
    
    #super-product-table td.col.a-center,
    #super-product-table td.col.price,
    #super-product-table th:nth-child(4) {
        width: 22% !important;
        padding: 5px 2px !important;
    }
    
    /* Spalte 5: Grundpreis - flexibel, darf umbrechen */
    #super-product-table colgroup col:nth-child(5) {
        width: auto !important;
    }
    
    #super-product-table td.col.grundpeis,
    #super-product-table th:nth-child(5) {
        width: auto !important;
        white-space: normal !important;
        word-break: break-word;
        padding: 5px 3px !important;
    }
}

/* Extra Small: 400px - 479px */
@media (max-width: 479px) {
    
    #super-product-table td.col.qty {
        width: 25px !important;
        max-width: 25px !important;
    }
    
    #super-product-table td.groupa {
        width: 10px !important;
        min-width: 10px !important;
        max-width: 10px !important;
    }
}

/* Ultra Small: max 399px */
@media (max-width: 399px) {
    
    #super-product-table thead th {
        padding: 4px 1px !important;
    }
    
    #super-product-table tbody td {
        padding: 4px 1px !important;
    }
}

/* =============================================
   HEADER ACCOUNT LINKS - Horizontal mit Pipe
   ============================================= */

/* Äußere Liste horizontal - korrigierter Selektor */
.header-right .panel.header.show-icon-tablet > ul.header.links {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Äußere li Elemente */
.header-right .panel.header.show-icon-tablet > ul.header.links > li {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Innere verschachtelte ul (Mein Konto, Abmelden) */
.header-right .panel.header.show-icon-tablet > ul.header.links > ul.header.links {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Innere li Elemente */
.header-right .panel.header.show-icon-tablet > ul.header.links > ul.header.links > li {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Pipe-Trennung zwischen Willkommen und Mein Konto */
.header-right .panel.header.show-icon-tablet > ul.header.links > li.greet.welcome::after {
    content: "|" !important;
    margin: 0 10px !important;
}

/* Pipe-Trennung zwischen Mein Konto und Abmelden */
.header-right .panel.header.show-icon-tablet > ul.header.links > ul.header.links > li:first-child::after {
    content: "|" !important;
    margin: 0 10px !important;
    color: #999 !important;
}

/* Desktop: top-links-icon ausblenden */
@media (min-width: 768px) {
    .header-right .panel.header.show-icon-tablet .top-links-icon {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .logo {
        max-width: 80px;
    }
}

.section-item-content[id="store.links"] > ul.header.links ~ ul.header.links {
    display: none !important;
}

.minicart-items .product-item-name {
    white-space: normal !important;
}

/* Mobile: Order Summary immer sichtbar statt als Modal */
@media (max-width: 767px) {
    /* Toggle-Button und kompakte Ansicht ausblenden */
    .opc-estimated-wrapper {
        display: none !important;
    }
    
    /* Sidebar als normales Element statt Modal anzeigen */
    .checkout-container .opc-sidebar.opc-summary-wrapper {
        position: static !important;
        transform: none !important;
        visibility: visible !important;
        opacity: 1 !important;
        display: block !important;
        width: 100% !important;
        left: auto !important;
        right: auto !important;
        z-index: auto !important;
        box-shadow: none !important;
        margin-bottom: 20px;
    }
    
    /* Modal-Header (Schließen-Button) ausblenden */
    .opc-sidebar .modal-header {
        display: none !important;
    }
    
    /* Modal-Content ohne Modal-Styles */
    .opc-sidebar .modal-inner-wrap {
        position: static !important;
        transform: none !important;
        height: auto !important;
    }
    
    /* Overlay verhindern */
    .modal-custom-overlay {
        display: none !important;
    }
    
    /* Sidebar vor dem Zahlungs-Formular positionieren */
    .checkout-container {
        display: flex;
        flex-direction: column;
    }
    
    .checkout-container .opc-sidebar {
        order: -1; /* Vor den anderen Elementen */
    }
}

/* Doppelpunkt nach Labels in Checkout und Mini Cart */
.block-minicart .subtotal .label:after,
.minicart-items .details-qty .label:after,
.minicart-items .price-minicart .label:after,
.order-details-items .order-gift-message .label:after,
.order-details-items .block-order-details-gift-message .label:after,
.block-wishlist-management .wishlist-select .wishlist-name-label:after {
    content: ":\00a0";
}

/* Checkout: Breitere Sidebar und schmalerer Inhalt ab Tablet */
@media screen and (min-width: 768px) {
    .checkout-container .opc-sidebar {
        width: 50%;
    }
    
    .checkout-container .opc-wrapper {
        width: 47%; /* 100% - 50% - etwas Abstand */
    }
}


/* Doppeltes Rechnungsadresse-Label im Dropdown ausblenden */
.checkout-billing-address .field-select-billing > .label {
    display: none;
}

/* Legend-Stil an step-title angleichen */
#co-payment-form > .fieldset > .legend {
    border-bottom: 1px solid #ccc;
    margin-bottom: 15px;
    padding-bottom: 10px;
    width: 100%;
    font-size: 18px;
    font-weight: 600;
}

/* Doppelte Zahlungsmethode-Überschrift aus payment-methods-list ausblenden */
.payment-group > .step-title {
    display: none;
}

.minicart-items .product-item-details {
    max-width: 100% !important;
    padding: 0 !important;
}

.opc-block-shipping-information {
    padding: 22px 1.5em;
}

.opc-wrapper .shipping-address-item {
    width: 100%;
    line-height: normal;
    margin: 0;
}

.opc-wrapper .shipping-address-item.not-selected-item {
    border-bottom: 1px solid #e7e7e7;
    border-top: 1px solid #e7e7e7;

}
.opc-wrapper .action-select-shipping-item {
    float: left;
}

.table-checkout-shipping-method .col-carrier {
    white-space: nowrap;
}

.opc-wrapper .action-show-popup {
    margin: 2em 1em 0em;
}

.opc-wrapper .step-content .actions-toolbar {
    padding: 0 0 1em;
}

.minicart-items .product-item-details .product-item-name {
    line-height: 1;
    font-size: 0.9em;
    font-weight: 400;
    overflow: visible;
}

.minicart-wrapper .block-minicart .subtotal {
    text-transform: none !important;
    line-height: 1.2 !important;
}

.checkout-payment-method ._active .payment-method-title {
    padding: 1em 0;
}

@media only screen and (max-width: 767px) {
    .checkout-payment-method .payment-method-title {
        padding: 1em 0 0 1em !important;
    }
}

#checkout-step-payment .step-title {
    margin: 30px 0 0;
}

.checkout-payment-method .billing-address-same-as-shipping-block {
    margin: 1em 0 0.5em;
}

.opc-wrapper .step-title {
    border-bottom: 2px solid #e7e7e7;
}

.payment-method-ppcp_card .fieldset .field .label > span {
    font-size: 1rem;
}

/* ==============================================
   Zahlungsarten-Logos im Checkout
   ============================================== */

/* Container für Radio-Button + Label vertikal zentrieren */
.payment-method-title.field.choice {
    display: flex;
    align-items: center;
}

/* Grundlegende Ausrichtung für alle Payment Labels */
.payment-method-title .label {
    display: inline-flex;
    align-items: center;
}

/* Rechnung (Check/Money Order) */
#checkmo + .label::before {
    content: '';
    display: inline-block;
    width: 60px;
    height: 40px;
    margin-right: 8px;
    background: url('../images/payment/invoice.svg') no-repeat center;
    background-size: contain;
    flex-shrink: 0;
}

/* Vorkasse (Bank Transfer) */
#banktransfer + .label::before {
    content: '';
    display: inline-block;
    width: 60px;
    height: 40px;
    margin-right: 8px;
    background: url('../images/payment/bank-transfer.svg') no-repeat center;
    background-size: contain;
    flex-shrink: 0;
}

/* Optional: Kreditkarte (ppcp_card) - falls gewünscht */
#ppcp_card + .label::before {
    content: '';
    display: inline-block;
    width: 60px;
    height: 40px;
    margin-right: 8px;
    background: url('../images/payment/credit-card.svg') no-repeat center;
    background-size: contain;
    flex-shrink: 0;
}

/* PayPal Logo Größe */
.payment-method-ppcp_paypal .payment-method-title .payment-icon {
    width: 60px !important;
    height: 40px !important;
    object-fit: contain;
}

.payment-methods .payment-group .payment-method-title label img {
    width: 60px;
    margin-right: 8px;
}

/* Kreditkarten Inline-Fehlermeldungen */
.payment-method-ppcp_card .fieldset .field .hosted-error {
    height: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 0.9rem;
    transition: height 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

.payment-method-ppcp_card .fieldset .field._error .hosted-error {
    height: auto;
    opacity: 1;
    font-size: 0.9rem;
}

.payment-method-ppcp_card .field._error label {
    color: #e02b27;
}

/* Hinweis für Pflichtfelder  */
.field-required-notice {
    margin-top: 15px;
    font-size: 0.9em;
    color: #666;
}

.field-required-notice .required-marker {
    color: #e02b27;
    font-weight: bold;
}