/* ==========================================================================
   PlaceRP Sklep - sklep.css
   Dostosowany 1 do 1 do wyglądu zakładki Transmisje (transmisje/style.css).
   ========================================================================== */

:root {
    --shop-gold: #fbbf24;
    --shop-gold-dim: rgba(251, 191, 36, 0.12);
    --shop-green: #10b981;
    --shop-green-dim: rgba(16, 185, 129, 0.12);
    --shop-blue: #3b82f6;
    --shop-blue-dim: rgba(59, 130, 246, 0.12);

    /* Główne kolory i akcenty z transmisji */
    --accent-primary: #9a03aa;
    --accent-secondary: #70027a;
    --border-color: rgba(255, 255, 255, 0.05);
}

/* ---- Kontener strony sklepu ---- */
#shop-page {
    position: relative;
    z-index: 1;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ==========================================================================
   HERO SECTION (Kopiowane 1:1 z .streams-hero)
   ========================================================================== */
.shop-hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 5% 80px;
    position: relative;
}

.shop-hero .shop-hero-content {
    max-width: 800px;
}

.shop-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    min-height: 1.2em;
    white-space: nowrap;
}

.shop-hero .cursor {
    color: var(--accent-primary);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.shop-hero p {
    font-size: 1.15rem;
    color: var(--light-gray);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.shop-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(154, 3, 170, 0.1);
    border: 1px solid rgba(154, 3, 170, 0.3);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #e4e4e7;
    margin-bottom: 20px;
}

.shop-hero-badge i {
    color: var(--accent-primary);
}

.shop-hero-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.hero-stat i {
    color: var(--accent-primary);
}

/* ==========================================================================
   SEKCJA ZAWARTOŚCI SKLEPU (Kopiowane 1:1 z .streams-container)
   ========================================================================== */
.shop-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 5% 100px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* --- Filtry i Zakładki (Kopiowane 1:1 z .streams-filters-row) --- */
.shop-filters-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.filter-group {
    display: flex;
    width: fit-content;
    gap: 4px;
    background: rgba(20, 20, 24, 0.45);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    padding: 6px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.55);
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.filter-btn i,
.filter-btn svg {
    font-size: 1rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-btn:hover {
    color: white;
}

.filter-btn:hover i,
.filter-btn:hover svg {
    transform: scale(1.15) rotate(5deg);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(154, 3, 170, 0.22) 0%, rgba(154, 3, 170, 0.08) 100%);
    color: #d8b4fe;
    border: 1px solid rgba(154, 3, 170, 0.45);
    box-shadow: 0 0 20px rgba(154, 3, 170, 0.3);
    text-shadow: 0 0 8px rgba(154, 3, 170, 0.5);
}

/* ==========================================================================
   SIATKA I KARTY PRODUKTÓW (Kopiowane 1:1 z .streams-grid i .stream-card-horizontal)
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    opacity: 1;
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
}

/* Card defaults for mobile/tablet */
.product-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    animation: cardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    position: relative;
    cursor: pointer;
}

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

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

.product-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, rgba(112, 2, 122, 0.15), rgba(112, 2, 122, 0.08));
}

.product-card-visual {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.product-banner {
    width: 100%;
    height: 150px;
    background-repeat: no-repeat;
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px 12px 0 0;
    box-sizing: border-box;
}

.default-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Wariant 1: Postacie, pojazdy itp. (Wypełnienie bez obcinania głowy) */
.product-banner.banner-cover {
    background-size: cover;
    background-position: center 15%;
    /* podniesienie kadru, aby nie obcinało głowy u góry */
}

/* Wariant 2: Monety, bilety, logotypy itp. (Dopasowanie do kontenera z lekkim marginesem) */
.product-banner.banner-contain {
    background-size: contain;
    background-position: center;
    background-origin: content-box;
    padding: 6px;
    /* Mniejszy margines wewnętrzny, aby grafiki były wyraźnie większe */
}

/* Badge popularności na zdjęciu */
.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.badge-popular {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: var(--shop-gold);
}

.badge-new {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--shop-green);
}

