/* ==========================================================================
   Klemmshop – Warenkorbseite
   Nur die bestehende JTL-Warenkorbseite wird optisch angepasst.
   Keine Warenkorb-/Checkout-Logik wird verändert.
   ========================================================================== */

.basket {
    --ks-basket-green: #2f8d45;
    --ks-basket-green-dark: #246f38;
    --ks-basket-green-soft: #eef7f1;
    --ks-basket-ink: #203229;
    --ks-basket-muted: #6e7b72;
    --ks-basket-line: #e0e8e2;
    --ks-basket-bg: #f5f8f6;
    --ks-basket-danger: #a84242;
    padding-top: 18px;
    padding-bottom: 48px;
    color: var(--ks-basket-ink);
}

/* ---------- Überschrift ---------- */
.basket > .row > [class*="col"] > .basket-heading:first-of-type {
    position: relative;
    margin: 0 0 22px;
    padding-left: 50px;
    color: var(--ks-basket-ink);
    font-family: Montserrat, "Open Sans", Arial, sans-serif;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.025em;
}

.basket > .row > [class*="col"] > .basket-heading:first-of-type::before {
    content: "\f07a";
    position: absolute;
    top: 50%;
    left: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--ks-basket-green-dark);
    background: var(--ks-basket-green-soft);
    font-family: "Font Awesome 5 Free";
    font-size: .95rem;
    font-weight: 900;
    transform: translateY(-50%);
}

/* ---------- Artikelliste ---------- */
.basket .cart-items-header {
    display: none !important;
}

.basket .basket-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.basket .cart-items-body {
    position: relative;
    margin: 0 !important;
    padding: 18px 18px 15px;
    border: 1px solid var(--ks-basket-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 34, 26, .045);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.basket .cart-items-body:hover {
    border-color: rgba(47, 141, 69, .25);
    box-shadow: 0 12px 30px rgba(20, 34, 26, .075);
}

.basket .cart-items-body > [class*="col"] {
    padding-top: 0;
    padding-bottom: 0;
}

.basket .cart-items-body hr {
    display: none;
}

/* Produktbild */
.basket .cart-items-image {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-right: 14px;
}

.basket .cart-items-image > a {
    width: 100%;
    max-width: 132px;
    min-height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 1px solid #e6ece8;
    border-radius: 14px;
    background: #f8faf8;
    overflow: hidden;
}

.basket .cart-items-image img,
.basket .cart-items-image picture {
    max-width: 100%;
}

.basket .cart-items-image img {
    width: 100%;
    height: 116px;
    object-fit: contain;
}

/* Produktname und Details */
.basket .cart-items-name {
    display: inline-block;
    margin: 1px 0 7px;
    color: var(--ks-basket-ink);
    font-family: Montserrat, "Open Sans", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 750;
    text-decoration: none;
}

.basket .cart-items-name:hover,
.basket .cart-items-name:focus {
    color: var(--ks-basket-green-dark);
}

.basket .cart-items-body ul.list-unstyled {
    margin: 7px 0 0;
    color: var(--ks-basket-muted);
    font-size: .76rem;
    line-height: 1.5;
}

.basket .cart-items-body ul.list-unstyled li {
    margin: 2px 0;
}

.basket .cart-items-body ul.list-unstyled strong {
    color: #526058;
    font-weight: 700;
}

.basket .cart-items-body .shortdescription {
    margin-bottom: 7px !important;
    color: #5f6d64;
    font-size: .78rem;
    line-height: 1.5;
}

/* Einzel-/Gesamtpreise */
.basket .cart-items-single-price,
.basket .cart-items-price {
    color: var(--ks-basket-muted);
    font-size: .76rem;
}

.basket .cart-items-price-text {
    display: block;
    margin-bottom: 3px;
    color: #7c887f;
    font-size: .68rem;
    font-weight: 600;
}

.basket .cart-items-price .price_overall {
    color: var(--ks-basket-ink) !important;
    font-family: Montserrat, "Open Sans", Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
}

/* Mengensteuerung */
.basket .cart-items-quantity .qty-wrapper {
    max-width: 150px !important;
}

.basket .cart-items-quantity .input-group {
    overflow: hidden;
    border: 1px solid #d9e3dc;
    border-radius: 11px;
    background: #fff;
}

.basket .cart-items-quantity .quantity {
    min-height: 39px;
    border: 0 !important;
    border-left: 1px solid #e3e9e5 !important;
    border-right: 1px solid #e3e9e5 !important;
    text-align: center;
    box-shadow: none !important;
}

.basket .cart-items-quantity .btn-decrement,
.basket .cart-items-quantity .btn-increment {
    min-width: 38px;
    min-height: 39px;
    padding: 0 !important;
    border: 0 !important;
    color: var(--ks-basket-green-dark) !important;
    background: var(--ks-basket-green-soft) !important;
    box-shadow: none !important;
}

.basket .cart-items-quantity .btn-decrement:hover,
.basket .cart-items-quantity .btn-increment:hover,
.basket .cart-items-quantity .btn-decrement:focus,
.basket .cart-items-quantity .btn-increment:focus {
    color: #fff !important;
    background: var(--ks-basket-green) !important;
}

/* Löschen / Wunschliste */
.basket .cart-items-delete {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #eef2ef;
}

.basket .cart-items-delete .btn,
.basket .cart-items-delete-button {
    margin: 0 !important;
    padding: 5px 9px !important;
    border-radius: 8px !important;
    color: #647168 !important;
    font-size: .72rem !important;
    text-decoration: none !important;
}

.basket .cart-items-delete-button:hover,
.basket .cart-items-delete-button:focus {
    color: var(--ks-basket-danger) !important;
    background: #fbefef !important;
}

.basket .cart-items-delete .wishlist-button,
.basket .cart-items-delete [data-toggle="wishlist"] {
    color: var(--ks-basket-green-dark) !important;
}

/* ---------- Versandkostenrechner / Gratisgeschenke / Cross-Selling ---------- */
.basket .shipping-calculator-form,
.basket .basket-freegift,
.basket .product-slider-wrapper {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--ks-basket-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 34, 26, .035);
}

