/* WooCommerce Global & Checkout Styles */
.woocommerce {
    padding: 40px 0 80px;
    width: 100%;
}

/* Coupon Form */
.woocommerce-form-coupon-toggle {
    margin-bottom: 20px;
    font-size: 15px;
}

.woocommerce-form-coupon-toggle a {
    color: var(--red);
    font-weight: 600;
}

.woocommerce-form-coupon {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 40px;
    padding: 24px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid var(--border);
    clear: both;
    align-items: center;
}

.woocommerce-form-coupon p {
    margin: 0;
}

.woocommerce-form-coupon .form-row-first,
.woocommerce-form-coupon .form-row-last {
    width: auto !important;
    float: none !important;
}

.woocommerce-form-coupon .form-row-first {
    flex: 1;
    min-width: 250px;
}

.woocommerce-form-coupon .button {
    padding: 14px 24px;
    background: var(--red);
    color: #fff;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
}

.woocommerce-form-coupon .button:hover {
    background: #a31126;
}

/* Forms & Inputs */
/* 2-Column Form Layout (Desktop Only) */
@media (min-width: 768px) {

    .woocommerce form .form-row-first,
    .woocommerce form .form-row-last {
        width: 48%;
        float: left;
    }

    .woocommerce form .form-row-last {
        float: right;
    }

    .woocommerce form .form-row-wide {
        clear: both;
        width: 100%;
    }
}

.woocommerce-billing-fields__field-wrapper::after,
.woocommerce-shipping-fields__field-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

.woocommerce form .form-row {
    margin-bottom: 24px;
}

.woocommerce form .form-row label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woocommerce form .form-row label .required {
    color: var(--red);
    text-decoration: none;
    border: none;
    font-size: 16px;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.select2-container--default .select2-selection--single {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    height: auto;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.select2-container--default .select2-selection--single {
    padding: 12px 18px;
    height: 50px;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(227, 24, 55, 0.1);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 48px;
    right: 10px;
}

/* Checkout Layout */
.woocommerce-checkout .col2-set {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    width: 100%;
    margin-bottom: 0;
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
    width: 100%;
    float: none;
}

#customer_details {
    flex: 1;
    min-width: 300px;
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

#customer_details h3 {
    font-size: 24px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
    color: var(--text);
    font-weight: 800;
    position: relative;
    padding-left: 14px;
}

#customer_details h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 20px;
    background-color: var(--red-dark);
    border-radius: 4px;
}

#order_review_heading {
    font-size: 22px;
    margin-top: 40px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
    font-weight: 800;
    position: relative;
    padding-left: 16px;
}

#order_review_heading::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 4px;
    height: 20px;
    background-color: var(--red-dark);
    border-radius: 4px;
}

/* Order Review Table */
.woocommerce-checkout-review-order {
    background: #f9f9f9;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

table.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
    border: none;
    table-layout: auto;
}

table.shop_table th,
table.shop_table td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    border-top: none;
    border-right: none;
    border-left: none;
}

table.shop_table th {
    background: transparent;
    font-weight: 800;
    font-size: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

table.shop_table th.product-name,
table.shop_table td.product-name {
    text-align: left;
    word-break: normal;
}

table.shop_table th.product-total,
table.shop_table td.product-total {
    text-align: right;
    white-space: nowrap;
    /* Ensure price never wraps */
}

table.shop_table td.product-name {
    font-weight: 600;
    line-height: 1.5;
}

table.shop_table td.product-name img {
    max-width: 100px !important;
    height: auto;
    border-radius: 8px;
    float: left;
    margin-right: 16px;
    border: 1px solid var(--border);
}

table.shop_table td.product-name dl.variation,
table.shop_table td.product-name .wc-item-meta {
    margin: 8px 0 0;
    font-size: 14px;
    color: #444;
    font-weight: 500;
    display: inline-block;
    clear: none;
    background: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #eaeaea;
}

table.shop_table td.product-name dl.variation p,
table.shop_table td.product-name .wc-item-meta p {
    margin: 0;
    display: inline;
}

table.shop_table td.product-total .amount {
    font-weight: 700;
    color: var(--red);
}

table.shop_table tfoot th,
table.shop_table tfoot td {
    border-bottom: none;
    border-top: 1px solid var(--border);
    text-align: right;
}

table.shop_table tfoot th {
    text-align: left;
}

table.shop_table tfoot tr.order-total th,
table.shop_table tfoot tr.order-total td {
    font-size: 18px;
}

table.shop_table tfoot tr.order-total .amount {
    font-size: 22px;
    color: var(--red);
    font-weight: 800;
}

/* Payment Section */
#payment {
    background: transparent;
    border-radius: 8px;
    padding: 0;
    margin-top: 32px;
}

