/* ================== CART STYLES ================== */

/* Floating Cart Icon */
.cart-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-floating-btn:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444; /* Red badge */
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Sidebar Cart */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px; /* Hidden by default */
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin: 0;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-cart:hover {
    color: #ef4444;
}

/* Cart Items Container */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.empty-cart {
    text-align: center;
    color: var(--text-muted);
    margin-top: 50px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    align-items: center;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: var(--text-main);
}

.cart-item-info p {
    margin: 0 0 10px 0;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

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

.cart-item-controls button {
    width: 24px;
    height: 24px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-main);
}

.cart-item-controls button:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.remove-item {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s ease;
}

.remove-item:hover {
    transform: scale(1.1);
}

/* Cart Footer */
.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: white;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-main);
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.checkout-btn:hover {
    background: var(--primary-dark);
}

/* ================== CHECKOUT MODAL ================== */
.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.checkout-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.checkout-modal.open .modal-content {
    transform: translateY(0);
}

.close-checkout {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: var(--text-main);
}

.modal-content p {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.checkout-form .form-group {
    margin-bottom: 20px;
}

.checkout-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
}

.checkout-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: #f8fafc;
}

.checkout-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.pay-btn {
    width: 100%;
    padding: 15px;
    background: #0ea5e9; /* Paystack Blue */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s ease;
}

.pay-btn:hover {
    background: #0284c7;
}
