/* Cart Detail Page Styles - Responsive design for all screen sizes */

/* Cart Detail Page Styles - Responsive design for all screen sizes */

/* ======================================== */
/* RESPONSIVE CART TABLE STYLES */
/* ======================================== */

.cart-detail {
    padding-top: 20px;
}

/* Cart Table - Rebuilt with white backgrounds */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 0 0 2px #ddd;
}

.cart-table th {
    padding: 12px;
    text-align: center;
    border-bottom: 2px solid #ddd;
    background: white;
    color: #333;
    font-weight: bold;
}

.cart-table td {
    padding: 12px;
    text-align: center;
    vertical-align: middle;
    background: white;
    border-bottom: 1px solid #eee;
}

.cart-table .remove-column {
    padding: 4px;
    width: 50px;
}

.cart-table .item-name-column {
    width: 40%;
    text-align: left;
}

.cart-table .price-column {
    width: 15%;
    text-align: center;
}

.cart-table .quantity-column {
    width: 15%;
    text-align: center;
}

.cart-table .shipping-column {
    width: 15%;
    text-align: center;
}

.cart-table .total-column {
    width: 15%;
    text-align: center;
}

.cart-table .cart-item-row {
    border-bottom: 1px solid #eee;
    background: white;
}

.cart-table .cart-total-row {
    border-top: 2px solid #ddd;
    border-bottom: none;
    font-weight: bold;
    background: white;
}

.cart-table .cart-total-row,
.cart-table .cart-shipping-row {
    border-bottom: none;
    font-weight: normal;
    font-style: italic;
    background: white;
    padding: 4px 0;
}

/* Cart Layout - Side by side tables */
.cart-layout {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
}

.cart-section {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Summary Section */
.summary-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Summary Table Styles - Rebuilt with white backgrounds */
.summary-table {
    min-width: 187px; /* 125px * 1.5 = 187.5px, rounded to 187px */
    width: auto;
    margin: 0;
    border-collapse: collapse;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 0 0 2px #ddd;
}

.summary-section .checkout-btn {
    margin-top: 15px;
    min-width: 187px; /* Match summary table minimum width */
    width: auto;
    text-align: center;
}

.summary-table th {
    padding: 12px 12px;
    text-align: center;
    border-bottom: 2px solid #ddd;
    background: white;
    font-weight: bold;
    color: #333;
}

.summary-table td {
    padding: 12px 12px;
    border-bottom: 1px solid #eee;
    background: white;
}

.summary-row {
    font-weight: normal;
    background: white;
}

.summary-total-row {
    border-top: 2px solid #ddd;
    font-weight: bold;
    background: white;
}

.summary-label {
    text-align: left;
    font-weight: inherit;
}

.summary-value {
    text-align: right;
    font-weight: inherit;
}



.cart-table .remove-btn {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 2px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cart-table .remove-btn:hover {
    background-color: #dc3545;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0px;
}

.quantity-controls .quantity-btn {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 2px;
    font-size: 12px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.quantity-controls .quantity-btn:hover {
    background-color: #555;
}

.quantity-controls .quantity-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.quantity-controls .quantity-display {
    display: inline-block;
    width: 30px;
    text-align: center;
}

.quantity-controls .quantity-input {
    display: inline-block;
    width: 35px;
    height: 28px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: inherit;
    padding: 6px 2px;
    background: white;
    margin: -4px 4px;
    vertical-align: middle;
}

.quantity-controls .quantity-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

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

.quantity-controls .quantity-input {
    -moz-appearance: textfield;
    appearance: textfield;
}

.clear-cart-btn,
.ajax-clear-btn {
    display: inline-block;
    padding: 6px 10px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.clear-cart-btn:hover,
.ajax-clear-btn:hover {
    background-color: var(--danger-red);
    color: white;
    text-decoration: none;
}

/* Override cart-checkout-btn styles for clear cart button */
.cart-checkout-btn.ajax-clear-btn {
    background-color: #6c757d;
}

.cart-checkout-btn.ajax-clear-btn:hover {
    background-color: var(--danger-red);
}

/* Checkout button styles */
.checkout-btn {
    display: inline-block;
    height: 48px;
    padding: 0 24px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 20px;
    line-height: 48px;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background-color: #218838;
    color: white;
    text-decoration: none;
}

/* Cart Checkout Button (under cart table) */
.cart-checkout-btn {
    display: inline-block;
    padding: 6px 10px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.3s;
    margin-top: 15px;
    text-align: left;
    width: fit-content;
    border: none;
    cursor: pointer;
}

.cart-checkout-btn:hover {
    background-color: var(--danger-red);
    color: white;
    text-decoration: none;
}

/* ======================================== */
/* RESPONSIVE BREAKPOINTS FOR MOBILE */
/* ======================================== */

@media (max-width: 767px) {
    .cart-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .cart-table {
        width: 100% !important;
    }
    
    .summary-table {
        width: 100% !important;
        min-width: 100% !important;
    }
    
    .summary-section {
        width: 100% !important;
        align-items: stretch !important;
    }
    
    .button-layout {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .button-layout .clear-cart-btn {
        margin-left: 0;
    }
    
    .summary-section .checkout-btn {
        min-width: 187px;
        width: auto;
        height: 48px;
        font-size: 20px;
        line-height: 48px;
        padding: 0 24px;
    }
    .cart-table th {
        padding: 15px 8px !important;
    }
    .cart-table td {
        padding: 15px 8px !important;
    }
    .cart-table .remove-column {
        padding: 8px 4px !important;
        width: 40px !important;
    }
    .cart-table .remove-btn {
        width: 24px;
        height: 24px;
        line-height: 24px;
        border-radius: 8px;
    }
    .quantity-controls {
        gap: 3px;
    }
    .clear-cart-btn,
    .checkout-btn {
        padding: 8px 12px;
        border-radius: 8px;
    }
    .cart-table .price-column {
        display: none !important;
    }
    .cart-table th.price-column {
        display: none !important;
    }
    .cart-table .shipping-column {
        display: none !important;
    }
    .cart-table th.shipping-column {
        display: none !important;
    }
    .cart-table .item-name-column {
        width: 50% !important;
    }
    .cart-table .quantity-column {
        width: 25% !important;
    }
    .cart-table .total-column {
        width: 25% !important;
    }
}

@media (max-width: 480px) {
    .quantity-controls {
        flex-direction: column !important;
        gap: 1px;
    }
    .quantity-controls .quantity-display {
        width: 24px;
        order: -1 !important;
    }
    .cart-table td {
        padding: 10px 4px !important;
    }
    .cart-table th {
        padding: 10px 4px !important;
    }
} 