/* Cart Modal Styles */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1001;
    display: none;
    justify-content: center;
    align-items: center;
}

.cart-overlay.active {
    display: flex;
}

.cart-sidebar {
    position: relative;
    width: 500px;
    max-width: 90%;
    max-height: 85vh;
    background: linear-gradient(135deg, #1e1e24 0%, #16161a 100%);
    border-radius: 25px;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
    overflow: hidden;
}

.cart-overlay.active .cart-sidebar {
    transform: scale(1);
    opacity: 1;
}

.cart-header {
    padding: 25px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 212, 255, 0.05);
}

.cart-header h3 {
    font-size: 1.8rem;
    color: var(--text-main);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-cart {
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--text-muted);
    transition: color 0.3s, transform 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.close-cart:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
    background: rgba(255, 255, 255, 0.1);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-msg {
    text-align: center;
    color: var(--text-muted);
    margin-top: 50px;
    font-size: 1.1rem;
}

.cart-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 15px;
    align-items: center;
    transition: background 0.3s;
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.cart-item img {
    width: 50px;
    height: 50px;
    min-width: 50px;
    max-width: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--glass-border);
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.cart-item-title {
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: block;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: bold;
}

.remove-item {
    color: #ff4757;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s;
    border-radius: 8px;
    flex-shrink: 0;
}

.remove-item:hover {
    opacity: 1;
    transform: scale(1.2);
}

.cart-footer {
    padding: 25px;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
}

.total {
    display: flex;
    justify-content: space-between;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.total span:last-child {
    color: var(--accent-color);
}

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

.cart-items::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

.cart-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}