/* =========================================
   CART UI 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: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.cart-sidebar {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    height: auto;
    max-height: 85vh;
    background: rgba(15, 10, 25, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(176, 38, 255, 0.3);
    border-radius: 20px;
    z-index: 1001;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(176, 38, 255, 0.15) inset;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-sidebar.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* STYL WYSKAKUJĄCEGO WYBIERAKA PŁATNOŚCI I INPUTA DISCORD */
.discord-nick-input {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.discord-nick-input label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
    text-align: center;
}

.discord-nick-input input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

.discord-nick-input input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.discord-nick-input input.error {
    border-color: #ff4d4d;
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.3);
}

.payment-selector {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.payment-selector label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
    text-align: center;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    font-size: 0.8rem;
    color: var(--neon-cyan);
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.payment-dropdown {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    text-align: center;
    text-align-last: center;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-dropdown:focus {
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(176, 38, 255, 0.3);
}

.payment-dropdown option {
    background: #111;
    color: #fff;
    text-align: center;
}

.cart-header {
    padding: 20px 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.cart-header h2 {
    font-size: 1.5rem;
    color: var(--text-light);
    font-family: 'Montserrat', sans-serif;
    margin: 0;
}

.close-cart-btn {
    position: absolute;
    right: 30px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-cart-btn:hover {
    color: var(--neon-purple);
}

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

/* CUSTOM SCROLLBAR DLA KOSZYKA */
.cart-items::-webkit-scrollbar {
    width: 6px;
}

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

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

/* STAN PUSTEGO KOSZYKA */
.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.empty-cart p {
    margin-top: 15px;
    font-size: 1.1rem;
}

/* NOWOCZESNY KOMPONENT PRODUKTU (SENIOR UI) */
.cart-item-pro {
    display: flex;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    transition: all 0.3s ease;
    opacity: 0;
    animation: cartSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.cart-item-pro:hover {
    background: rgba(30, 20, 40, 0.6);
    border-color: rgba(176, 38, 255, 0.4);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

@keyframes cartSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-icon {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 8px;
    width: 50px;
    flex-shrink: 0;
    margin-right: 15px;
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1) inset;
}

.item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-title {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1.3;
    padding-right: 20px;
}

.item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-price {
    margin: 0;
    color: var(--neon-green);
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 0 10px rgba(0, 250, 154, 0.2);
}

.qty-controller {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.qty-val {
    width: 22px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.remove-pro-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.remove-pro-btn:hover {
    color: #ff4d4d;
    background: rgba(255, 50, 50, 0.1);
    transform: scale(1.1) rotate(90deg);
}

.cart-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(5, 5, 8, 0.95);
    box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.3);
}

.cart-total-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}

.cart-total-price {
    font-size: 1.5rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.cart-icon-nav {
    position: relative;
    font-size: 1.5rem;
    text-decoration: none;
    color: white;
}

.cart-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--neon-purple);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
}

/* ADD TO CART ANIMATION */
.flying-cart-item {
    position: fixed;
    width: 30px;
    height: 30px;
    background: var(--neon-cyan);
    color: #000;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 900;
    font-size: 14px;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.8);
    pointer-events: none;
    transition: left 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
        top 0.6s cubic-bezier(0.5, 0, 1, 0.5),
        transform 0.6s ease, opacity 0.6s ease;
}

.pulse-anim {
    animation: cartPulse 0.4s ease;
}

@keyframes cartPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(176, 38, 255, 0.7);
    }

    50% {
        transform: scale(1.4);
        box-shadow: 0 0 0 10px rgba(176, 38, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(176, 38, 255, 0);
    }
}

.cart-item-new {
    animation: slideInItem 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slideInItem {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =========================================
   MOBILE RESPONSIVENESS (SMARTPHONES)
   ========================================= */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 95%;
        max-height: 90vh;
        border-radius: 15px;
    }

    .cart-header {
        padding: 15px 20px;
    }

    .cart-header h2 {
        font-size: 1.3rem;
    }

    .close-cart-btn {
        right: 20px;
        font-size: 1.8rem;
    }

    .cart-items {
        padding: 15px 20px;
    }

    .cart-footer {
        padding: 15px 20px;
    }

    .cart-total-price {
        font-size: 1.3rem;
    }

    .discord-nick-input input, .payment-dropdown {
        padding: 10px 15px;
        font-size: 0.95rem;
    }

    .item-icon {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
        margin-right: 10px;
    }

    .item-title {
        font-size: 0.85rem;
    }

    .item-price {
        font-size: 0.95rem;
    }

    .qty-btn {
        width: 22px;
        height: 22px;
    }

    .qty-val {
        font-size: 0.8rem;
    }
}