/**
 * Frontend styles dla Zakładka Motoryzacja Sync
 */

/* Global image fixes */
.aps-single-vehicle img,
.aps-archive-page img,
.aps-vehicle-card img {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}

/* Container */
/*.aps-container {*/
/*    margin: 0 auto;*/
/*    width: 97%;*/
/*    max-width: 1400px;*/
/*}*/

/* ========================================
   SINGLE VEHICLE PAGE
   ======================================== */

.aps-single-vehicle {
    padding: 40px 0;
}

/* Breadcrumbs */
.aps-breadcrumbs {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.aps-breadcrumbs a {
    color: #2271b1;
    text-decoration: none;
}

.aps-breadcrumbs a:hover {
    text-decoration: underline;
}

.aps-separator {
    margin: 0 8px;
    color: #999;
}

.aps-current {
    color: #333;
    font-weight: 500;
}

/* Header */
.aps-vehicle-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.aps-vehicle-title {
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #1a1a1a;
}

.aps-vehicle-title .aps-make {
    color: #2271b1;
}

.aps-vehicle-title .aps-model {
    color: #333;
}

.aps-vehicle-title .aps-title {
    color: #666;
    font-weight: 400;
}

.aps-vehicle-price-main {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.aps-price-value {
    font-size: 36px;
    font-weight: 700;
    color: #2271b1;
}

.aps-price-note {
    font-size: 14px;
    color: #666;
}

/* Content Layout */
.aps-vehicle-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .aps-vehicle-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .aps-vehicle-gallery-section {
        position: relative;
        top: auto;
    }

    .aps-main-image {
        aspect-ratio: 16 / 10;
    }

    .aps-no-image {
        aspect-ratio: 16 / 10;
    }

    .aps-vehicle-title {
        font-size: 24px;
    }

    .aps-price-value {
        font-size: 28px;
    }

    /*.aps-quick-specs {*/
    /*    grid-template-columns: repeat(2, 1fr);*/
    /*    gap: 10px;*/
    /*    padding: 15px;*/
    /*}*/

    .aps-data-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .aps-data-label {
        font-size: 13px;
    }

    .aps-data-value {
        font-size: 15px;
    }

    .aps-vehicle-cta {
        flex-direction: column;
    }

    .aps-btn {
        width: 100%;
    }

    .aps-gallery-thumbs {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    /*.aps-container {*/
    /*    padding: 0 15px;*/
    /*}*/

    .aps-single-vehicle {
        padding: 20px 0;
    }

    .aps-vehicle-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .aps-vehicle-title {
        font-size: 20px;
    }

    .aps-price-value {
        font-size: 24px;
    }

    .aps-main-image {
        aspect-ratio: 4 / 3;
    }

    .aps-no-image {
        aspect-ratio: 4 / 3;
    }

    /*.aps-thumb {*/
    /*    width: 60px;*/
    /*    height: 60px;*/
    /*}*/

    /*.aps-quick-specs {*/
    /*    grid-template-columns: 1fr;*/
    /*}*/

    .aps-section-title {
        font-size: 18px;
    }

    .aps-gallery-thumbs {
        gap: 8px;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
}

/* Gallery */
.aps-vehicle-gallery-section {
    position: sticky;
    top: 20px;
    height: fit-content;
    max-width: 100%;
}

.aps-gallery-main {
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    width: 100%;
}

.aps-main-image-link {
    display: block;
    width: 100%;
}

.aps-main-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.aps-no-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 18px;
}

.aps-gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    flex-wrap: wrap;
    max-width: 100%;
}

.aps-gallery-thumbs::after {
    content: '';
    flex: 1;
}

/*.aps-thumb {*/
/*    width: 80px;*/
/*    height: 80px;*/
/*    border-radius: 4px;*/
/*    overflow: hidden;*/
/*    cursor: pointer;*/
/*    border: 2px solid transparent;*/
/*    transition: border-color 0.2s;*/
/*    flex-shrink: 0;*/
/*}*/

/*.aps-thumb:hover,*/
/*.aps-thumb.active {*/
/*    border-color: #2271b1;*/
/*}*/

/*.aps-thumb img {*/
/*    width: 100%;*/
/*    height: 100%;*/
/*    object-fit: cover;*/
/*    display: block;*/
/*}*/

/* Quick Specs */
/*.aps-quick-specs {*/
/*    display: grid;*/
/*    grid-template-columns: repeat(2, 1fr);*/
/*    gap: 15px;*/
/*    margin-bottom: 30px;*/
/*    padding: 20px;*/
/*    background: #f8f9fa;*/
/*    border-radius: 8px;*/
/*}*/

.aps-quick-item {
    display: flex;
    flex-direction: column;
}

.aps-quick-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.aps-quick-value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Data Sections */
.aps-data-section {
    margin-bottom: 30px;
}

.aps-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #2271b1;
}

.aps-data-grid {
    display: grid;
    gap: 12px;
}

.aps-data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.aps-data-label {
    color: #666;
    font-size: 14px;
}

.aps-data-value {
    color: #1a1a1a;
    font-weight: 500;
    font-size: 14px;
}

.aps-vin {
    font-family: monospace;
    letter-spacing: 1px;
}

