@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&family=Orbitron:wght@400;700;900&display=swap');
:root { --bg: #050505; --card: #0f0f0f; --text: #ffffff; --font-main: 'Inter', sans-serif; --font-title: 'Orbitron', sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: var(--font-main); margin: 0; overflow-x: hidden; }

/* TŁO */
#bg-text, #onboarding-bg-text { 
    font-size: 18vw; 
    font-weight: 900; 
    color: rgba(255, 255, 255, 0.05); 
    position: fixed; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    z-index: -1; 
    white-space: nowrap; 
    pointer-events: none;
}

#onboarding-bg-text {
    animation: flicker 4s infinite;
}

#bg-text {
    animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; text-shadow: 0 0 30px rgba(255,255,255,0.05); }
}

@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        opacity: 0.1;
        text-shadow: none;
    }
    20%, 24%, 55% {
        opacity: 1;
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    }
    21%, 23%, 56% {
        opacity: 0.4;
    }
}

/* HEADER & DROPDOWN FIX */
.header-main { 
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center; 
    gap: 30px; 
    margin: 40px 0; 
    width: 100%;
}

.header-main .nav-group:first-child {
    justify-self: end;
}

.header-main .nav-group:last-child {
    justify-self: start;
}

.nav-group { 
    display: flex; 
    gap: 10px; 
    align-items: center; 
}
.nav-item { text-decoration: none; color: rgba(255, 255, 255, 0.4); font-size: 11px; text-transform: uppercase; font-weight: 700; padding: 12px 18px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; transition: 0.3s; cursor: pointer; display: inline-flex; align-items: center; }
.nav-item.active, .nav-item:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,0.05); }

.dropdown { position: relative; }
.dropdown::after { content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 20px; }
.dropdown-content { display: none; position: absolute; top: 100%; right: 0; background: #0f0f0f; min-width: 180px; border: 1px solid #333; border-radius: 12px; z-index: 2000; margin-top: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); padding: 5px 0; }
.dropdown:hover .dropdown-content { display: block; }
.dropdown-content a { color: rgba(255,255,255,0.5); padding: 12px 18px; text-decoration: none; display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.dropdown-content a:hover { color: #fff; background: #151515; }

/* PROFILE SECTION */
.profile-section {
    position: relative;
    margin-left: 15px;
}

.profile-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font-title);
    font-size: 14px;
}

.profile-icon:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 240px;
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 15px;
    z-index: 2000;
    margin-top: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.9);
    animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.profile-section:hover .profile-dropdown {
    display: block;
}

/* Fix dla trójkąta/mostka żeby menu nie znikało */
.profile-section::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
}

.profile-option-group {
    margin-bottom: 15px;
}

.profile-option-group:last-child {
    margin-bottom: 0;
}

.profile-option-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: #888;
}

/* CUSTOM SELECT STYLES */
.custom-select-container {
    position: relative;
    width: 100%;
}

.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.2s;
}

.select-trigger:hover {
    border-color: #555;
}

.select-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.select-icon {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px; /* Small radius for aesthetic, or 0 for sharp square */
}

.select-arrow {
    font-size: 10px;
    color: #888;
    transition: transform 0.2s;
}

.custom-select-container.open .select-arrow {
    transform: rotate(180deg);
}

.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 100;
    max-height: 120px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.select-options::-webkit-scrollbar {
    width: 6px;
}
.select-options::-webkit-scrollbar-track {
    background: #1a1a1a;
}
.select-options::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}
.select-options::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.custom-select-container.open .select-options {
    display: block;
}

.select-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.select-option:hover {
    background: #252525;
}

