.wc-proceed-to-checkout{
    padding: 16px 18px 18px;
}

.ws-cart-section{
    background-color: var(--gray);
    padding-top: 10px;
}

.ws-cart-section .ws-cart-page-panel {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.ws-cart-inner{
    padding: 18px;
    padding-top: 0;
}

.ws-cart-section .ws-cart-page-head {
    margin-bottom: 18px;
}

.ws-cart-section .ws-cart-page-title {
    margin: 0;
}

.ws-cart-section .ws-cart-inner,
.ws-cart-section .woocommerce:has(.cart_totals) {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1rem;
    align-items: start;
}

@media (max-width: 991px) {
    .ws-cart-section .ws-cart-inner,
    .ws-cart-section .woocommerce:has(.cart_totals) {
        grid-template-columns: 1fr;
    }
}

.ws-cart-section .ws-cart-list {
    background: #fff;
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.ws-cart-section .ws-cart-coupon {
    padding: 0.875rem 1rem;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

.ws-cart-section .ws-coupon-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.ws-cart-section .ws-coupon-form .input-text {
    padding: 0.625rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9375rem;
    min-width: 180px;
}

.ws-cart-section .ws-coupon-form .input-text:focus {
    outline: none;
    border-color: var(--primary);
}

.ws-cart-section .ws-cart-table,
.ws-cart-section .shop_table.cart {
    width: 100%;
    border: none;
    margin: 0;
}

.ws-cart-section .ws-cart-table thead,
.ws-cart-section .shop_table.cart thead {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.ws-cart-section .ws-cart-table th,
.ws-cart-section .shop_table.cart th {
    padding: 0.75rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border: none;
}

.ws-cart-section .ws-cart-table td,
.ws-cart-section .shop_table.cart td {
    padding: 0.875rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    background: #fff;
}

.ws-cart-section .ws-cart-table tbody tr:last-child td,
.ws-cart-section .shop_table.cart tbody tr:last-child td {
    border-bottom: none;
}

.ws-cart-section .product-remove a.remove,
.ws-cart-section .product-remove a.ws-cart-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #94a3b8 !important;
    font-size: 1.25rem;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s;
}

.ws-cart-section .product-remove a.remove:hover,
.ws-cart-section .product-remove a.ws-cart-remove:hover {
    background: #fee2e2;
    color: #dc2626 !important;
}

.ws-cart-section .product-thumbnail a,
.ws-cart-section .product-thumbnail img {
    display: block;
}

.ws-cart-section .product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.ws-cart-section .product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.ws-cart-section .product-name a {
    color: #1e293b;
    text-decoration: none;
}

.ws-cart-section .product-name a:hover {
    color: var(--primary);
}

.ws-cart-section .product-name .wc-block-components-product-name {
    font-size: inherit;
}

.ws-cart-section .product-price,
.ws-cart-section .product-subtotal {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.ws-cart-section .product-price del,
.ws-cart-section .product-subtotal del {
    color: #94a3b8;
    margin-right: 0.35em;
}

.ws-cart-section .product-quantity {
    width: 140px;
}

.ws-cart-section .product-quantity .quantity {
    display: inline-block;
    margin: 0;
}

.ws-cart-section .ws-quantity-selector {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    width: fit-content;
    height: 40px;
}

.ws-cart-section .ws-qty-btn {
    width: 40px;
    min-width: 40px;
    background: #f1f5f9;
    border: none;
    color: #475569;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.ws-cart-section .ws-qty-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.ws-cart-section .ws-qty-btn:active {
    background: #cbd5e1;
}

.ws-cart-section .ws-qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ws-cart-section .ws-qty-btn:disabled:hover {
    background: #f1f5f9;
    color: #475569;
}

.ws-cart-section .ws-qty-minus {
    border-right: 1px solid #e2e8f0;
}

.ws-cart-section .ws-qty-plus {
    border-left: 1px solid #e2e8f0;
}

.ws-cart-section .ws-quantity-selector .ws-qty-input {
    width: 48px;
    min-width: 48px;
    padding: 10px 6px;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    color: #0f172a;
    background: #fff;
    -moz-appearance: textfield;
}

.ws-cart-section .ws-quantity-selector .ws-qty-input::-webkit-outer-spin-button,
.ws-cart-section .ws-quantity-selector .ws-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ws-cart-section .ws-quantity-selector .ws-qty-input:focus {
    outline: none;
}

.ws-cart-section .ws-quantity-selector .ws-qty-input[readonly] {
    cursor: default;
    background: #fff;
}

.ws-cart-section .shop_table.cart .actions {
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.ws-cart-section .shop_table.cart .actions td {
    padding: 1.25rem 1.5rem;
    border: none;
}

.ws-cart-section .coupon {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
}

.ws-cart-section .coupon .input-text {
    padding: 0.625rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9375rem;
    min-width: 180px;
    transition: border-color 0.2s;
}

.ws-cart-section .coupon .input-text:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.ws-cart-section .shop_table.cart .button {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ws-cart-section .shop_table.cart .button[name="update_cart"] {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}

.ws-cart-section .shop_table.cart .button[name="update_cart"]:hover {
    background: var(--primary-hover, #4338ca);
    border-color: var(--primary-hover, #4338ca);
    color: #fff;
}

.ws-cart-section .shop_table.cart .button[name="apply_coupon"] {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.ws-cart-section .shop_table.cart .button[name="apply_coupon"]:hover {
    background: #eef2ff;
    color: var(--primary);
}

.ws-cart-section .ws-cart-totals-wrap,
.ws-cart-section .cart-collaterals {
    position: sticky;
    top: 1.5rem;
}

.ws-cart-section .cart_totals {
    background: #fff;
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.ws-cart-section .cart_totals h2,
.ws-cart-section .cart_totals .ws-cart-totals-title {
    margin: 0;
    padding: 14px 14px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 18px;
    color: var(--primary) !important;
    background: transparent !important;
    border: 0 !important;
}

.ws-cart-section .cart_totals table {
    width: 100%;
    border: none;
    margin: 0;
    margin-top: 10px;
}

.ws-cart-section .cart_totals th,
.ws-cart-section .cart_totals td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9375rem;
    background: #fff;
}

.ws-cart-section .cart_totals tr:last-child th,
.ws-cart-section .cart_totals tr:last-child td {
    border-bottom: none;
}

.ws-cart-section .cart_totals th {
    font-weight: 500;
    color: #64748b;
    text-align: left;
}

.ws-cart-section .cart_totals td {
    font-weight: 600;
    color: #1e293b;
    text-align: right;
}

.ws-cart-section .cart_totals .order-total th,
.ws-cart-section .cart_totals .order-total td {
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    background: #fff !important;
}

.ws-cart-section .cart_totals .checkout-button {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    background: var(--primary);
    color: #fff !important;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none !important;
}

.ws-cart-section .cart_totals .checkout-button:hover {
    background: var(--primary-hover, #4338ca);
    color: #fff !important;
}

.ws-cart-section .ws-button.block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Empty cart */
.ws-cart-section .ws-cart-empty,
.ws-cart-section .cart-empty {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 24px;
    color: #4b5563;
}

.ws-cart-section .ws-cart-empty .return-to-shop {
    margin-top: 1rem;
}

.ws-cart-section .return-to-shop {
    margin-top: 1rem;
}

.ws-cart-section .return-to-shop .button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    background: var(--primary);
    color: #fff !important;
    text-decoration: none !important;
    transition: background 0.2s;
}

.ws-cart-section .return-to-shop .button:hover {
    background: var(--primary-hover, #4338ca);
    color: #fff !important;
}

/* Responsive: cart table */
@media (max-width: 767px) {
    .ws-cart-section .ws-cart-table thead,
    .ws-cart-section .shop_table.cart thead {
        display: none;
    }

    .ws-cart-section .ws-cart-table tbody tr,
    .ws-cart-section .shop_table.cart tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 0.5rem 1rem;
        padding: 1rem;
        border-bottom: 1px solid #e2e8f0;
    }

    .ws-cart-section .ws-cart-table .product-remove,
    .ws-cart-section .shop_table.cart .product-remove {
        grid-column: 2;
        grid-row: 1;
        text-align: right;
    }

    .ws-cart-section .ws-cart-table .product-thumbnail,
    .ws-cart-section .shop_table.cart .product-thumbnail {
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: start;
    }

    .ws-cart-section .ws-cart-table .product-name,
    .ws-cart-section .shop_table.cart .product-name {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .ws-cart-section .ws-cart-table .product-price,
    .ws-cart-section .shop_table.cart .product-price {
        grid-column: 1;
        grid-row: 3;
    }

    .ws-cart-section .ws-cart-table .product-quantity,
    .ws-cart-section .shop_table.cart .product-quantity {
        grid-column: 2;
        grid-row: 3;
        width: auto;
    }

    .ws-cart-section .ws-cart-table .product-subtotal,
    .ws-cart-section .shop_table.cart .product-subtotal {
        grid-column: 1 / -1;
        grid-row: 4;
        font-size: 1.125rem;
    }

    .ws-cart-section .ws-cart-table .product-thumbnail img,
    .ws-cart-section .shop_table.cart .product-thumbnail img {
        width: 72px;
        height: 72px;
    }

    .ws-cart-section .product-quantity .ws-quantity-selector {
        margin: 0;
    }
}
