/* Custom WooCommerce Checkout Premium Styling */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap&subset=vietnamese');

*,
::before,
::after {
    box-sizing: border-box;
}

:root {
    --cc-primary-color: #16a34a;
    /* Fallback */
    --cc-primary-hover: #15803d;
    /* Fallback */
    --cc-primary-alpha: rgba(22, 163, 74, 0.1);
    /* Fallback */
    --cc-border-color: #e5e7eb;
    --cc-bg-body: #f8f9fc;
    /* Very light gray/blue background */
    --cc-bg-card: #ffffff;
    --cc-bg-input: #ffffff;
    --cc-bg-address: #f9fafb;
    /* Slightly gray background for address section */
    --cc-text-main: #1f2937;
    --cc-text-muted: #6b7280;
    --cc-radius: 12px;
    --cc-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --cc-danger: #ef4444;
    /* Red text color for totals */
}

.cc-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (max-width: 600px) {
    .cc-grid-2 {
        grid-template-columns: 1fr;
    }
}

body {
    background-color: var(--cc-bg-body);
}

/* Page Title replacement */
.cc-page-title {
    grid-column: 1 / -1;
    font-size: 24px;
    font-weight: 700;
    color: var(--cc-text-main);
    margin-bottom: 5px;
    margin-top: 0;
}

/* Layout container - Responsive Grid */
form.woocommerce-checkout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    align-items: start;
    font-family: 'Inter', sans-serif;
    color: var(--cc-text-main);
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0px;
}
0@media (max-width: 1200px) {
   body form.woocommerce-checkout {
       	display: flex !important;
    }
}

@media (min-width: 992px) {
    html body form.woocommerce-checkout {
        grid-template-columns: 1fr minmax(320px, 380px) !important;
        
		
    }
}

form.woocommerce-checkout>* {
width: 100% !important;
	position: sticky;
  top: 24px;

}
@media (max-width: 992px) {
 form.woocommerce-checkout>* {
 
	position: relative !important;
  top: 0px;
  
}
}
/* Cột trái: container tất cả các card */
#customer_details {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px;
    width: 100% !important;
    float: none !important;
}

#customer_details .col-1/*,
#customer_details .col-2 */{
    display: none;
}

/* Ẩn nguồn gốc order_review (nội dung đã clone sang các card) */
#order_review,
#order_review_heading {
    display: none !important;
}

/* Cột phải - Sticky */
.cc-right-col {

    display: flex;
    flex-direction: column;
    gap: 20px;
}
*/
/* Ẩn phần giao hàng đến địa chỉ khác */
.woocommerce-shipping-fields,
#ship-to-different-address-wrapper,
.shipping_address {
    display: none !important;
}

/* Hide original headings */
.woocommerce-billing-fields>h3,
.woocommerce-shipping-fields>h3 {
    display: none !important;
}

/* Base Card Styling */
.cc-card,
.woocommerce-checkout-review-order {
    background: var(--cc-bg-card);
    border-radius: var(--cc-radius);
    padding: 20px;
    box-shadow: var(--cc-shadow);
    border: 1px solid var(--cc-border-color);
    margin-bottom: 0;
}

.cc-card-title,
#order_review_heading {
    font-size: 16px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--cc-text-main);
    display: block;
}

/* Specific adjustment for right column container if any */
.cc-right-col {
    display: flex;
    flex-direction: column;
}

/* Grid Layouts inside Cards */
.cc-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 991px) {
    html body form.woocommerce-checkout {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        padding: 20px 12px;
		gap:0px;
    }

    .cc-grid-2 {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .cc-right-col {
        position: static !important;
        width: 100% !important;
    }
}

@media (max-width: 768px) {

    .cc-card,
    .woocommerce-checkout-review-order {
        padding: 20px 16px;
    }

    #order_review,
    #customer_details {
        flex: 1 1 100%;
        max-width: 100%;
    }
}


/* Form Styles */
.woocommerce-checkout .form-row {
    margin-bottom: 0px !important;
    width: 100% !important;
    padding: 0 !important;
    display: flex !important;
    flex-wrap: wrap;
    /* Ensure mobile friendly */
}

.woocommerce-checkout .form-row label {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    opacity: 0 !important;
    margin: 0 !important;
}

.woocommerce-checkout .form-row .woocommerce-input-wrapper {
    flex: 1 !important;
    width: 100% !important;
}

.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
    width: 100% !important;
    max-width: 100% !important;
    height: 48px !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    background-color: var(--cc-bg-input) !important;
    font-size: 14px !important;
    color: var(--cc-text-main) !important;
    transition: all 0.2s ease !important;
    line-height: 26px !important;
}

/* Native select styling - instant display, no Select2 delay */
/* Only style the selects when NOT inside our custom searchable wrap */
#billing_state_field .select2-container,
#billing_city_field .select2-container,
#billing_ward_field .select2-container,
#shipping_state_field .select2-container,
#shipping_city_field .select2-container,
#shipping_ward_field .select2-container,
.cc-address-fields .select2-container {
    display: none !important;
}

