/**
 * Styles for Used Cars Pages
 * uzywane.php & sprzedane.php
 */

/* ========================================
   HERO SECTION (layout jak index.php)
   ======================================== */
.hero-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 30px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    white-space: pre-line;
    margin-bottom: 30px;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* ========================================
   SCROLL DOWN INDICATOR
   ======================================== */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    visibility: visible;
}

.scroll-indicator.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.scroll-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.scroll-arrow {
    display: inline-block;
    animation: bounce 2s infinite;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

.scroll-arrow i {
    font-size: 32px;
    color: #ff0000;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ========================================
   FILTER BAR
   ======================================== */
.cars-filter-section {
    background: #0a0a0a !important;
    padding: 40px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 0, 0, 0.6);
    color: #ff0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

.filter-btn.active {
    background: #ff0000;
    border-color: #ff0000;
    color: white;
}

/* ========================================
   CARS GRID
   ======================================== */
.cars-grid-section {
    padding: 60px 0;
    background: #0a0a0a !important;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

/* Section with divider for "all" view */
.cars-section {
    margin-bottom: 60px;
}

.cars-section:last-child {
    margin-bottom: 0;
}

.section-divider {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-divider i {
    color: #ff0000;
    font-size: 26px;
}

/* ========================================
   CAR CARD
   ======================================== */
.car-card {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255, 0, 0, 0.3);
    border-color: rgba(255, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.5);
}

/* Sprzedane auto - szary filtr */
.car-card.sold {
    opacity: 0.7;
}

.car-card.sold:hover {
    opacity: 0.85;
}

/* ========================================
   CAR IMAGE
   ======================================== */
.car-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #000;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.car-card:hover .car-image img {
    transform: scale(1.05);
}

/* Car Badge */
.car-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.car-badge.coming-soon {
    background: rgba(255, 165, 0, 0.95);
    color: white;
}

.car-badge.sold-badge,
.car-badge.sold {
    background: rgba(0, 200, 100, 0.95);
    color: white;
}

.car-badge i {
    font-size: 16px;
}

/* ========================================
   CAR DETAILS
   ======================================== */
.car-details {
    padding: 25px;
}

.car-title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    line-height: 1.3;
}

/* ========================================
   CAR SPECS
   ======================================== */
.car-specs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.spec-item i {
    width: 20px;
    color: #ff0000;
    font-size: 16px;
}

.spec-item span {
    color: rgba(255, 255, 255, 0.6);
}

.spec-item strong {
    color: white;
    font-weight: 600;
    margin-left: auto;
}

/* ========================================
   CAR FOOTER (Price & Button)
   ======================================== */
.car-footer {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.car-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.car-price .price-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.car-price .price-amount {
    font-size: 26px;
    font-weight: 700;
    color: #ff0000;
}

.car-price .price-vat {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* Sprzedane auto - cena z przekreśleniem */
.car-price.sold .price-amount {
    color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   NO CARS MESSAGE
   ======================================== */
.no-cars-message {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.no-cars-message i {
    font-size: 80px;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

.no-cars-message p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.cta-section .section-title {
    color: white;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   RESPONSIVE
   ======================================== */
/* Tablet - 2 columns */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        display: none;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 17px;
    }

    .cars-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .section-divider {
        font-size: 24px;
    }
}

/* Mobile - 1 column */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 80px 0 80px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
        line-height: 1.6;
    }

    .scroll-indicator {
        bottom: 20px;
    }

    .scroll-text {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .scroll-arrow i {
        font-size: 28px;
    }

    .cars-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-divider {
        font-size: 22px;
    }

    .filter-buttons {
        width: 100%;
    }

    .filter-btn {
        flex: 1;
        min-width: 120px;
        font-size: 14px;
        padding: 10px 16px;
    }

    .car-image {
        height: 220px;
    }

    .car-title {
        font-size: 20px;
    }

    .spec-item {
        font-size: 14px;
    }

    .car-price .price-amount {
        font-size: 22px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .section-divider {
        font-size: 20px;
    }

    .car-details {
        padding: 20px;
    }

    .filter-btn {
        font-size: 13px;
        padding: 8px 12px;
    }
}
