/* ===========================
   WPSL – CLEAN CHECKOUT UI
=========================== */

/* Cart Icon */
#wpsl-cart-icon {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #111;
    color: #fff;
    padding: 12px 16px;
    border-radius: 999px;
    cursor: pointer;
    z-index: 9999;
    font-size: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    transition: transform .15s ease, box-shadow .15s ease;
}

#wpsl-cart-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

#wpsl-cart-count {
    background: #e11d48;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 18px;
    font-weight: 800;
}

/* Overlay */
#wpsl-cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 24px;
}

/* Popup */
#wpsl-cart-popup {
    width: min(1100px, 96vw);
    max-height: 90vh;
    overflow: auto;
    /* falls wirklich nötig, sonst bleibt's ruhig */
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
    position: relative;
    padding: 20px;
}

/* Close button */
#wpsl-close-cart {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: #f3f4f6;
    color: #111;
    font-size: 18px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform .12s ease, background .12s ease;
}

#wpsl-close-cart:hover {
    background: #e5e7eb;
    transform: scale(1.03);
}

/* Header */
.wpsl-popup-head {
    display: flex;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
    margin-bottom: 18px;
}

.wpsl-popup-title {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -.02em;
    color: #111;
}

.wpsl-popup-subtitle {
    margin-top: 6px;
    font-size: 13px;
    color: #6b7280;
}

/* 2-column checkout */
.wpsl-checkout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
    align-items: start;
}

/* Panels */
.wpsl-panel {
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 16px;
    background: #fff;
}

.wpsl-panel-title {
    font-size: 13px;
    font-weight: 900;
    color: #111;
    margin-bottom: 12px;
}

/* Cart items */
#wpsl-cart-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 14px;
    background: #fafafa;
}

.cart-item strong {
    display: block;
    font-size: 14px;
    margin: 0 0 8px 0;
    color: #111;
}

.wpsl-cart-qty {
    width: 76px;
    padding: 10px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    background: #fff;
}

.wpsl-cart-qty:focus {
    outline: none;
    border-color: #111;
}

/* Remove */
.wpsl-remove {
    width: auto !important;
    margin: 0 !important;
    border: none;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fee2e2;
    color: #991b1b;
    cursor: pointer;
    transition: transform .12s ease, background .12s ease;
}

.wpsl-remove:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

/* Total */
#wpsl-total {
    margin-top: 12px;
    padding: 14px;
    border-radius: 14px;
    background: #9c1e1ed9;
    color: #fff;
    font-weight: 900;
    font-size: 16px;
}

/* Empty */
.wpsl-empty {
    padding: 16px;
    border: 1px dashed #e5e7eb;
    border-radius: 14px;
    background: #fff;
    color: #6b7280;
    font-size: 14px;
    text-align: center;
}

/* CF7 clean form */
#wpsl-cart-popup .wpcf7 {
    margin: 0;
}

#wpsl-cart-popup .wpcf7 form {
    margin: 0;
}

.wpsl-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wpsl-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

#wpsl-cart-popup input[type="text"],
#wpsl-cart-popup input[type="email"],
#wpsl-cart-popup input[type="tel"] {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}

#wpsl-cart-popup input:focus {
    outline: none;
    border-color: #111;
}

/* Submit only */
#wpsl-cart-popup .wpcf7-submit,
#wpsl-cart-popup input[type="submit"] {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 13px 14px;
    background: #111;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
    margin-top: 6px;
}

#wpsl-cart-popup .wpcf7-submit:hover,
#wpsl-cart-popup input[type="submit"]:hover {
    background: #9c1e1ed9;
    transform: translateY(-1px);
}

.wpsl-form-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

/* Mobile stacking */
@media (max-width: 900px) {
    #wpsl-cart-popup {
        padding: 16px;
    }

    .wpsl-checkout {
        grid-template-columns: 1fr;
    }

    .wpsl-2col {
        grid-template-columns: 1fr;
    }
}

#wpsl-cart-popup .wpcf7 form p {
    margin: 0;
}

/* =========================
   CF7 – 1 Column Compact Checkout
========================= */

#wpsl-cart-popup .wpsl-checkout-form-1col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* nah beieinander */
}

/* Inputs kompakter */
#wpsl-cart-popup input[type="text"],
#wpsl-cart-popup input[type="email"],
#wpsl-cart-popup input[type="tel"] {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
    /* weniger Höhe */
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}

#wpsl-cart-popup input:focus {
    outline: none;
    border-color: #9c1e1ed9;
}

/* Submit Button */
#wpsl-cart-popup .wpcf7-submit,
#wpsl-cart-popup input[type="submit"] {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    background: #9c1e1ed9;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    margin-top: 6px;
}