/* Hide the original native select when it's inside our custom searchable wrapper */
.cc-searchable-wrap select,
.cc-searchable-wrap .cc-original-select {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
}

/* Style native selects only when NOT wrapped by our custom component */
#billing_state:not(.cc-original-select),
#billing_city:not(.cc-original-select),
#shipping_state:not(.cc-original-select),
#shipping_city:not(.cc-original-select) {
    display: block;
    visibility: visible !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px 16px !important;
    padding-right: 40px !important;
    cursor: pointer;
    color: var(--cc-text-main) !important;
}

#billing_state option[value=""],
#billing_city option[value=""],
#shipping_state option[value=""],
#shipping_city option[value=""] {
    color: #94a3b8;
}

/* ─────────────────────────────────────────────────
   Custom Searchable Select Component
───────────────────────────────────────────────── */
.cc-searchable-wrap {
    position: relative;
    width: 100%;
}

/* The clickable display box */
.cc-searchable-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 40px 0 16px;
    /* Increased right padding to accommodate absolute icons */
    border: 1px solid var(--cc-border-color);
    border-radius: 8px;
    background: var(--cc-bg-input);
    cursor: pointer;
    font-size: 14px;
    color: var(--cc-text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
    position: relative;
    /* Added for absolute children */
}

.cc-searchable-display:hover {
    border-color: var(--cc-primary-color);
}

.cc-searchable-wrap.cc-open .cc-searchable-display {
    border-color: var(--cc-primary-color);
    box-shadow: 0 0 0 3px var(--cc-primary-alpha);
}

.cc-current-val {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--cc-text-main);
}

/* Arrow icon - small inline */
.cc-arrow {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: var(--cc-text-muted);
    transition: transform 0.2s ease;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.cc-searchable-wrap.cc-open .cc-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Hide Select2 clear button if it leaks into our custom wrap */
.cc-searchable-wrap .select2-selection__clear {
    display: none !important;
}

/* Dropdown panel - HIDDEN by default */
.cc-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--cc-border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    overflow: hidden;
}

/* Show panel only when open */
.cc-searchable-wrap.cc-open .cc-dropdown-panel {
    display: block;
}

.cc-search-input-wrap {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    gap: 8px;
}

/* Search icon - small inline */
.cc-search-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: var(--cc-text-muted);
}

.cc-search-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    height: auto !important;
    padding: 0 !important;
    font-size: 13px !important;
    color: var(--cc-text-main) !important;
    background: transparent !important;
}

.cc-results-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 240px;
    overflow-y: auto;
}

.cc-result-item {
    padding: 10px 16px;
    font-size: 13px;
    cursor: pointer;
    color: var(--cc-text-main);
    transition: background 0.15s;
}

.cc-result-item:hover {
    background: var(--cc-primary-alpha);
    color: var(--cc-primary-color);
}

.cc-result-item.cc-selected {
    background: var(--cc-primary-alpha);
    color: var(--cc-primary-color);
    font-weight: 600;
}

.cc-result-item.cc-no-results {
    color: var(--cc-text-muted);
    cursor: default;
    font-style: italic;
}

.cc-result-item.cc-no-results:hover {
    background: transparent;
    color: var(--cc-text-muted);
}

.select2-container--default .select2-selection--single {
    width: 100% !important;
    max-width: 100% !important;
    height: 48px !important;
    border: 1px solid var(--cc-border-color) !important;
    border-radius: 8px !important;
    background-color: var(--cc-bg-input) !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    padding: 0 !important;
}

/* Ensure placeholder alignment */
.woocommerce-checkout .form-row input.input-text::placeholder {
    color: #94a3b8;
}

.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row select:focus,
.woocommerce-checkout .form-row textarea:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
    outline: none !important;
    border-color: var(--cc-primary-color) !important;
    box-shadow: 0 0 0 3px var(--cc-primary-alpha) !important;
}

/* ─── Grouped Address Block (iOS Settings style) ─── */
.cc-address-fields,
.cc-address-1-wrapper,
.cc-shipping-address-fields,
.cc-shipping-address1-wrapper {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
}

/* Outer wrapper that groups all address rows */
.cc-card-body .cc-address-fields {
    margin-top: 16px;
}

/* Visually group address-fields + address-1-wrapper as one block */
.cc-address-fields+.cc-address-1-wrapper,
.cc-shipping-address-fields+.cc-shipping-address1-wrapper {
    margin-top: 0;
}

/* The unified group container - now just a grid with gap */
.cc-address-fields,
.cc-shipping-address-fields {
    border: none;
    border-radius: 0;
    overflow: visible;
    padding: 0;
    margin-top: 16px;
    background: transparent;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    /* Added gap between columns */
}

.cc-address-1-wrapper,
.cc-shipping-address1-wrapper {
    border: 1px solid var(--cc-border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--cc-bg-input);
    margin-top: 8px;
}

