/* ============================================================
   CHECKOUT + WARENKORB – BOXED LAYOUT (Blocks + Classic)
   T-026-B | 2026-06-30
   Ansatz: body-Hintergrund grau, .site-main zentriert mit
           min. 200px Seitenabstand auf Desktop.
   ============================================================ */

/* 1. Grauer Vollbild-Hintergrund (body, damit er bis zu den Rändern geht) */
body.woocommerce-checkout,
body.woocommerce-cart {
    background-color: #f5f5f5;
}

/* 2. Weißen Hintergrund der .site-main aufheben */
body.woocommerce-checkout .site-main,
body.woocommerce-cart .site-main {
    background: transparent;
    padding-top: 24px;
    padding-bottom: 48px;
}

/* 3. Seitentitel kompakt halten */
body.woocommerce-checkout .entry-header,
body.woocommerce-cart .entry-header {
    min-height: 0;
    max-height: 100px;
    padding: 16px 0 8px;
    margin: 0 auto;
    max-width: 1200px;
    overflow: hidden;
    box-sizing: border-box;
}

body.woocommerce-checkout .entry-title,
body.woocommerce-cart .entry-title {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.2;
}

/* 4. ── KERN-REGEL: mind. 200px Rand auf Desktop ──────────────
      calc((100% - 1000px) / 2) zentriert 1000px Inhalt.
      max(..., 200px) stellt sicher: nie weniger als 200px.
      Auf Screens < 1024px: normale mobile Abstände.           */
@media (min-width: 1024px) {
    body.woocommerce-checkout .site-main,
    body.woocommerce-cart .site-main {
        padding-left:  max(200px, calc((100% - 1200px) / 2));
        padding-right: max(200px, calc((100% - 1200px) / 2));
        box-sizing: border-box;
    }
}

/* Tablet: moderate Abstände */
@media (min-width: 600px) and (max-width: 1023px) {
    body.woocommerce-checkout .site-main,
    body.woocommerce-cart .site-main {
        padding-left:  40px;
        padding-right: 40px;
        box-sizing: border-box;
    }
}

/* Mobile */
@media (max-width: 599px) {
    body.woocommerce-checkout .site-main,
    body.woocommerce-cart .site-main {
        padding-left:  16px;
        padding-right: 16px;
        box-sizing: border-box;
    }
}

/* ============================================================
   WEISSE BOXEN FÜR DIE CHECKOUT-SEKTIONEN
   ============================================================ */

/* WooCommerce Block-Cart/Checkout */
body.woocommerce-cart .entry-content > .wp-block-woocommerce-cart,
body.woocommerce-checkout .entry-content > .wp-block-woocommerce-checkout,
body.woocommerce-cart .wp-block-woocommerce-cart.alignwide,
body.woocommerce-checkout .wp-block-woocommerce-checkout.alignwide {
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

body.woocommerce-cart .wc-block-cart__main,
body.woocommerce-cart .wc-block-cart__sidebar,
body.woocommerce-checkout .wc-block-checkout__main,
body.woocommerce-checkout .wc-block-checkout__sidebar {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 24px 28px;
    box-sizing: border-box;
}

body.woocommerce-cart .wc-block-cart__sidebar,
body.woocommerce-checkout .wc-block-checkout__sidebar {
    height: fit-content;
}

body.woocommerce-cart .wc-block-cart__submit-container {
    margin-top: 16px;
}

body.woocommerce-cart .wc-block-cart__totals-title {
    color: #1a3c5e;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

body.woocommerce-cart .wc-block-cart__sidebar.pn24-cart-summary-compact {
    background: #bfe8f7;
    border-radius: 0;
    box-shadow: none;
    color: #1f2a36;
    padding: 24px;
}

body.woocommerce-cart .wc-block-cart__sidebar.pn24-cart-summary-compact .wc-block-cart__totals-title {
    color: #1f2a36;
    margin-bottom: 18px;
}

body.woocommerce-cart .wc-block-cart__sidebar.pn24-cart-summary-compact .wc-block-components-totals-wrapper {
    border: 0;
    padding: 0 0 12px;
}

body.woocommerce-cart .wc-block-cart__sidebar.pn24-cart-summary-compact .wc-block-components-totals-item {
    align-items: baseline;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 0 0 10px;
}

body.woocommerce-cart .wc-block-cart__sidebar.pn24-cart-summary-compact .wc-block-components-totals-item__label,
body.woocommerce-cart .wc-block-cart__sidebar.pn24-cart-summary-compact .wc-block-components-totals-item__value {
    color: #1f2a36;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.25;
    text-transform: uppercase;
}

body.woocommerce-cart .wc-block-cart__sidebar.pn24-cart-summary-compact .wc-block-components-totals-item__value {
    text-align: right;
    white-space: nowrap;
}

body.woocommerce-cart .wc-block-cart__sidebar.pn24-cart-summary-compact .wc-block-components-totals-footer-item {
    border-top: 1px solid rgba(31, 42, 54, 0.24);
    margin-top: 18px;
    padding-top: 18px;
}

body.woocommerce-cart .wc-block-cart__sidebar.pn24-cart-summary-compact .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
    font-size: 1.05rem;
}

body.woocommerce-cart .wc-block-cart__sidebar.pn24-cart-summary-compact .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-size: 1.7rem;
    font-weight: 800;
}

