/* Kontener siatki kart */
.jabra-deck-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    padding: 30px 0;
    width: 100%;
}

/* Pojedyncza karta */
.jabra-card-wrapper {
    position: relative;
    width: 280px;
    height: 400px;
    flex: 0 0 280px;
    perspective: 1200px;
    cursor: pointer;
    margin-bottom: 120px; /* Przestrzeń na wysuwający się panel marek */
}

/* Wewnętrzny kontener wykonujący obrót */
.jabra-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 20px;
    will-change: transform;
}

/* --- BAZOWE STYLE DLA STRON KARTY --- */
.jabra-card-back, .jabra-card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease, background 0.4s ease;
}

/* REWERS (Domyślny tył karty UCON) - Luksusowy granatowy gradient */
.jabra-card-back {
    background: linear-gradient(135deg, #0d2240 0%, #030914 100%) !important; 
    color: #ffffff;
    justify-content: center;
    align-items: center;
    z-index: 2;
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 45px rgba(3, 11, 24, 0.42), 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* AWERS (Przód karty) - Profesjonalna biel */
.jabra-card-front {
    background-color: #ffffff !important;
    color: #0f172a !important;
    transform: rotateY(180deg);
    justify-content: space-between;
    align-items: center;
    z-index: 1;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16), 0 8px 20px rgba(15, 23, 42, 0.08);
}

/* Ujednolicony boks logo na rewersie - efekt szkła (glassmorphism) */
.jabra-logo-box {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(3, 11, 24, 0.75) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 8px 24px rgba(0, 0, 0, 0.4);
    border-radius: 16px !important;
    width: 88% !important;
    max-width: 240px !important;
    min-height: 145px !important; 
    height: auto !important;
    padding: 20px 14px !important; 
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important; 
    align-items: center !important;
    position: relative;
    z-index: 3;
}

/* Wspólny celownik (narożniki) dla wszystkich typów kart */
.jabra-logo-box::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid transparent;
    border-radius: 20px;
    clip-path: polygon(
        0% 0%, 20% 0%, 20% 3px, 3px 3px, 3px 20%, 0% 20%,
        0% 80%, 3px 80%, 3px calc(100% - 3px), 20% calc(100% - 3px), 20% 100%, 0% 100%,
        100% 100%, 80% 100%, 80% calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 80%, 100% 80%,
        100% 20%, calc(100% - 3px) 20%, calc(100% - 3px) 3px, 80% 3px, 80% 0%, 100% 0%
    );
    pointer-events: none;
    transition: border-color 0.4s ease;
}

.jabra-text {
    font-size: 1.75rem !important;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    line-height: 1;
    white-space: nowrap !important;
}

.ucon-decay-tag, .ucon-deck-tag {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-top: 8px;
    opacity: 0.9;
    text-transform: uppercase;
    white-space: nowrap !important;
}

/* ==========================================================================
   🔮 SEKCJA WIDEOKONFERENCJI (MTR) - Fioletowe akcenty
   ========================================================================== */