.select-option.selected {
    background: #2a2a2a;
    color: #fff;
}
#onboarding { position: fixed; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; z-index: 5000; transition: 0.8s; overflow: hidden; }
/* #onboarding-bg-text uses shared style with #bg-text above */
.setup-box, .search-container { position: relative; overflow: hidden; padding: 2px; border-radius: 16px; background: #111; z-index: 10; }
.setup-box { width: 300px; padding: 25px; }

@media (min-width: 768px) {
    .setup-box {
        width: 600px; /* Szersze na desktopie */
        padding: 45px;
    }
    #options-container {
        max-height: 500px; /* Wyższe na desktopie */
    }
    
    /* Większe kafelki na desktopie */
    .option-btn {
        padding: 18px;
        margin-bottom: 12px;
    }
    .option-icon {
        width: 32px;
    }
    .option-label {
        font-size: 16px;
    }
}
.setup-box::before, .search-container::before { 
    content: ''; 
    position: absolute; 
    width: 1200px; 
    height: 1200px; 
    background: conic-gradient(from 0deg, transparent 0deg, transparent 260deg, #fff 360deg); 
    animation: none; 
    transform: translate(-50%, -50%) rotate(var(--rotation, 0deg));
    top: 50%; 
    left: 50%; 
    z-index: 1; 
}
.setup-box::after, .search-container::after { 
    content: ''; 
    position: absolute; 
    inset: 2px; 
    background: #0f0f0f; 
    border-radius: 14px; 
    z-index: 2; 
}
/* @keyframes rot removed as it is controlled by JS now */
#setup-content { position: relative; z-index: 10; text-align: center; }

#options-container {
    max-height: 250px;
    overflow-y: auto;
    padding: 10px;
    overflow-x: visible;
}

#options-container::-webkit-scrollbar {
    width: 6px;
}
#options-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
}
#options-container::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}
#options-container::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* MODAL TITLE SMOKE ANIMATION */
.section-title, #modal-title {
    font-family: var(--font-title);
    font-size: 26px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    margin: 40px 0 60px; /* Większy odstęp góra/dół */
    color: #fff;
    letter-spacing: 8px;
    position: relative;
    animation: trackingIn 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
}

@keyframes trackingIn {
    0% { letter-spacing: 1em; opacity: 0; filter: blur(12px); }
    40% { opacity: 0.6; }
    100% { letter-spacing: 8px; opacity: 1; filter: blur(0); }
}

@media (min-width: 768px) {
    #modal-title {
        font-size: 32px;
        margin-bottom: 25px;
    }
}

#modal-title {
    margin-bottom: 15px;
    margin-top: 0;
    font-size: 22px;
    color: transparent;
    background: linear-gradient(90deg, #fff 0%, #888 20%, #fff 40%, #666 60%, #fff 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: smokeFlow 3s linear infinite;
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.3));
    letter-spacing: normal;
}


@keyframes smokeFlow {
    0% { background-position: 100% 50%; filter: blur(0px) drop-shadow(0 0 0px rgba(255,255,255,0.5)); }
    50% { filter: blur(0.5px) drop-shadow(-2px -2px 5px rgba(255,255,255,0.2)); }
    100% { background-position: -100% 50%; filter: blur(0px) drop-shadow(0 0 0px rgba(255,255,255,0.5)); }
}

/* SZUKAJKA */
.search-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 550px;
    margin: 0 auto 40px;
}

.search-container { 
    width: 100%; 
    flex: 1;
    margin: 0; /* Margin handled by wrapper */
}

#product-search, #product-search-sheet { 
    position: relative; 
    z-index: 10; 
    width: 100%; 
    background: transparent; 
    border: none; 
    padding: 15px; 
    color: #fff; 
    outline: none; 
    text-align: center; 
    font-family: inherit; 
    transition: all 0.3s ease;
    text-shadow: none;
}

/* SEARCH BTN */
.search-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    background: rgba(255,255,255,0.03);
}

.search-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.3));
    border-color: rgba(255,255,255,0.3);
}

#product-search:focus, #product-search-sheet:focus {
    text-shadow: 0 0 10px rgba(255,255,255,0.7);
    color: #fff;
    transform: scale(1.02);
}

#product-search::placeholder, #product-search-sheet::placeholder {
    color: rgba(255,255,255,0.5);
    transition: color 0.3s ease;
    text-shadow: none;
}

.search-container:hover #product-search::placeholder, 
.search-container:hover #product-search-sheet::placeholder {
    color: rgba(255,255,255,0.9);
}

#product-search:focus::placeholder, 
#product-search-sheet:focus::placeholder,
.search-container:hover #product-search:focus::placeholder, 
.search-container:hover #product-search-sheet:focus::placeholder {
    color: transparent;
    text-shadow: none;
}


.search-container:hover {
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.15);
}