#wpsl-cart-popup .wpcf7-submit:hover,
#wpsl-cart-popup input[type="submit"]:hover {
    background: #9c1e1ed9;
}

/* kleine Notiz */
#wpsl-cart-popup .wpsl-form-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}


#wpsl-floating-cart {
    position: fixed;
    left: 20px;
    bottom: 20px;
    background: #111;
    color: #fff;
    padding: 12px 16px;
    border-radius: 50px;
    font-size: 16px;
    text-decoration: none;
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 9999;
}

#wpsl-floating-count {
    background: #22c55e;
    padding: 2px 6px;
    border-radius: 20px;
    font-size: 12px;
}

.wpsl-empty {
    padding: 20px;
    background: #f3f4f6;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.wpsl-success {
    padding: 20px;
    background: #dcfce7;
    color: #166534;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.wpsl-product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin: 40px 0;
}

.wpsl-gallery {
    display: flex;
    flex-direction: column;
}

.wpsl-main-image img {
    width: 100%;
    border-radius: 14px;
}

.wpsl-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.wpsl-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.wpsl-product-info h1 {
    font-size: 32px;
}

.wpsl-price {
    font-size: 26px;
    font-weight: bold;
    margin: 20px 0;
}

.wpsl-add.big {
    width: 100%;
    padding: 16px;
    background: #9c1e1ed9;
    color: white;
    border-radius: 12px;
}

/* MOBILE */
@media (max-width: 900px) {
    .wpsl-product-detail {
        grid-template-columns: 1fr;
    }
}

/* =========================
   FINAL SHOP LAYOUT
========================= */

/* Layout */
.whi-product-single-layout {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    /* 🔥 mehr Platz für Bilder */
    gap: 60px;
    align-items: start;
}

/* LEFT FULL WIDTH */
.whi-product-single-image {
    width: 100%;
}

/* GRID GALLERY */
.wpsl-grid-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* BIG IMAGES */
.wpsl-grid-gallery img {
    width: 100%;
    height: 420px;
    /* 🔥 jetzt wirklich groß */
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover */
.wpsl-grid-gallery img:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* RIGHT */
.whi-product-single-info {
    max-width: 500px;
}

/* MOBILE */
@media (max-width: 900px) {

    .whi-product-single-layout {
        grid-template-columns: 1fr;
    }

    .wpsl-grid-gallery {
        grid-template-columns: 1fr;
    }

    .wpsl-grid-gallery img {
        height: auto;
    }
}

/* MAIN IMAGE */
.wpsl-main-image {
    width: 100%;
    margin-bottom: 15px;
}

.wpsl-main-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* THUMBNAILS */
.wpsl-thumbnails {
    display: flex;
    gap: 10px;
}

.wpsl-thumb {
    width: 90px !important;
    height: 90px !important;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid #eee;
}

.wpsl-thumb.active {
    border-color: #9c1e1ed9;
}

/* HOVER */
.wpsl-thumb:hover {
    border-color: #9c1e1ed9;
}

/* RIGHT TEXT */
.whi-product-single-info {
    max-width: 520px;
}

.whi-product-single-info h1 {
    font-size: 34px;
    line-height: 1.2;
}

.whi-shop-price {
    font-size: 28px;
    font-weight: bold;
    margin: 20px 0;
}

/* MOBILE */
@media (max-width: 900px) {

    .whi-product-single-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .wpsl-thumb {
        width: 70px !important;
        height: 70px !important;
    }

    .whi-product-single-info {
        max-width: 100%;
    }
}


/* =========================
   GALERIE – OPTISCH NICE
========================= */
/* =========================
   CLEAN PRODUCT GALLERY (SHOP STYLE)
========================= */

.wpsl-grid-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* KEIN grauer Rahmen mehr */
.wpsl-grid-gallery img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

/* Hover wie echter Shop */
.wpsl-grid-gallery img:hover {
    transform: scale(1.03);
}

/* MOBILE */
@media (max-width: 900px) {
    .wpsl-grid-gallery {
        grid-template-columns: 1fr;
    }

    .wpsl-grid-gallery img {
        height: auto;
    }
}

/* =========================
   LIGHTBOX
========================= */

#wpsl-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    z-index: 999999;
    padding: 40px;
}

/* DAS IST DER WICHTIGE FIX */
#wpsl-lightbox img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    /* 🔥 verhindert Abschneiden */
    border-radius: 12px;
}

#wpsl-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
}

