/* ==========================================================================
   CART AND CHECKOUT STYLES (v4 - Confirmed Flatsome Overrides)
   ========================================================================== */

/* 1. Checkout Summary Box & Cart Totals (Modern Card) */

/* The working CSS from the subagent browser prototype */
.checkout-sidebar .col-inner.has-border,
.cart-sidebar .col-inner.has-border {
    border: none !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06) !important;
    background: #fff !important;
    padding: 30px !important;
    border-radius: 12px !important;
}

/* Clean up checkout sidebar extra borders or padding if any */
.checkout-sidebar .inner {
    border: none !important;
    padding: 0 !important;
}

.checkout-sidebar .cart_totals {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Payment methods line separator */
.woocommerce-checkout #payment .wc_payment_methods {
    border-bottom: 1px solid #f1f5f9 !important;
    padding-bottom: 15px !important;
    margin-bottom: 15px !important;
}

/* 2. Billing & Shipping Form Inputs (Flatsome Float labels override) */
.woocommerce-checkout #main input[type="text"],
.woocommerce-checkout #main input[type="email"],
.woocommerce-checkout #main input[type="tel"],
.woocommerce-checkout #main input[type="password"],
.woocommerce-checkout #main textarea,
.woocommerce-cart .coupon input[type="text"] {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    transition: all 0.3s ease !important;
    padding-left: 15px !important;
}

body .woocommerce-checkout #main input[type="text"]:focus,
body .woocommerce-checkout #main input[type="email"]:focus,
body .woocommerce-checkout #main input[type="tel"]:focus,
body .woocommerce-checkout #main input[type="password"]:focus,
body .woocommerce-checkout #main textarea:focus,
body .woocommerce-cart .coupon input[type="text"]:focus {
    border-color: #059669 !important;
    /* Emerald Green */
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2) !important;
    outline: none !important;
}

/* 3. Primary Action Buttons (Place Order / Checkout) */
body.woocommerce-cart .checkout-button.button,
body.woocommerce-checkout #place_order.button {
    background-color: #059669 !important;
    /* Emerald Green */
    color: #ffffff !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    padding: 15px 30px !important;
    text-transform: uppercase !important;
    width: 100% !important;
    /* Ensure it takes full space */
    display: inline-block;
    text-align: center;
}

body.woocommerce-cart .checkout-button.button:hover,
body.woocommerce-checkout #place_order.button:hover {
    background-color: #047857 !important;
    /* Emerald Dark */
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.4) !important;
}

/* 4. Cart Table Polish */
table.shop_table.cart {
    border: none !important;
}

table.shop_table.cart th,
table.shop_table.cart td {
    border-left: none !important;
    border-right: none !important;
}

table.shop_table.cart th {
    border-top: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    background: transparent !important;
    font-size: 13px !important;
    text-transform: uppercase;
    color: #64748b;
}

table.shop_table.cart td {
    border-top: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 24px 12px !important;
}

table.shop_table.cart tbody tr:last-child th,
table.shop_table.cart tbody tr:last-child td {
    border-bottom: none !important;
}

/* Rounded Product Thumbnails */
table.shop_table.cart td.product-thumbnail img {
    border-radius: 8px !important;
    border: 1px solid #f1f5f9 !important;
}

/* Total Price Highlight */
.cart-subtotal .amount,
.order-total .amount {
    font-size: 1.15em !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

/* 5. Checkout Breadcrumbs */
.checkout-breadcrumb .breadcrumb-step {
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.checkout-breadcrumb .breadcrumb-step.active,
.checkout-breadcrumb .breadcrumb-step.done {
    opacity: 1 !important;
}

body .checkout-breadcrumb .breadcrumb-step.active .step-title,
body .checkout-breadcrumb .breadcrumb-step.done .step-title {
    color: #059669 !important;
    /* Emerald Green */
    font-weight: 700 !important;
}

/* Hide divider line in top Breadcrumbs header for cleaner look */
.checkout-page-title .is-divider {
    display: none !important;
}

/* ==========================================================================
   ITERATION 2: CART REFINEMENTS (CONVERSION & CONTRAST)
   ========================================================================== */

/* 1. Product Title Contrast & Accessibility */
table.shop_table.cart td.product-name a {
    color: #1e293b !important;
    /* Dark slate instead of gold */
    font-weight: 600 !important;
    font-size: 15px !important;
    transition: color 0.2s ease !important;
}

body table.shop_table.cart td.product-name a:hover {
    color: #059669 !important;
    /* Emerald Green on hover */
}

/* 2. Button Shape Consistency (Border Radius for all cart buttons) */
.woocommerce-cart .button-continue-shopping,
.woocommerce-cart .coupon .button,
.woocommerce-cart .checkout-button.button {
    border-radius: 8px !important;
    /* Unify to slightly rounded square instead of pill */
}

/* 3. Coupon Field & Button Styling */
.woocommerce-cart .coupon {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 20px !important;
}

.woocommerce-cart .coupon input.input-text {
    flex: 1 !important;
    min-width: 200px !important;
    height: 48px !important;
    /* Match button height */
    margin: 0 !important;
}

.woocommerce-cart .coupon .button {
    height: 48px !important;
    background-color: #475569 !important;
    /* Elegant slate */
    color: #ffffff !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
}

.woocommerce-cart .coupon .button:hover {
    background-color: #334155 !important;
    transform: translateY(-1px) !important;
}

/* 4. Primary Conversion Button Enhancements (Przejdź do płatności) */
body.woocommerce-cart .checkout-button.button {
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 18px 30px !important;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3) !important;
    /* Base emerald shadow */
}

body.woocommerce-cart .checkout-button.button:hover {
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.5) !important;
    /* Hover emerald shadow */
}

/* 5. Clean up Cart Totals Table inside the Modern Card */
.cart-sidebar .cart_totals table th,
.cart-sidebar .cart_totals table td,
.cart-sidebar .cart_totals table tr {
    border: none !important;
    /* Remove grey horizontal borders */
    background: transparent !important;
}

/* Add a subtle separator only above the final Total */
.cart-sidebar .cart_totals table tr.order-total {
    border-top: 1px solid #f1f5f9 !important;
}