/* OCENY KLASY */
.rating-badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-weight: 900; font-size: 10px; color: #fff; white-space: nowrap; }

.weight-badge {
    background: transparent;
    padding: 0;
    border-radius: 0;
    backdrop-filter: none;
    display: inline-block;
    color: #fff;
    font-weight: 900;
    font-size: 10px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.9), 0 0 10px rgba(255, 255, 255, 0.7), 0 0 20px rgba(255, 255, 255, 0.5);
    box-shadow: none;
    white-space: nowrap;
    vertical-align: middle;
}

.neon-price {
    background: transparent;
    padding: 0;
    border-radius: 0;
    backdrop-filter: none;
    display: inline-block;
    color: #fff;
    font-weight: 900;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.9), 0 0 10px rgba(255, 255, 255, 0.7), 0 0 20px rgba(255, 255, 255, 0.5);
    box-shadow: none;
    white-space: nowrap;
}

/* GRID & KARTY */
.grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px; 
    padding: 20px; 
    max-width: 1200px; 
    margin: 0 auto; 
    width: 100%;
}
.product-card { 
    background: var(--card); 
    border: 1px solid #222; 
    border-radius: 16px; 
    overflow: hidden; 
    transition: 0.3s; 
    width: 100%;
}
.product-card:hover { transform: translateY(-5px); border-color: #555; }

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}
::-webkit-scrollbar-thumb {
    background: #00e676; /* Using existing green accent */
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #00c853;
}

@media (max-width: 1000px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* RESZTA */
.page-content { display: none; padding: 20px; }
.page-content.active { display: block; }
#main-content { display: none; opacity: 0; transition: 1s ease; }
#main-content.visible { display: block; opacity: 1; }
.neon-logo { 
    font-size: 42px; 
    font-weight: 900; 
    letter-spacing: 5px; 
    filter: drop-shadow(0 0 8px #fff); 
    margin: 0; 
    animation: neonPulse 10s linear infinite;
}

@keyframes neonPulse {
    0%, 100% { 
        filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 20px rgba(255,255,255,0.4));
    }
    50% { 
        filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 10px rgba(255,255,255,0.1));
    }
}
.tool-box { background: var(--card); border: 1px solid #222; padding: 30px; border-radius: 20px; max-width: 400px; margin: 0 auto; text-align: left; position: relative; z-index: 10; }
.tool-input { width: 100%; background: #000; border: 1px solid #333; padding: 14px; color: #fff; border-radius: 12px; margin-bottom: 15px; outline: none; box-sizing: border-box; }
.btn-main { background: #fff; color: #000; border: none; padding: 14px; width: 100%; border-radius: 12px; font-weight: 900; cursor: pointer; text-transform: uppercase; font-size: 10px; transition: 0.2s; }
.btn-main:hover { background: #ccc; }
.option-btn { 
    background: rgba(255,255,255,0.03); 
    border: 1px solid rgba(255,255,255,0.1); 
    color: #fff; 
    padding: 10px; 
    width: 100%; 
    border-radius: 8px; 
    margin-bottom: 8px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    transition: all 0.3s ease;
}
.option-btn:hover { 
    background: rgba(255,255,255,0.1); 
    border-color: rgba(255,255,255,0.3);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255,255,255,0.05);
    z-index: 10;
    position: relative;
}

.option-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.option-icon {
    width: 24px;
    height: auto;
    border-radius: 2px;
}

.option-label {
    font-size: 14px;
}
#admin-add-btn, #admin-add-seller-btn { 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    background: #fff; 
    color: #000; 
    border: none; 
    font-size: 30px; 
    font-weight: 900; 
    cursor: pointer; 
    z-index: 4000; 
    box-shadow: 0 0 20px rgba(255,255,255,0.3); 
    transition: all 0.3s ease;
}

#admin-add-btn:hover, #admin-add-seller-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255,255,255,0.6);
    background: #f0f0f0;
}

/* MODAL OVERLAY */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: none; /* Ukryte domyślnie */
    align-items: center;
    justify-content: center;
    z-index: 6000;
}

/* ADMIN CONTROLS */
.admin-controls {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
}
.btn-delete {
    background: #333 !important;
    color: white !important;
    border: 1px solid #ff0000 !important;
    font-weight: bold;
}