/* Individual field rows - removed internal border-bottom */
.cc-address-fields .form-row,
.cc-shipping-address-fields .form-row {

    border-radius: 12px !important;
    background: var(--cc-bg-input) !important;
    margin: 0 !important;
    overflow: visible;
    /* Changed from hidden to show dropdown list */
}

/* Each column separated - removed redundant internal borders */


/* Searchable display in grouped rows - flush, no outer radius */
.cc-address-fields .cc-searchable-display,
.cc-shipping-address-fields .cc-searchable-display {
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    height: 52px;
    padding: 0 40px 0 14px;
}

.cc-address-fields .cc-searchable-wrap,
.cc-shipping-address-fields .cc-searchable-wrap {
    border-radius: 0;
}

/* Top-left field: now full radius */
.cc-address-fields .form-row .cc-searchable-display,
.cc-shipping-address-fields .form-row .cc-searchable-display {
    border-radius: 12px !important;
}

/* Focus ring inside grouped fields */
.cc-address-fields .cc-searchable-wrap.cc-open .cc-searchable-display,
.cc-shipping-address-fields .cc-searchable-wrap.cc-open .cc-searchable-display {
    background: var(--cc-primary-alpha) !important;
    box-shadow: none !important;
}

/* Bottom address_1 input: flush, no border, only radius on bottom */
.cc-address-1-wrapper .form-row,
.cc-shipping-address1-wrapper .form-row {
    margin: 0 !important;
    padding: 0 !important;
}

.cc-address-1-wrapper input.input-text,
.cc-shipping-address1-wrapper input.input-text {
    border: none !important;
    border-radius: 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    height: 52px !important;
    padding: 0 16px !important;
}

.cc-address-1-wrapper input.input-text:focus,
.cc-shipping-address1-wrapper input.input-text:focus {
    background: var(--cc-primary-alpha) !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

/* Dropdown panel must escape the overflow:hidden */
.cc-address-fields .cc-dropdown-panel,
.cc-shipping-address-fields .cc-dropdown-panel {
    z-index: 10000;
}

.cc-full-width-field {
    grid-column: 1 / -1;
}

@media (max-width: 600px) {

    .cc-address-fields,
    .cc-shipping-address-fields {
        grid-template-columns: 1fr;
        border-radius: 12px 12px 0 0;
    }

    .cc-address-fields .form-row:nth-child(1),
    .cc-shipping-address-fields .form-row:nth-child(1) {
        border-right: none !important;
        border-bottom: 1px solid var(--cc-border-color) !important;
    }

   
}

/* Store Address Styling */
.cc-store-box {
    background-color: var(--cc-bg-address);
    border: 1px solid var(--cc-border-color);
    padding: 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 10px;
}

/* Multiple Store Selection */
.cc-store-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.cc-store-item {
    position: relative;
    cursor: pointer;
    display: block;
}

.cc-store-item input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.cc-store-item-inner {
    padding: 16px;
    border: 1px solid var(--cc-border-color);
    border-radius: 10px;
    background: #fff;
    transition: all 0.2s ease;
}

.cc-store-item.active .cc-store-item-inner {
    border-color: var(--cc-primary-color);
    background: var(--cc-primary-alpha);
    box-shadow: 0 0 0 1px var(--cc-primary-color);
}

.cc-store-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--cc-text-main);
    margin-bottom: 4px;
}

.cc-store-address-text {
    font-size: 13px;
    color: var(--cc-text-muted);
    line-height: 1.4;
    margin-bottom: 4px;
}

.cc-store-hotline {
    font-size: 12px;
    font-weight: 600;
    color: var(--cc-primary-color);
}

/* Custom Radio Buttons */
.cc-shipping-methods {
    display: flex;
    gap: 30px;
    margin-bottom: 15px;
}

.cc-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
}

.cc-radio-label input[type="radio"] {
    display: none;
}

.cc-radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    transition: all 0.2s ease;
}

.cc-radio-label input[type="radio"]:checked+.cc-radio-custom {
    border-color: var(--cc-primary-color);
}

.cc-radio-label input[type="radio"]:checked+.cc-radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--cc-primary-color);
    border-radius: 50%;
}

/* Textarea & char count */
.cc-textarea-wrap {
    position: relative;
}

.woocommerce-checkout .form-row textarea {
    min-height: 100px;
    resize: vertical;
}

.cc-char-counter {
    text-align: right;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 5px;
}

/* Select2 Customization */
.select2-container--default .select2-selection--single {
    height: 48px;
    border: 1px solid var(--cc-border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--cc-text-muted);
    font-size: 14px !important;
    padding-left: 16px !important;
    line-height: 46px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    right: 10px !important;
    display: flex !important;
    align-items: center !important;
}

/* ─── Card Ưu đãi (Coupon) ─── */
.cc-coupon-card {
    padding: 16px 20px !important;
    cursor: pointer;
    transition: all 0.2s ease;

}

.cc-coupon-card:hover {
    border-color: var(--cc-primary-color);
}