body.woocommerce-cart .wc-block-cart__sidebar.pn24-cart-summary-compact .wc-block-components-totals-footer-item-tax {
    font-size: 0.75rem;
    text-align: right;
}

body.woocommerce-cart .wp-block-woocommerce-cart-order-summary-coupon-form-block {
    display: none !important;
}

body.woocommerce-cart .pn24-cart-original-subtotal-hidden {
    display: none !important;
}

body.woocommerce-cart .pn24-cart-summary-subtotal {
    border-top: 1px solid #e8e8e8;
    margin-top: 4px;
}

body.woocommerce-cart .pn24-cart-summary-subtotal .wc-block-components-totals-item {
    font-weight: 700;
}

body.woocommerce-cart .wp-block-woocommerce-cart-order-summary-shipping-block {
    border-top: 1px solid #eeeeee;
}

body.woocommerce-cart .wc-block-components-product-metadata__description,
body.woocommerce-checkout .wc-block-components-product-metadata__description,
body.woocommerce-cart .pn24-product-description-hidden,
body.woocommerce-checkout .pn24-product-description-hidden {
    display: none !important;
}

body.woocommerce-cart .pn24-product-metadata-empty,
body.woocommerce-checkout .pn24-product-metadata-empty {
    display: none !important;
}

body.woocommerce-cart .pn24-metadata-separator-hidden,
body.woocommerce-checkout .pn24-metadata-separator-hidden {
    display: none !important;
}

body.woocommerce-cart .wc-block-components-product-metadata,
body.woocommerce-checkout .wc-block-components-product-metadata {
    margin-top: 4px;
}

body.woocommerce-cart .wc-block-components-product-sku,
body.woocommerce-checkout .wc-block-components-product-sku,
body.woocommerce-cart .wc-block-cart-item__sku,
body.woocommerce-checkout .wc-block-components-order-summary-item__sku,
body.woocommerce-cart .pn24-cart-sku,
body.woocommerce-checkout .pn24-cart-sku {
    color: #555;
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 2px;
}

body.woocommerce-cart .pn24-hidden-cut-meta {
    display: none !important;
}

body.woocommerce-cart .pn24-meter-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

body.woocommerce-cart .pn24-meter-quantity-label {
    color: #555;
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
}

body.woocommerce-cart .pn24-meter-quantity .wc-block-components-quantity-selector {
    width: 86px;
    min-width: 86px;
}

body.woocommerce-cart .pn24-meter-quantity .wc-block-components-quantity-selector__input {
    max-width: 34px;
    padding-left: 2px;
    padding-right: 2px;
}