/* Card Arrows */
.card-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    font-size: 14px;
    z-index: 10;
    transition: 0.2s;
    user-select: none;
}
.card-arrow:hover {
    background: rgba(255,255,255,0.9);
    color: #000;
}
.card-arrow.left { left: 10px; }
.card-arrow.right { right: 10px; }
/* Hover handled by .btn-delete:hover later in file */

.product-main-img {
    max-width: 100%;
    height: auto;
    display: block;
}
.product-img-container {
    position: relative;
    cursor: pointer;
    height: 200px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: #222;
}

/* NOWE KLASY OCEN - DEFINICJE PODSTAWOWE */
.rate-low, .rate-mid, .rate-good, .rate-high, .rate-god, .rate-pending, .rate-pending-blue {
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 10px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    display: inline-block; /* Ensure they behave like badges */
}

.rate-god { 
    color: #ffcc00; 
    font-weight: 900; 
    text-shadow: 0 0 15px #ffcc00; 
    position: relative; 
    overflow: visible; 
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.2);
    backdrop-filter: blur(8px);
} 

.star-particle { 
    position: absolute; 
    top: -5px; 
    color: #ffcc00; 
    font-size: 10px; 
    animation: star-fall 3s linear forwards; 
    pointer-events: none;
    z-index: 9999;
}

@keyframes star-fall { 
    0% { transform: translate(0, 0) scale(0); opacity: 0; } 
    20% { opacity: 1; transform: translate(var(--x), 0) scale(1.2); } 
    50% { transform: translate(calc(var(--x) * -0.5), 20px) scale(1); }
    100% { transform: translate(calc(var(--x) * 1.2), 60px) scale(0); opacity: 0; } 
}

