/* Cart Header Styles */
.cart-item-preview {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    min-height: 80px;
}

.cart-item-preview:last-child {
    border-bottom: none;
}

.item-image {
    margin-right: 10px;
    flex-shrink: 0;
}

.item-image img {
    border-radius: 4px;
    object-fit: cover;
}

.item-details {
    flex-grow: 1;
    min-width: 0;
}

.item-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-size {
    color: #666;
    font-size: 12px;
    display: block;
    margin-bottom: 5px;
}

.item-price {
    font-size: 13px;
}

.item-price .quantity {
    color: #666;
}

.item-price .price {
    font-weight: 600;
    color: #333;
}

.item-remove {
    margin-left: 10px;
    flex-shrink: 0;
}

.remove-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background-color: #dc3545;
    color: white;
}

.cart-total-preview {
    padding: 15px 10px 10px 10px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
}

.total-amount {
    text-align: center;
    margin-bottom: 10px;
}

.cart-actions {
    text-align: center;
}

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

/* Cart Count Badge */
#header-cart-count {
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -8px;
    right: -8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cart-item-preview {
        padding: 8px;
        min-height: 60px;
    }
    
    .item-image img {
        width: 40px !important;
        height: 40px !important;
    }
    
    .item-name {
        font-size: 13px;
    }
    
    .item-price {
        font-size: 12px;
    }
}

/* Cart page specific styles */
.page-cart .cart-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.page-cart .cart-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    padding: 15px;
    border: none;
}

.page-cart .cart-table td {
    padding: 15px;
    border-color: #eee;
}

.page-cart .product-item {
    gap: 15px;
}

.page-cart .product-name {
    color: #333;
    margin-bottom: 5px;
}

.page-cart .quantity-controls {
    gap: 8px;
}

.page-cart .quantity-controls .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 4px;
}

.page-cart .quantity-input {
    border-radius: 4px;
    border: 1px solid #ddd;
    text-align: center;
    font-weight: 600;
}

.page-cart .btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    border: none;
}

.page-cart .btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.page-cart .cart-totals {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.page-cart .checkout-actions .btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.page-cart .checkout-actions .btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.page-cart .empty-cart {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.page-cart .empty-cart-icon i {
    color: #ddd;
}

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

.fa-spin {
    animation: spin 1s linear infinite;
}