#payment ul.payment_methods {
    border-bottom: none;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

#payment ul.payment_methods li {
    padding: 16px;
    border: 1px solid var(--border);
    background: #fff;
    margin-bottom: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#payment ul.payment_methods li:last-child {
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

#payment div.payment_box {
    background: #f9f9f9;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    color: #555;
    position: relative;
    border: 1px solid #eaeaea;
}

#payment div.payment_box::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 20px;
    border: 5px solid transparent;
    border-bottom-color: #f5f5f5;
}

.place-order {
    padding: 0 !important;
}

.woocommerce-terms-and-conditions-wrapper,
.woocommerce-privacy-policy-text {
    margin-bottom: 24px;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

button#place_order {
    width: 100%;
    background: var(--red);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

button#place_order:hover {
    background: #c01026;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 24, 55, 0.3);
}

/* 2 Columns on Desktop */
@media (min-width: 992px) {
    form.woocommerce-checkout {
        display: flex;
        flex-wrap: wrap;
        gap: 40px;
        align-items: flex-start;
    }

    form.woocommerce-checkout form.checkout_coupon,
    form.woocommerce-checkout .woocommerce-NoticeGroup {
        width: 100%;
    }

    #customer_details {
        width: 55%;
        flex: none;
    }

    #order_review_heading {
        display: none;
        /* Hide because we style it inside the review block */
    }

    .woocommerce-checkout-review-order {
        width: calc(45% - 40px);
        flex: none;
        position: sticky;
        top: 100px;
    }
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
    table.shop_table {
        table-layout: auto;
    }

    table.shop_table th.product-name,
    table.shop_table td.product-name {
        width: 55%;
    }

    table.shop_table th.product-total,
    table.shop_table td.product-total {
        width: 45%;
    }

    table.shop_table tfoot tr.order-total .amount {
        font-size: 20px;
    }

    table.shop_table td.product-name img {
        max-width: 60px !important;
        margin-right: 12px;
    }

    table.shop_table td.product-name dl.variation,
    table.shop_table td.product-name .wc-item-meta {
        font-size: 13px;
        padding: 4px 8px;
    }

    .woocommerce-checkout .col2-set {
        gap: 24px;
    }

    #customer_details {
        padding: 20px 16px;
    }

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