.rate-low { color: #ff4d4d; } 
.rate-mid { color: #ffa500; } 
.rate-good { color: #adff2f; } 
.rate-high { color: #00ff00; text-shadow: 0 0 10px #00ff00; }
.rate-pending { color: #00ffff; text-shadow: 0 0 5px #00ffff; font-style: italic; }
.rate-pending-blue { 
    color: #00d4ff; 
    text-shadow: 0 0 10px #00d4ff; 
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
    font-weight: 900;
}

/* MODAL PRODUKTU - NOWY LAYOUT */
.product-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 15px;
    padding: 30px;
    color: white;
    width: 95%;
    max-width: 1400px;
    max-height: 98vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

.modal-gallery {
    position: relative;
    flex: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    min-height: 300px;
}

.gallery-frame {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    transition: transform 0.3s;
}

/* New Layout Classes for Centered Modal */
.modal-body-split {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.modal-gallery-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gallery-main-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
}

.modal-info-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.info-row-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    transition: 0.2s;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav:hover {
    background: rgba(255,255,255,0.2);
}

.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }

.gallery-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
}

.modal-prod-title {
    font-family: var(--font-title);
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.modal-meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-price-tag {
    font-size: 24px;
    color: #ccc;
    font-weight: 300;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: auto;
}

.btn-agent {
    background: #fff;
    color: #000;
    font-size: 14px;
    padding: 18px;
    letter-spacing: 1px;
}

.btn-shop {
    background: transparent;
    border: 1px solid #555;
    color: #fff;
    font-size: 14px;
    padding: 18px;
}

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

/* Rate God Blur Override */
.rate-god {
    backdrop-filter: blur(8px) !important;
}

@keyframes star-fall { 
    0% { transform: translate(0, 0) scale(0); opacity: 0; } 
    20% { opacity: 1; transform: translate(var(--x), 0) scale(1.2); } 
    50% { transform: translate(calc(var(--x) * -0.5), 20px) scale(1); }
    100% { transform: translate(calc(var(--x) * 1.2), 60px) scale(0); opacity: 0; } 
} 

/* Close Button */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 20;
    transition: transform 0.2s;
}

.modal-close-btn:hover {
    color: #ff4444;
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .product-modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .gallery-img {
        max-height: 50vh;
    }

    .modal-prod-title {
        font-size: 24px;
    }
}

/* === BUTTON ANIMATIONS & NEW STYLES === */

/* Base Animation for all buttons */
.btn-main, .btn-mini, .search-btn, .option-btn {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

/* Hover Scale Effect */
.btn-main:hover, .btn-mini:hover, .option-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Active Click Effect */
.btn-main:active, .btn-mini:active, .option-btn:active {
    transform: translateY(1px) scale(0.98);
}

/* Mini Button (Admin Tools) */
.btn-mini {
    background: #333;
    color: #fff;
    border: 1px solid #444;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-square {
    width: 40px;
    height: 40px;
    padding: 0;
    min-width: unset; /* Override btn-mini min-width */
    border-radius: 8px;
}

.btn-square svg {
    width: 20px;
    height: 20px;
}

/* Specific Button Colors & Glows */
.btn-add:hover {
    background: #33ff33 !important;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6) !important;
    color: #000 !important;
    border-color: #33ff33 !important;
}

.btn-save:hover {
    background: #fff !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6) !important;
    color: #000 !important;
}

.btn-cancel:hover {
    background: #222 !important;
    color: #fff !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1) !important;
    border-color: #666 !important;
}

.btn-delete:hover, #modal-btn-delete:hover {
    background: #ff0000 !important;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.6) !important;
    color: #fff !important;
    border-color: #ff0000 !important;
}

.btn-edit:hover {
    background: #ffff00 !important;
    color: #000 !important;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.6) !important;
    border-color: #ffff00 !important;
}

.btn-refresh:hover {
    background: #00ffff !important;
    color: #000 !important;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6) !important;
    border-color: #00ffff !important;
}

/* Admin Footer Layout */
.admin-controls-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
    justify-content: flex-end;
    width: 100%;
}

/* Modal Agent/Shop Button Enhancements */
.btn-agent:hover {
    background: #fff !important;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-3px) scale(1.02);
}

.btn-shop:hover {
    background: rgba(255,255,255,0.15) !important;
    border-color: #fff !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2) !important;
}

/* Search Button Animation Fix */
.search-btn:hover {
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

/* QC Thumbnails */
.qc-thumbnails-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.qc-thumb {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #444;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.qc-thumb:hover {
    transform: scale(1.15);
    border-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    z-index: 5;
}

.qc-thumb.active {
    border-color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
    z-index: 6;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    overflow-x: auto;
    padding: 10px 0;
}

.gallery-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #333;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
}

.gallery-thumb:hover, .gallery-thumb.active {
    opacity: 1;
    border-color: #fff;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* Fullscreen Overlay */
.fullscreen-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.fullscreen-overlay img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    cursor: default;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    animation: zoomIn 0.3s ease;
}

.fullscreen-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.fullscreen-close:hover {
    background: rgba(255,0,0,0.7);
    transform: rotate(90deg);
    border-color: #ff4444;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ADD TO CART ANIMATION - INTENSIFIED */
@keyframes cartSuccess {
    0% { transform: scale(1); background-color: #00e676; box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7); }
    25% { transform: scale(1.15); background-color: #fff; color: #000; box-shadow: 0 0 20px 5px rgba(255, 255, 255, 0.8); }
    50% { transform: scale(1.05); background-color: #00ff88; color: #000; box-shadow: 0 0 10px 2px rgba(0, 255, 136, 0.5); }
    75% { transform: scale(1.02); }
    100% { transform: scale(1); background-color: #00b359; box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

.btn-added {
    animation: cartSuccess 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    background-color: #00b359 !important;
    color: #fff !important;
    font-weight: 900 !important;
    letter-spacing: 1px;
    pointer-events: none;
    position: relative;
    overflow: hidden;
    border: 2px solid #fff !important;
    z-index: 10;
}

.btn-added::before {
    content: '✓ ';
    font-weight: 900;
    margin-right: 5px;
}

.btn-added::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: superRipple 0.8s ease-out;
    z-index: -1;
}

@keyframes superRipple {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 500px; height: 500px; opacity: 0; }
}

@keyframes badgePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.badge-anim {
    animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* CART DROPDOWN STYLES */
.nav-item-wrapper:hover .cart-dropdown {
    display: block;
    animation: fadeInDown 0.2s ease-out;
}

.cart-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 12px;
    z-index: 2000;
    margin-top: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.9);
    overflow: visible; /* Ensure bridge is not clipped if something weird happens */
}

.cart-dropdown::before {
    content: '';
    position: absolute;
    top: -40px; /* Increased coverage */
    left: 0;
    width: 100%;
    height: 40px; /* Covers the 10px gap + 30px overlap */
    background: transparent;
    pointer-events: auto; /* Ensure it captures hover */
}

.cart-header {
    padding: 15px;
    border-bottom: 1px solid #222;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    background: #111;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.clear-cart-btn {
    font-size: 9px;
    font-weight: bold;
    color: #ff4444;
    cursor: pointer;
    background: transparent;
    border: 1px solid #ff4444;
    padding: 3px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-left: auto; /* Push to the right */
    position: relative;
    z-index: 10;
}

.clear-cart-btn:hover {
    background: rgba(255, 68, 68, 0.1);
    box-shadow: 0 0 5px rgba(255, 68, 68, 0.3);
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.cart-empty {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 12px;
}

.cart-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #222;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 100px;
    opacity: 1;
    transform: translateX(0);
}

.cart-item.removing {
    opacity: 0;
    transform: translateX(100px);
    max-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-bottom-width: 0;
    overflow: hidden;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    background: #222;
}

.cart-item-info {
    flex: 1;
    /* overflow: hidden; Removed to allow neon glow */
    min-width: 0; /* Enables text truncation in flex child */
}

.cart-item-name {
    font-size: 11px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.cart-item-price {
    font-size: 10px;
    color: #00e676;
    font-weight: bold;
}

/* CART ACTIONS (WINDOWS) */
.cart-item-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.cart-item-count {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #ccc;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    min-width: 28px;
}

/* Input number styling to match tiles */
.cart-item-qty-input {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #ccc;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    width: 35px;
    height: 28px;
    outline: none;
    padding: 0;
}

.cart-item-qty-input:focus {
    border-color: #00e676;
    color: #fff;
}

/* Hide spin buttons in webkit */
.cart-item-qty-input::-webkit-outer-spin-button,
.cart-item-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* Firefox */
.cart-item-qty-input {
    -moz-appearance: textfield;
}

.cart-item-remove {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    width: 28px;
    padding: 0 !important;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-item-remove:hover {
    background: #222;
    color: #ff4444;
    border-color: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.2);
}

.cart-footer {
    padding: 15px;
    border-top: 1px solid #222;
    background: #111;
    border-radius: 0 0 12px 12px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

/* --- RESPONSIVE / RWD --- */

/* Global Image Reset */
img {
    max-width: 100%;
    height: auto;
}

/* Tablet (max-width: 768px) */
@media (max-width: 768px) {
    .header-main {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin: 30px 0;
    }

    .nav-group {
        flex-wrap: wrap;
        justify-content: center;
    }

    .neon-logo {
        font-size: 32px;
        order: -1; /* Logo na górę */
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        padding: 15px;
        gap: 15px;
    }
    
    .setup-box {
        width: 80%;
    }
    
    #bg-text, #onboarding-bg-text {
        font-size: 25vw; /* Większy tekst tła na mniejszych ekranach */
    }
    
    .modal-body-split {
        flex-direction: column;
    }
    
    .modal-gallery {
        min-height: 250px;
        width: 100%;
    }
}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .header-main {
        margin: 20px 0;
    }
    
    .nav-item {
        font-size: 10px;
        padding: 8px 12px;
    }
    
    .neon-logo {
        font-size: 26px;
        letter-spacing: 2px;
    }

    .search-wrapper {
        padding: 0 15px;
    }

    /* Układ pionowy na telefonach */
    .grid {
        grid-template-columns: 1fr; /* Jedna kolumna */
        padding: 10px;
    }

    .product-card {
        margin-bottom: 10px;
    }

    .setup-box {
        width: 90%;
        padding: 20px;
    }

    .section-title, #modal-title {
        font-size: 20px;
        letter-spacing: 4px;
        margin: 30px 0;
    }

    /* Modal Adjustments */
    .product-modal-content {
        padding: 15px;
        width: 95%;
        margin: 10px auto;
        max-height: 90vh;
    }

    .modal-prod-title {
        font-size: 20px;
        text-align: center;
    }

    .modal-meta-row {
        flex-direction: column;
        gap: 10px;
    }

    .btn-agent, .btn-shop {
        padding: 14px;
        font-size: 12px;
    }
    
    .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 16px;
        padding: 0;
    }
    
    /* Ukrycie zbyt dużych elementów tła lub zmniejszenie */
    #bg-text, #onboarding-bg-text {
        font-size: 30vw;
        opacity: 0.03;
    }
}

/* === PRICE FILTER STYLES === */
.filter-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    gap: 15px;
    max-width: 1200px;
}

.filter-box {
    background: #111;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 0 15px; /* Removed top/bottom padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 200px;
    transition: 0.3s;
    position: relative;
    height: 50px; /* Match search height */
    box-sizing: border-box;
}

.filter-box:hover, .filter-box:focus-within {
    border-color: #00e676;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.15);
}

.filter-box.left, .filter-box.right {
    align-items: flex-start;
    justify-content: center;
}

.filter-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 2px;
    font-weight: 700;
}