.wpsl-grid-gallery img {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* =========================
   BUY BOX (AMAZON STYLE)
========================= */

/* Preis + Cart nebeneinander */
.wpsl-buy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Preis groß */
.whi-shop-price {
    font-size: 28px;
    font-weight: 900;
    color: #111;
}

/* Cart Bereich */
.wpsl-product-cart-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Menge */
.wpsl-qty-row {
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.wpsl-qty-row button {
    background: #f3f4f6;
    border: none;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 16px;
}

.wpsl-qty-row input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 14px;
}

/* BUTTON */
.wpsl-add.big {
    padding: 12px 18px;
    background: #9c1e1ed9;
    color: white;
    border-radius: 10px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.wpsl-add.big:hover {
    background: #7f1d1d;
}

/* MOBILE */
@media (max-width: 900px) {

    .wpsl-buy-row {
        flex-direction: column;
        align-items: stretch;
    }

    .wpsl-product-cart-control {
        justify-content: space-between;
    }

    .wpsl-add.big {
        width: 100%;
    }
}

/* =========================
   BUY UX CLEAN (FINAL)
========================= */

/* Menge + Button */
.wpsl-product-cart-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Input cleaner */
.wpsl-qty {
    width: 60px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    text-align: center;
    font-weight: 600;
}

/* Plus Button */
.wpsl-minus,
.wpsl-plus {
    background: #f3f4f6;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpsl-minus:hover,
.wpsl-plus:hover {
    background: #e5e7eb;
}

.wpsl-cart-combined .wpsl-minus,
.wpsl-cart-combined .wpsl-plus {
    border: none;
    background: #f3f4f6;
    color: #111;
    padding: 0 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.wpsl-cart-combined .wpsl-minus:hover,
.wpsl-cart-combined .wpsl-plus:hover {
    background: #e5e7eb;
}

/* CTA */
.wpsl-add.big {
    padding: 12px 18px;
    background: #9c1e1ed9;
    color: white;
    border-radius: 10px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

/* CART INFO */
.wpsl-in-cart {
    margin-top: 8px;
    font-size: 13px;
    color: #16a34a;
    font-weight: 600;
}

/* MOBILE */
@media (max-width: 900px) {
    .wpsl-product-cart-control {
        flex-wrap: wrap;
    }

    .wpsl-add.big {
        width: 100%;
    }
}

/* ROW */
.wpsl-product-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* PREIS */
.wpsl-product-price {
    font-size: 28px;
    font-weight: 800;
    color: #9c1e1ed9 !important;
}

/* CART BLOCK */
.wpsl-product-cart-control {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* =========================
   COMBINED BUY BUTTON (SHOP STYLE)
========================= */

.wpsl-cart-combined {
    display: flex;
    align-items: stretch;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

/* INPUT (links im Button) */
.wpsl-cart-combined .wpsl-qty {
    width: 70px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    background: #f9fafb;
}

/* BUTTON (rechts) */
.wpsl-cart-combined .wpsl-add {
    border: none;
    background: #9c1e1ed9;
    color: #fff;
    padding: 0 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
}

/* Hover */
.wpsl-cart-combined .wpsl-add:hover {
    background: #7f1d1d;
}

/* FOCUS STYLE */
.wpsl-cart-combined:focus-within {
    border-color: #9c1e1ed9;
}


/* INPUT */
.wpsl-qty {
    width: 60px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

/* BUTTON */
.wpsl-add {
    height: 44px;
    padding: 0 16px;
    background: #9c1e1ed9;
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
}

/* STATUS */
.wpsl-in-cart {
    margin-top: 6px;
    font-size: 14px;
    color: #16a34a;
}


/* =========================
   SHOP KEIN PADDING
========================= */

/* Single Produkt */
.single-wpsl_product main,
.single-wpsl_product .wp-block-post-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Shop Übersicht */
.post-type-archive-wpsl_product main,
.post-type-archive-wpsl_product .wp-block-post-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.whi-product-card .wp-block-post-featured-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 12px;
}

/* =========================
   PRODUCT GRID FIX (WICHTIG)
========================= */

.wpsl-products,
.wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* CARD */
.whi-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
}

/* IMAGE WRAPPER */
.whi-product-card .wp-block-post-featured-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
    border-radius: 12px;
}

/* IMAGE */
.whi-product-card .wp-block-post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* BODY */
.whi-product-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-top: 10px;
}

/* TITLE */
.whi-product-body h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

/* PREIS */
.whi-shop-price {
    margin-top: auto;
    color: #9c1e1ed9 !important;
    /* 🔥 sorgt dafür dass alles nach unten gedrückt wird */
    font-size: 20px;
    font-weight: 800;
}

/* OPTIONAL: Button immer unten */
.wpsl-product-cart-control {
    margin-top: 10px;
}

.wpsl-grid-gallery.single {
    grid-template-columns: 1fr !important;
}

.wpsl-grid-gallery.single .wpsl-gallery-img {
    width: 100%;
    height: auto !important;
    max-height: 720px;
    object-fit: contain;
}