.cc-coupon-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cc-coupon-left,
.cc-coupon-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cc-coupon-left span {
    font-weight: 600;
    font-size: 15px;
    color: var(--cc-text-main);
}

.cc-icon-ticket {
    width: 32px;
    height: 32px;
    fill: var(--cc-primary-color);
    background: var(--cc-primary-alpha);
    padding: 6px;
    border-radius: 8px;
    box-sizing: border-box;
}

.cc-payment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--cc-primary-alpha);
    border-radius: 8px;
    margin-right: 10px;
    flex-shrink: 0;
}

.cc-payment-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--cc-primary-color);
}

.cc-coupon-right {
    gap: 4px;
    color: var(--cc-text-muted);
}

.cc-coupon-right span {
    font-size: 14px;
}

.cc-icon-arrow {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.cc-coupon-input-wrap {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px dashed var(--cc-border-color);
}

.cc-coupon-input-wrap input {
    flex: 1;
    height: 40px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
}

.cc-coupon-input-wrap button {
    height: 40px !important;
    padding: 0 15px !important;
    background: var(--cc-primary-color) !important;
    color: white !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

/* ─── Cột phải: Card Chi tiết thanh toán ─── */
.cc-summary-card {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cc-divider {
    border: none;
    border-top: 1px solid var(--cc-border-color);
    margin: 16px 0;
}

.cc-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--cc-text-main);
    margin: 0 0 12px 0;
}

/* Bảng tổng tiền gọn gàng hơn */
.cc-totals-table {
    width: 100% !important;
}

.cc-totals-table tr td,
.cc-totals-table tr th {
    padding: 8px 0 !important;
    border: none !important;
}

.cc-totals-table th {
    text-align: left !important;
    font-weight: 500 !important;
    color: var(--cc-text-muted) !important;
    font-size: 14px !important;
}

.cc-totals-table td {
    text-align: right !important;
    font-weight: 600 !important;
    color: var(--cc-text-main) !important;
    font-size: 14px !important;
}

.cc-totals-table .order-total {
    margin-top: 8px;
    border-top: 1px solid var(--cc-border-color) !important;
}

.cc-totals-table .order-total th {
    padding-top: 16px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--cc-text-main) !important;
}

.cc-totals-table .order-total td {
    padding-top: 16px !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--cc-danger) !important;
}

/* Tỷ lệ cột: Sản phẩm chiếm phần lớn, 3 cột còn lại cố định */
.cc-product-table th.cc-h-remove,
.cc-product-table td.cc-td-remove {
    width: 44px;
    text-align: center;
    padding: 0 8px;
}

.cc-product-table th.cc-h-product,
.cc-product-table td.cc-td-product {
    width: auto;
}

.cc-product-table th.cc-h-unit-price,
.cc-product-table td.cc-td-price {
    width: 130px;
    text-align: center;
}

.cc-product-table th.cc-h-qty,
.cc-product-table td.cc-td-qty {
    width: 140px;
    text-align: center;
}

.cc-product-table th.cc-h-total,
.cc-product-table td.cc-td-total {
    width: 130px;
    text-align: right;
}

/* Header row */
tr.cc-custom-header th {
    background: #f8fafc;
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cc-text-muted);
    border-bottom: 1px solid var(--cc-border-color);
}

/* Product Table Responsiveness */
@media (max-width: 768px) {

    .cc-product-table,
    .cc-product-table thead,
    .cc-product-table tbody,
    .cc-product-row {
        display: block;
        width: 100% !important;
    }

    .cc-product-table thead tr {
        display: flex !important;
        background: #f8fafc !important;
        justify-content: space-between !important;
        padding: 10px 12px !important;
        border-bottom: 1px solid var(--cc-border-color) !important;
    }

    .cc-product-table thead tr th {
        display: none !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
    }

    .cc-product-table thead tr th:first-child,
    .cc-product-table thead tr th:last-child {
        display: block;
        font-size: 13px !important;
        font-weight: 600 !important;
        color: var(--cc-text-main) !important;
    }

    tr.cc-product-row {
        display: flex !important;
        padding: 16px 0 !important;
        gap: 16px !important;
        align-items: flex-start !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    tr.cc-product-row td {
        display: none !important;
    }

    tr.cc-product-row td.cc-td-remove {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 0 !important;
        margin-top: 15px;
        /* align with image */
    }

    tr.cc-product-row td.cc-td-product {
        display: flex !important;
        flex: 1 !important;
        width: 100% !important;
        padding: 0 !important;
        border: none !important;
        gap: 16px !important;
    }

    tr.cc-product-row:last-child {
        border-bottom: none;
    }

    .cc-item-thumb {
        flex: 0 0 60px !important;
        width: 60px !important;
        height: 60px !important;
    }

    .cc-item-thumb img {
        width: 60px !important;
        height: 60px !important;
        border-radius: 8px !important;
        object-fit: contain !important;
        background: #f8fafc !important;
        border: 1px solid #f1f5f9 !important;
    }

    .cc-item-info {
        flex: 1 !important;
        margin-bottom: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        min-width: 0 !important;
    }

    .cc-item-name-mobile {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: var(--cc-text-main) !important;
        line-height: 1.4 !important;
        margin-bottom: 2px !important;
        display: block;
    }

    .cc-item-meta-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-top: 8px !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
    }

    .cc-item-qty-mobile {
        font-size: 13px !important;
        color: var(--cc-text-muted) !important;
        font-weight: 500 !important;
        flex-shrink: 0 !important;
    }

    .cc-item-price-mobile {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: var(--cc-danger) !important;
        text-align: left !important;
        flex-grow: 1 !important;
    }

    .cc-item-price-mobile del {
        font-size: 11px !important;
        color: #94a3b8 !important;
        text-decoration: line-through !important;
        margin-left: 8px !important;
        font-weight: 400 !important;
    }

    tr.cc-product-row td.cc-td-total {
        grid-area: total;
        text-align: right !important;
        font-size: 15px;
        font-weight: 700 !important;
        color: var(--cc-danger) !important;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-start;
        padding-top: 0 !important;
        min-width: 100px;
    }

    /* Remove the old qty selector logic */
    .cc-item-info::after {
        display: none !important;
    }
}

