/* =========================================
   RESET WOOCOMMERCE & FLATSOME 
========================================= */
.wccd-custom-checkout table.shop_table,
.wccd-custom-checkout table.shop_table th,
.wccd-custom-checkout table.shop_table td,
.wccd-custom-checkout table.shop_table tr,
.wccd-custom-checkout .woocommerce-checkout-review-order { border: none !important; box-shadow: none !important; }

.wccd-custom-checkout .checkout-sidebar,
.wccd-custom-checkout .is-well,
.wccd-custom-checkout .sm-touch-scroll,
.wccd-custom-checkout .col-inner.has-border { border: none !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; margin: 0 !important; }

.woocommerce-checkout .row { max-width: 100% !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
.woocommerce-checkout .col, .woocommerce-checkout .large-7, .woocommerce-checkout .large-5 { max-width: 100% !important; padding: 0 !important; }
#order_review_heading, .woocommerce-form-coupon-toggle { display: none !important; }
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals { display: none !important; }

/* ซ่อนกล่องขยะของ WooCommerce ที่มักโผล่เป็นกรอบดำๆ */
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields,
.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
.woocommerce-additional-fields h3,
.wccd-hidden-coupon-form { 
    display: none !important; visibility: hidden !important; opacity: 0 !important; position: absolute !important; left: -9999px !important; pointer-events: none !important; height: 0 !important; width: 0 !important; overflow: hidden !important;
}


/* =========================================
   CART PAGE PREMIUM UI
========================================= */
body.woocommerce-cart .cart-wrapper { max-width: 1200px !important; margin: 40px auto !important; padding: 0 20px !important; display: flex !important; flex-wrap: wrap; gap: 30px !important; }
body.woocommerce-cart .cart-wrapper .woocommerce-cart-form { flex: 1; min-width: 55%; background: #ffffff !important; border-radius: 20px !important; padding: 30px !important; border: 1px solid #f1f5f9 !important; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05) !important; margin-bottom: 0 !important; }
body.woocommerce-cart .cart-wrapper .cart-collaterals { width: 35%; flex-shrink: 0; align-self: flex-start; }
.woocommerce-cart .is-well, .woocommerce-cart .cart-sidebar, .woocommerce-cart .col-inner.has-border { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; }

.woocommerce-cart table.shop_table { border: none !important; margin: 0 !important; border-collapse: collapse !important; }
.woocommerce-cart table.shop_table th { border: none !important; border-bottom: 2px solid #f1f5f9 !important; padding: 15px 0 15px 0 !important; font-size: 14px !important; color: #64748b !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; }
.woocommerce-cart table.shop_table td { border: none !important; border-bottom: 1px dashed #e2e8f0 !important; padding: 25px 0 !important; vertical-align: middle !important; }
.woocommerce-cart table.shop_table tr:last-child td { border-bottom: none !important; padding-bottom: 0 !important;}

.woocommerce-cart .product-thumbnail img { width: 75px !important; height: 75px !important; border-radius: 12px !important; object-fit: cover !important; box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important; border: 1px solid #f1f5f9 !important; }
.woocommerce-cart .product-name a { font-weight: 700 !important; color: #1e293b !important; font-size: 16px !important; text-decoration: none !important; }
.woocommerce-cart .product-name a:hover { color: var(--wccd-primary) !important; }
.woocommerce-cart .product-price, .woocommerce-cart .product-subtotal { font-weight: 700 !important; color: #0f172a !important; font-size: 16px !important; }
.woocommerce-cart .product-remove a { color: #ef4444 !important; font-size: 24px !important; border: 1px solid #fee2e2 !important; border-radius: 50% !important; width: 32px !important; height: 32px !important; display: flex !important; align-items: center !important; justify-content: center !important; transition: 0.3s !important; background: #fff !important; text-decoration: none !important; line-height: 1 !important;}
.woocommerce-cart .product-remove a:hover { background: #ef4444 !important; color: #fff !important; }

.woocommerce-cart .quantity { display: inline-flex !important; align-items: center !important; border: 1px solid #cbd5e1 !important; border-radius: 8px !important; background: #fff !important; overflow: hidden !important; margin: 0 !important; height: 32px !important; }
.woocommerce-cart .quantity input.qty { width: 35px !important; border: none !important; text-align: center !important; font-weight: 600 !important; font-size: 14px !important; padding: 0 !important; height: 32px !important; min-height: 32px !important; box-shadow: none !important; background: #fff !important; color: #0f172a !important;}
.woocommerce-cart .quantity input.minus, .woocommerce-cart .quantity input.plus { background: #f8fafc !important; border: none !important; width: 30px !important; height: 32px !important; color: #64748b !important; font-weight: bold !important; cursor: pointer !important; font-size: 16px !important; transition: 0.2s !important; display: flex !important; align-items: center !important; justify-content: center !important; padding: 0 !important; }
.woocommerce-cart .quantity input.minus:hover, .woocommerce-cart .quantity input.plus:hover { background: #e2e8f0 !important; color: #0f172a !important; }

.woocommerce-cart .actions { padding: 25px 0 0 0 !important; display: flex !important; justify-content: space-between !important; align-items: center !important; flex-wrap: wrap !important; gap: 15px !important; }
.woocommerce-cart .coupon { display: block !important; width: 100% !important; max-width: 450px !important; border: none !important; padding: 0 !important;}

/* FIXED: Changed to position absolute so JS can find and trigger the native submit button in cart form */
.woocommerce-cart .coupon input.input-text, 
.woocommerce-cart .coupon button.button,
.woocommerce-cart .coupon input[type="submit"] { 
    position: absolute !important; left: -9999px !important; opacity: 0 !important; pointer-events: none !important;
}

.woocommerce-cart button[name="update_cart"] { border-radius: 12px !important; background: #f1f5f9 !important; color: #334155 !important; padding: 0 24px !important; font-weight: 600 !important; border: 1px solid #e2e8f0 !important; transition: 0.3s !important; height: 46px !important; text-transform: none !important;}
.woocommerce-cart button[name="update_cart"]:hover { background: #e2e8f0 !important; color: #0f172a !important; }

.woocommerce-cart .cart_totals { background: #ffffff !important; border: 1px solid #f1f5f9 !important; border-radius: 20px !important; padding: 30px !important; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05) !important; width: 100% !important; margin-bottom: 0 !important; }
.woocommerce-cart .cart_totals h2 { font-size: 1.25rem !important; font-weight: 700 !important; color: #0f172a !important; margin-top: 0 !important; margin-bottom: 25px !important; border-bottom: 1px solid #f1f5f9 !important; padding-bottom: 15px !important; }
.woocommerce-cart .cart_totals table { width: 100% !important; border: none !important; margin-bottom: 25px !important; }
.woocommerce-cart .cart_totals table th { text-align: left !important; padding: 15px 0 !important; border-bottom: 1px solid #f1f5f9 !important; color: #64748b !important; font-weight: 500 !important; font-size: 14px !important; border-top: none !important;}
.woocommerce-cart .cart_totals table td { text-align: right !important; padding: 15px 0 !important; border-bottom: 1px solid #f1f5f9 !important; color: #0f172a !important; font-weight: 600 !important; font-size: 14px !important; border-top: none !important;}
.woocommerce-cart .cart_totals table tr.order-total th { font-size: 1.25rem !important; color: #0f172a !important; font-weight: 700 !important; border-top: 2px dashed #e2e8f0 !important; border-bottom: none !important; padding-top: 25px !important; }
.woocommerce-cart .cart_totals table tr.order-total td { border-top: 2px dashed #e2e8f0 !important; border-bottom: none !important; padding-top: 25px !important; }
.woocommerce-cart .cart_totals table tr.order-total td .amount { font-size: 1.8rem !important; color: var(--wccd-primary) !important; font-weight: 900 !important; }

.woocommerce-cart .wc-proceed-to-checkout { padding: 0 !important; }
.woocommerce-cart .checkout-button { width: 100% !important; padding: 20px !important; color: #fff !important; font-size: 18px !important; font-weight: 700 !important; border-radius: 14px !important; border: none !important; transition: all 0.3s ease !important; box-shadow: 0 8px 20px -5px rgba(0,0,0,0.2) !important; display: flex !important; justify-content: center !important; align-items: center !important; background: var(--wccd-primary) !important; margin-bottom: 0 !important; text-transform: none !important;}
.woocommerce-cart .checkout-button:hover { filter: brightness(1.1) !important; transform: translateY(-2px) !important; box-shadow: 0 12px 25px -5px rgba(0,0,0,0.3) !important; color: #fff !important; }


/* =========================================
   LAYOUT STRUCTURE (Checkout)
========================================= */
.wccd-checkout-wrap { display: flex !important; flex-direction: column !important; gap: 35px !important; width: 100% !important; }
@media (min-width: 992px) {
    .layout-modern .wccd-checkout-wrap { flex-direction: row !important; align-items: flex-start !important; }
    .layout-modern .wccd-main-col { width: 55% !important; flex-shrink: 0; display:flex; flex-direction:column; gap:30px; }
    .layout-modern .wccd-sidebar-col { width: calc(45% - 35px) !important; flex-shrink: 0; position: sticky; top: 90px; display:flex; flex-direction:column; gap:30px;}
}
.layout-minimal .wccd-checkout-wrap { max-width: 700px !important; margin: 0 auto !important; }
.layout-minimal .wccd-main-col { width: 100% !important; display:flex; flex-direction:column; gap:30px;}
.layout-minimal .wccd-sidebar-col { display: none !important; }

/* =========================================
   PREMIUM CARDS & UI ELEMENTS (Checkout)
========================================= */
.wccd-card { background: #ffffff !important; border: 1px solid #f1f5f9 !important; border-radius: 20px !important; padding: 30px !important; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05) !important; width: 100% !important; box-sizing: border-box !important; margin-bottom: 0 !important; }
#order_review.wccd-card { padding: 30px !important; }
.wccd-card-title { font-size: 1.25rem; font-weight: 700; color: #0f172a; margin-top: 0; margin-bottom: 25px; border-bottom: 1px solid #f1f5f9; padding-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.wccd-step-badge { color: #fff; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0;}

/* Form Inputs */
.woocommerce form .form-row { margin-bottom: 18px !important; }
.woocommerce form label { display: block; font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 8px; }
.woocommerce form .input-text, .woocommerce form input[type='email'], .woocommerce form input[type='tel'], .select2-selection, .woocommerce form textarea, .wccd-input-field { 
    width: 100% !important; padding: 14px 16px !important; border: 1px solid #e2e8f0 !important; border-radius: 12px !important; font-size: 14px !important; background: #fcfcfc !important; box-shadow: 0 1px 2px rgba(0,0,0,0.01) !important; transition: all 0.3s ease; box-sizing: border-box !important; 
}
.woocommerce form textarea { min-height: 120px !important; resize: vertical; }
.woocommerce form .input-text:focus, .woocommerce form textarea:focus, .wccd-input-field:focus { border-color: var(--wccd-primary) !important; background: #fff !important; box-shadow: 0 0 0 4px rgba(0,0,0,0.03) !important; outline: none; }
.wccd-modal-grid-input { display: flex; gap: 12px; margin-bottom: 16px; }

/* Address Book Grid */
.wccd-ab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.wccd-ab-card { border: 1px solid #e2e8f0; border-radius: 16px; padding: 20px; background: #f8fafc; transition: all 0.3s ease; position: relative; }
.wccd-ab-card:hover { border-color: #cbd5e1; box-shadow: 0 8px 20px rgba(0,0,0,0.04); transform: translateY(-2px); }
.wccd-ab-card.wccd-active { border-color: var(--wccd-primary) !important; background: #ffffff !important; box-shadow: 0 0 0 2px var(--wccd-primary), 0 8px 20px rgba(0,0,0,0.04) !important; }
.wccd-active .wccd-ab-btn-select { display: none !important; }
.wccd-ab-card-add { border: 2px dashed #cbd5e1; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #64748b; font-weight: 600; cursor: pointer; min-height: 140px; transition: all 0.3s ease; }
.wccd-ab-card-add:hover { border-color: var(--wccd-primary); color: var(--wccd-primary); background: #fff; transform: translateY(-2px); }

/* Radio Cards */
ul.payment_methods, ul#shipping_method { list-style: none !important; padding: 0 !important; margin: 0 !important; }
ul.payment_methods li, ul#shipping_method li { display: flex !important; flex-wrap: wrap; align-items: center; border: 1px solid #e2e8f0; border-radius: 16px; padding: 18px 20px; margin-bottom: 15px !important; background: #fff; transition: all 0.3s ease; box-sizing: border-box !important; width: 100% !important; }
ul.payment_methods li:hover, ul#shipping_method li:hover { border-color: #cbd5e1; box-shadow: 0 6px 15px rgba(0, 0, 0, 0.04); transform: translateY(-2px); }
ul.payment_methods li label, ul#shipping_method li label { flex: 1; display: flex !important; align-items: center; justify-content: space-between; font-size: 15px !important; font-weight: 600 !important; margin: 0 !important; cursor: pointer; width: 100%; color: #1e293b !important; line-height: 1.4; }
ul.payment_methods li input[type="radio"], ul#shipping_method li input[type="radio"] { appearance: none !important; -webkit-appearance: none !important; width: 22px !important; height: 22px !important; border: 2px solid #cbd5e1 !important; border-radius: 50% !important; margin-right: 15px !important; margin-top: 0 !important; position: relative !important; cursor: pointer !important; flex-shrink: 0 !important; background-color: #fff !important; transition: 0.2s; }
ul.payment_methods li input[type="radio"]:checked::after, ul#shipping_method li input[type="radio"]:checked::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 8px; height: 8px; background: white; border-radius: 50%; }

/* Smart SVGs */
ul.payment_methods li label img { margin-left: auto !important; max-height: 32px !important; border-radius: 6px; padding: 2px 6px; background: #fff; border: 1px solid #f1f5f9; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.wccd-smart-icon { margin-left: auto; background: #fff; padding: 6px; border-radius: 8px; border: 1px solid #e2e8f0; display:flex; align-items:center; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.wccd-smart-icon svg { width: 24px; height: 24px; }
div.payment_box { width: 100%; padding: 12px 0 0 37px !important; color: #64748b !important; font-size: 13.5px !important; border: none !important; background: transparent !important; line-height: 1.6; }
div.payment_box::before { display: none !important; }

/* =========================================
   ORDER SUMMARY REBUILD 
========================================= */
.woocommerce-checkout-review-order-table { border: none !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; background: transparent !important; table-layout: fixed !important; }
.woocommerce-checkout-review-order-table th, .woocommerce-checkout-review-order-table td { border: none !important; padding: 12px 0 !important; border-bottom: 1px solid #f1f5f9 !important;}
.woocommerce-checkout-review-order-table thead { display: none !important; }

/* รายการสินค้า Cart Item */
.woocommerce-checkout-review-order-table tr.cart_item { border-bottom: 1px dashed #e2e8f0 !important; padding-bottom: 20px !important; margin-bottom: 20px !important; display: flex !important; justify-content: space-between !important; align-items: center !important; width: 100% !important; box-sizing: border-box !important; }
.woocommerce-checkout-review-order-table tr.cart_item:last-child { border-bottom: none !important; margin-bottom: 0 !important; padding-bottom: 0 !important;}
.woocommerce-checkout-review-order-table tr.cart_item td.product-name { flex: 1 !important; min-width: 0 !important; width: auto !important; padding-right: 15px !important; padding-top: 0 !important; padding-bottom: 0 !important; box-sizing: border-box !important; }
.woocommerce-checkout-review-order-table tr.cart_item td.product-total { text-align: right !important; flex-shrink: 0 !important; font-weight: 700; color: #0f172a; padding-top: 0 !important; padding-bottom: 0 !important; }

/* Product Images & QTY (Checkout) */
.wccd-product-item { display: flex; align-items: center; gap: 16px; width: 100%; box-sizing: border-box !important; }
.wccd-img-box { position: relative; flex-shrink: 0; }
.wccd-product-img { width: 68px !important; height: 68px !important; object-fit: cover !important; border-radius: 12px !important; border: 1px solid #e2e8f0 !important; box-shadow: 0 2px 6px rgba(0,0,0,0.04) !important; background: #fff; }
.wccd-qty-badge { position: absolute; top: -8px; right: -8px; color: #fff; font-size: 11px; font-weight: bold; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff; background: var(--wccd-primary); z-index: 10; }
.wccd-name-box { display: flex; flex-direction: column; justify-content: center; flex: 1; min-width: 0; }
.wccd-product-name { font-size: 0.95rem !important; font-weight: 600 !important; color: #1e293b !important; line-height: 1.4 !important; margin: 0 0 6px 0 !important; white-space: normal !important; overflow-wrap: break-word !important; word-wrap: break-word !important; max-width: 100%;}
.wccd-qty-controls { display: inline-flex; align-items: center; border: 1px solid #e2e8f0; border-radius: 8px; width: max-content; background: #fff; overflow: hidden; margin-top: 2px; height: 32px; }
.wccd-btn-minus, .wccd-btn-plus { background: #f8fafc; border: none; padding: 0; width: 30px; color: #64748b; font-weight: bold; cursor: pointer; transition: 0.2s; font-size: 16px; line-height: 1; height: 32px; display: flex; align-items: center; justify-content: center; }
.wccd-btn-minus:hover, .wccd-btn-plus:hover { background: #e2e8f0; color: #0f172a; }
.wccd-input-qty { width: 35px !important; text-align: center !important; border: none !important; font-size: 14px !important; font-weight: 600 !important; padding: 0 !important; color: #0f172a !important; background: #fff !important; height: 32px !important; min-height: 32px !important; box-shadow: none !important; }

/* Totals (Flexbox for tfoot tr) */
.woocommerce-checkout-review-order-table tfoot tr:not(.wccd-coupon-table-row) { 
    display: flex !important; justify-content: space-between !important; align-items: center !important; 
    width: 100% !important; box-sizing: border-box !important; border-bottom: 1px dashed #e2e8f0 !important; padding: 12px 0 !important; 
}
.woocommerce-checkout-review-order-table tfoot tr:not(.wccd-coupon-table-row) th { text-align: left !important; color: #64748b !important; font-weight: 500 !important; font-size: 14px !important; border: none !important; padding: 0 !important; }
.woocommerce-checkout-review-order-table tfoot tr:not(.wccd-coupon-table-row) td { text-align: right !important; font-weight: 600 !important; color: #334155 !important; font-size: 14px !important; border: none !important; padding: 0 !important; }

.woocommerce-checkout-review-order-table tfoot tr.order-total { border-top: 1px dashed #e2e8f0 !important; border-bottom: none !important; margin-top: 5px !important; padding-top: 20px !important; align-items: flex-end !important;}
.woocommerce-checkout-review-order-table tfoot tr.order-total th { font-size: 1.25rem !important; color: #0f172a !important; font-weight: 700 !important; }
.woocommerce-checkout-review-order-table tfoot tr.order-total td { text-align: right !important; }
.woocommerce-checkout-review-order-table tfoot tr.order-total td .woocommerce-Price-amount { font-size: 1.7rem !important; color: var(--wccd-primary) !important; font-weight: 900 !important; }

/* Button Reset */
#payment .place-order { padding: 0 !important; margin: 25px 0 0 0 !important; background: transparent !important; border: none !important; }

/* =========================================
   COUPON UI BLOCK (Full Width, Above Subtotal)
========================================= */
tr.wccd-coupon-table-row { border: none !important; border-bottom: 1px dashed #e2e8f0 !important; background: transparent !important; display: block !important; width: 100% !important; margin: 0 0 15px 0 !important; padding: 0 0 20px 0 !important;}
tr.wccd-coupon-table-row td { padding: 0 !important; border: none !important; display: block !important; width: 100% !important; box-sizing: border-box !important;}
.wccd-coupon-block { display: flex; align-items: center; justify-content: space-between; background: #ffffff; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 15px 20px; transition: all 0.3s ease; width: 100% !important; box-sizing: border-box !important; gap: 15px; margin: 0 !important; }
.wccd-coupon-block:hover { border-style: solid; border-color: var(--wccd-primary) !important; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.wccd-coupon-block-left { display: flex; align-items: center; gap: 15px; flex: 1; min-width: 0; }
.wccd-icon-wrapper { background: #fff; width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,0.06); flex-shrink: 0; }
.wccd-icon-wrapper svg { width: 22px; height: 22px; }
.wccd-text-wrapper { flex: 1; min-width: 0; }
.wccd-text-wrapper strong { display: block; font-size: 15px; color: #0f172a; font-weight: 700; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.wccd-text-wrapper span { display: block; font-size: 13px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.wccd-open-modal-btn { flex-shrink: 0; background: #fff; border: 1px solid var(--wccd-primary) !important; color: var(--wccd-primary) !important; border-radius: 8px; padding: 8px 20px; font-size: 14px; font-weight: 600; cursor: pointer; transition: 0.3s; box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
.wccd-open-modal-btn:hover { background: var(--wccd-primary) !important; color: #fff !important; }

/* Modals */
.wccd-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(5px); z-index: 999999; display: none; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; }
.wccd-modal-container { background: #fff; width: 100%; max-width: 480px; border-radius: 24px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15); overflow: hidden; animation: wccd-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes wccd-pop { 0% { transform: scale(0.95) translateY(10px); opacity: 0; } 100% { transform: scale(1) translateY(0); opacity: 1; } }
.wccd-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 24px; border-bottom: 1px solid #f1f5f9; }
.wccd-modal-header h3 { margin: 0; font-size: 18px; color: #0f172a; font-weight: 700; }
.wccd-close-modal { background: #f1f5f9; border: none; font-size: 24px; color: #64748b; cursor: pointer; padding: 0; line-height: 1; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.wccd-close-modal:hover { background: #e2e8f0; color: #0f172a; }
.wccd-manual-input { display: flex; gap: 12px; padding: 24px; background-color: #f8fafc; border-bottom: 1px solid #f1f5f9; }
.wccd-manual-input input { flex: 1; padding: 14px 18px; border: 1px solid #e2e8f0; border-radius: 12px; font-size: 15px; outline: none; transition: 0.3s;}
.wccd-manual-input button { border: none; padding: 14px 24px; border-radius: 12px; font-weight: 600; cursor: pointer; transition: 0.3s; }
.wccd-coupon-list { padding: 24px; max-height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.wccd-coupon-item { border: 1px solid #e2e8f0; border-radius: 16px; padding: 18px; display: flex; justify-content: space-between; align-items: center; transition: all 0.3s ease; }
.wccd-coupon-item:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.04); transform: translateY(-2px); }
.wccd-coupon-info h4 { margin: 0 0 6px 0; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;}
.wccd-coupon-info p { margin: 0; font-size: 13.5px; color: #64748b; }
.wccd-apply-list-btn { background: #f1f5f9; color: #334155; border: none; padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: 0.3s; }
.wccd-apply-list-btn:hover { background: #e2e8f0; }

.wccd-scrollable { max-height: 350px; overflow-y: auto; padding-right: 8px; margin-bottom: 20px; }
.wccd-scrollable::-webkit-scrollbar { width: 5px; }
.wccd-scrollable::-webkit-scrollbar-track { background: transparent; }
.wccd-scrollable::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }


/* =========================================
   ✅ ORDER COMPLETE (THANK YOU) PAGE UI
========================================= */
.wccd-order-complete-container { max-width: 800px !important; margin: 0 auto !important; display: flex; flex-direction: column; gap: var(--wccd-ty-margin) !important; }

/* Success Header */
.wccd-thankyou-header { text-align: center; padding: var(--wccd-ty-padding) !important; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.wccd-success-icon { width: 80px; height: 80px; background: #10b981; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 25px; animation: scaleUp 0.6s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4); }
.wccd-success-icon svg { width: 40px; height: 40px; }
@keyframes scaleUp { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.wccd-ty-title { font-size: var(--wccd-ty-title-size) !important; color: #0f172a !important; margin-bottom: 12px !important; font-weight: 800 !important; letter-spacing: -0.5px !important; border: none !important; }
.wccd-ty-desc { color: #64748b !important; font-size: 16px !important; margin: 0 !important; }

/* All Cards inside order complete */
.wccd-order-complete-container .wccd-card { padding: var(--wccd-ty-padding) !important; }

/* Order Meta Overview Grid */
.wccd-order-overview-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important; gap: 15px !important; list-style: none !important; margin: 0 !important; border: none !important;}
.wccd-order-overview-grid li { background: #fff !important; border: 1px solid #f1f5f9 !important; border-radius: 16px !important; padding: 20px !important; text-align: center !important; text-transform: uppercase !important; font-size: 12px !important; color: #64748b !important; font-weight: 600 !important; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02) !important; margin: 0 !important;}
.wccd-order-overview-grid li strong { display: block !important; font-size: 16px !important; color: #0f172a !important; margin-top: 8px !important; font-weight: 700 !important; text-transform: none !important; }

/* --- 💸 PAYMENT NOTIFICATION HUB (V11.0) --- */
.woocommerce-order ul.wc-bacs-bank-details, 
.woocommerce-order section.woocommerce-bacs-bank-details, 
.woocommerce-order h2.wc-bacs-bank-details-heading { display: none !important; }

.wccd-payment-form-card { overflow: hidden; }
.wccd-form-section-title { 
    font-size: 18px !important; 
    font-weight: 700 !important; 
    color: #0f172a !important; 
    margin: 0 0 20px 0 !important; 
    padding-bottom: 12px !important; 
    border-bottom: 2px solid #f1f5f9 !important; 
    display: block !important; 
    width: 100% !important; 
}

/* Premium Bank Info Card */
.wccd-bacs-list-container { margin-bottom: 30px; }
.wccd-bacs-premium-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    gap: 16px;
}
.wccd-bacs-premium-card:last-child { margin-bottom: 0; }
.wccd-bank-logo {
    width: 48px; height: 48px;
    border-radius: 8px;
    object-fit: contain;
    background: #f8fafc;
    padding: 4px;
    border: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.wccd-bank-logo-fallback { color: #94a3b8; display: flex; align-items: center; justify-content: center; }
.wccd-bank-logo-fallback svg { width: 24px; height: 24px; }
.wccd-bacs-details { flex: 1; min-width: 0; }
.wccd-bacs-bank-name { font-weight: 700; color: #0f172a; font-size: 15px; }
.wccd-bacs-acc-name { color: #475569; font-size: 13px; margin-top: 2px; }
.wccd-bacs-acc-num { color: var(--wccd-primary); font-weight: 700; font-size: 18px; margin-top: 4px; letter-spacing: 1px; }

/* Upload Form UI */
.wccd-payment-form-wrapper { border-top: 1px dashed #e2e8f0; padding-top: 30px; }
.wccd-form-group label { display: block; font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 10px; }

/* Radio Cards Grid */
.wccd-bank-radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.wccd-bank-radio-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    margin: 0 !important;
}
.wccd-bank-radio-card:hover { border-color: var(--wccd-primary); }
.wccd-bank-radio-card.wccd-active-bank {
    border-color: var(--wccd-primary) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 2px var(--wccd-primary), 0 4px 12px rgba(0,0,0,0.05) !important;
}
.wccd-bank-radio-card input[type="radio"] { display: none; }
.wccd-bank-radio-logo { width: 36px; height: 36px; border-radius: 6px; object-fit: contain; background: #fff; padding: 2px; border: 1px solid #e2e8f0; flex-shrink: 0; }
.wccd-bank-radio-details { display: flex; flex-direction: column; }
.wccd-bank-radio-name { font-weight: 600; color: #0f172a; font-size: 13px; }
.wccd-bank-radio-num { font-size: 12px; color: #64748b; margin-top: 2px; }

/* Date & Time Grid */
.wccd-date-time-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.wccd-slip-upload-zone {
    border: 2px dashed #cbd5e1; border-radius: 12px; background: #f8fafc;
    position: relative; text-align: center; padding: 30px 20px; cursor: pointer;
    transition: all 0.3s ease;
}
.wccd-slip-upload-zone:hover { border-color: var(--wccd-primary); background: #f1f5f9; }
.wccd-slip-upload-zone input[type="file"] {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 10;
}
.wccd-slip-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.wccd-slip-preview span { font-size: 13px; font-weight: 500; color: #64748b; }
.wccd-upload-icon { width: 32px; height: 32px; color: #94a3b8; margin-bottom: 10px; }
.wccd-slip-preview img { max-height: 200px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); margin-top: 10px; object-fit: contain; }

.wccd-submit-slip-btn {
    width: 100%; padding: 16px; border-radius: 12px; font-size: 16px; font-weight: 700;
    margin-top: 20px; box-shadow: 0 8px 20px -5px rgba(0,0,0,0.2);
}

/* Success State */
.wccd-payment-success-state { text-align: center; padding: 20px 10px; }
.wccd-payment-success-icon { width: 64px; height: 64px; background: #d1fae5; color: #10b981; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px auto; }
.wccd-payment-success-icon svg { width: 32px; height: 32px; }
.wccd-payment-success-state h4 { font-size: 18px; color: #0f172a; font-weight: 700; margin-bottom: 8px; }
.wccd-payment-success-state p { font-size: 14px; color: #64748b; margin-bottom: 20px; }
.wccd-view-slip-link { display: inline-block; padding: 10px 24px; border: 1px solid var(--wccd-primary); color: var(--wccd-primary); font-size: 14px; font-weight: 600; border-radius: 8px; text-decoration: none; transition: 0.3s; }
.wccd-view-slip-link:hover { background: var(--wccd-primary); color: #fff; }


/* Order Details Table */
.wccd-card .woocommerce-order-details__title, .wccd-card .woocommerce-column__title { font-size: 20px !important; color: #0f172a !important; font-weight: 700 !important; margin-bottom: 20px !important; border-bottom: 1px solid #f1f5f9 !important; padding-bottom: 15px !important; margin-top: 0 !important; }

/* Order Item Product Images (80x80) */
.woocommerce-table--order-details td.woocommerce-table__product-name { padding-left: 0 !important; }
.wccd-order-item-flex { display: flex; align-items: center; gap: 15px; }
.wccd-order-item-img img { width: 80px !important; height: 80px !important; border-radius: 12px; object-fit: cover; border: 1px solid #e2e8f0; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.wccd-order-item-name { flex: 1; }

.woocommerce-table--order-details { width: 100% !important; border-collapse: collapse !important; border: none !important; margin: 0 !important;}
.woocommerce-table--order-details th, .woocommerce-table--order-details td { padding: 15px 0 !important; border-bottom: 1px dashed #e2e8f0 !important; background: transparent !important; }
.woocommerce-table--order-details tbody tr:last-child th, .woocommerce-table--order-details tbody tr:last-child td { border-bottom: 1px solid #e2e8f0 !important; }
.woocommerce-table--order-details tfoot th { text-align: left !important; color: #64748b !important; font-weight: 500 !important; }
.woocommerce-table--order-details tfoot td { text-align: right !important; font-weight: 600 !important; color: #0f172a !important; }
.woocommerce-table--order-details tfoot tr:last-child th, .woocommerce-table--order-details tfoot tr:last-child td { font-size: 18px !important; color: var(--wccd-primary) !important; font-weight: 800 !important; border-top: 2px dashed #e2e8f0 !important; padding-top: 20px !important; border-bottom: none !important;}

/* Customer Addresses in Thank You */
.woocommerce-customer-details address { background: #f8fafc !important; border: 1px solid #e2e8f0 !important; border-radius: 12px !important; padding: 20px !important; font-style: normal !important; color: #334155 !important; line-height: 1.6 !important; margin: 0 !important;}
.woocommerce-customer-details .col2-set { display: flex !important; gap: 20px !important; flex-wrap: wrap; }
.woocommerce-customer-details .col2-set .col-1, .woocommerce-customer-details .col2-set .col-2 { flex: 1 !important; min-width: 280px !important; max-width: 100% !important; width: 100% !important;}


/* =========================================
   📱 MOBILE-FIRST PREMIUM OPTIMIZATIONS
========================================= */
@media(max-width: 768px) {
    /* Main Layout */
    .wccd-main-container { padding: 20px 10px !important; }
    .wccd-checkout-wrap { gap: 16px !important; }
    .wccd-main-col, .wccd-sidebar-col { gap: 16px !important; }
    
    /* Cards */
    .wccd-card { padding: 20px !important; border-radius: 16px !important; }
    #order_review.wccd-card { padding: 20px !important; }
    .wccd-card-title { font-size: 1.15rem; margin-bottom: 20px; }
    
    /* Inputs: Prevent iOS Auto-Zoom */
    .woocommerce form .input-text, 
    .woocommerce form input[type='email'], 
    .woocommerce form input[type='tel'], 
    .wccd-input-field,
    .wccd-manual-input input,
    .woocommerce form textarea { 
        font-size: 16px !important; 
        padding: 12px 14px !important;
    }

    /* Radio Items */
    ul.payment_methods li, ul#shipping_method li { padding: 14px 16px !important; margin-bottom: 12px !important; border-radius: 12px !important; }
    ul.payment_methods li label, ul#shipping_method li label { font-size: 14px !important; }
    ul.payment_methods li label img { max-height: 28px !important; }
    
    .wccd-ab-grid { grid-template-columns: 1fr; gap: 12px; }
    
    /* Product Item in Order Review */
    .wccd-product-item { gap: 12px; }
    .wccd-product-img { width: 56px !important; height: 56px !important; border-radius: 10px !important; }
    .wccd-product-name { font-size: 0.9rem !important; }
    .woocommerce-checkout-review-order-table tr.cart_item td.product-total { font-size: 0.95rem !important; }
    
    /* Touch-friendly QTY Buttons */
    .wccd-btn-minus, .wccd-btn-plus { padding: 0; font-size: 16px; height: 32px; width: 30px; }
    .wccd-input-qty { height: 32px !important; min-height: 32px !important; width: 35px !important; font-size: 14px !important; }
    
    /* Buttons */
    .button#place_order, .wccd-ab-submit-btn, .wccd-btn-primary { padding: 18px !important; font-size: 17px !important; border-radius: 12px !important; }

    /* Cart Specific */
    body.woocommerce-cart .cart-wrapper { padding: 10px !important; margin: 15px auto !important; }
    body.woocommerce-cart .cart-wrapper .woocommerce-cart-form { padding: 20px !important; border-radius: 16px !important; }
    .woocommerce-cart .cart_totals { padding: 20px !important; border-radius: 16px !important; }
    .woocommerce-cart table.cart td.product-thumbnail img { width: 64px !important; height: 64px !important; }
    .woocommerce-cart .coupon { max-width: 100% !important; flex-direction: column; }
    .woocommerce-cart button[name="update_cart"] { width: 100% !important; }
    body.woocommerce-cart .cart-wrapper .cart-collaterals { width: 100% !important; }

    /* Modals */
    .wccd-modal-container { border-radius: 20px; max-width: 95%; margin: 10px; }
    .wccd-modal-header { padding: 20px; }
    .wccd-modal-body { padding: 20px; }
    .wccd-modal-grid-input { flex-direction: column; gap: 16px; margin-bottom: 16px; }
    .wccd-manual-input { padding: 20px; flex-direction: column; gap: 12px; }
    .wccd-manual-input button { width: 100%; padding: 14px; }
    .wccd-coupon-block { flex-direction: column; align-items: stretch; gap: 12px; padding: 15px;}
    .wccd-open-modal-btn { width: 100%; padding: 12px; }

    /* Order Complete Mobile */
    .wccd-order-complete-container { gap: 20px !important; }
    .wccd-thankyou-header { padding: 30px 15px !important; }
    .wccd-ty-title { font-size: 24px !important; }
    .wccd-order-overview-grid { grid-template-columns: 1fr 1fr !important; }
    .wccd-order-item-img img { width: 64px !important; height: 64px !important; }
    
    .wccd-bank-radio-grid { grid-template-columns: 1fr; }
    .wccd-bacs-premium-card { flex-direction: column; align-items: flex-start; gap: 10px; }
    .wccd-date-time-grid { grid-template-columns: 1fr 1fr; }
}