/* ==========================================================================
   LISTA SAMOCHODÓW (shortcode)
   ========================================================================== */

/* Główny kontener */
.supernova-cars-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Zaawansowane filtry */
.cars-filters-bar {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.filters-heading {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 25px 0;
    color: #000;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s;
}

.filter-input:focus,
.filter-select:focus {
    border-color: #333;
}

.filter-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-range input {
    flex: 1;
}

.filter-range span {
    color: #666;
    font-weight: 600;
}

.filters-actions {
    display: flex;
    gap: 15px;
}

.filter-button,
.reset-button {
    padding: 15px 40px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-button {
    background: #000;
    color: #fff;
    flex: 1;
}

.filter-button:hover {
    background: #333;
}

.reset-button {
    background: #f0f0f0;
    color: #333;
}

.reset-button:hover {
    background: #e0e0e0;
}

/* Info o wynikach */
.cars-results-info {
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #f8f8f8;
    border-radius: 5px;
}

.cars-results-info p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

#results-count {
    color: #E91E63;
    font-weight: 700;
}

/* Siatka samochodów */
.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Siatka 3 kolumny */
.cars-grid-3cols {
    grid-template-columns: repeat(3, 1fr);
}

/* Karta samochodu - NOWY DESIGN */
.car-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.car-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    background: #ffffff;
    border-radius: 8px 8px 0 0;
}

.car-card-image {
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
}

.car-card-content {
    padding: 25px;
}

/* DUŻY TYTUŁ */
.car-card-title-big {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 700;
    color: #000;
    line-height: 1.2;
}

