/* Cart Page Styles - Minimalist Design */

/* Cart Sale Price Styles */
.cart-price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.cart-sale-price {
    color: #dc2626;
    font-weight: bold;
    font-size: 16px;
}

.cart-original-price {
    color: #6b7280;
    font-size: 12px;
    text-decoration: line-through;
}

/* Cart Badge Styles */
.cart-flash-sale-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cart-flash-sale-badge i {
    margin-right: 4px;
}

.cart-sale-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cart-sale-badge i {
    margin-right: 4px;
}

/* Cart Header */
.cart-header {
    background: #1A4D2A;
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid #2d5a3d;
}

.cart-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.cart-subtitle {
    font-size: 13px;
    color: #a8c8a8;
    font-weight: 400;
}

/* Cart Main */
.cart-main {
    padding: 16px;
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

/* Cart Items Container */
#cart-items-container {
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 420px);
    padding-right: 10px;
    margin-bottom: 20px;
    padding-bottom: 40px;
}

/* Custom scrollbar for cart items */
#cart-items-container::-webkit-scrollbar {
    width: 6px;
}

#cart-items-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#cart-items-container::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 3px;
}

#cart-items-container::-webkit-scrollbar-thumb:hover {
    background: #B8941F;
}

/* Loading Spinner */
.cart-loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(26, 77, 42, 0.9);
    color: #F4D03F;
    padding: 15px 25px;
    border-radius: 25px;
    border: 2px solid #D4AF37;
    z-index: 1000;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cart-loading.show {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #D4AF37;
    border-top: 2px solid #F4D03F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Select All Section */
.select-all-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.select-all-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.select-all-text {
    font-weight: 500;
    color: #2d3748;
    font-size: 14px;
}

.selected-count {
    font-size: 13px;
    color: #718096;
    font-weight: 400;
}

/* Cart Items */
.cart-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    transition: all 0.2s ease;
    position: relative;
    gap: 12px;
}

.cart-item.unselected {
    opacity: 0.5;
    background: #f7fafc;
    border-color: #cbd5e0;
}

.cart-item.unselected .cart-item-image img {
    filter: grayscale(30%);
}

/* Checkbox Styles */
.cart-item-checkbox {
    margin-right: 12px;
    display: flex;
    align-items: center;
    min-width: 24px;
}

.item-select-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #1A4D2A;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
    border-radius: 3px;
}

#select-all-items {
    width: 16px;
    height: 16px;
    accent-color: #1A4D2A;
    cursor: pointer;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .select-all-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 12px;
    }
    
    .select-all-text {
        font-size: 13px;
    }
    
    .selected-count {
        font-size: 12px;
        align-self: flex-end;
    }
    
    .cart-item {
        padding: 12px;
        gap: 10px;
    }
    
    .cart-item-checkbox {
        margin-right: 10px;
        min-width: 20px;
    }
    
    .item-select-checkbox {
        width: 18px;
        height: 18px;
    }
    
    .cart-item-image {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 480px) {
    .select-all-section {
        padding: 8px 10px;
    }
    
    .select-all-text {
        font-size: 12px;
    }
    
    .selected-count {
        font-size: 11px;
    }
    
    .cart-item {
        padding: 10px;
        gap: 8px;
    }
    
    .cart-item-checkbox {
        margin-right: 8px;
        min-width: 18px;
    }
    
    .item-select-checkbox {
        width: 16px;
        height: 16px;
    }
    
    .cart-item-image {
        width: 48px;
        height: 48px;
    }
    
    .cart-item-name {
        font-size: 13px;
    }
    
    .cart-item-size {
        font-size: 10px;
    }
    
    .cart-item-price {
        font-size: 14px;
    }
}

.cart-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border-color: #1A4D2A;
}

.cart-item-image {
    width: 64px;
    height: 64px;
    margin-right: 12px;
    border-radius: 6px;
    overflow: hidden;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    margin-right: 12px;
    min-width: 0;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 4px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cart-item-size {
    font-size: 11px;
    color: #718096;
    margin-bottom: 6px;
    font-weight: 400;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 600;
    color: #1A4D2A;
}

.cart-item-price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.cart-item-price.sale-price {
    color: #e53e3e;
    font-weight: 600;
}

.cart-item-price.original-price {
    color: #a0aec0;
    text-decoration: line-through;
    font-size: 12px;
    font-weight: 400;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7fafc;
    border-radius: 6px;
    padding: 4px;
    border: 1px solid #e2e8f0;
}

.quantity-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: #1A4D2A;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.quantity-btn:hover {
    background: #2d5a3d;
    transform: scale(1.05);
}

