/* cart.css additions */
.shipping-note {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 10px;
    margin: 15px 0;
    font-size: 14px;
    color: #6c757d;
}

.shipping-note i {
    color: #007bff;
    margin-right: 8px;
}

/* checkout.css additions */
.shipping-info {
    background-color: #e7f3ff;
    border: 1px solid #b3d7ff;
    border-radius: 5px;
    padding: 10px;
    margin: 15px 0;
    font-size: 14px;
    color: #004085;
}

.shipping-info i {
    color: #0062cc;
    margin-right: 8px;
}
















/* Cart Container */
.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* Cart Items */
.cart-items {
    flex: 1;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 2fr 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cart-item.updating {
    opacity: 0.7;
    pointer-events: none;
}

.cart-item.removing {
    opacity: 0;
    transform: translateX(-100%);
}

/* Cart Item Image */
.cart-item-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* Cart Item Details */
.cart-item-details {
    flex: 1;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.4;
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0.5rem 0;
}

.old-price {
    text-decoration: line-through;
    color: #95a5a6;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.new-price {
    color: #e74c3c;
    font-weight: 700;
}

/* Quantity Controls */
.cart-item-quantity {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.quantity-selector-small {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    width: 35px;
    height: 35px;
    background: #f8f9fa;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #e9ecef;
}

.qty-input {
    width: 50px;
    height: 35px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    background: white;
}

/* Remove Button */
.btn-remove {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.btn-remove:hover {
    background: #c0392b;
}

/* Cart Total */
.cart-item-total {
    text-align: right;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.empty-cart i {
    color: #bdc3c7;
    margin-bottom: 1.5rem;
}

.empty-cart h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.empty-cart p {
    color: #7f8c8d;
    margin-bottom: 2rem;
}

/* Cart Summary */
.cart-summary {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.cart-summary h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e74c3c;
    color: #2c3e50;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
    color: #555;
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: 700;
    border-top: 2px solid #2c3e50;
    margin-top: 1rem;
    padding-top: 1rem;
    color: #2c3e50;
}

/* Buttons */
.btn-block {
    display: block;
    width: 100%;
    margin: 0.75rem 0;
    padding: 0.75rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

.btn-primary {
    background: #e74c3c;
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #c0392b;
}

.btn-outline {
    background: white;
    color: #2c3e50;
    border: 2px solid #2c3e50;
}

.btn-outline:hover {
    background: #2c3e50;
    color: white;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .cart-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
        gap: 1rem;
        padding: 1rem;
    }
    
    .cart-item-image {
        grid-row: 1 / 3;
        width: 80px;
        height: 80px;
    }
    
    .cart-item-details {
        grid-column: 2 / 3;
    }
    
    .product-name {
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }
    
    .cart-item-price {
        font-size: 1rem;
    }
    
    .mobile-quantity {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid #eee;
    }
    
    .mobile-remove {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .cart-item-quantity.desktop-only {
        display: none;
    }
    
    .cart-item-total {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 1.1rem;
    }
    
    .mobile-label {
        font-weight: 600;
        color: #7f8c8d;
    }
    
    .cart-summary {
        position: static;
        margin-top: 1rem;
    }
    
    .empty-cart {
        padding: 3rem 1rem;
    }
    
    .empty-cart i {
        font-size: 2.5rem;
    }
    
    .empty-cart h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .cart-item {
        grid-template-columns: 70px 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .cart-item-image {
        width: 70px;
        height: 70px;
    }
    
    .product-name {
        font-size: 0.9rem;
    }
    
    .cart-item-price {
        font-size: 0.95rem;
    }
    
    .mobile-quantity {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .quantity-selector-small {
        width: 100%;
    }
    
    .qty-btn {
        width: 40px;
    }
    
    .qty-input {
        flex: 1;
    }
    
    .mobile-remove {
        width: 100%;
        justify-content: center;
    }
    
    .cart-item-total {
        font-size: 1rem;
    }
    
    .summary-row {
        font-size: 0.95rem;
    }
    
    .summary-row.total {
        font-size: 1.1rem;
    }
    
    .btn-block {
        padding: 0.6rem;
        font-size: 0.95rem;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .cart-container {
        grid-template-columns: 1.5fr 1fr;
        gap: 1.5rem;
    }
    
    .cart-item {
        grid-template-columns: 90px 2fr 1fr 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .cart-item-image {
        width: 90px;
        height: 90px;
    }
    
    .mobile-quantity {
        display: none;
    }
}

/* Loading States */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Swipe Animation */
.cart-item.swiped {
    transform: translateX(-80px);
}

.cart-item.swiped::after {
    content: 'Remove';
    position: absolute;
    right: -80px;
    top: 0;
    height: 100%;
    width: 80px;
    background: #e74c3c;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: right 0.3s ease;
}

.cart-item.swiped::after {
    right: 0;
}