/* Ikona i opis */
.product-icon-area {
    padding: 16px 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(154, 3, 170, 0.12);
    border: 1px solid rgba(154, 3, 170, 0.25);
    color: var(--accent-primary);
    flex-shrink: 0;
}

.product-card-info {
    padding: 14px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.product-card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    line-height: 1.35;
    margin: 0;
}

.product-card-price {
    font-family: var(--font-headings);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--shop-gold);
    margin: 0;
}

.product-buy-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 11px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 5px;
}

.product-buy-btn:hover {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(154, 3, 170, 0.45);
    transform: scale(1.005);
}

.product-buy-btn:active {
    transform: scale(0.98);
}

/* ==========================================================================
   DESKTOP ACCORDION LAYOUT (Enabled for screen widths >= 992px)
   Replikacja 1 do 1 wyglądu i animacji z 77roleplay.pl
   ========================================================================== */
@media (min-width: 992px) {
    .shop-container {
        max-width: 1450px;
        /* zwiększone z 1200px, aby kafelki miały więcej miejsca na boki */
    }

    .products-grid {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: stretch;
        gap: 0;
        /* stykają się dzięki margin-left i clip-path */
        min-height: auto;
        overflow: visible;
        padding: 0;
        max-width: 100%;
        margin: 0 auto;
        width: max-content;
        align-self: center; /* Zapobiega rozciąganiu gridu do 100% szerokości rodzica */
        --slant: 35px;
        background: rgba(255, 255, 255, 0.02);
        backdrop-filter: blur(55px) saturate(180%);
        -webkit-backdrop-filter: blur(55px) saturate(180%);
    }

    .product-card {
        flex: 1 1 250px;
        width: 250px; /* Wymusza właściwy rozmiar bazowy przy kalkulacji max-content rodzica */
        max-width: 250px;
        /* zwiększone z 220px */
        min-width: 140px;
        /* zwiększone z 120px */
        display: flex;
        flex-direction: column;
        align-items: center;
        background: transparent;
        border: none;
        box-shadow: none;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        position: relative;
        overflow: visible;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .product-card:hover {
        z-index: 10;
        /* wysuwa kartę na wierzch nad sąsiadujące nakładające się skosy */
        background: transparent;
        border: none;
        box-shadow: none;
        transform: none;
    }

    /* Osobny element z cieniem i tłem na poziomie .product-card::before */
    .product-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 380px;
        z-index: 0;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 6px;
        box-sizing: border-box;
        transition: all 0.4s ease;
        filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.45));
    }

    /* Wyłączamy blur na poziomie pojedynczych kart na desktopie (jest teraz na poziomie siatki) */
    .product-card::after {
        display: none;
    }

    .product-card:hover::before {
        filter: drop-shadow(0 15px 30px rgba(154, 3, 170, 0.55));
    }

    /* Przyciemniamy tło pozostałych kart na hover */
    .products-grid:hover .product-card:not(:hover)::before {
        opacity: 0.35;
    }



    /* Ukośny kontener na obrazek (1:1 z 77RP, dopasowany do rzędu 7 pakietów) */
    .product-card-visual {
        width: 100%;
        height: 380px;
        position: relative;
        z-index: 2; /* Musi być na wierzchu rozmytego ::after i ::before */
        overflow: hidden;
        border-radius: 6px;
        transition: opacity 0.4s ease;
        background: transparent;
    }

    /* Wyłączamy pseudo-element na visual, bo tło, shadow i blur są teraz na .product-card::before i ::after */
    .product-card-visual::before {
        display: none;
    }

    /* Zmiana podświetlenia przy najechaniu (1:1 77RP - bez drgania skali kontenera) */
    .product-card:hover .product-card-visual {
        opacity: 1 !important;
    }

    /* Przyciemnianie pozostałych kart po najechaniu (1:1 77RP) */
    .products-grid:hover .product-card:not(:hover) .product-card-visual {
        opacity: 0.35;
    }

    /* Obrazek wewnątrz skosu */
    .product-banner {
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
        border-radius: 0;
        border-bottom: none;
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
    }

    .product-banner.banner-contain {
        background-size: contain;
        background-position: center;
        background-origin: content-box;
        padding: 20px;
        background-color: transparent;
    }

    /* Zoom obrazka przy najechaniu */
    .product-card:hover .product-banner {
        transform: scale(1.1);
    }

    /* -- DYNAMICZNE UKOŚNE WYCINANIE I NAKŁADANIE (1:1 77RP, matematycznie doskonałe przy każdej szerokości) -- */

    /* 1. Pierwsza karta: lewa krawędź prosta, prawa ścięta */
    .product-card:first-child::before,
    .product-card:first-child::after,
    .product-card:first-child .product-card-visual {
        clip-path: polygon(0% 0%, 100% 0%, calc(100% - var(--slant)) 100%, 0% 100%);
    }

    /* 2. Środkowe karty: obie krawędzie ścięte + nakładanie ujemnym marginesem */
    .product-card:nth-child(n+2) {
        margin-left: calc(-1 * var(--slant));
        /* idealne nakładanie skosów bez szpar i podwójnych linii */
    }

    .product-card:nth-child(n+2)::before,
    .product-card:nth-child(n+2)::after,
    .product-card:nth-child(n+2) .product-card-visual {
        clip-path: polygon(var(--slant) 0%, 100% 0%, calc(100% - var(--slant)) 100%, 0% 100%);
    }

    /* 3. Ostatnia karta: lewa krawędź ścięta, prawa prosta */
    .product-card:last-child::before,
    .product-card:last-child::after,
    .product-card:last-child .product-card-visual {
        clip-path: polygon(var(--slant) 0%, 100% 0%, 100% 100%, 0% 100%);
    }

    /* 4. Zabezpieczenie dla pojedynczego produktu w kategorii */
    .product-card:first-child:last-child {
        margin-left: 0;
    }

    .product-card:first-child:last-child::before,
    .product-card:first-child:last-child::after,
    .product-card:first-child:last-child .product-card-visual {
        clip-path: none;
    }

    /* Napisy wewnątrz kafelków na dole (1:1 z 77RP - wyśrodkowane i nałożone na dół kafelka) */
    .product-card-info {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        text-align: center;
        padding: 24px 10px 20px 10px;
        /* Zmniejszony padding boczny z 20px do 10px, aby dać więcej miejsca na tekst */
        background: transparent;
        transition: transform 0.4s ease;
        box-sizing: border-box;
        z-index: 5;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    /* Przesunięcie paddingu skrajnych elementów, by wycentrować napisy */
    .product-card:first-child .product-card-info {
        padding-right: calc(10px + var(--slant));
    }

    .product-card:last-child .product-card-info {
        padding-left: calc(10px + var(--slant));
    }

    .product-card:hover .product-card-info {
        transform: translateY(3px);
    }

    .product-card-title {
        font-family: var(--font-heading);
        font-size: 1.05rem;
        /* Zmniejszone z 1.15rem, aby tekst idealnie mieścił się w jednej linii */
        font-weight: 800;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.45);
        /* domyślnie na szaro */
        margin: 0 0 6px 0;
        letter-spacing: 0.5px;
        transition: color 0.3s ease;
        white-space: nowrap;
        /* Zabezpieczenie przed zawijaniem tekstu do nowej linii */
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .product-card:hover .product-card-title {
        color: white;
        /* podświetlenie na biało */
    }

    .product-card-price {
        font-family: var(--font-headings);
        font-size: 1.05rem;
        /* Zmniejszone z 1.1rem */
        font-weight: 700;
        color: rgba(255, 255, 255, 0.4);
        /* domyślnie na szaro */
        margin: 0;
        transition: color 0.3s ease;
        white-space: nowrap;
        /* Zabezpieczenie przed zawijaniem tekstu do nowej linii */
    }

    .product-card:hover .product-card-price {
        color: var(--shop-gold);
        /* cena na złoto */
    }

    /* Ukrywamy przycisk "Kup teraz" na desktopie (cała karta staje się przyciskiem) */
    .product-card .product-buy-btn {
        display: none;
    }
}