.filter-input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    width: 100%;
    outline: none;
    font-family: var(--font-main);
    font-weight: 700;
}

.filter-input::placeholder {
    color: #444;
}

/* Remove Arrows/Spinners from Number Input */
.filter-input::-webkit-outer-spin-button,
.filter-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.filter-input[type=number] {
    -moz-appearance: textfield;
}

.price-input-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* RANGE SLIDER STYLES */
.filter-range {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
    margin-top: 5px;
    cursor: pointer;
}

.filter-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00e676;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.5);
    transition: 0.2s;
}

.filter-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #fff;
}

.filter-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00e676;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.5);
    transition: 0.2s;
    border: none;
}

/* SEARCH CONTAINER ADJUSTMENT */
.search-container.main-search {
    width: 500px !important;
    flex: 0 0 500px !important;
    display: flex;
    align-items: center;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 0;
    height: 50px; /* Fixed height for consistency */
}

.search-container.main-search input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    color: white;
    padding: 0 50px 0 15px; /* Space for icon */
    font-size: 16px;
    outline: none;
}

.search-btn-icon {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn-icon:hover {
    color: #fff;
    transform: scale(1.1);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .filter-layout {
        flex-direction: column;
        gap: 10px;
    }

    .filter-box {
        width: 100%;
        flex-direction: row; /* Horizontal layout for filters on mobile */
        align-items: center;
        justify-content: space-between;
        padding: 12px 15px;
    }
    
    .filter-box.left, .filter-box.right {
        justify-content: flex-start;
        gap: 10px;
    }
    
    .search-container.main-search {
        order: -1; /* Search bar first on mobile */
        height: 50px;
    }
}

/* === DROPDOWN STYLES === */
.category-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0;
}

