/* =========================================
   SHOWROOM ULTIMATE CART - STYLES
   ========================================= */

/* --- TRIGGER BUTTON --- */
.suc-trigger {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 60px;
    height: 60px;
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 999990;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.suc-trigger:hover {
    transform: scale(1.1);
}

/* Pulse Animation for Cart Trigger */
@keyframes cartPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(26, 26, 26, 0.7); }
    70% { transform: scale(1.2); box-shadow: 0 0 0 15px rgba(26, 26, 26, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(26, 26, 26, 0); }
}

.suc-trigger.cart-pulse,
.sum-trigger.cart-pulse {
    animation: cartPulse 1s ease-out;
}

/* --- TOAST MESSAGE --- */
.suc-toast {
    position: fixed;
    bottom: 30px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: max-content;
    max-width: 80%;
    transform: translateY(20px);
    background: #1a1a1a;
    color: #fff;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 999999;
    opacity: 0;
    visibility: hidden; /* Ensure it's not clickable or visible */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    text-align: center;
}

.suc-toast a {
    color: #fff;
    text-decoration: underline;
    margin-left: 10px;
}

.suc-toast.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Weisser Kreis mit Anzahl Badge */
.suc-trigger.has-items::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    background: #ffffff;
    border: 2.5px solid #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.suc-count {
    display: none;
}

/* --- OVERLAY & PANEL --- */
.suc-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    visibility: hidden;
    pointer-events: none; /* Ensure clicks pass through when hidden */
}

.suc-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none; /* Ensure clicks pass through when hidden */
}

.suc-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 450px;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,0.05);
    pointer-events: auto; /* Panel should be clickable */
}

/* OPEN STATE */
body.suc-open { overflow: hidden; }
body.suc-open .suc-overlay { visibility: visible; pointer-events: all; }
body.suc-open .suc-backdrop { opacity: 1; pointer-events: all; }
body.suc-open .suc-panel { transform: translateX(0); }


/* --- HEADER --- */
.suc-header {
    padding: 25px 30px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.suc-title {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.suc-close-btn {
    background: none;
    border: 2px solid #000;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 300;
    cursor: pointer;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
}
.suc-close-btn:hover {
    transform: rotate(90deg);
    background: #f5f5f5;
}

/* --- BODY / ITEMS --- */
.suc-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.suc-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suc-item {
    display: flex;
    padding: 20px 30px;
    border-bottom: 1px solid #f9f9f9;
    transition: background 0.2s;
}

.suc-item-thumb {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
}
.suc-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crop to fill square */
    padding: 0;
}

.suc-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.suc-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.suc-item-name {
    font-weight: 600;
    font-size: 14px;
    padding-right: 10px;
    line-height: 1.4;
    flex: 1; /* Take available space */
    min-width: 0; /* Allow wrapping */
    word-wrap: break-word;
}

.suc-remove {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px !important; /* Fixed flex size */
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    border-radius: 50% !important;
    border: 1px solid #1a1a1a !important;
    color: #1a1a1a !important;
    background: transparent !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transition: all 0.2s;
    margin-left: 10px;
}
.suc-remove:hover {
    background: #1a1a1a !important;
    color: #fff !important;
    border-color: #1a1a1a !important;
}

.suc-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}

.suc-qty-control {
    display: flex;
    align-items: center;
    border: none; /* Kein Rahmen um Container */
    border-radius: 0;
    overflow: visible;
    gap: 5px;
}

.suc-qty-btn {
    background: transparent !important;
    border: 1px solid #1a1a1a !important;
    border-radius: 50% !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important; /* Prevent oval shape */
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #1a1a1a !important;
    transition: all 0.2s;
    padding: 0 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}
.suc-qty-btn:hover { 
    background: #1a1a1a !important; 
    color: #fff !important;
}

.suc-item-qty {
    padding: 0 8px;
    font-weight: 600;
    font-size: 14px;
    min-width: 20px;
    text-align: center;
}

.suc-item-price {
    font-weight: 700;
    color: #1a1a1a;
}