.basket .basket-freegift .basket-heading,
.basket .product-slider-wrapper .h2,
.basket .product-slider-wrapper .hr-sect {
    color: var(--ks-basket-ink);
    font-family: Montserrat, "Open Sans", Arial, sans-serif;
    font-weight: 750;
}

/* ---------- Rechte Bestellübersicht ---------- */
.basket .sticky-top.cart-summary {
    top: 18px;
}

.basket .sticky-top.cart-summary > .basket-heading {
    margin: 0 0 12px;
    color: var(--ks-basket-ink);
    font-family: Montserrat, "Open Sans", Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
}

.basket .sticky-top.cart-summary > .card {
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--ks-basket-line) !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 12px 32px rgba(20, 34, 26, .06);
}

.basket .sticky-top.cart-summary > .card .card-header {
    padding: 13px 16px;
    border-bottom: 1px solid #e8eee9;
    background: #f7faf8;
}

.basket .sticky-top.cart-summary > .card .card-header .btn-link {
    color: var(--ks-basket-green-dark);
    font-weight: 700;
    text-decoration: none;
}

.basket .sticky-top.cart-summary > .card .card-body {
    padding: 16px;
}

/* Kupon */
.basket #basket-coupon-form .form-group {
    margin-bottom: 10px;
}

.basket #basket-coupon-form .form-control {
    min-height: 42px;
    border: 1px solid #d9e3dc;
    border-radius: 10px;
    box-shadow: none;
}

.basket #basket-coupon-form .form-control:focus {
    border-color: var(--ks-basket-green);
    box-shadow: 0 0 0 3px rgba(47, 141, 69, .10);
}

.basket #basket-coupon-form .btn-outline-primary {
    min-height: 42px;
    border-color: var(--ks-basket-green) !important;
    border-radius: 10px;
    color: var(--ks-basket-green-dark) !important;
    background: #fff !important;
    font-weight: 700;
}

.basket #basket-coupon-form .btn-outline-primary:hover,
.basket #basket-coupon-form .btn-outline-primary:focus {
    color: #fff !important;
    background: var(--ks-basket-green) !important;
}

/* Summenkarte */
.basket .sticky-top.cart-summary > .basket-summary.card {
    padding: 18px !important;
    border: 1px solid rgba(47, 141, 69, .16) !important;
    background:
        linear-gradient(180deg, #f8fbf9 0%, #ffffff 38%) !important;
}

.basket .sticky-top.cart-summary > .basket-summary.card .row {
    margin-bottom: 8px;
}

.basket .sticky-top.cart-summary .price_label,
.basket .sticky-top.cart-summary .tax_label {
    color: var(--ks-basket-muted);
    font-size: .78rem;
}

.basket .sticky-top.cart-summary .basket-summary-total {
    align-items: center;
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid #dfe8e2;
}

.basket .sticky-top.cart-summary .basket-summary-total .price_label {
    color: var(--ks-basket-ink);
    font-size: .9rem;
    font-weight: 800;
}

.basket .sticky-top.cart-summary .basket-summary-total .total-sum {
    color: var(--ks-basket-green-dark);
    font-family: Montserrat, "Open Sans", Arial, sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
}

/* Checkout-Button */
.basket #cart-checkout-btn {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    border: 1px solid var(--ks-basket-green) !important;
    border-radius: 12px;
    color: #fff !important;
    background: var(--ks-basket-green) !important;
    font-size: .95rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(47, 141, 69, .18);
}