/* Tył karty: Ciemny granat + fioletowe kropki + fioletowa obwódka */
.faction-mtr .jabra-card-back {
    border: 2px solid rgba(168, 85, 247, 0.45) !important;
    background: radial-gradient(rgba(245, 158, 11, 0.15) 1px, transparent 1px), 
                linear-gradient(135deg, #0d2240 0%, #030914 100%) !important;
    background-size: 16px 16px, 100% 100% !important;
}

/* Przód karty: Czyste białe tło z delikatnym fioletowym gradientem u dołu */
.faction-mtr .jabra-card-front {
    border: 1px solid rgba(168, 85, 247, 0.2) !important;
    background: linear-gradient(180deg, #ffffff 65%, #faf5ff 100%) !important;
}

.faction-mtr .jabra-logo-box {
    border: 1px solid rgba(168, 85, 247, 0.4) !important; 
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 
                0 8px 24px rgba(0, 0, 0, 0.4), 
                0 0 15px rgba(168, 85, 247, 0.15) !important;
}

/* Celowniki narożne wokół logo */
.faction-mtr .jabra-logo-box::after {
    border-color: rgba(168, 85, 247, 0.55) !important;
}

.faction-mtr .uc-platforms-row {
    display: flex !important;
    gap: 14px !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 8px 0 !important; 
    width: 100% !important;
}

.faction-mtr .platform-icon {
    display: inline-block !important;
    width: 28px !important;   
    height: 28px !important;  
    flex: 0 0 28px !important;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.faction-mtr .jabra-text {
    color: #ffffff !important; 
    letter-spacing: 3px !important; 
    font-weight: 800 !important;
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
}

.faction-mtr .ucon-deck-tag {
    color: #cbd5e1 !important; 
    font-size: 0.8rem !important; 
    margin: 0 !important;
}

/* ==========================================================================
   ✨ SEKCJA EKRANÓW (EKRANY & LED) - Niebieskie/Cyan akcenty
   ========================================================================== */

/* Tył karty: Ciemny granat + niebieskie kropki + niebieska obwódka */
.faction-ekrany .jabra-card-back { 
    border: 2px solid rgba(20, 93, 255, 0.45) !important; 
    background: radial-gradient(rgba(245, 158, 11, 0.15) 1px, transparent 1px), 
                linear-gradient(135deg, #0d2240 0%, #030914 100%) !important;
    background-size: 16px 16px, 100% 100% !important;
}

/* Przód karty: Czyste białe tło z delikatnym niebieskim gradientem u dołu */
.faction-ekrany .jabra-card-front {
    border: 1px solid rgba(20, 93, 255, 0.2) !important;
    background: linear-gradient(180deg, #ffffff 65%, #f0f7ff 100%) !important;
}

.faction-ekrany .jabra-logo-box { 
    border-color: rgba(20, 93, 255, 0.4) !important; 
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 
                0 8px 24px rgba(0, 0, 0, 0.4), 
                0 0 15px rgba(20, 93, 255, 0.15) !important;
}

.faction-ekrany .jabra-logo-box::after {
    border-color: rgba(20, 93, 255, 0.55) !important;
}

.faction-ekrany .jabra-text { 
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(20, 93, 255, 0.6);
}

.display-tech-row {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 10px 0 !important;
}
.display-icon {
    width: 32px !important;
    height: 32px !important;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* ==========================================================================
   🛡️ SEKCJA SŁUCHAWEK BIZNESOWYCH - Żółte/Amber akcenty
   ========================================================================== */

/* Tył karty: Ciemny granat + żółte kropki + żółta obwódka */
.faction-sluchawki .jabra-card-back { 
    border: 2px solid rgba(245, 158, 11, 0.45) !important; 
    background: radial-gradient(rgba(245, 158, 11, 0.15) 1px, transparent 1px), 
                linear-gradient(135deg, #0d2240 0%, #030914 100%) !important;
    background-size: 16px 16px, 100% 100% !important;
}

/* Przód karty: Czyste białe tło z delikatnym żółtym gradientem u dołu */
.faction-sluchawki .jabra-card-front {
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
    background: linear-gradient(180deg, #ffffff 65%, #fffbeb 100%) !important;
}

.faction-sluchawki .jabra-logo-box {
    border-color: rgba(245, 158, 11, 0.4) !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 
                0 8px 24px rgba(0, 0, 0, 0.4), 
                0 0 15px rgba(245, 158, 11, 0.15) !important;
}

.faction-sluchawki .jabra-logo-box::after {
    border-color: rgba(245, 158, 11, 0.55) !important;
}

.faction-sluchawki .jabra-text { 
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

/* ==========================================================================
   ⌨️ SEKCJA WORKPLACE/PERYFERIÓW - Szare akcenty
   ========================================================================== */

/* Tył karty: Ciemny granat + szare kropki + szara obwódka */
.faction-peryferia .jabra-card-back { 
    border: 2px solid rgba(100, 116, 139, 0.45) !important; 
    background: radial-gradient(rgba(245, 158, 11, 0.15) 1px, transparent 1px), 
                linear-gradient(135deg, #0d2240 0%, #030914 100%) !important;
    background-size: 16px 16px, 100% 100% !important;
}

/* Przód karty: Czyste białe tło z delikatnym szarym gradientem u dołu */
.faction-peryferia .jabra-card-front { 
    border: 1px solid rgba(100, 116, 139, 0.2) !important; 
    background: linear-gradient(180deg, #ffffff 65%, #f8fafc 100%) !important;
}

.faction-peryferia .jabra-logo-box {
    border-color: rgba(100, 116, 139, 0.4) !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 
                0 8px 24px rgba(0, 0, 0, 0.4), 
                0 0 15px rgba(100, 116, 139, 0.15) !important;
}

.faction-peryferia .jabra-logo-box::after {
    border-color: rgba(100, 116, 139, 0.55) !important;
}

.faction-peryferia .jabra-text { 
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(100, 116, 139, 0.6);
}

/* ==========================================================================
   --- ANIMACJE I OBRÓT ---
   ========================================================================== */
.jabra-card-wrapper:hover .jabra-card-inner {
    transform: rotateY(180deg) scale(1.02);
}

/* ODSŁONIĘTA KARTA DOMYŚLNIE (Dla kategorii na podstronie) */
.jabra-card-inner.revealed-glow {
    transform: rotateY(180deg);
}
.jabra-card-inner.revealed-glow .jabra-card-front {
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16), 0 8px 20px rgba(15, 23, 42, 0.08);
}
.jabra-card-wrapper .revealed-glow:hover {
    transform: rotateY(180deg) scale(1.03) !important;
}

/* ==========================================================================
   ⭐ DYNAMICZNE PRZEJŚCIE W ZŁOTĄ KARTĘ NA HOVER (ŻÓŁTA POŚWIATA I TŁO - SUBTELNA WERSJA)
   ========================================================================== */

/* Efekt dla awersów (przodów) wszystkich kart po najechaniu - delikatna kremowo-złota poświata */
.jabra-card-wrapper:hover .jabra-card-front,
.jabra-card-wrapper .revealed-glow:hover .jabra-card-front {
    background: linear-gradient(135deg, #ffffff 0%, #fef9c3 100%) !important;
    border: 1px solid rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 35px 70px rgba(15, 23, 42, 0.24), 0 12px 30px rgba(15, 23, 42, 0.12), 0 0 25px rgba(245, 158, 11, 0.35) !important;
}

/* Efekt dla rewersów (tyłów) wszystkich kart podczas rozpoczynania obrotu */
.jabra-card-wrapper:hover .jabra-card-back {
    border-color: rgba(245, 158, 11, 0.4) !important;
    box-shadow: 0 35px 70px rgba(3, 11, 24, 0.55), 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 25px rgba(245, 158, 11, 0.2) !important;
}

/* Efekt dla celowników (narożników) na rewersach po najechaniu */
.jabra-card-wrapper:hover .jabra-logo-box::after {
    border-color: rgba(245, 158, 11, 0.65) !important;
}

/* Zmiana koloru tekstu rewersu dla lepszego kontrastu ze złotą poświatą */
.jabra-card-wrapper:hover .jabra-text {
    color: #fcd34d !important;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.4) !important;
}

/* Etykiety i zawartość frontu */
.card-rarity-tag {
    align-self: flex-end;
    background-color: #f1f5f9; 
    color: #475569;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 30px;
    letter-spacing: 1px;
}

.card-new-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #ffffff !important;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 5px 9px;
    border-radius: 6px;
    text-transform: uppercase;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.card-img-holder {
    width: 100%;
    height: 180px;
    margin: auto 0 !important; 
    margin-top: 35px !important; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.card-img-holder img, .card-img-holder svg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}
.jabra-card-wrapper:hover .card-img-holder img,
.jabra-card-wrapper:hover .card-img-holder svg {
    transform: scale(1.08);
}

.card-product-meta h3 {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #0f172a !important;
    min-height: 3.6rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.card-product-meta p {
    font-size: 0.85rem;
    color: #64748b !important;
    margin-bottom: 5px;
    text-align: center;
}

/* ==========================================================================
   --- SYSTEM DYNAMICZNYCH MINI-KART PRODUCENTÓW ---
   ========================================================================== */
.brand-selector-panel {
    position: absolute;
    bottom: -115px;   
    left: 50%;
    transform: translateX(-50%) translateY(-15px);
    display: flex;
    gap: 12px;        
    justify-content: center;
    width: max-content;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    z-index: 50;
}

.jabra-card-wrapper:hover .brand-selector-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.mini-brand-card {
    width: 100px;        
    height: 130px;       
    background-color: #ffffff; 
    border-radius: 12px; 
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.05);
}

.mini-brand-name {
    font-size: 0.68rem;  
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-top: 6px;     
    text-align: center;
}

.mini-brand-logo {
    width: 100%;
    height: 55px;        
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.mini-brand-logo img {
    max-width: 92%;
    max-height: 92%;
    object-fit: contain;
    filter: grayscale(100%) opacity(50%);
    transition: filter 0.25s ease, opacity 0.25s ease;
}
.mini-brand-card:hover .mini-brand-logo img {
    filter: grayscale(0%) opacity(100%);
}

.faction-mtr .mini-brand-card:hover { 
    border-color: #a855f7; transform: translateY(-6px) scale(1.05); box-shadow: 0 6px 18px rgba(168, 85, 247, 0.2);
}
.faction-mtr .mini-brand-card:hover .mini-brand-name { color: #a855f7; }

.faction-ekrany .mini-brand-card:hover { 
    border-color: #205dff; transform: translateY(-6px) scale(1.05); box-shadow: 0 6px 18px rgba(20, 93, 255, 0.2);
}
.faction-ekrany .mini-brand-card:hover .mini-brand-name { color: #205dff; }

.faction-sluchawki .mini-brand-card:hover { 
    border-color: #ffbe00; transform: translateY(-6px) scale(1.05); box-shadow: 0 6px 18px rgba(255, 190, 0, 0.2);
}
.faction-sluchawki .mini-brand-card:hover .mini-brand-name { color: #ffbe00; }

.faction-peryferia .mini-brand-card:hover { 
    border-color: #64748b; transform: translateY(-6px) scale(1.05); box-shadow: 0 6px 14px rgba(100, 116, 139, 0.15);
}
.faction-peryferia .mini-brand-card:hover .mini-brand-name { color: #475569; }

/* ==========================================================================
   SUBTELNE LINIE PODZIAŁU KATEGORII
   ========================================================================== */
.ucon-scanner-line {
    width: 100%;
    height: 1px;
    position: relative;
    overflow: hidden;
    margin: 15px 0 35px 0;
    background: #e2e8f0;
}
.ucon-scanner-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    animation: ucon-scan 4s linear infinite;
    background: linear-gradient(90deg, transparent, rgba(20, 93, 255, 0.2), transparent);
}

.ucon-scanner-line.line-mtr {
    background: linear-gradient(90deg, transparent 0%, rgba(168, 85, 247, 0.25) 50%, transparent 100%);
}
.ucon-scanner-line.line-ekrany {
    background: linear-gradient(90deg, transparent 0%, rgba(20, 93, 255, 0.25) 50%, transparent 100%);
}
.ucon-scanner-line.line-sluchawki {
    background: linear-gradient(90deg, transparent 0%, rgba(245, 158, 11, 0.25) 50%, transparent 100%);
}
.ucon-scanner-line.line-peryferia {
    background: linear-gradient(90deg, transparent 0%, rgba(100, 116, 139, 0.25) 50%, transparent 100%);
}

@keyframes ucon-scan { 0% { left: -50%; } 100% { left: 150%; } }

/* ==========================================================================
   ⚡ JASNY MOTYW MODALA SPECYFIKACJI PRODUKTÓW
   ========================================================================== */

#jabra-modal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.55) !important; /* Spokojniejsze, rozmyte tło */
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 99999 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    box-sizing: border-box !important;
}

#jabra-modal.active {
    display: flex !important;
}

.jabra-modal-content {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
    border-radius: 24px !important;
    width: 100% !important;
    max-width: 850px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    padding: 32px !important;
    position: relative !important;
    color: #0f172a !important;
    box-sizing: border-box !important;
}

.modal-grid {
    display: grid !important;
    grid-template-columns: 1fr 1.2fr !important;
    gap: 32px !important;
    align-items: stretch !important;
}

/* ODZNAKA PRO SPEC */
.modal-rarity-badge {
    position: absolute !important;
    top: 16px !important;
    left: 16px !important;
    z-index: 10 !important;
    background: #145dff !important;
    color: white !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    box-shadow: 0 4px 12px rgba(20, 93, 255, 0.2) !important;
}

/* MODAL-LEFT Kontener zdjęcia słuchawek w tle */
.modal-left {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    min-height: 390px !important; 
    height: 390px !important;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.02) !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

.modal-big-img {
    display: none !important;
}

.modal-right {
    position: relative !important;
}

#modal-title {
    padding-right: 110px !important; 
    position: relative !important;
    z-index: 10 !important;
    color: #0f172a !important;
}

.modal-description {
    color: #475569 !important;
}

.modal-brand-logo {
    position: absolute !important;
    top: 8px !important; 
    right: 8px !important; 
    z-index: 20 !important;
    max-width: 90px !important;
    height: auto !important;
    opacity: 0.95 !important;
    display: block !important;
}

/* Lista specyfikacji w modalu */
.spec-list {
    color: #334155 !important;
}
.spec-list .spec-item, .spec-list .modal-spec-item {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
    font-size: 0.9rem;
}
.spec-list .spec-item strong, .spec-list .modal-spec-item strong {
    color: #0f172a !important;
}
.spec-list a {
    color: #145dff !important;
    font-weight: 600;
}
.spec-list a:hover {
    text-decoration: underline;
}

/* Przycisk zamknięcia modalu */
.modal-close {
    position: absolute !important;
    top: 16px !important;
    left: 20px !important;
    right: auto !important;
    background: none !important;
    border: none !important;
    font-size: 28px !important;
    color: #000000 !important;
    cursor: pointer !important;
    transition: color 0.2s !important;
    z-index: 50 !important;
}
.modal-close:hover {
    color: #ef4444 !important;
}

/* Na stronie kategorii produkty nie mają wysuwanego panelu marek na dole, więc nie potrzebują 120px marginesu */
#dynamic-deck-grid .jabra-card-wrapper {
    margin-bottom: 16px;
}