/* GLOBAL QTY BUTTONS (Cart Page) */
.woocommerce .quantity .suc-qty-btn-global {
    background: transparent;
    border: 1px solid #1a1a1a;
    width: 30px;
    height: 30px;
    min-width: 30px; /* Prevent oval shape */
    flex-shrink: 0;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 8px;
    transition: all 0.2s;
    color: #1a1a1a;
    font-size: 16px;
    line-height: 1;
    padding: 0; /* Ensure no padding distorts shape */
    box-sizing: border-box;
}
.woocommerce .quantity .suc-qty-btn-global:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}
/* Hide default spinners */
.woocommerce .quantity input.qty::-webkit-outer-spin-button,
.woocommerce .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.woocommerce .quantity input.qty {
    -moz-appearance: textfield;
    appearance: textfield;
    text-align: center;
    width: 40px !important;
    max-width: 40px !important;
    min-width: 0 !important;
    display: inline-block;
    border: none;
    padding: 0 !important;
    background: transparent !important;
    font-weight: 700;
}

/* --- WOOCOMMERCE CART PAGE STYLING --- */
.woocommerce-cart .woocommerce {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Tabelle aufräumen */
.woocommerce-cart table.shop_table {
    border: none !important;
    border-collapse: collapse !important;
    width: 100%;
    margin-bottom: 40px;
}

.woocommerce-cart table.shop_table th {
    border: none !important;
    border-bottom: 1px solid #1a1a1a !important;
    padding: 15px 0;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    font-weight: 700;
}

.woocommerce-cart table.shop_table td {
    border: none !important;
    border-bottom: none !important;
    padding: 10px 15px 5px !important;
    vertical-align: middle;
}

/* Produktbild */
.woocommerce-cart table.shop_table td.product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background: #f5f5f5;
    padding: 5px;
}

/* Produktname */
.woocommerce-cart table.shop_table td.product-name a {
    color: #1a1a1a;
    font-weight: 700;
    text-decoration: none;
    font-size: 16px;
}

/* Entfernen X */
.woocommerce-cart table.shop_table td.product-remove a.remove {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    border: 1px solid #1a1a1a !important;
    color: #1a1a1a !important;
    background: transparent !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transition: all 0.2s;
}
.woocommerce-cart table.shop_table td.product-remove a.remove:hover {
    background: #1a1a1a !important;
    color: #fff !important;
    border-color: #1a1a1a !important;
}

/* Coupon & Update Cart */
.woocommerce-cart .actions {
    padding-top: 20px;
}
.woocommerce-cart .coupon {
    display: flex;
    align-items: center;
}
.woocommerce-cart .coupon input.input-text {
    border: 1px solid #ddd !important;
    padding: 10px 15px !important;
    border-radius: 50px !important;
    margin-right: 10px !important;
    width: 200px !important;
}

/* Buttons allgemein */
.woocommerce-cart .button {
    background: #1a1a1a !important;
    color: #fff !important;
    border-radius: 50px !important;
    padding: 12px 30px !important;
    text-transform: uppercase;
    font-size: 13px !important;
    letter-spacing: 1px;
    font-weight: 600 !important;
    border: 1px solid #1a1a1a !important;
    transition: all 0.2s !important;
}
.woocommerce-cart .button:hover {
    background: transparent !important;
    color: #1a1a1a !important;
}

/* Cart Totals */
.cart-collaterals .cart_totals {
    width: 100% !important;
    float: none !important;
    margin-top: 40px;
    background: #f9f9f9;
    padding: 40px;
    border-radius: 12px;
}

.cart-collaterals .cart_totals h2 {
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.cart-collaterals .cart_totals table.shop_table {
    border: none !important;
    margin: 0 !important;
}
.cart-collaterals .cart_totals table.shop_table th,
.cart-collaterals .cart_totals table.shop_table td {
    border-bottom: 1px solid #eee !important;
    padding: 15px 0 !important;
}

.wc-proceed-to-checkout {
    margin-top: 20px;
}
.wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 18px !important;
    font-size: 16px !important;
}

/* --- FOOTER / TOTALS --- */
.suc-footer {
    padding: 30px;
    background: #fff;
    border-top: 1px solid #f5f5f5;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.02);
}

.suc-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.suc-subtotal {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.suc-tax {
    font-size: 13px;
    color: #888;
}

.suc-legal-note {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 20px;
    text-align: right;
}
.suc-legal-note a { color: #aaa; text-decoration: underline; }

/* BUTTONS */
.suc-btn-primary, .suc-btn-secondary {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.suc-btn-primary {
    background: #1a1a1a;
    color: #fff;
    margin-bottom: 10px;
}
.suc-btn-primary:hover {
    background: #333;
    transform: translateY(-2px);
}

.suc-btn-secondary {
    background: #f5f5f5;
    color: #1a1a1a;
}
.suc-btn-secondary:hover {
    background: #e5e5e5;
}

.suc-empty-state {
    padding: 50px 30px;
    text-align: center;
    color: #888;
}