body.woocommerce-cart .pn24-meter-title-quantity {
    color: #343434;
    font-weight: 700;
    white-space: nowrap;
}

body.woocommerce-cart .pn24-cart-cut-fee-row td {
    background: #fafafa;
    border-top: 1px solid #e8e8e8;
}

body.woocommerce-cart .pn24-cart-cut-fee-row__icon-cell {
    text-align: center;
    vertical-align: top;
}

body.woocommerce-cart .pn24-cart-cut-fee-row__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1eeee;
    color: #343434;
    font-size: 18px;
    font-weight: 700;
}

body.woocommerce-cart .pn24-cart-cut-fee-row__scissors {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.woocommerce-cart .pn24-cart-cut-fee-row__title {
    font-weight: 700;
    color: #343434;
    margin-bottom: 4px;
}

body.woocommerce-cart .pn24-cart-cut-fee-row__description {
    color: #555;
    font-size: 0.92rem;
    line-height: 1.4;
}

body.woocommerce-cart .pn24-cart-cut-fee-row__note {
    color: #666;
    font-size: 0.8rem;
    margin-top: 3px;
}

body.woocommerce-cart .pn24-cart-cut-fee-row__total-cell {
    font-weight: 700;
    color: #343434;
    text-align: right;
    white-space: nowrap;
}

/* 5. Gutschein-Box */
body.woocommerce-checkout .woocommerce-form-coupon-toggle,
body.woocommerce-checkout .checkout_coupon {
    display: none !important;
}

/* 6. Rechnungsdaten-Box */
body.woocommerce-checkout #customer_details .col-1 {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 24px 28px;
    box-sizing: border-box;
    float: none;
    width: 100%;
    margin-bottom: 16px;
}

/* 7. Lieferdaten-Box (B2B meist ausgeblendet) */
body.woocommerce-checkout #customer_details .col-2 {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 24px 28px;
    box-sizing: border-box;
    float: none;
    width: 100%;
    margin-bottom: 16px;
}

/* 8. Bestellübersicht-Box */
body.woocommerce-checkout #order_review {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 24px 28px;
    box-sizing: border-box;
}

/* ============================================================
   TYPOGRAPHIE & FORMULAR
   ============================================================ */

/* 9. Abschnitts-Überschriften */
body.woocommerce-checkout h3,
body.woocommerce-checkout #order_review_heading {
    font-size: 1.05em;
    font-weight: 700;
    color: #1a3c5e;
    margin-top: 0;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8e8e8;
}