/* Features */
.aps-features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aps-feature-tag {
    background: #e8f0fe;
    color: #2271b1;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* CTA */
.aps-vehicle-cta {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

/* Description */
.aps-vehicle-description {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.aps-description-content {
    line-height: 1.8;
    color: #333;
    font-size: 16px;
}

.aps-description-content p {
    margin-bottom: 15px;
}

.aps-description-content ul,
.aps-description-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.aps-description-content li {
    margin-bottom: 5px;
}

.aps-description-content strong,
.aps-description-content b {
    font-weight: 600;
    color: #1a1a1a;
}

/* ========================================
   ARCHIVE PAGE
   ======================================== */

/*.aps-archive-page {*/
/*    padding: 40px 0;*/
/*}*/

/*.aps-archive-header {*/
/*    margin-bottom: 30px;*/
/*    text-align: center;*/
/*}*/

/*.aps-archive-title {*/
/*    font-size: 36px;*/
/*    font-weight: 600;*/
/*    color: #1a1a1a;*/
/*    margin: 0 0 10px 0;*/
/*}*/

/*.aps-results-count {*/
/*    color: #666;*/
/*    font-size: 16px;*/
/*}*/

/*.aps-archive-content {*/
/*    display: grid;*/
/*    grid-template-columns: 280px 1fr;*/
/*    gap: 30px;*/
/*}*/

/*@media (max-width: 768px) {*/
/*    .aps-archive-content {*/
/*        grid-template-columns: 1fr;*/
/*    }*/
/*}*/

/* Filters Sidebar */
/*.aps-filters-sidebar {*/
/*    background: #f8f9fa;*/
/*    padding: 20px;*/
/*    border-radius: 8px;*/
/*    height: fit-content;*/
/*    position: sticky;*/
/*    top: 20px;*/
/*}*/

/*.aps-filter-section {*/
/*    margin-bottom: 20px;*/
/*}*/

/*.aps-filter-title {*/
/*    font-size: 14px;*/
/*    font-weight: 600;*/
/*    color: #1a1a1a;*/
/*    margin: 0 0 10px 0;*/
/*    text-transform: uppercase;*/
/*    letter-spacing: 0.5px;*/
/*}*/

/*.aps-filter-select,*/
/*.aps-filter-input {*/
/*	width: 100%;*/
/*	padding: 10px 12px;*/
/*	border: 1px solid #ddd;*/
/*	border-radius: 4px;*/
/*	font-size: 14px;*/
/*	background: #fff;*/
/*}*/

/*.aps-filter-select:focus,*/
/*.aps-filter-input:focus {*/
/*    outline: none;*/
/*    border-color: #2271b1;*/
/*}*/

/*.aps-range-inputs {*/
/*    display: grid;*/
/*    grid-template-columns: 1fr 1fr;*/
/*    gap: 10px;*/
/*}*/

/*.aps-filter-actions {*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*    gap: 10px;*/
/*    margin-top: 25px;*/
/*}*/

/* Vehicles Grid */
.aps-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

@media (max-width: 992px) {
    .aps-vehicles-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Vehicle Card */
.aps-vehicle-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.aps-vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.aps-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.aps-card-image {
    position: relative;
    height: 200px;
    background: #f5f5f5;
    overflow: hidden;
}

.aps-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.aps-vehicle-card:hover .aps-card-image img {
    transform: scale(1.05);
}

.aps-card-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.aps-card-year {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #2271b1;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.aps-card-content {
    padding: 20px;
}

.aps-card-header {
    margin-bottom: 15px;
}

.aps-card-make-model {
    font-size: 13px;
    color: #2271b1;
    margin-bottom: 5px;
}

.aps-card-make {
    font-weight: 600;
}

.aps-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
}

.aps-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.aps-card-spec {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
}

.aps-spec-icon {
    display: flex;
    align-items: center;
}

.aps-spec-icon svg {
    width: 14px;
    height: 14px;
}

.aps-card-price {
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/*.aps-price-amount {*/
/*	font-size: 22px;*/
/*	font-weight: 700;*/
/*	color: #2271b1;*/
/*}*/

/*.aps-price-negotiable {*/
/*	color: #666;*/
/*	font-style: italic;*/
/*}*/

/* No Results */
.aps-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.aps-no-results p {
    font-size: 18px;
    margin-bottom: 20px;
}

/* Buttons */
.aps-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.aps-btn-primary {
    background: #2271b1;
    color: #fff;
}

.aps-btn-primary:hover {
    background: #1a5a8e;
}

.aps-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.aps-btn-secondary:hover {
    background: #e0e0e0;
}

.aps-filters-loading select {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}

/* Pagination */
.aps-vehicles-grid-wrapper .pagination,
.aps-vehicles-grid-wrapper .nav-links {
    margin-top: 40px;
    text-align: center;
}


/* Paginacja wewnątrz nav.aps-pagination */
.aps-pagination {
    margin-top: 40px;
}


/* Loading State */
.aps-loading {
    opacity: 0.6;
    pointer-events: none;
}

.aps-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: aps-spin 1s linear infinite;
}

@keyframes aps-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


.vehicles-listing__top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vehicles-listing__top-bar-sort-per-page {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.aps-pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    list-style: none;

    .btn {
        padding: 0.875rem 0.875rem;
        display: inline-flex;
        line-height: 1;
        font-size: 1rem;
        aspect-ratio: 1;
        width: 44px;
    }
}