/* Order Received Page - Premium Cohesive Layout */
.woocommerce-order {
    max-width: 100%;
    margin: -24px 0 40px;
    background: #fff;
    padding: 24px 48px 48px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

@media (min-width: 992px) {
    .woocommerce-order {
        display: grid;
        grid-template-columns: 1.6fr 1fr;
        gap: 0 40px;
        align-items: start;
    }

    .woocommerce-notice--success,
    ul.order_details,
    .woocommerce-vietqr-qr-scan,
    .woocommerce-vietqr-bank-details {
        grid-column: 1 / -1;
    }

    .woocommerce-order-details {
        grid-column: 1;
    }

    .woocommerce-customer-details {
        grid-column: 2;
    }
}

.woocommerce-notice--success {
    background: #e6f6ee;
    color: #008a3e;
    padding: 24px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    border: 1px solid #bce6d0;
    text-align: center;
}

.woocommerce-notice--success::before {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: #00a64c;
    color: #fff;
    border-radius: 50%;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(0, 166, 76, 0.3);
}

/* Order Summary Bar */
ul.order_details {
    display: flex;
    flex-wrap: wrap;
    background: #f9f9f9;
    border: 1px solid var(--border);
    border-radius: 12px;
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
    overflow: hidden;
}

ul.order_details li {
    flex: 1;
    min-width: 160px;
    padding: 24px;
    text-align: left;
    border-right: 1px solid var(--border);
    text-transform: uppercase;
    font-size: 13px;
    color: #666;
}

ul.order_details li:last-child {
    border-right: none;
}

ul.order_details li strong {
    display: block;
    font-size: 16px;
    color: var(--text);
    margin-top: 8px;
    text-transform: none;
    font-weight: 600;
    word-break: break-word;
}

ul.order_details li.method strong {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.4;
}

/* Sections as Premium Cards */
.woocommerce-order>section {
    margin-bottom: 40px;
    text-align: left;
}

/* VietQR Combined Premium Block */
.woocommerce-order>section.woocommerce-vietqr-qr-scan {
    background: #fffcfc;
    border: 2px dashed var(--red);
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    margin-bottom: 0;
    padding: 40px 40px 24px;
    box-shadow: none;
    text-align: center;
}

.woocommerce-order>section.woocommerce-vietqr-bank-details {
    background: #fffcfc;
    border: 2px dashed var(--red);
    border-top: none;
    border-radius: 0 0 16px 16px;
    margin-top: 0;
    padding: 0 40px 40px;
    margin-bottom: 40px;
    box-shadow: none;
    text-align: center;
}

/* Mobile Layout Fixes for Order Received */
@media (max-width: 768px) {
    .woocommerce-order {
        padding: 20px 16px !important;
        margin-bottom: 24px !important;
    }

    .woocommerce-order>section.woocommerce-vietqr-qr-scan {
        padding: 24px 16px 16px !important;
    }

    .woocommerce-order>section.woocommerce-vietqr-bank-details {
        padding: 0 16px 24px !important;
    }

    ul.order_details li {
        padding: 16px !important;
    }

    .woocommerce-notice--success {
        padding: 24px 16px;
        margin-bottom: 24px;
    }

    .woocommerce-table--order-details th,
    .woocommerce-table--order-details td {
        padding: 16px 12px !important;
    }

    .woocommerce-customer-details address {
        padding: 20px !important;
    }
}

.woocommerce-vietqr-qr-scan img {
    max-width: 280px;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    border: 1px solid #eaeaea;
}

.wc-vietqr-bank-details-heading {
    color: var(--text);
    font-weight: 800;
    margin-bottom: 24px;
    font-size: 22px;
}

.woocommerce-vietqr-bank-details h4 {
    background: #fff0f0;
    padding: 16px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 24px;
    font-weight: 600;
}

/* Fix the Ugly Bank Table */
.woocommerce-vietqr-bank-details table {
    width: 100% !important;
    max-width: 800px !important;
    border-collapse: collapse;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.woocommerce-vietqr-bank-details table td {
    text-align: left !important;
    padding: 16px 24px !important;
    border-bottom: 1px solid var(--border) !important;
    font-size: 16px;
}

.woocommerce-vietqr-bank-details table tr:last-child td {
    border-bottom: none !important;
}

.woocommerce-vietqr-bank-details table td:first-child {
    background: #fdfdfd;
    width: 40%;
}

.woocommerce-vietqr-bank-details table td strong,
.woocommerce-vietqr-bank-details table td span {
    color: var(--text) !important;
    font-weight: 600;
}

/* Remove default styles that clash */
.woocommerce-vietqr-bank-details table td.text-right {
    text-align: left !important;
}

/* Common Section Styles */
.woocommerce-order-details,
.woocommerce-customer-details {
    text-align: left;
    margin-bottom: 40px;
}

.woocommerce-order-details__title,
.woocommerce-column__title {
    font-size: 24px;
    margin-bottom: 24px;
    margin-top: 0;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
    font-weight: 800;
    position: relative;
    padding-left: 16px;
}

.woocommerce-order-details__title::before,
.woocommerce-column__title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 20px;
    background-color: var(--red-dark);
    border-radius: 4px;
}

/* Order Table */
.woocommerce-table--order-details {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 100%;
    overflow: hidden;
    border-collapse: collapse;
}

.woocommerce-table--order-details th,
.woocommerce-table--order-details td {
    padding: 20px 16px;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
}

.woocommerce-table--order-details th {
    background: #fdfdfd;
}

/* Customer Address Box */
.woocommerce-customer-details address {
    font-style: normal;
    background: #f9f9f9;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border);
    line-height: 1.8;
    font-size: 16px;
    color: #444;
}

.woocommerce-order p {
    font-size: 16px;
    color: #444;
    line-height: 1.6;
}

/* Overrides for page padding on checkout/order received */
@media (max-width: 991px) {
    .default-page {
        padding-top: 32px !important;
        padding-bottom: 32px !important;
    }
}

/* Mobile Adjustments for Order Received */
@media (max-width: 767px) {
    .woocommerce-order {
        padding: 24px 16px;
        margin: -16px 0 32px;
        /* Pull up closer to header on mobile */
        border-radius: 12px;
    }

    ul.order_details {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
    }

    ul.order_details li {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        text-align: left;
        padding: 16px;
    }

    ul.order_details li:last-child {
        border-bottom: none;
    }

    .woocommerce-bacs-bank-details {
        padding: 24px 16px;
    }
}

/* Woo Vietnam Checkout Specific Adjustments */
.devvn_checkout .form-row {
    width: 100% !important;
    float: none !important;
}

.devvn_checkout .form-row-first,
.devvn_checkout .form-row-last {
    width: 48% !important;
    float: left !important;
}

.devvn_checkout .form-row-last {
    float: right !important;
}

.devvn_checkout::after {
    content: "";
    display: table;
    clear: both;
}

/* Force Hide Country Field */
#billing_country_field,
#shipping_country_field {
    display: none !important;
}