/* 📱 Compact Mode for Right Column - Prevent Table Breaking */
.cc-right-col .cc-product-card .cc-product-table,
.cc-right-col .cc-product-card .cc-product-table thead,
.cc-right-col .cc-product-card .cc-product-table tbody,
.cc-right-col .cc-product-card tr.cc-product-row {
    display: block;
    width: 100% !important;
}

.cc-right-col .cc-product-card .cc-product-table thead tr {
    display: flex !important;
    background: #f8fafc !important;
    justify-content: space-between !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid var(--cc-border-color) !important;
}

.cc-right-col .cc-product-card .cc-product-table thead tr th {
    display: none !important;
}

.cc-right-col .cc-product-card .cc-product-table thead tr th.cc-h-product,
.cc-right-col .cc-product-card .cc-product-table thead tr th.cc-h-total {
    display: block;
    font-size: 13px !important;
    font-weight: 600 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.cc-right-col .cc-product-card tr.cc-product-row {
    display: flex !important;
    padding: 16px 0 !important;
    gap: 12px !important;
    align-items: flex-start !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.cc-right-col .cc-product-card tr.cc-product-row td {
    display: none !important;
    padding: 0 !important;
    border: none !important;
}

.cc-right-col .cc-product-card tr.cc-product-row td.cc-td-remove {
    display: flex !important;
    width: 32px !important;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.cc-right-col .cc-product-card tr.cc-product-row td.cc-td-product {
    display: flex !important;
    flex: 1 !important;
    gap: 12px !important;
    padding: 0 !important;
}

.cc-right-col .cc-product-card .cc-item-thumb {
    flex: 0 0 var(--cc-prod-img-size, 64px) !important;
    width: var(--cc-prod-img-size, 64px) !important;
    height: var(--cc-prod-img-size, 64px) !important;
}

.cc-right-col .cc-product-card .cc-item-thumb img {
    width: var(--cc-prod-img-size, 64px) !important;
    height: var(--cc-prod-img-size, 64px) !important;
    border-radius: 8px !important;
}

.cc-right-col .cc-product-card .cc-item-info {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    min-width: 0 !important;
}

.cc-right-col .cc-product-card .cc-item-name {
    display: none !important;
}

.cc-right-col .cc-product-card .cc-item-name-mobile {
    font-size: var(--cc-prod-font-size, 14px) !important;
    font-weight: 600 !important;
    display: block;
    color: var(--cc-text-main) !important;
    line-height: 1.4 !important;
}

.cc-right-col .cc-product-card .cc-item-meta-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 8px !important;
    gap: 10px !important;
}

.cc-right-col .cc-product-card .cc-checkout-qty-picker {
    display: flex !important;
}

.cc-right-col .cc-product-card .cc-item-price-mobile {
    display: block;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--cc-danger) !important;
}

/* Fix for existing table structure if needed */
.cc-right-col .cc-product-card td.cc-td-total {
    display: none !important;
    /* Hide the table total cell */
}

tr.cc-custom-header th.cc-h-product {
    padding-left: 0;
}

tr.cc-custom-header th.cc-h-total {
    padding-right: 0;
}

/* Product rows */
tr.cc-product-row {
    border-bottom: 1px solid var(--cc-border-color);
}

tr.cc-product-row:last-child {
    border-bottom: none;
}

tr.cc-product-row td {
    padding: 16px 8px;
    vertical-align: middle;
    font-size: 14px;
    color: var(--cc-text-main);
    font-weight: 600;
}

tr.cc-product-row td.cc-td-product {
    padding-left: 0;
}

tr.cc-product-row td.cc-td-total {
    padding-right: 0;
}

/* Image + Name wrapper */
.cc-item-product-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.cc-item-thumb img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--cc-border-color);
    display: block;
    flex-shrink: 0;
}

