/* Layout */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.main-content {
    margin-right: 350px; /* Space for sidebar */
    min-height: 100vh;
    transition: margin-right 0.3s ease;
}

/* Fixed Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    height: 100vh;
    background: #fff;
    border-left: 1px solid #e0e0e0;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-header {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.cart-header h5 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    flex-shrink: 0;
}

/* Cart Summary Items */
.cart-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.cart-summary-item.cart-total {
    background: #f8f9fa;
    font-size: 1.1em;
    border-bottom: none;
}

/* Product Cards */
.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-card .card-img-top {
    border-radius: 8px 8px 0 0;
}

.product-card .btn {
    transition: all 0.2s ease;
}

/* Cart Styles */
.cart-item {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item:hover {
    background-color: #f8f9fa;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #007bff;
    background: white;
    color: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #007bff;
    color: white;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.remove-item {
    color: #dc3545;
    cursor: pointer;
    transition: color 0.2s ease;
}

.remove-item:hover {
    color: #c82333;
}

/* Cart Empty State */
.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.cart-empty i {
    opacity: 0.3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-content {
        margin-right: 0;
    }

    .cart-sidebar {
        position: fixed;
        bottom: 0;
        right: 0;
        top: auto;
        width: 100%;
        height: auto;
        max-height: 50vh;
        border-left: none;
        border-top: 1px solid #e0e0e0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }

    .cart-header {
        padding: 15px 20px;
    }

    .cart-body {
        max-height: 200px;
        overflow-y: auto;
    }

    .product-card {
        margin-bottom: 20px;
    }

    .cart-item-image {
        width: 50px;
        height: 50px;
    }

    .cart-summary-item {
        padding: 10px 20px;
    }

    .cart-footer {
        padding: 15px 20px;
    }
}

.button-reset {
    padding: 0;
    background: none;
    border: none;
    outline: none;
    font: inherit;
    color: inherit;
}

#qrcode {
    width: 100% !important;
    height: auto !important;
}

/* Payment Status Styles */
#payment-status {
    margin-bottom: 1rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
}

#payment-status.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

#payment-status.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

#payment-status.alert-success {
    background-color: #d4edda;
    color: #155724;
}

#payment-status.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

#payment-status.alert-secondary {
    background-color: #e2e3e5;
    color: #383d41;
}
