/* ------------ CART PAGE BASE STYLES ------------ */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cart-page-wrapper {
    padding: 40px 15px;
}

.cart-page-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Container override (if you don't use Bootstrap) */
.container {
    max-width: 1140px;
    margin: 0 auto;
}

/* ------------ TABLE STYLES ------------ */

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #ffffff;
}

.table thead {
    background: #f5f5f5;
}

.table th,
.table td {
    padding: 12px 10px;
    border: 1px solid #e0e0e0;
    text-align: left;
    font-size: 14px;
}

.table th {
    font-weight: 600;
}

/* Striped effect */
.table-striped tbody tr:nth-child(odd) {
    background-color: #fafafa;
}

/* Bordered table */
.table-bordered {
    border: 1px solid #e0e0e0;
}

/* Total row emphasis */
.table tfoot th {
    font-size: 16px;
    font-weight: 600;
}

/* ------------ BUTTONS ------------ */

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

/* Primary style used in your theme */
.btn-style.btn-style-primary {
    background: #ff5a3c;
    color: #ffffff;
    border: 1px solid #ff5a3c;
    transition: 0.3s ease;
    padding: 10px;
}

.btn-style.btn-style-primary:hover {
    background: #e0492f;
    border-color: #e0492f;
    color: #ffffff;
}

/* Outline danger for Clear / Remove */
.btn-outline-danger {
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
    transition: 0.3s ease;
    margin-top: 12px;
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: #ffffff;
}

/* Small button (for Remove) */
.btn-sm {
    padding: 4px 10px;
    font-size: 13px;
}

/* Spacing helpers if not using Bootstrap */
.mb-4 {
    margin-bottom: 1.5rem;
}

.ms-2 {
    margin-left: 0.5rem;
}

/* ------------ RESPONSIVE BEHAVIOUR ------------ */

/* Make table horizontally scrollable on small screens */
.table-responsive,
.cart-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

/* Wrap the table (you can update cart.php to add this div) */
/*
<div class="cart-table-wrapper">
    <table class="table table-bordered table-striped">...</table>
</div>
*/

/* Tablet adjustments (≤ 992px) */

.btn-success {
    background: #28a745;
    color: #ffffff !important;
    border: 1px solid #28a745;
    transition: 0.3s ease;
    margin-top: 12px;
}

.btn-success:hover {
    background: #218838;
    border-color: #218838;
}


@media (max-width: 992px) {
    .cart-page-wrapper {
        padding: 30px 10px;
    }

    .cart-page-title {
        font-size: 24px;
    }

    .table th,
    .table td {
        font-size: 13px;
        padding: 10px 8px;
    }
}

/* Mobile adjustments (≤ 768px) */
@media (max-width: 768px) {
    .cart-page-wrapper {
        padding: 20px 10px;
    }

    .cart-page-title {
        font-size: 22px;
        text-align: center;
    }

    /* Center empty cart message */
    .cart-empty-message {
        text-align: center;
        font-size: 15px;
    }

    /* Buttons stack better on small screens */
    .cart-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .cart-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Extra small devices (≤ 480px) */
@media (max-width: 480px) {
    .table th,
    .table td {
        font-size: 12px;
        padding: 8px 6px;
    }

    .btn-style.btn-style-primary,
    .btn-outline-danger {
        font-size: 13px;
        padding: 7px 12px;
    }
}