.cc-item-info {
    flex: 1;
    min-width: 0;
}

.cc-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--cc-text-main);
    line-height: 1.45;
    /* Truncate to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cc-item-meta-row {
    display: none;
}

/* ─── Cart Management in Checkout ─── */
.cc-checkout-item-actions {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.cc-checkout-qty-picker {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cc-qty-btn {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px solid #d1d5db;
    background: #fff !important;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
    line-height: 1;
    padding: 0 !important;
    box-shadow: none !important;
}

.cc-qty-btn:hover {
    border-color: var(--cc-primary-color);
    color: var(--cc-primary-color);
}

.cc-qty-input {
    width: 30px;
    flex-shrink: 0;
    text-align: center;
    border: none !important;
    font-weight: 700;
    font-size: 16px;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--cc-text-main) !important;
    pointer-events: none;
    margin: 0 !important;
}

.cc-item-remove {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 50%;
    margin: 0 !important;
    box-shadow: none !important;
    width: 32px;
    height: 32px;
    /* CSS-only trash icon - immune to WordPress sanitization */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d1d5db'%3E%3Cpath d='M6,19c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V7H6V19z M19,4h-3.5l-1-1h-5l-1,1H5v2h14V4z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 18px 18px !important;
}

.cc-item-remove:hover {
    background-color: #fef2f2 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ef4444'%3E%3Cpath d='M6,19c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V7H6V19z M19,4h-3.5l-1-1h-5l-1,1H5v2h14V4z'/%3E%3C/svg%3E") !important;
}

.cc-item-remove svg {
    display: none;
}

/* Remove column sizing */
.cc-td-remove,
.cc-h-remove {
    width: 44px !important;
    text-align: center;
    padding-left: 0 !important;
    padding-right: 4px !important;
}

/* Loading state */
.cc-product-card {
    position: relative;
    transition: opacity 0.3s ease;
}

.cc-product-card.cc-loading {
    opacity: 0.6;
    pointer-events: none;
}

.cc-product-card.cc-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid var(--cc-primary-alpha);
    border-top-color: var(--cc-primary-color);
    border-radius: 50%;
    animation: cc-spin 0.8s linear infinite;
    z-index: 10;
}

@keyframes cc-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .cc-checkout-item-actions {
        justify-content: flex-start;
        gap: 8px;
    }

    .cc-checkout-qty-picker {
        padding: 1px;
    }

    .cc-checkout-qty-picker .cc-qty-btn {
        width: 26px;
        height: 26px;
    }

    .cc-checkout-qty-picker .cc-qty-input {
        width: 30px !important;
        font-size: 13px !important;
    }

    .cc-item-remove {
        padding: 4px !important;
    }
}

/* Price cell */
td.cc-td-price {
    font-size: 14px;
    font-weight: 500;
    color: var(--cc-text-main);
}

td.cc-td-price .cc-item-unit-price {
    display: block;
    text-align: center;
}

/* Qty cell */
td.cc-td-qty {
    color: var(--cc-text-muted);
    font-weight: 500;
}

/* Total cell */
td.cc-td-total {
    font-weight: 700 !important;
    color: var(--cc-danger) !important;
    font-size: 14px;
}

/* Separate Totals Table Style */
.cc-totals-table {
    width: 100% !important;
    border-top: 1px solid var(--cc-border-color) !important;
    margin: 15px 0 !important;
}

.cc-totals-table th {
    text-align: left !important;
    padding: 8px 0 !important;
    font-weight: 500 !important;
    color: var(--cc-text-muted) !important;
    font-size: 13px !important;
}

.cc-totals-table td {
    text-align: right !important;
    padding: 8px 0 !important;
    font-weight: 600 !important;
    color: var(--cc-text-main) !important;
    font-size: 14px !important;
}

.cc-totals-table .order-total th {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--cc-text-main) !important;
}

.cc-totals-table .order-total td {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--cc-danger) !important;
}

/* Coupon Card Styling */
.cc-coupon-card {
    cursor: pointer;
    background: #fdfdfd;
    transition: all 0.2s ease;
    padding: 18px !important;
}

.cc-coupon-card:hover {
    border-color: var(--cc-primary-color);
}

.cc-coupon-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cc-coupon-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 15px;
    color: var(--cc-text-main);
}

.cc-icon-ticket {
    width: 32px;
    height: 32px;
    fill: var(--cc-primary-color);
    background: var(--cc-primary-alpha);
    padding: 6px;
    border-radius: 8px;
    box-sizing: border-box;
}

.cc-coupon-right {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--cc-primary-color);
    font-size: 13px;
    font-weight: 600;
}

