/* Shopping Cart Styles for InterAction Irrigation Academy */

/* Cart Button in Navigation */
.btn-cart {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-cart i {
    font-size: 1.1rem;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid white;
    transition: transform 0.2s ease;
}

/* Add to Cart Buttons */
.btn-add-to-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    width: 100%;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-add-to-cart i {
    font-size: 1rem;
}

/* Cart Modal */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.cart-modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.cart-modal-header {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-modal-header i {
    font-size: 1.6rem;
}

.cart-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    min-height: 300px;
}

.cart-modal-footer {
    border-top: 2px solid #e5e7eb;
    padding: 25px 30px;
    background: #f9fafb;
    border-radius: 0 0 20px 20px;
}

/* Cart Items */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

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

.cart-item-info h4 {
    margin: 0 0 5px 0;
    color: #1e293b;
    font-size: 1.1rem;
}

.cart-item-type {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 5px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.qty-btn {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #475569;
}

.qty-btn:hover {
    background: #3b82f6;
    color: white;
}

.quantity {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: #1e293b;
}

/* Cart Item Price */
.cart-item-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #10b981;
    min-width: 100px;
    text-align: right;
}

/* Remove Button */
.remove-item {
    background: #fee2e2;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ef4444;
}

.remove-item:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* Empty Cart Message */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.cart-empty h3 {
    color: #64748b;
    margin-bottom: 10px;
}

.cart-empty p {
    color: #94a3b8;
}

/* Cart Summary */
.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.cart-total span:first-child {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
}

.cart-total-amount {
    font-size: 2rem;
    font-weight: 800;
    color: #10b981;
}

.cart-actions {
    display: flex;
    gap: 15px;
}

.cart-actions button {
    flex: 1;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
}

#clearCart {
    background: #f1f5f9;
    color: #64748b;
}

#clearCart:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

#proceedCheckout {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

#proceedCheckout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* Cart Notification */
.cart-notification {
    position: fixed;
    bottom: -100px;
    right: 30px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 18px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    z-index: 10001;
    transition: all 0.3s ease;
}

.cart-notification.show {
    bottom: 30px;
}

.cart-notification i {
    font-size: 1.3rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .cart-modal-header {
        padding: 20px;
        border-radius: 0;
    }

    .cart-modal-header h2 {
        font-size: 1.4rem;
    }

    .cart-modal-body {
        padding: 20px;
    }

    .cart-modal-footer {
        padding: 20px;
        border-radius: 0;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }

    .cart-actions {
        flex-direction: column;
    }

    .cart-actions button {
        width: 100%;
    }

    .btn-cart span:not(.cart-count) {
        display: none;
    }

    .btn-cart {
        padding: 10px 15px;
    }

    .cart-notification {
        right: 20px;
        left: 20px;
    }

    .cart-notification.show {
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .cart-total span:first-child {
        font-size: 1.1rem;
    }

    .cart-total-amount {
        font-size: 1.6rem;
    }

    .quantity-controls {
        gap: 5px;
    }

    .qty-btn {
        width: 28px;
        height: 28px;
    }
}

/* Print Styles */
@media print {
    .cart-modal,
    .btn-cart,
    .btn-add-to-cart,
    .cart-notification {
        display: none !important;
    }
}