.category-badge {
    background: #00e676;
    color: #000;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    padding: 0;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
    margin-left: 8px;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.6);
    display: none; /* Controlled by JS */
}

.category-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 200px;
    background: #111;
    border: 1px solid #00e676;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
    border-radius: 12px;
    padding: 10px;
    z-index: 9999;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
}

.album-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #00d4ff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 900;
    text-shadow: 0 0 10px #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.5);
    z-index: 10;
}

.category-dropdown.active {
    display: block;
}

.category-dropdown label, .sort-option {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 13px;
    color: #ccc;
    transition: 0.2s;
    border-radius: 6px;
}

.category-dropdown label:hover, .sort-option:hover {
    background: #333;
    color: #00e676;
}

.sort-option.selected {
    color: #00e676;
    font-weight: bold;
}

.category-dropdown input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #00e676;
}

/* === GOOGLE TRANSLATE HIDING === */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}
body {
    top: 0px !important;
}
#google_translate_element .goog-te-gadget-simple {
    background-color: transparent !important;
    border: none !important;
}
#google_translate_element .goog-te-gadget-icon {
    display: none !important;
}

/* Toggle Button for Calculator */
#calc-add-cart-btn {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    transition: all 0.3s ease;
    margin-top: 15px;
    margin-bottom: 10px;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
}

#calc-add-cart-btn:hover {
    border-color: #555;
    color: #fff;
    background: rgba(255,255,255,0.05);
}

#calc-add-cart-btn.active {
    background: #00e676;
    color: #000;
    border-color: #00e676;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.4);
    font-weight: 900;
}

