.ms-cart-page-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: var(--font-family);
}

.ms-cart-page-header {
    text-align: center;
    margin-bottom: 40px;
}

.ms-cart-page-header h1 {
    font-size: var(--h1);
    font-weight: 500;
    margin-bottom: 10px;
}

.ms-cart-page-header p {
    font-size: 14px;
    color: #555;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.ms-cart-page-header p::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 2px;
    background-color: #000;
}

/* Flex layout for cart content */
.ms-cart-page-wrapper > .ms-cart-form {
    float: left;
    width: 65%;
}

.ms-cart-collaterals {
    float: right;
    width: 30%;
}

.ms-cart-page-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* Left side: Cart Items */
.ms-cart-table {
    width: 100%;
}

.ms-cart-table-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 14px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.ms-cart-th-product { width: 50%; }
.ms-cart-th-qty { width: 25%; text-align: center; }
.ms-cart-th-total { width: 25%; text-align: right; }

.ms-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.ms-cart-td-product {
    width: 50%;
    display: flex;
    gap: 20px;
    align-items: center;
}

.ms-cart-td-product img {
    width: 60px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.ms-cart-product-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ms-cart-product-name a {
    font-weight: 700;
    color: #000;
    text-decoration: none;
    font-size: 15px;
}

.ms-cart-product-name dl.variation {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    display: flex;
    gap: 5px;
}

.ms-cart-product-price {
    font-size: 14px;
    color: #555;
}

.ms-cart-td-qty {
    width: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ms-cart-td-qty .quantity input.qty {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.ms-cart-remove-item {
    font-size: 12px;
    color: #888;
    text-decoration: underline;
}

.ms-cart-td-total {
    width: 25%;
    text-align: right;
    font-weight: 600;
    font-size: 15px;
}

.ms-cart-shipping-calculator {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.ms-cart-estimate-shipping summary {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    list-style: none;
}

.ms-cart-estimate-shipping summary::-webkit-details-marker {
    display: none;
}

.ms-cart-shipping-calculator-form {
    margin-top: 15px;
}

/* Right side: Cart Totals */
.ms-cart-collaterals .cart_totals {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 30px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.ms-cart-collaterals h2 {
    display: none; /* Hide default "Cart totals" heading */
}

.ms-cart-collaterals .shop_table {
    width: 100%;
    border-collapse: collapse;
}

.ms-cart-collaterals .shop_table th,
.ms-cart-collaterals .shop_table td {
    padding: 10px 0;
    text-align: right;
    border: none;
}

.ms-cart-collaterals .shop_table th {
    text-align: left;
    font-weight: 400;
    color: #555;
}

.ms-cart-collaterals .shop_table tr.cart-subtotal th,
.ms-cart-collaterals .shop_table tr.cart-subtotal td {
    font-size: 15px;
}

.ms-cart-collaterals .shop_table tr.order-total th,
.ms-cart-collaterals .shop_table tr.order-total td {
    font-size: 20px;
    font-weight: 600;
    padding-top: 20px;
}

.woocommerce-shipping-destination {
    font-size: 13px;
    color: #888;
    text-align: left;
    margin-top: 10px;
}

.woocommerce-shipping-calculator {
    display: none; /* Already showing in left column */
}

.woocommerce-checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px 20px;
    background-color: #111;
    color: #fff;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 20px;
    transition: background 0.3s;
}

.woocommerce-checkout-button:hover {
    background-color: #333;
    color: #fff;
}

.woocommerce-checkout-button::before {
    content: url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23fff" stroke-width="2"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0110 0v4"></path></svg>');
    width: 16px;
    height: 16px;
    display: inline-block;
}

/* Hide default checkout button, use our own styling over it */
.wc-proceed-to-checkout a.checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px 20px;
    background-color: #111;
    color: #fff;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 20px;
    transition: background 0.3s;
}

.wc-proceed-to-checkout a.checkout-button::before {
    content: url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23fff" stroke-width="2"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0110 0v4"></path></svg>');
    width: 16px;
    height: 16px;
    display: inline-block;
}

/* Payment Icons below checkout box */
.ms-cart-payment-icons {
    text-align: center;
    margin-top: 20px;
}

.ms-cart-tax-note--page {
    font-size: var(--fs-13);
    color: var(--text-muted);
    margin-top: 10px;
    margin-bottom: 20px;
}

.ms-cart-page-order-input {
    width: 100%;
    border: 1px solid var(--border-medium);
    border-radius: 6px;
    padding: 10px;
    font-family: var(--font-family);
    font-size: var(--fs-14);
    resize: none;
}

.ms-cart-payment-icons p {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

.ms-cart-payment-icons img {
    max-width: 100%;
    height: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .ms-cart-page-wrapper > .ms-cart-form,
    .ms-cart-collaterals {
        width: 100%;
        float: none;
    }

    .ms-cart-collaterals {
        margin-top: 40px;
    }

    .ms-cart-item {
        flex-direction: column;
        align-items: flex-start;
        position: relative;
    }

    .ms-cart-th-product, .ms-cart-th-qty, .ms-cart-th-total {
        display: none;
    }

    .ms-cart-td-product {
        width: 100%;
        margin-bottom: 20px;
    }

    .ms-cart-td-qty {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
    }

    .ms-cart-td-total {
        position: absolute;
        bottom: 20px;
        right: 0;
    }
}

/* Cart page empty state */
.ms-cart-page-empty {
    text-align: center;
    padding: 80px 20px;
    font-family: var(--font-family);
}
.ms-cart-page-empty svg {
    color: var(--border-medium);
    margin-bottom: 16px;
}
.ms-cart-page-empty strong {
    display: block;
    font-size: var(--fs-24);
    font-weight: 600;
    color: var(--text-gray-500);
    margin-bottom: 8px;
}
.ms-cart-page-empty span {
    display: block;
    font-size: var(--fs-16);
    color: var(--text-gray-600);
    margin-bottom: 24px;
}
.ms-cart-page-empty a {
    display: inline-block;
    padding: 14px 32px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: var(--fs-15);
    transition: opacity 0.2s;
}
.ms-cart-page-empty a:hover { opacity: 0.85; }
