/* ========== CART PAGE STYLING ========== */
/* One-column layout with clean tile sections matching checkout design */

/* Cart container - centered, max-width */
.cart-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Tiles inherit from .tile1 - already styled in samstyle.css */
.cart-tile {
    margin-bottom: 20px;
}

/* Section headings */
.cart-container h1 {
    font-family: "Gazpacho", sans-serif;
    font-weight: 400;
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
}

/* Remove default WooCommerce cart headings (we use our own) */
.woocommerce-cart .woocommerce-cart-form h2 {
    display: none;
}

/* ========== TILE 1: CART ITEMS (Warenkorb) ========== */
/* Terracotta background with white text */
.cart-items-section.tile1 {
    background-color: var(--color-3) !important; /* Terracotta */
}

.cart-items-section h1 {
    color: #ffffff !important;
}

/* Cart table styling */
.cart-items-section .shop_table {
    width: 100%;
    border-collapse: collapse;
    border: none;
    margin: 0;
    padding: 0;
    background: transparent !important;
}

/* Table header styling */
.cart-items-section .shop_table thead {
    background: transparent !important;
}

.cart-items-section .shop_table thead th {
    padding: 12px 0 !important;
    font-family: "Poppins", sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    border: none !important;
    background: transparent !important;
    text-transform: none !important;
    text-align: left;
}

.cart-items-section .shop_table thead th.product-price,
.cart-items-section .shop_table thead th.product-subtotal {
    text-align: right;
}

/* Override Enfold's table row backgrounds */
.cart-items-section .shop_table tbody {
    background: transparent !important;
}

.cart-items-section .shop_table tr,
.cart-items-section .shop_table tr:nth-child(odd),
.cart-items-section .shop_table tr:nth-child(even),
.main_color .cart-items-section .shop_table tr:nth-child(odd),
.main_color .cart-items-section .shop_table tr:nth-child(even) {
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

.cart-items-section .shop_table td {
    padding: 12px 0 !important;
    font-family: "Poppins", sans-serif !important;
    font-size: 15px !important;
    color: #ffffff !important;
    border: none !important;
    background: transparent !important;
    text-transform: none !important;
    vertical-align: middle;
}

/* Remove button styling */
/* Remove button - consistent with checkout page */
.cart-items-section .product-remove a,
.product-remove a.remove {
color: #ffffff !important;
background-image: url('../img/remove.svg');
background-color: #CCC;
background-position: center;
background-repeat: no-repeat;
background-size: 18px 18px;
transition: opacity 0.2s ease;
margin-left: 8px;
vertical-align: middle;
display: inline-block;
height: 21px;
width: 21px;
text-indent: -9999px;
border-radius: 0;
border-style: none;
border-width: 0;
}

.cart-items-section .product-remove a:hover,
.product-remove a.remove:hover {
    opacity: 0.7;
}

/* Product name */
.cart-items-section .product-name {
    font-weight: 400;
}

.cart-items-section .product-name a {
    color: #ffffff !important;
    text-decoration: none;
}

.cart-items-section .product-name a:hover {
    text-decoration: underline;
}

/* Price and subtotal alignment */
.cart-items-section .product-price,
.cart-items-section .product-subtotal {
    text-align: right !important;
    font-weight: 400;
}

/* Quantity input */
.cart-items-section .product-quantity input.qty {
    width: 60px !important;
    padding: 8px !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid #ffffff !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-family: "Poppins", sans-serif !important;
    font-size: 15px !important;
    text-align: center;
}

.cart-items-section .product-quantity input.qty:focus {
    outline: none !important;
    background-color: rgba(255, 255, 255, 0.3) !important;
}

/* Override strong text color */
.main_color .cart-items-section strong,
.main_color .cart-items-section strong a,
.main_color .cart-items-section strong span,
.main_color .cart-items-section strong bdi {
    color: #ffffff !important;
}

/* ========== TILE 2: COUPON SECTION (Abo-Code) ========== */
/* White background */
.cart-coupon-section.tile1 {
    background-color: #ffffff !important;
}

.cart-coupon-section h1 {
    color: #333 !important;
}

/* Coupon input wrapper */
.cart-coupon-section .coupon-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.cart-coupon-section input#coupon_code {
    flex: 1;
    padding: 12px 16px;
    background-color: #faf2ee !important;
    border: 2px solid var(--color-3) !important;
    border-radius: 8px;
    font-family: "Poppins", sans-serif !important;
    font-size: 15px !important;
    color: #333 !important;
}