.quantity-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed !important;
    background: #cbd5e0 !important;
    color: #a0aec0 !important;
    transform: none !important;
}

.quantity-btn.disabled:hover {
    background: #cbd5e0 !important;
    color: #a0aec0 !important;
    transform: none !important;
}

.quantity {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    min-width: 16px;
    text-align: center;
}

.remove-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: #e53e3e;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: #c53030;
    transform: scale(1.05);
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 15px;
    border: 2px solid #1A4D2A;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.empty-cart-icon {
    font-size: 64px;
    color: #D4AF37;
    margin-bottom: 20px;
}

.empty-cart h3 {
    font-size: 24px;
    font-weight: bold;
    color: #1A4D2A;
    margin-bottom: 10px;
}

.empty-cart p {
    font-size: 16px;
    color: #D4AF37;
    margin-bottom: 30px;
}

.continue-shopping-btn {
    background: linear-gradient(135deg, #D4AF37, #F4D03F);
    color: #1A4D2A;
    border: 2px solid #1A4D2A;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.continue-shopping-btn:hover {
    background: linear-gradient(135deg, #1A4D2A, #2d5a3d);
    color: #D4AF37;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 77, 42, 0.4);
}

/* Cart Summary */
.cart-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 16px 20px 20px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    z-index: 100;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: #4a5568;
}

.summary-row.points-rewards {
    background: #f0fff4;
    color: #22543d;
    padding: 10px 12px;
    border-radius: 6px;
    margin: 8px 0;
    border: 1px solid #c6f6d5;
}

.points-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.points-info span {
    font-weight: 500;
    font-size: 14px;
}

.points-description {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
}

.points-value {
    font-weight: 600;
    font-size: 16px;
    color: #22543d;
}

.summary-row.total {
    font-size: 16px;
    font-weight: 600;
    color: #1A4D2A;
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
    margin-top: 8px;
}

/* Shipping Information */
.shipping-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.shipping-method {
    font-size: 11px;
    color: #718096;
    font-weight: 400;
    margin-top: 2px;
}

.delivery-time {
    font-size: 10px;
    color: #a0aec0;
    margin-top: 1px;
}

#shipping-cost {
    font-weight: 500;
    color: #2d3748;
}

.checkout-btn {
    width: 100%;
    background: #1A4D2A;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 77, 42, 0.3);
    margin-top: 15px;
}

.checkout-btn:hover {
    background: linear-gradient(135deg, #D4AF37, #F4D03F);
    color: #1A4D2A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.checkout-btn:disabled {
    background: linear-gradient(135deg, #ccc, #ddd);
    color: #666;
    border-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.checkout-btn:disabled:hover {
    background: linear-gradient(135deg, #ccc, #ddd);
    color: #666;
    transform: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 480px) {
    .cart-header {
        padding: 15px;
    }
    
    .cart-header h1 {
        font-size: 24px;
    }
    
    .cart-main {
        padding: 15px;
    }
    
    .cart-item {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .cart-item-image {
        width: 60px;
        height: 60px;
        margin-right: 12px;
    }
    
    .cart-item-name {
        font-size: 14px;
    }
    
    .cart-item-price {
        font-size: 16px;
    }
    
    .quantity-btn {
        width: 25px;
        height: 25px;
        font-size: 10px;
    }
    
    .remove-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .cart-summary {
        padding: 15px;
    }
    
    .summary-row {
        font-size: 14px;
    }
    
    .summary-row.total {
        font-size: 18px;
    }
    
    .checkout-btn {
        padding: 12px;
        font-size: 16px;
    }
    
    /* Mobile adjustments for cart items container */
    #cart-items-container {
        max-height: calc(100vh - 450px);
        padding-right: 5px;
        padding-bottom: 30px;
    }
}

/* Stock Warning Styles */
.out-of-stock-warning {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c33;
    font-size: 13px;
    font-weight: 500;
}

.out-of-stock-warning i {
    color: #c33;
    font-size: 14px;
}

.low-stock-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #856404;
    font-size: 13px;
    font-weight: 500;
}

.low-stock-warning i {
    color: #856404;
    font-size: 14px;
}