/* cart.css - Cart Page Specific Styles */

.cart-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.cart-header {
    text-align: center;
    margin-bottom: 40px;
}

.cart-header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.cart-header h1:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.cart-header p {
    color: #666;
    font-size: 1.1rem;
    margin-top: 20px;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin: 20px 0 40px;
}

.empty-cart i {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-cart h2 {
    color: #666;
    margin-bottom: 15px;
    font-size: 28px;
}

.empty-cart p {
    color: #888;
    margin-bottom: 25px;
    font-size: 16px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Cart Grid */
.cart-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .cart-grid {
        grid-template-columns: 1fr;
    }
}

/* Cart Items */
.cart-items {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.cart-items h2 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
    font-size: 1.5rem;
}

/* Cart Item */
.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
        padding: 25px 0;
    }
    
    .cart-item > div {
        margin-bottom: 10px;
    }
}

.item-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s;
}

.item-image img:hover {
    transform: scale(1.05);
}

.item-details h3 {
    margin-bottom: 5px;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.category {
    color: var(--primary-color);
    font-size: 0.85rem;
    margin-bottom: 8px;
    display: inline-block;
    padding: 4px 10px;
    background: rgba(211, 47, 47, 0.1);
    border-radius: 20px;
}

.item-price {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

/* Quantity Controls */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.quantity-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.quantity-input {
    width: 60px;
    height: 35px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
}

.quantity-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.item-total {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
    min-width: 80px;
}

.remove-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.remove-btn:hover {
    background: #ff5252;
}

/* Cart Actions */
.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

@media (max-width: 480px) {
    .cart-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .cart-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Cart Summary */
.cart-summary {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    height: fit-content;
}

.cart-summary h2 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
    font-size: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.summary-total {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
    padding-top: 15px;
}

.summary-total span:last-child {
    color: var(--primary-color);
}

.secure-note {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 15px;
}

/* Back to Home */
.back-home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin: 40px 0;
    padding: 12px 25px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    transition: all 0.3s;
    background: white;
}

.back-home:hover {
    background: rgba(211, 47, 47, 0.1);
    transform: translateX(-5px);
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    z-index: 2000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 400px;
}

.notification.success {
    background: #2E7D32;
}

.notification.error {
    background: #d32f2f;
}

.notification.info {
    background: #1976D2;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}