.cart-coupon-section input#coupon_code:focus {
    outline: none !important;
    border-color: var(--color-3) !important;
}

.cart-coupon-section button.button {
    background-color: var(--color-3);
    color: #fff;
    border: 2px solid var(--color-3);
    padding: 13px 24px;
    border-radius: 8px;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-coupon-section button.button:hover {
    background-color: var(--color-1);
    border-color: var(--color-1);
}

/* Update cart button */
.cart-coupon-section .update-cart-button {
    width: 100%;
    margin-top: 15px;
}

/* Available coupons wrapper */
.cart-coupon-section .available-coupons-wrapper {
    margin-bottom: 15px;
}

/* Smart Coupons styling - same as checkout */
#sc-cc {
    padding: 0 !important;
    margin-left: 0 !important;
}

#coupons_list {
    margin-bottom: 1.5em;
    border: none !important;
    border-radius: 0 !important;
}

.sc-accordion-content.open {
    max-height: none !important;
    overflow: hidden !important;
    background: transparent !important;
}

/* Hide Smart Coupons accordion header */
#coupons_list .sc-accordion-header {
    display: none !important;
}

/* Force accordion content to always show */
#coupons_list .sc-accordion-content {
    display: block !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Stack coupons vertically, left-aligned */
#sc-cc .sc-coupons-list,
#all_coupon_container.sc-coupons-list {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 10px !important;
}

/* ========== TILE 3: CART TOTALS (Warenkorb-Summe) ========== */
/* Lavender background with white text */
.cart-totals-section.tile1 {
    background-color: var(--color-1) !important; /* Lavender */
}

/* Override WooCommerce cart totals heading */
.cart-totals-section .cart_totals > h2 {
    font-family: "Gazpacho", sans-serif !important;
    font-weight: 400 !important;
    font-size: 24px !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    color: #ffffff !important;
}

/* Cart totals table */
.cart-totals-section .shop_table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px 0;
    padding: 0;
    background: transparent !important;
}

