/**
 * Cart Panel Styles
 * Slide-out cart panel for CodLion theme
 * Professional e-commerce cart functionality
 */

/* Cart Panel Overlay */
.cart-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Cart Panel */
.cart-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.cart-panel.active {
    right: 0;
}

/* Cart Panel Header */
.cart-panel-header {
    padding: 25px 20px 20px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
}

.cart-panel-title {
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin: 0;
    letter-spacing: 2px;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
}

.cart-panel-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #000000;
    padding: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    font-weight: 300;
}

.cart-panel-close:hover {
    color: #666;
}

/* Cart Panel Content */
.cart-panel-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.cart-empty-text {
    font-size: 16px;
    color: #000000;
    margin-bottom: 40px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    line-height: 1.5;
}

.cart-empty-actions {
    width: 100%;
    max-width: 280px;
}

/* Cart Items */
.cart-items {
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    margin-right: 15px;
}

.cart-item-name {
    font-size: 13px;
    font-weight: 400;
    color: #000000;
    margin-bottom: 8px;
    line-height: 1.4;
    font-family: 'Poppins', sans-serif;
}

.cart-item-price {
    font-size: 12px;
    color: #000000;
    margin-bottom: 10px;
    font-weight: 400;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    border-color: #333;
    background-color: #f8f9fa;
}

.quantity-input {
    width: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 2px;
    padding: 4px;
    font-size: 14px;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.cart-item-remove:hover {
    color: #e74c3c;
}

/* Cart Panel Footer */
.cart-panel-footer {
    padding: 20px;
    border-top: 1px solid #e5e5e5;
    background-color: #ffffff;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 400;
}

.cart-subtotal-label {
    color: #000000;
    letter-spacing: 2px;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
}

.cart-subtotal-amount {
    color: #000000;
    font-weight: 600;
    font-size: 14px;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-btn {
    border: none;
    border-radius: 0;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    letter-spacing: 2px;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-btn-primary {
    background-color: #000000;
    color: #ffffff;
    border: 1px solid #000000;
}

.cart-btn-primary:hover {
    background-color: #333333;
    border-color: #333333;
}

.cart-btn-secondary {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #000000;
}

.cart-btn-secondary:hover {
    background-color: #000000;
    color: #ffffff;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .cart-panel {
        width: 100%;
        right: -100%;
    }
    
    .cart-panel-header {
        padding: 15px;
    }
    
    .cart-panel-content {
        padding: 15px;
    }
    
    .cart-panel-footer {
        padding: 15px;
    }
    
    .cart-item-image {
        width: 50px;
        height: 50px;
    }
    
    .cart-item-name {
        font-size: 13px;
    }
    
    .cart-item-price {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .cart-panel {
        width: 100vw;
    }
}

/* Animation for cart count badge */
.cart-count.updated {
    animation: cartBounce 0.6s ease;
}

@keyframes cartBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Scrollbar styling for cart content */
.cart-panel-content::-webkit-scrollbar {
    width: 6px;
}

.cart-panel-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.cart-panel-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.cart-panel-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