/* Krótki opis pod tytułem */
.car-card-description {
    margin: 0 0 20px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

/* Specyfikacje - 2 kolumny, małe */
.car-card-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.spec-item-small {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spec-label-small {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.5px;
}

.spec-value-small {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

/* ==========================================================================
   POJEDYNCZA STRONA SAMOCHODU - empe-cars.pl style
   ========================================================================== */

/* Główny kontener z białym tłem */
.supernova-single-car-container {
    background: #fff;
    padding: 40px 0;
    min-height: 100vh;
}

.supernova-single-car-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Przycisk powrotu do listy */
.back-to-list {
    padding-top: 50px;
    margin-bottom: 20px;
}

.back-to-list-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #f8f8f8;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.back-to-list-button:hover {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* Galeria - Grid miniaturek z padding-top */
/* GALERIA - 3 layouty */
.car-gallery-grid {
    margin-bottom: 30px;
    padding-top: 15px;
}

/* Zdjęcie główne - pełna szerokość */
.car-gallery-hero {
    margin-bottom: 15px;
    padding-top: 50px;
}

/* Galeria na dole strony */
.car-gallery-bottom {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.car-gallery-hero .gallery-item-hero {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.car-gallery-hero .gallery-item-hero img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.car-gallery-hero .gallery-item-hero:hover img {
    transform: scale(1.02);
}

/* LAYOUT 1: 1-4 zdjęcia w JEDNYM RZĘDZIE */
.car-gallery-grid.layout-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* LAYOUT 2: 5 zdjęć - 2 duże + 3 małe z boku */
.car-gallery-grid.layout-five {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 15px;
}

/* Pierwsze duże - kolumna 1, wszystkie rzędy */
.car-gallery-grid.layout-five .gallery-item:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / 4;
}

/* Drugie duże - kolumna 2, wszystkie rzędy */
.car-gallery-grid.layout-five .gallery-item:nth-child(2) {
    grid-column: 2;
    grid-row: 1 / 4;
}

/* Małe zdjęcia po prawej - kolumna 3, każde w swoim rzędzie */
.car-gallery-grid.layout-five .gallery-item:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
}

.car-gallery-grid.layout-five .gallery-item:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
}

.car-gallery-grid.layout-five .gallery-item:nth-child(5) {
    grid-column: 3;
    grid-row: 3;
}

/* LAYOUT 3: 6+ zdjęć - 4 w rzędzie */
.car-gallery-grid.layout-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* Ukryte zdjęcia */
.gallery-item-hidden {
    display: none;
}

/* Item galerii */
.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

/* Przycisk "Załaduj więcej" */
.gallery-load-more {
    text-align: center;
    margin: 20px 0 30px 0;
}

.load-more-button {
    padding: 15px 40px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-button:hover {
    background: #E91E63;
    transform: translateY(-2px);
}

/* Tytuł główny */
.car-main-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Subtitle pod tytułem */
.car-subtitle {
    font-size: 18px;
    color: #666;
    margin: 0 0 30px 0;
    font-weight: 400;
}

/* Layout: Specyfikacja + Sidebar */
.car-content-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-top: 30px;
}

/* Lewa strona - Content */
.car-left-content {
    min-width: 0;
}

/* Specyfikacja */
.car-spec-section {
    background: #f8f8f8;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.spec-heading {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #000;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.spec-item {
    background: #fff;
    padding: 15px;
    border-radius: 5px;
}

.spec-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.spec-value {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

/* Dodatkowa grafika */
.car-additional-section {
    margin: 30px 0;
}

.additional-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Opis */
.car-description-section {
    margin-top: 30px;
    line-height: 1.8;
    color: #333;
}

.description-heading {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #000;
}

.car-description-section h2,
.car-description-section h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #000;
}

.car-description-section p {
    margin-bottom: 15px;
}

/* Sidebar kontaktowy */
.car-right-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* Box z informacjami o aukcji */
.auction-info-box {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-item {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.info-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

/* Gwiazdki rating */
.rating-value {
    display: flex;
    align-items: center;
    gap: 5px;
}

.star {
    font-size: 20px;
    color: #FFB400;
}

.star.filled {
    color: #FFB400;
}

.star.empty {
    color: #DDD;
}

.star.half {
    background: linear-gradient(90deg, #FFB400 50%, #DDD 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-number {
    margin-left: 5px;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

/* Cena */
.price-item {
    padding-top: 15px;
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    color: #E91E63;
}

/* Przyciski kontaktowe */
.contact-box {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.whatsapp-button,
.email-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.whatsapp-button {
    background: #25D366;
    color: #fff;
}

.whatsapp-button:hover {
    background: #128C7E;
}

.email-button {
    background: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
}

.email-button:hover {
    background: #f8f8f8;
    border-color: #333;
}

/* CTA powrotu na górę */
.car-bottom-cta {
    margin-top: 60px;
    padding: 40px 0;
    text-align: center;
    border-top: 2px solid #e0e0e0;
}

.back-to-top {
    display: inline-block;
    padding: 15px 40px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s;
}

.back-to-top:hover {
    background: #000;
}

/* Responsywność */
@media (max-width: 992px) {
    .car-content-layout {
        grid-template-columns: 1fr;
    }
    
    .car-right-sidebar {
        position: static;
        order: -1;
    }
    
    .spec-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .cars-grid-3cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cars-grid,
    .cars-grid-3cols {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-actions {
        flex-direction: column;
    }
    
    .car-card-specs-grid {
        grid-template-columns: 1fr;
    }
    
    /* Galeria na mobile */
    .car-gallery-grid.layout-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .car-gallery-grid.layout-five {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    
    .car-gallery-grid.layout-five .gallery-item {
        grid-column: auto !important;
        grid-row: auto !important;
    }
    
    .car-gallery-grid.layout-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .car-gallery-hero .gallery-item-hero img {
        height: 300px;
    }
    
    .car-gallery-grid.layout-five .gallery-item-big img {
        height: 250px;
        min-height: auto;
    }
    
    .car-main-title {
        font-size: 24px;
    }
    
    .spec-grid {
        grid-template-columns: 1fr;
    }
    
    .back-to-list {
        padding-top: 30px;
    }
}

@media (max-width: 480px) {
    .supernova-single-car-wrapper {
        padding: 0 10px;
    }
    
    .car-spec-section,
    .contact-box,
    .auction-info-box {
        padding: 15px;
    }
    
    .car-gallery-grid {
        gap: 8px;
        padding-top: 30px;
    }
    
    /* Galeria na małych ekranach - 1 kolumna */
    .car-gallery-grid.layout-row,
    .car-gallery-grid.layout-five,
    .car-gallery-grid.layout-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item img {
        height: 220px;
    }
    
    .car-gallery-hero .gallery-item-hero img {
        height: 220px;
    }
    
    .car-gallery-hero {
        padding-top: 30px;
    }
    
    .back-to-list {
        padding-top: 20px;
    }
    
    .car-card-title-big {
        font-size: 20px;
    }
    
    .car-card-description {
        font-size: 13px;
    }
}

/* ========== LIGHTBOX ========== */
.sn-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.sn-lightbox.active {
    display: flex;
}

.sn-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    cursor: pointer;
}

.sn-lightbox-content {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sn-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    -webkit-user-drag: none;
}

.sn-lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    z-index: 3;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    padding: 5px 12px;
    transition: opacity 0.2s;
}

.sn-lightbox-close:hover {
    opacity: 0.7;
}

.sn-lightbox-prev,
.sn-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 15px 18px;
    border-radius: 50%;
    transition: background 0.2s;
    line-height: 1;
}

.sn-lightbox-prev:hover,
.sn-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sn-lightbox-prev {
    left: 20px;
}

.sn-lightbox-next {
    right: 20px;
}

.sn-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .sn-lightbox-prev,
    .sn-lightbox-next {
        padding: 10px 14px;
        font-size: 22px;
    }
    
    .sn-lightbox-prev {
        left: 10px;
    }
    
    .sn-lightbox-next {
        right: 10px;
    }
    
    .sn-lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 32px;
    }
}

/* ===== Przycisk SPRAWDŹ na karcie produktu ===== */
.car-card-btn-sprawdz {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 180px;
    margin: 18px auto;
    background-color: #1a1a1a;
    border: 1px solid #333333;
    color: #ffffff !important;
    text-align: center;
    padding: 14px 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-decoration: none !important;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.car-card-btn-sprawdz:hover {
    background-color: #2e2e2e;
    border-color: #555555;
    color: #ffffff !important;
}

/* ===== Kontakt - telefon i mail jako tekst ===== */
.contact-detail {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.contact-detail-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999999;
    margin-bottom: 4px;
}

.contact-detail-value {
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    text-decoration: none;
}

.contact-detail-value:hover {
    color: #333333;
    text-decoration: underline;
}

/* ===== Kontakt na dole podstrony produktu ===== */
.car-bottom-contact {
    background: #111111;
    border-radius: 12px;
    padding: 28px 36px;
    margin: 40px 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.bottom-contact-name {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.bottom-contact-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.bottom-contact-item {
    color: #cccccc !important;
    text-decoration: none !important;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.bottom-contact-item:hover {
    color: #ffffff !important;
}

@media (max-width: 600px) {
    .bottom-contact-details {
        flex-direction: column;
        gap: 12px;
    }
}