.cc-icon-arrow {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.cc-coupon-input-wrap {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px dashed var(--cc-border-color);
}

.cc-coupon-input-wrap input {
    flex: 1;
    height: 42px !important;
    font-size: 13px !important;
    border-radius: 8px;
    background: #F3F4F6;
    color: #000;

}

.cc-coupon-input-wrap button {
    background: var(--cc-text-main);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 15px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* Responsive adjustments & Overrides */
@media (max-width: 991px) {
    .woocommerce-checkout .form-row {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        float: none !important;
    }

    .cc-shipping-methods {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    form.woocommerce-checkout {
        padding: 15px 10px;
    }

    .cc-card,
    .woocommerce-checkout-review-order {
        padding: 16px 12px;
    }

    .cc-page-title {
        font-size: 20px;
        padding-left: 5px;
    }

    .cc-coupon-input-wrap {
        flex-direction: column;
    }

    .cc-coupon-input-wrap button {
        width: 100%;
    }
}

/* Source hidden helper */
.cc-hidden-source {
    display: none !important;
}

/* Payment Methods (in Summary Card) */
.cc-summary-card ul.payment_methods {
    list-style: none;
    padding: 0;
    margin: 0 0 4px 0;
}

.cc-summary-card ul.payment_methods li {
    margin-bottom: 10px;
    font-size: 12px;
    padding: 14px;
    border: 1px solid var(--cc-border-color);
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s ease;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 12px;
}

.cc-summary-card ul.payment_methods li input[type="radio"] {
    margin: 0 !important;
    flex-shrink: 0;
    accent-color: var(--cc-primary-color);
}

.cc-summary-card ul.payment_methods li:has(input:checked) {
    border-color: var(--cc-primary-color);
    background: var(--cc-primary-alpha);
}

.cc-summary-card ul.payment_methods li label {
    display: flex !important;
    align-items: center !important;
    font-weight: 600;
    cursor: pointer;
    margin: 0 !important;
    padding: 0 !important;
    gap: 8px;
    flex: 1;
}

.cc-summary-card ul.payment_methods li .payment_box {
    width: 100% !important;
    background: #f8fafc;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--cc-text-muted);
    line-height: 1.5;
}

/* Hide raw #payment source - nội dung đã clone vào cc-summary-card */
#payment {
    padding: 0px !important;
    border: 0px solid var(--bricks-border-color) !important;
}


/* Button Styling */
#place_order {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 18px !important;
    width: 100% !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-top: 10px !important;
    line-height: 1em;
}

#place_order:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 15px rgba(34, 197, 94, 0.4) !important;
    filter: brightness(1.05);
}

.cc-payment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f0fdf4;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    margin-right: 10px;
    flex-shrink: 0;
}

.cc-payment-icon svg {
    width: 20px !important;
    height: 20px !important;
}

/* Loading state for update_checkout */
.cc-updating {
    opacity: 0.6;
    pointer-events: none;
}

/* ─── VAT Invoice Card ─── */


.cc-vat-header {
    padding: 10px 0;
}

.cc-vat-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    width: 100%;
}

.cc-vat-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--cc-text-main);
}

/* Switch Toggle */
.cc-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.cc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    transition: .3s;
    border-radius: 24px;
}

.cc-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

input:checked+.cc-slider {
    background-color: var(--cc-primary-color);
}

input:checked+.cc-slider:before {
    transform: translateX(20px);
}

/* Fix Select2 font for Vietnamese accents */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-results__option,
.select2-container--default .select2-search__field,
.select2-dropdown {
    font-family: 'Inter', sans-serif !important;
}


.cc-vat-details {
    padding-top: 20px;
    margin-top: 15px;
    border-top: 1px dashed var(--cc-border-color);
}

/* Hide original VAT checkbox row */
#cc_vat_checkbox_field {
    display: none !important;
}

/* ─── Buy Now Button ─── */
.cc-buy-now-wrapper {
    flex-basis: 100%;
    width: 100%;
    margin-top: 15px !important;
    display: block;
    clear: both;
}

.cc-buy-now-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 48px !important;
    border: none !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.2) !important;
}

.cc-buy-now-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 15px rgba(34, 197, 94, 0.3) !important;
    filter: brightness(1.05);
}

/* ─── Searchable Select Component (Removed) ─── */
.cc-original-select {
    display: block;
}

@keyframes cc-fade-up {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cc-buy-now-btn:active {
    transform: translateY(0) !important;
}

/* Adjust mobile layout for Buy Now */
@media (max-width: 480px) {
    .cc-buy-now-btn {
        height: 48px !important;
        font-size: 15px !important;
    }
}

/* ─── Processing Popup ─── */
.cc-processing-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.cc-processing-content {
    background: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    animation: cc-fade-up 0.3s ease;
}

.cc-processing-content p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--cc-text-main);
}

.cc-spinner {
    width: 50px;
    height: 50px;
    border: 2px solid var(--cc-primary-color);
    border-top: 2px solid var(--cc-primary-color);
    border-radius: 50%;
    animation: cc-spin 0.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    position: relative;
}

