/* ============================================
   UNIFIED CART COMPONENT STYLES
   Shared across all pages (scripts, merchandise)
   ============================================ */

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    z-index: 10001;
    pointer-events: none;
}

.cart-sidebar .cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-sidebar.active .cart-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.cart-sidebar .cart-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: #14141a;
    border-left: 1px solid rgba(122, 247, 247, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    pointer-events: all;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
}

.cart-sidebar.active .cart-panel {
    transform: translateX(0);
}

/* Cart Header */
.cart-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20, 20, 26, 0.95);
}

.cart-header h3 {
    font-size: 1.1rem;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.cart-header h3 i {
    color: #7af7f7;
}

.cart-count-badge {
    background: #7af7f7;
    color: #0a0a0c;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    min-width: 28px;
    text-align: center;
}

.cart-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cart-close-btn:hover {
    background: rgba(122, 247, 247, 0.2);
    color: #7af7f7;
    transform: rotate(90deg);
}

/* Cart Content */
.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Custom Scrollbar */
.cart-content::-webkit-scrollbar {
    width: 5px;
}

.cart-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.cart-content::-webkit-scrollbar-thumb {
    background: #7af7f7;
    border-radius: 10px;
}

/* Cart Empty State */
.cart-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9CA3AF;
}

.cart-empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.4;
    color: #7af7f7;
}

.cart-empty-state p {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.cart-empty-state .cart-empty-hint {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Cart Items List */
.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(122, 247, 247, 0.2);
}

.cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 5px;
    font-weight: 600;
    line-height: 1.3;
}

.cart-item-options {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.65rem;
    color: #9CA3AF;
    flex-wrap: wrap;
}

.cart-item-options small {
    background: rgba(122, 247, 247, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    color: #7af7f7;
}

.cart-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.cart-item-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: #83f582;
}

.cart-item-price .currency-symbol {
    font-size: 0.7rem;
    margin-right: 2px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.7rem;
}

.quantity-btn:hover {
    background: #7af7f7;
    color: #0a0a0c;
    transform: scale(1.05);
}

.quantity-display {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 25px;
    text-align: center;
    color: #ffffff;
}

.remove-item-btn {
    background: transparent;
    border: none;
    color: #ff158a;
    cursor: pointer;
    margin-left: 5px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-item-btn:hover {
    background: rgba(255, 21, 138, 0.2);
    transform: scale(1.05);
}

/* Cart Summary */
.cart-summary {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(20, 20, 26, 0.95);
}

.cart-subtotal, .cart-shipping, .cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.cart-shipping {
    color: #9CA3AF;
    font-size: 0.75rem;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-total {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-total .total-amount {
    color: #83f582;
    font-size: 1.1rem;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.cart-actions .btn {
    padding: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    width: 100%;
}

.checkout-btn {
    background: #7af7f7;
    border: none;
    color: #0a0a0c;
}

.checkout-btn:hover {
    background: #5ed4d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(122, 247, 247, 0.3);
}

.continue-shopping-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.continue-shopping-btn:hover {
    border-color: #7af7f7;
    color: #7af7f7;
    transform: translateY(-2px);
}

/* Cart Toggle Button (Floating) */
.cart-toggle-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    background: #7af7f7;
    color: #0a0a0c;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    z-index: 9999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cart-toggle-btn:hover {
    transform: scale(1.08);
    background: #5ed4d4;
    box-shadow: 0 6px 20px rgba(122, 247, 247, 0.3);
}

.cart-toggle-btn .cart-item-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff158a;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cart-item {
    animation: fadeIn 0.3s ease;
}

/* Responsive Cart */
@media (max-width: 480px) {
    .cart-sidebar {
        max-width: 100%;
    }
    
    .cart-header {
        padding: 15px;
    }
    
    .cart-content {
        padding: 15px;
    }
    
    .cart-item {
        padding: 12px;
        gap: 10px;
    }
    
    .cart-item-image {
        width: 55px;
        height: 55px;
    }
    
    .cart-item-title {
        font-size: 0.8rem;
    }
    
    .cart-item-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-summary {
        padding: 15px;
    }
    
    .cart-toggle-btn {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
        bottom: 20px;
        right: 20px;
    }
}

/* Dark theme adjustments */
@media (prefers-color-scheme: dark) {
    .cart-sidebar .cart-panel {
        background: #0f0f13;
    }
}