/* 10. Formularfelder */
body.woocommerce-checkout .input-text,
body.woocommerce-checkout input[type="text"],
body.woocommerce-checkout input[type="email"],
body.woocommerce-checkout input[type="tel"],
body.woocommerce-checkout select,
body.woocommerce-checkout textarea {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 9px 12px;
    font-size: 0.95em;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

body.woocommerce-checkout .input-text:focus,
body.woocommerce-checkout input[type="text"]:focus,
body.woocommerce-checkout input[type="email"]:focus,
body.woocommerce-checkout select:focus {
    border-color: #1a3c5e;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26,60,94,0.1);
}

/* 11. Pflichtfeld-Stern */
body.woocommerce-checkout abbr.required {
    color: #c0392b;
    border: none;
    text-decoration: none;
}

/* ============================================================
   BESTELLTABELLE
   ============================================================ */

/* 12. Tabelle */
body.woocommerce-checkout .woocommerce-checkout-review-order-table {
    width: 100%;
    font-size: 0.92em;
    border-collapse: collapse;
    margin-bottom: 0;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table td {
    padding: 8px 4px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table thead th {
    font-weight: 700;
    color: #1a3c5e;
    border-bottom: 2px solid #e8e8e8;
    font-size: 0.88em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* 13. Gesamtsumme */
body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot .order-total th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot .order-total td {
    font-weight: 700;
    font-size: 1.05em;
    color: #1a3c5e;
    border-top: 2px solid #e8e8e8;
    border-bottom: none;
    padding-top: 12px;
}

/* ============================================================
   ZAHLUNGSMETHODEN
   ============================================================ */

/* 14. Zahlungsbereich */
body.woocommerce-checkout #payment {
    background: #f8f9fb;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 16px 20px;
    margin-top: 20px;
}

/* 15. Zahlungsmethoden-Liste */
body.woocommerce-checkout .wc_payment_methods {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

body.woocommerce-checkout .wc_payment_method {
    border: 1px solid #e2e8ee !important;
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

body.woocommerce-checkout .wc_payment_method:has(input.input-radio:checked) {
    background: #f5fbff;
    border-color: #009ddf !important;
    box-shadow: 0 0 0 2px rgba(0, 157, 223, 0.12);
}

body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method:has(input.input-radio:checked) {
    background-color: #f5fbff !important;
}

body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method:not(:has(input.input-radio:checked)) {
    background-color: #fff !important;
}

body.woocommerce-checkout .wc_payment_method:last-child {
    margin-bottom: 0;
}

body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > label {
    align-items: center;
    font-weight: 600;
    cursor: pointer;
    color: #333;
    display: flex !important;
    gap: 10px;
    line-height: 1.35;
    min-height: 52px;
    padding: 12px 14px 12px 58px !important;
    position: relative !important;
    text-indent: 0 !important;
}

body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > input[type="radio"],
body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > input.input-radio {
    appearance: none !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    display: none !important;
    height: 1px !important;
    left: 20px;
    margin: 0 !important;
    opacity: 0 !important;
    outline: 0 !important;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 1px !important;
}

body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > label::before {
    background: #fff !important;
    background-image: none !important;
    border: 2px solid #66717c !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    box-sizing: border-box;
    content: "" !important;
    height: 22px;
    left: 20px;
    outline: 0 !important;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    z-index: 1;
}

body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > label::after {
    align-items: center;
    background: transparent !important;
    border-radius: 50%;
    color: #fff;
    content: "" !important;
    display: none !important;
    font-size: 13px;
    font-weight: 800;
    height: 16px;
    justify-content: center;
    left: 23px;
    line-height: 1;
    opacity: 0 !important;
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.75);
    transition: opacity 0.15s ease, transform 0.15s ease;
    width: 16px;
    z-index: 2;
}

body.woocommerce-checkout .wc_payment_method input.input-radio:checked + label::before,
body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method:has(input.input-radio:checked) > label::before {
    border-color: #009ddf !important;
}

body.woocommerce-checkout .wc_payment_method input.input-radio:checked + label::after,
body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method:has(input.input-radio:checked) > label::after {
    background: #009ddf !important;
    content: "✓" !important;
    display: flex !important;
    opacity: 1 !important;
    transform: translateY(-50%) scale(1);
}

body.woocommerce-checkout .wc_payment_method input.input-radio:focus-visible + label::before {
    box-shadow: 0 0 0 3px rgba(0, 157, 223, 0.2);
}

body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > label img {
    flex: 0 0 auto;
    max-height: 24px;
}

body.woocommerce-checkout .wc_payment_method .payment_box {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 10px 14px;
    margin-top: 8px;
    font-size: 0.88em;
    color: #555;
}

/* 16. Bestell-Button */
body.woocommerce-checkout #place_order {
    background: var(--color-button);
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-size: 1em;
    font-weight: 700;
    border-radius: 4px;
    width: 100%;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
    letter-spacing: 0.02em;
}

body.woocommerce-checkout #place_order:hover {
    background: var(--color-button-hover);
}

/* ============================================================
   WARENKORB-SEITE
   ============================================================ */

body.woocommerce-cart .cart-collaterals,
body.woocommerce-cart table.cart {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 24px 28px;
    box-sizing: border-box;
}

body.woocommerce-cart .cart-collaterals {
    margin-top: 16px;
}
