/* Cart Layout */
.cart-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.cart-items-section {
    flex: 1 1 65%;
}

.order-summary-section {
    flex: 0 0 30%;
}

/* Cart Items Styling */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-table thead {
    background: #f8f9fa;
}

.cart-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #eee;
}

.cart-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.cart-table tbody tr:hover {
    background: #f8f9fa;
}

/* Product Cell */
.product-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
}

.product-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
}

.product-info h3 {
    margin: 0;
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

/* Price Cell */
.price-cell {
    font-weight: 600;
    color: #e53935;
    font-size: 1.1rem;
}

/* Quantity Cell */
.quantity-cell {
    min-width: 150px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.25rem;
    border-radius: 6px;
    width: fit-content;
}

.quantity-controls button {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.2s;
}

.quantity-controls button:hover {
    background: #e53935;
    color: white;
}

.quantity-input {
    width: 50px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 1rem;
    -moz-appearance: textfield;
}

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

/* Stock Indicator */
.stock-indicator {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
    text-align: center;
}

/* Subtotal Cell */
.subtotal-cell {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

/* Remove Button */
.remove-item {
    width: 32px;
    height: 32px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
}

.remove-item:hover {
    background: #e53935;
    color: white;
}

/* Empty Cart Message */
.cart-empty {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-empty p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* Cart Footer */
.cart-footer {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    gap: 1rem;
}

.cart-footer .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-outline {
    background: white;
    border: 2px solid #e53935;
    color: #e53935;
}

.btn-outline:hover {
    background: #e53935;
    color: white;
}

/* Cart Summary */
.cart-summary {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.cart-summary h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    color: #666;
}

.summary-row.total {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
    border-top: 1px solid #eee;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

/* Notes Section */
.notes-section {
    margin-top: 2rem;
}

.notes-section h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

#notes-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

#notes-input:focus {
    outline: none;
    border-color: #e53935;
}

/* Checkout Section */
.checkout-section {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

#checkoutBtn {
    padding: 1rem 2rem;
    background: #e53935;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 200px;
}

#checkoutBtn:hover {
    background: #c62828;
}

.purchase-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
}

.buy-now-btn, .add-to-cart-btn {
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.buy-now-btn {
    background: #e53935;
    color: white;
    border: none;
}

.add-to-cart-btn {
    background: white;
    color: #e53935;
    border: 2px solid #e53935;
}

/* Scrollable cart items area: shows max 4 items, scrolls if more */
.cart-items-scrollable {
    max-height: calc(3 * 110px); /* Approximate height for 3 rows, adjust as needed */
    overflow-y: auto;
    display: block;
    overscroll-behavior-y: contain;
}

.cart-items-scrollable tbody {
    display: table;
    width: 100%;
}

.cart-items-scrollable::-webkit-scrollbar {
    width: 8px;
}
.cart-items-scrollable::-webkit-scrollbar-thumb {
    background: #1b1b1b;
    border-radius: 4px;
}
.cart-items-scrollable::-webkit-scrollbar-thumb:hover {
    background: #000000;
}

input[type="checkbox"] {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    accent-color: #e53935; /* Optional: makes the checkmark red */
}

.notification-bell:active + .notification-dropdown,
.notification-bell:focus + .notification-dropdown {
    display: block;
}
.notification-dropdown:hover {
    display: block;
}

.notification-dropdown.show {
    display: block;
}

/* Sticky Order Summary */
.cart-summary {
    position: sticky;
    top: 2rem;
}

/* Promo Section */
.promo-section {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.promo-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Discount Row */
.discount-row {
    color: #e53935;
}

/* Trust Badges */
.trust-badges {
    margin-top: 1.5rem;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.badge i {
    color: #e53935;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-layout {
        flex-direction: column;
        gap: 1rem;
    }

    .cart-items-section,
    .order-summary-section {
        flex: none;
        width: 100%;
    }

    .cart-summary {
        position: static;
        margin-top: 1rem;
    }

    .cart-footer {
        justify-content: center;
    }

    .checkout-section {
        justify-content: center;
    }

    .promo-section {
        flex-direction: column;
    }

    .trust-badges {
        text-align: center;
    }

    .badge {
        justify-content: center;
    }
}