.cc-spinner::after {
    content: "";
    position: absolute;
    inset: -10px;
    border: 1px solid var(--cc-primary-color);
    border-top: 1px var(--cc-primary-color);
    border-radius: 50%;
    animation: cc-spin 1.2s linear infinite;
}

@keyframes cc-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ─── Inline Variation Meta ─── */
.wc-item-meta,
dl.variation {
    list-style: none !important;
    padding: 0 !important;
    margin: 5px 0 0 0 !important;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wc-item-meta li,
.wc-item-meta .wc-item-meta-li {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* For ul.wc-item-meta */
ul.wc-item-meta {
    margin-left: 0 !important;
}

ul.wc-item-meta li::before,
ul.wc-item-meta li::marker {
    display: none !important;
    content: "" !important;
}

.wc-item-meta strong,
.wc-item-meta .wc-item-meta-label,
dl.variation dt {
    font-weight: 600;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--cc-text-muted);
    float: none !important;
    clear: none !important;
}

/* Hide the trailing colon sometimes injected by woo natively inside p or dt */
.wc-item-meta p,
dl.variation dd,
dl.variation dd p {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--cc-text-main);
    display: inline-block;
}

dl.variation {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
}

/* ─── Live Data Validation ─── */
.woocommerce-checkout .form-row .woocommerce-input-wrapper {
    position: relative;
}

.woocommerce-checkout .form-row .woocommerce-input-wrapper.cc-valid-field::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2310b981'%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M9.7 17L4.5 11.8L5.9 10.4L9.7 14.2L18.1 5.8L19.5 7.2L9.7 17Z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    animation: cc-pop-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    z-index: 10;
}

.woocommerce-checkout .form-row .woocommerce-input-wrapper.cc-invalid-field::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ef4444'%3E%3Cpath d='M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    animation: cc-pop-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    z-index: 10;
}

@keyframes cc-pop-in {
    0% {
        transform: translateY(-50%) scale(0);
        opacity: 0;
    }

    100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

/* Ensure padding-right on valid/invalid inputs so text doesn't overlap icon */
.woocommerce-checkout .form-row .woocommerce-input-wrapper.cc-valid-field input,
.woocommerce-checkout .form-row .woocommerce-input-wrapper.cc-invalid-field input {
    padding-right: 40px !important;
}

.woocommerce-checkout .form-row .woocommerce-input-wrapper.cc-invalid-field input {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* ?? Premium Payment Methods Styling */
.cc-payment-card .cc-card-title {
    margin-bottom: 20px !important;
}

ul.payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

li.wc_payment_method {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s;
    background: #fff;
    overflow: hidden;
}

li.wc_payment_method>label {
    display: flex !important;
    align-items: center !important;
    padding: 16px !important;
    cursor: pointer !important;
    gap: 12px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    color: var(--cc-text-main) !important;
    font-size: 14px !important;
}



.cc-payment-icon {
    width: 44px;
    height: 44px;
    background: #f0fdf4;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cc-primary);
    flex-shrink: 0;
    transition: all 0.2s;
}

.cc-payment-icon svg {
    width: 24px;
    height: 24px;
}

li.wc_payment_method:has(input:checked) {
    border-color: var(--cc-primary);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

li.wc_payment_method:has(input:checked) .cc-payment-icon {
    background: var(--cc-primary);
    color: #fff;
}

div.payment_box {
    background: #f8fafc !important;
    margin: 0 16px 16px 16px !important;
    padding: 16px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    color: #475569 !important;
    line-height: 1.6 !important;
    border: none !important;
    position: relative;
}

div.payment_box::before {
    display: none !important;
}

div.payment_box p {
    margin: 0 !important;
}

@media (max-width: 480px) {
    li.wc_payment_method>label {
        padding: 12px !important;
        font-size: 13px !important;
    }

    .cc-payment-icon {
        width: 38px;
        height: 38px;
    }
}

/* ?? Updated Payment Methods Fix */
li.wc_payment_method {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    background: #fff !important;
    padding: 0 !important;
    transition: border-color 0.2s !important;
}

li.wc_payment_method>input[type=radio] {
    margin-left: 16px !important;
    margin-right: 0 !important;
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
   
}

li.wc_payment_method>label {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    padding: 10px !important;
    cursor: pointer !important;
    gap: 10px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    color: var(--cc-text-main) !important;
    margin: 0 !important;
}

.cc-payment-icon {
    width: 32px !important;
    height: 32px !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #94a3b8 !important;
    flex-shrink: 0 !important;
    transition: color 0.2s !important;
}

.cc-payment-icon svg {
    width: 24px !important;
    height: 24px !important;
}

li.wc_payment_method:has(input:checked) {
    border-color: var(--cc-primary) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

li.wc_payment_method:has(input:checked) .cc-payment-icon {
    color: var(--cc-primary) !important;
}

div.payment_box {
    width: 100% !important;
    background: #f8fafc !important;
    margin: 0 16px 16px 16px !important;
    padding: 16px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    color: #475569 !important;
    border: none !important;
    display: block;
}