.cart-totals-section .shop_table tr,
.cart-totals-section .shop_table tr:nth-child(odd),
.cart-totals-section .shop_table tr:nth-child(even),
.main_color .cart-totals-section .shop_table tr:nth-child(odd),
.main_color .cart-totals-section .shop_table tr:nth-child(even) {
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

.cart-totals-section .shop_table th,
.cart-totals-section .shop_table td {
    padding: 12px 0 !important;
    font-family: "Poppins", sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    color: #ffffff !important;
    border: none !important;
    background: transparent !important;
    text-transform: none !important;
}

.cart-totals-section .shop_table td {
    text-align: right !important;
}

/* Hide cart-subtotal if needed (optional - show for now) */
/* .cart-totals-section .cart-subtotal {
    display: none;
} */

/* Order total row - bigger font */
.cart-totals-section .order-total th,
.cart-totals-section .order-total td {
    font-size: 20px !important;
    font-weight: 600 !important;
    padding-top: 15px !important;
}

/* Override strong text color */
.main_color .cart-totals-section strong,
.main_color .cart-totals-section strong a,
.main_color .cart-totals-section strong span,
.main_color .cart-totals-section strong bdi {
    color: #ffffff !important;
}

/* Applied coupons in totals */
.cart-totals-section .cart-discount {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.cart-totals-section .cart-discount th,
.cart-totals-section .cart-discount td {
    padding: 12px 10px !important;
}

/* Hide WooCommerce block elements */
.wp-block-woocommerce-cart-order-summary-block,
.wc-block-cart__payment-options,
.woocommerce-cart .wp-block-woocommerce-cart-order-summary-block,
.woocommerce-cart .wc-block-cart__payment-options {
    display: none !important;
}

/* Style WooCommerce block checkout button globally on cart page */
.woocommerce-cart .wc-block-components-button.wc-block-cart__submit-button,
.woocommerce-cart a.wc-block-components-button {
    width: 100% !important;
    background-color: #ffffff !important;
    color: var(--color-1) !important;
    border: none !important;
    padding: 16px !important;
    border-radius: 12px !important;
    font-family: "Poppins", sans-serif !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    display: block !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.woocommerce-cart .wc-block-components-button__text {
    color: var(--color-1) !important;
    font-family: "Poppins", sans-serif !important;
    font-size: 18px !important;
    font-weight: 500 !important;
}

.woocommerce-cart .wc-block-components-button.wc-block-cart__submit-button:hover,
.woocommerce-cart a.wc-block-components-button:hover {
    background-color: var(--color-4) !important;
    color: var(--color-2) !important;
}

.woocommerce-cart .wc-block-components-button:hover .wc-block-components-button__text {
    color: var(--color-2) !important;
}

/* Proceed to checkout button */
.cart-totals-section .wc-proceed-to-checkout {
    margin-top: 20px;
}

.cart-totals-section .checkout-button,
.cart-totals-section .wc-block-components-button,
.cart-totals-section .wc-block-cart__submit-button {
    width: 100% !important;
    background-color: var(--color-3)!important;
    color: #ffffff !important;
    border: none !important;
    padding: 16px !important;
    border-radius: 12px !important;
    font-family: "Poppins", sans-serif !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    display: block !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

/* Style the button text inside */
.cart-totals-section .wc-block-components-button__text {
    color: var(--color-1) !important;
    font-family: "Poppins", sans-serif !important;
    font-size: 18px !important;
    font-weight: 500 !important;
}

.cart-totals-section .checkout-button:hover,
.cart-totals-section .wc-block-components-button:hover,
.cart-totals-section .wc-block-cart__submit-button:hover {
    background-color: var(--color-1) !important;
    color: #ffffff !important;
}

/* Style the button text on hover */
.cart-totals-section .wc-block-components-button:hover .wc-block-components-button__text {
    color: var(--color-2) !important;
}

/* ========== LOADING OVERLAY ========== */
.woocommerce-cart .blockUI.blockOverlay {
    background-color: var(--color-4) !important; /* Pale Yellow */
    opacity: 0.8 !important;
}

.woocommerce-cart .blockUI.blockMsg {
    background-color: transparent !important;
    border: none !important;
    color: #ffffff !important;
}

/* ========== NOTICES STYLING ========== */
.woocommerce-notices-wrapper {
    max-width: 800px;
    margin: 0 auto 20px auto;
}

.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-error,
.woocommerce-cart .woocommerce-info {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 15px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.woocommerce-cart .woocommerce-info::before,
.woocommerce-cart .woocommerce-message::before,
.woocommerce-cart .woocommerce-error::before {
    display: none;
}

/* ========== MOBILE OPTIMIZATION ========== */
@media (max-width: 768px) {
    .cart-container {
        padding: 10px;
    }

    .cart-container h1 {
        font-size: 20px;
    }

    /* Stack coupon input vertically on mobile */
    .cart-coupon-section .coupon-input-wrapper {
        flex-direction: column;
    }

    .cart-coupon-section button.button {
        width: 100%;
    }

    /* Make cart table responsive */
    .cart-items-section .shop_table thead {
        display: none;
    }

    .cart-items-section .shop_table td {
        display: block;
        text-align: left !important;
        padding: 8px 0 !important;
    }

    .cart-items-section .shop_table td::before {
        content: attr(data-title) ": ";
        font-weight: 600;
        display: inline-block;
        margin-right: 8px;
    }

    .cart-items-section .product-remove {
        text-align: right !important;
    }

    .cart-items-section .product-price,
    .cart-items-section .product-subtotal {
        text-align: left !important;
    }

    .cart-items-section .shop_table tr {
        display: block;
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    }
}

/* ========== CROSS-SELLS (if displayed) ========== */
.cart-container .cross-sells {
    margin-top: 20px;
    background: #f7f7f7;
    padding: 30px;
    border-radius: 12px;
}

.cart-container .cross-sells h2 {
    font-family: "Gazpacho", sans-serif;
    font-weight: 400;
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

/* ========== HIDE GENERATED COUPON CONTAINER ========== */
#generated_coupon_data_container {
    display: none !important;
}