.basket #cart-checkout-btn::after {
    content: "\f061";
    margin-left: 9px;
    font-family: "Font Awesome 5 Free";
    font-size: .8rem;
    font-weight: 900;
}

.basket #cart-checkout-btn:hover,
.basket #cart-checkout-btn:focus {
    border-color: var(--ks-basket-green-dark) !important;
    background: var(--ks-basket-green-dark) !important;
}

/* Versandhinweis */
.basket .sticky-top.cart-summary > .font-weight-bold.mt-3 {
    margin-top: 14px !important;
    padding: 12px 14px;
    border: 1px solid #dfe9e2;
    border-radius: 12px;
    color: #536158;
    background: var(--ks-basket-green-soft);
    font-size: .78rem;
}

.basket .sticky-top.cart-summary > .font-weight-bold.mt-3 .fa-truck {
    color: var(--ks-basket-green-dark) !important;
}

/* ---------- Leerer Warenkorb ---------- */
.basket .basket-empty {
    margin: 0;
    padding: 34px 18px 40px;
    border: 1px solid var(--ks-basket-line);
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 0%, rgba(47,141,69,.08), transparent 42%),
        #fff;
    text-align: center;
    box-shadow: 0 12px 34px rgba(20, 34, 26, .05);
}

.basket .basket-empty .alert-info {
    margin: 0 0 18px;
    padding: 0;
    border: 0;
    color: var(--ks-basket-muted);
    background: transparent;
}

.basket .basket-empty .bubble {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 13px;
    border-radius: 18px;
    color: var(--ks-basket-green-dark);
    background: var(--ks-basket-green-soft);
    font-size: 1.25rem;
}

.basket .basket-empty .btn-primary {
    min-height: 44px;
    padding: 10px 22px;
    border-color: var(--ks-basket-green) !important;
    border-radius: 11px;
    color: #fff !important;
    background: var(--ks-basket-green) !important;
    font-weight: 750;
}

/* ---------- Mobile ---------- */
@media (max-width: 1199.98px) {
    .basket .cart-items-body {
        padding: 16px;
    }

    .basket .cart-items-image > a {
        max-width: 118px;
        min-height: 116px;
    }

    .basket .cart-items-image img {
        height: 104px;
    }
}

@media (max-width: 991.98px) {
    .basket {
        padding-top: 12px;
    }

    .basket .sticky-top.cart-summary {
        position: static !important;
        margin-top: 25px;
    }

    .basket .sticky-top.cart-summary > .basket-heading {
        margin-top: 0;
    }
}

@media (max-width: 767.98px) {
    .basket > .row > [class*="col"] > .basket-heading:first-of-type {
        padding-left: 43px;
        font-size: 1.55rem;
    }

    .basket > .row > [class*="col"] > .basket-heading:first-of-type::before {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .basket .cart-items-body {
        padding: 14px 12px;
        border-radius: 15px;
    }

    .basket .cart-items-image {
        padding-right: 8px;
    }

    .basket .cart-items-image > a {
        max-width: 98px;
        min-height: 98px;
        padding: 6px;
        border-radius: 12px;
    }

    .basket .cart-items-image img {
        height: 86px;
    }

    .basket .cart-items-name {
        font-size: .92rem;
    }

    .basket .cart-items-single-price,
    .basket .cart-items-price,
    .basket .cart-items-quantity {
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #eef2ef;
    }

    .basket .cart-items-price-text {
        display: inline;
        margin-right: 5px;
    }

    .basket .cart-items-quantity .qty-wrapper {
        max-width: 145px !important;
    }

    .basket .sticky-top.cart-summary > .card {
        border-radius: 15px !important;
    }
}

@media (max-width: 479.98px) {
    .basket .cart-items-image {
        max-width: 100%;
        flex: 0 0 100%;
        margin-bottom: 12px;
    }

    .basket .cart-items-image > a {
        max-width: 145px;
        min-height: 132px;
        margin: 0 auto;
    }

    .basket .cart-items-image img {
        height: 120px;
    }

    .basket .basket-empty {
        padding: 28px 14px 32px;
        border-radius: 18px;
    }
}