/* Premium Checkout Processing Overlay */
.woocommerce form.checkout .blockUI.blockOverlay {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(4px) !important;
    opacity: 1 !important;
    z-index: 9999 !important;
    cursor: wait !important;
}

.woocommerce form.checkout .blockUI.blockOverlay::before {
    content: "";
    position: fixed;
    top: 45%;
    left: 50%;
    margin-left: -25px;
    margin-top: -25px;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(228, 30, 38, 0.15);
    border-top: 3px solid var(--red);
    border-radius: 50%;
    animation: hvh-spin 0.8s linear infinite;
    z-index: 10000;
}

.woocommerce form.checkout .blockUI.blockOverlay::after {
    content: "Đang xử lý đơn hàng...";
    position: fixed;
    top: calc(45% + 40px);
    left: 50%;
    transform: translateX(-50%);
    color: var(--red);
    font-weight: 700;
    font-size: 15px;
    z-index: 10000;
    background: #fff;
    padding: 6px 16px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(228, 30, 38, 0.15);
    letter-spacing: 0.3px;
}

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

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

/* Reset Woo Default Product Loop for Custom Card Integration */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

@media(min-width:768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media(min-width:1024px) {
    .woocommerce ul.products.columns-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

.woocommerce ul.products li.product {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    transition: none !important;
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

.woocommerce ul.products li.product:hover {
    transform: none !important;
    box-shadow: none !important;
}

.woocommerce ul.products li.product .product-card {
    height: 100%;
    margin-bottom: 0;
}

/* =========================================
   CLASSIC CART PAGE STYLING
========================================= */
.woocommerce-cart .woocommerce {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

/* WooCommerce Notices */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    flex: 1 1 100%;
    width: 100%;
    padding: 16px 24px;
    margin-bottom: 24px;
    border-radius: var(--radius);
    background: #fff;
    border-left: 4px solid #10b981;
    /* Default to success green */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    list-style: none;
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.woocommerce-error {
    border-left-color: var(--red);
}

.woocommerce-info {
    border-left-color: #3b82f6;
}

.woocommerce-message .button,
.woocommerce-error .button,
.woocommerce-info .button {
    background: #f9fafb;
    color: var(--text);
    padding: 8px 16px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.woocommerce-message .button:hover {
    background: var(--bg-secondary);
}

.woocommerce-cart .woocommerce-cart-form {
    flex: 1 1 55%;
    min-width: 0;
}

.woocommerce-cart .cart-collaterals {
    flex: 1 1 35%;
    min-width: 300px;
}

/* Cart Table */
.woocommerce table.shop_table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 24px;
}

.woocommerce table.shop_table th {
    background: #f9fafb;
    padding: 16px 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.woocommerce table.shop_table td {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.woocommerce table.shop_table tbody tr:last-child td {
    border-bottom: none;
}

.woocommerce table.cart .product-remove a {
    color: #ef4444;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    text-decoration: none;
    transition: transform 0.2s;
    display: inline-block;
}

.woocommerce table.cart .product-remove a:hover {
    transform: scale(1.2) rotate(90deg);
}

.woocommerce table.cart .product-thumbnail img {
    max-width: 80px;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.woocommerce table.cart .product-name a {
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
    text-decoration: none;
    transition: color 0.2s;
}

.woocommerce table.cart .product-name a:hover {
    color: var(--red);
}

.woocommerce table.cart .product-price,
.woocommerce table.cart .product-subtotal {
    font-weight: 700;
    color: var(--text);
}

/* Quantity Input */
.woocommerce .quantity {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.woocommerce .quantity input.qty {
    width: 50px;
    height: 36px;
    border: none;
    text-align: center;
    font-weight: 600;
    -moz-appearance: textfield;
    appearance: textfield;
}

.woocommerce .quantity input.qty::-webkit-outer-spin-button,
.woocommerce .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Coupon & Actions */
.woocommerce table.cart td.actions {
    background: #f9fafb;
    padding: 16px 20px;
}

.woocommerce table.cart td.actions .coupon {
    display: flex;
    gap: 10px;
    float: left;
}

.woocommerce table.cart td.actions .coupon input.input-text {
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    font-size: 14px;
    width: 200px;
    box-sizing: border-box;
}

.woocommerce table.cart td.actions .coupon input.input-text:focus {
    border-color: var(--red);
}

.woocommerce table.cart td.actions button {
    height: 44px;
    padding: 0 24px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.woocommerce table.cart td.actions .coupon button {
    background: #e5e7eb;
    color: var(--text);
    border: none;
}

.woocommerce table.cart td.actions .coupon button:hover {
    background: #d1d5db;
}

.woocommerce table.cart td.actions>button {
    float: right;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}

.woocommerce table.cart td.actions>button:hover {
    border-color: var(--text);
    background: #f9fafb;
}

/* Cart Totals */
.woocommerce .cart-collaterals .cart_totals {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    width: 100%;
}

.woocommerce .cart-collaterals .cart_totals h2 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.woocommerce .cart-collaterals table.shop_table {
    border: none;
    border-radius: 0;
    margin-bottom: 0;
}

.woocommerce .cart-collaterals table.shop_table th {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    color: var(--text);
    text-transform: none;
    font-size: 15px;
}

.woocommerce .cart-collaterals table.shop_table td {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    text-align: right;
}

.woocommerce .cart-collaterals .order-total th,
.woocommerce .cart-collaterals .order-total td {
    border-bottom: none;
    font-size: 18px;
    padding-top: 24px;
}

.woocommerce .cart-collaterals .order-total td {
    color: var(--red);
    font-weight: 800;
}

/* Proceed to Checkout Button */
.woocommerce .cart-collaterals .wc-proceed-to-checkout {
    margin-top: 24px;
}

.woocommerce .cart-collaterals .checkout-button {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--red);
    color: #fff;
    padding: 16px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.woocommerce .cart-collaterals .checkout-button:hover {
    background: #b91028;
    /* Darker red */
    transform: translateY(-2px);
    color: #fff;
}

/* Responsive Cart */
@media (max-width: 768px) {
    .woocommerce-cart .woocommerce {
        flex-direction: column;
    }

    .woocommerce-cart .woocommerce-cart-form,
    .woocommerce-cart .cart-collaterals {
        width: 100%;
        flex: 1 1 100%;
    }

    .woocommerce table.shop_table.cart th {
        display: none;
    }

    .woocommerce table.shop_table.cart tbody tr {
        display: block;
        padding: 16px;
        position: relative;
        border-bottom: 1px solid var(--border);
    }

    .woocommerce table.shop_table.cart td {
        display: block;
        text-align: right;
        padding: 10px 0;
        border-bottom: none;
    }

    .woocommerce table.shop_table.cart td::before {
        content: attr(data-title);
        float: left;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 12px;
        color: var(--text-muted);
    }

    .woocommerce table.cart .product-remove {
        position: absolute;
        top: 10px;
        right: 16px;
        padding: 0;
    }

    .woocommerce table.cart .product-thumbnail {
        text-align: center !important;
        margin-bottom: 10px;
    }

    .woocommerce table.cart .product-thumbnail::before {
        display: none;
    }

    .woocommerce table.cart .product-thumbnail img {
        max-width: 100px;
        margin: 0 auto;
    }

    .woocommerce table.cart td.actions {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .woocommerce table.cart td.actions .coupon {
        width: 100%;
        flex-direction: column;
    }

    .woocommerce table.cart td.actions .coupon input.input-text,
    .woocommerce table.cart td.actions .coupon button,
    .woocommerce table.cart td.actions>button {
        width: 100%;
    }
}