/* ==========================================================================
   LOADER & ERRORS
   ========================================================================== */
.products-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 15px;
    color: var(--text-secondary);
}

.loader-ring {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(154, 3, 170, 0.15);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.products-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 16px;
    text-align: center;
}

.products-error i {
    font-size: 2.5rem;
    color: rgba(251, 191, 36, 0.6);
}

.products-error h3 {
    font-family: var(--font-heading);
    color: white;
    font-size: 1.25rem;
}

.products-error p {
    color: var(--text-secondary);
}

.retry-btn {
    margin-top: 10px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.retry-btn:hover {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(154, 3, 170, 0.45);
}

/* ==========================================================================
   MODALE (1:1 z głównym stylem)
   ========================================================================== */
.buy-modal {
    position: fixed;
    inset: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.buy-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Gdy modal jest aktywny — ukryj całą zawartość sklepu, zostaw tylko wideo w tle */
#shop-page:has(.buy-modal.active) .shop-hero,
#shop-page:has(.buy-modal.active) .shop-container,
#shop-page:has(.buy-modal.active) .main-footer {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

body:has(.buy-modal.active) .navbar {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.buy-modal-box {
    width: 100%;
    max-width: 480px;
    background: rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 36px;
    position: relative;
    transform: scale(0.93) translateY(15px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7);
}

.buy-modal.active .buy-modal-box {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-icon {
    width: 44px;
    height: 44px;
    background: rgba(154, 3, 170, 0.12);
    border: 1px solid rgba(154, 3, 170, 0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent-primary);
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: white;
    margin: 0;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-package-info {
    background: rgba(154, 3, 170, 0.05);
    border: 1px solid rgba(154, 3, 170, 0.15);
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.modal-package-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
}

.modal-package-price {
    font-family: var(--font-headings);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--shop-gold);
    white-space: nowrap;
}

.modal-info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-cancel-btn {
    flex: 1;
    height: 44px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.modal-buy-btn {
    flex: 1.8;
    height: 44px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.modal-buy-btn:hover {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(154, 3, 170, 0.45);
}

.modal-buy-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ==========================================================================
   MODAL SUKCESU PŁATNOŚCI
   ========================================================================== */
.transaction-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed rgba(16, 185, 129, 0.4);
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
}

#transaction-id-text {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--shop-green);
    font-weight: 700;
    letter-spacing: 1px;
    word-break: break-all;
    text-align: left;
}

.copy-btn {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--shop-green);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: var(--shop-green);
    color: white;
    transform: scale(1.05);
}

/* ==========================================================================
   SYSTEM TOASTÓW
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(29, 29, 32, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    max-width: 320px;
    font-weight: 500;
}

.toast.toast-error {
    border-left: 3px solid #ef4444;
}

.toast.toast-success {
    border-left: 3px solid var(--shop-green);
}

.toast.toast-info {
    border-left: 3px solid var(--accent-primary);
}

.toast i {
    font-size: 1rem;
}

.toast.toast-error i {
    color: #ef4444;
}

.toast.toast-success i {
    color: var(--shop-green);
}

.toast.toast-info i {
    color: var(--accent-primary);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
    .shop-hero {
        padding: 120px 5% 40px;
        min-height: 50vh;
    }

    .shop-hero h1 {
        font-size: 2.2rem;
    }

    .shop-hero-stats {
        gap: 16px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .buy-modal-box {
        padding: 24px;
    }

    .modal-package-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .modal-footer {
        flex-direction: column;
    }

    .modal-cancel-btn,
    .modal-buy-btn {
        flex: none;
        width: 100%;
    }
}

/* ==========================================================================
   MODAL POTWIERDZENIA v2 — przebudowany od zera
   Layout: .buy-modal-box.rp-style > .modal-split
           > .modal-img-col  (fixed-width image)
           > .modal-detail-col
               > .modal-detail-scroll  (scrollable: title + price + desc)
               > .modal-detail-action  (pinned bottom: button)
   ========================================================================== */

/* --- Kontener modala (rp-style) --- */
.buy-modal-box.rp-style {
    max-width: 850px;
    width: 90%;
    height: 560px;
    max-height: 90vh;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-sizing: border-box;
    background: rgba(10, 10, 14, 0.40);
    backdrop-filter: blur(36px) saturate(170%);
    -webkit-backdrop-filter: blur(36px) saturate(170%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* --- Podział lewo/prawo --- */
.modal-split {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* --- Lewa kolumna: obrazek --- */
.modal-img-col {
    width: 260px;
    flex-shrink: 0;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.modal-img-inner {
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
    box-sizing: border-box;
}

.modal-img-inner.image-cover {
    background-size: cover;
    background-position: center;
}

.modal-img-inner.image-contain {
    background-size: 150px auto;
    background-position: center;
    background-color: transparent;
}

/* --- Prawa kolumna: detale --- */
.modal-detail-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
    overflow: hidden;
}

/* Strefa przewijalna: tytuł + cena + opis */
.modal-detail-scroll {
    flex: 1 1 auto;
    min-height: 0;              /* kluczowe: pozwala flex-child się skurczyć */
    overflow-y: auto;
    padding: 38px 36px 12px 36px;
    box-sizing: border-box;
}

/* Scrollbar */
.modal-detail-scroll::-webkit-scrollbar { width: 5px; }
.modal-detail-scroll::-webkit-scrollbar-track { background: transparent; }
.modal-detail-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}
.modal-detail-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Tytuł pakietu */
.modal-pkg-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: white;
    margin: 0 0 6px 0;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* Cena */
.modal-pkg-price {
    font-family: var(--font-headings);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--shop-gold);
    margin: 0 0 18px 0;
}

/* Opis */
.modal-pkg-description {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
}

.modal-pkg-description p {
    margin: 0 0 10px 0;
    color: rgba(255, 255, 255, 0.7);
}

.modal-pkg-description h1,
.modal-pkg-description h2,
.modal-pkg-description h3,
.modal-pkg-description h4 {
    color: white;
    font-family: var(--font-heading);
    margin: 18px 0 6px 0;
    font-size: 1.02rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.modal-pkg-description ul {
    list-style-type: disc !important;
    padding-left: 20px !important;
    margin: 0 0 10px 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.modal-pkg-description ol {
    list-style-type: decimal !important;
    padding-left: 20px !important;
    margin: 0 0 10px 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.modal-pkg-description li {
    color: rgba(255, 255, 255, 0.75) !important;
    line-height: 1.5;
    margin: 0 !important;
    padding-left: 0 !important;
}

.modal-pkg-description li::before {
    display: none !important;
}

/* --- Strefa przycisku (zawsze na dole, nigdy nie scrolluje) --- */
.modal-detail-action {
    flex: 0 0 auto;
    padding: 14px 36px 28px 36px;
    box-sizing: border-box;
}

/* Przycisk "Przejdź do płatności" / "Przetwarzanie..." */
.modal-checkout-btn {
    width: 100%;
    height: 52px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    color: #e7e7e7;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.97rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* Label / Loading toggle — domyślnie widoczny label, ukryty loading */
.modal-checkout-btn .btn-label   { display: inline; }
.modal-checkout-btn .btn-loading { display: none; }

/* Stan loading — przełączamy widoczność spanów, BEZ zmiany innerHTML */
.modal-checkout-btn.is-loading .btn-label   { display: none; }
.modal-checkout-btn.is-loading .btn-loading { display: inline-flex; align-items: center; gap: 8px; }
.modal-checkout-btn.is-loading {
    opacity: 0.65;
    pointer-events: none;
    cursor: wait;
}

/* Hover */
.modal-checkout-btn:hover {
    background: linear-gradient(135deg, rgba(112, 2, 122, 0.18), rgba(112, 2, 122, 0.06));
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 0 24px rgba(154, 3, 170, 0.2);
}

.modal-checkout-btn:active {
    opacity: 0.85;
}

/* --- Pole Discord ID --- */
.modal-discord-row {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.modal-discord-row label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    color: #5865F2; /* Discord branding color */
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.discord-input-container {
    position: relative;
    width: 100%;
    display: flex;
    gap: 8px;
}

.discord-input-container input {
    flex: 1;
    min-width: 0;
    height: 46px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: white;
    padding: 0 14px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    box-sizing: border-box;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.discord-verify-btn {
    height: 46px;
    padding: 0 18px;
    border-radius: 8px;
    background: #5865F2;
    border: none;
    color: white;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s, opacity 0.2s;
    white-space: nowrap;
    box-sizing: border-box;
}

.discord-verify-btn:hover {
    background: #4752C4;
}

.discord-verify-btn:active {
    opacity: 0.85;
}

.discord-verify-btn.is-loading {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}

.discord-verified-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(88, 101, 242, 0.08); /* Discord Color 8% */
    border: 1px solid rgba(88, 101, 242, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    box-sizing: border-box;
    width: 100%;
}

.discord-verified-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.discord-logo-icon {
    font-size: 1.35rem;
    color: #5865F2;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 101, 242, 0.1);
    border-radius: 50%;
    box-sizing: border-box;
}

.discord-avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(88, 101, 242, 0.35);
    box-sizing: border-box;
}

.discord-user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.discord-display-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: white;
    font-family: var(--font-body);
}

.discord-handle {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-body);
}

.discord-change-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    font-family: var(--font-body);
}

.discord-change-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.discord-input-container input:focus {
    outline: none;
    border-color: #5865F2;
    box-shadow: 0 0 10px rgba(88, 101, 242, 0.2);
}

.discord-input-container input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* Stan błędu walidacji */
.discord-input-container.has-error input {
    border-color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.discord-error-msg {
    color: #ef4444;
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: -2px;
    display: none;
    line-height: 1.3;
}

.discord-help-text {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.discord-help-text a {
    color: #5865F2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.discord-help-text a:hover {
    color: #7289da;
    text-decoration: underline;
}

/* ==========================================================================
   MODAL v2 — MOBILE (≤ 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .buy-modal-box.rp-style {
        max-width: 480px;
        width: 95%;
        height: auto;
        max-height: 88vh;
    }

    .modal-split {
        flex-direction: column;
        overflow-y: auto;
    }

    .modal-img-col {
        width: 100%;
        height: 180px;
        flex-shrink: 0;
    }

    .modal-img-inner {
        clip-path: none;
        border-radius: 14px 14px 0 0;
    }

    .modal-img-inner.image-contain {
        background-size: 110px auto;
    }

    .modal-detail-col {
        overflow: visible;
    }

    .modal-detail-scroll {
        padding: 22px 22px 8px 22px;
        overflow-y: visible;
        min-height: auto;
    }

    .modal-pkg-title {
        font-size: 1.4rem;
    }

    .modal-pkg-price {
        font-size: 1.15rem;
        margin-bottom: 14px;
    }

    .modal-detail-action {
        padding: 10px 22px 22px 22px;
    }
}