/* === Idealne Auto — Single Oferta Front-end === */
/* Design dopasowany do motywu Kadence (ciemny) */

.iao-single-oferta {
    padding: 200px 0 60px;
    font-family: 'Poppins', sans-serif;
    color: var(--global-palette4, #ededed);
    line-height: 1.6;
    background: var(--global-palette9, #1d1d1d);
}
.iao-container {
    max-width: 1290px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Breadcrumb */
.iao-breadcrumb {
    font-size: 14px;
    color: var(--global-palette6, #666464);
    margin-bottom: 20px;
    padding: 10px 0;
}
.iao-breadcrumb a {
    color: var(--global-palette5, #dcdcdc);
    text-decoration: none;
}
.iao-breadcrumb a:hover {
    color: var(--global-palette1, #d81d16);
    text-decoration: underline;
}
.iao-breadcrumb-sep {
    margin: 0 8px;
    color: var(--global-palette6, #666464);
}
.iao-breadcrumb-current {
    color: var(--global-palette4, #ededed);
}

/* Górna sekcja — galeria + info */
.iao-top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Galeria */
.iao-gallery {
    position: relative;
}
.iao-gallery-main {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    background: var(--global-palette8, #000);
    aspect-ratio: 4/3;
}
.iao-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    display: block;
}
.iao-gallery-prev,
.iao-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}
.iao-gallery-prev:hover,
.iao-gallery-next:hover {
    background: rgba(0,0,0,0.9);
}
.iao-gallery-prev { left: 10px; }
.iao-gallery-next { right: 10px; }
.iao-gallery-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 0;
}

.iao-gallery-thumbs {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.iao-thumb {
    width: 70px;
    height: 52px;
    object-fit: cover;
    border-radius: 0;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.2s;
    flex-shrink: 0;
}
.iao-thumb:hover,
.iao-thumb.active {
    opacity: 1;
    border-color: var(--global-palette1, #d81d16);
}

.iao-gallery-placeholder {
    aspect-ratio: 4/3;
    background: var(--global-palette8, #000);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--global-palette6, #666464);
}
.iao-gallery-placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

/* Status badge */
.iao-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    padding: 6px 14px;
    border-radius: 0;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
}
.iao-status-dostepny   { background: var(--global-palette11, #13612e); }
.iao-status-rezerwacja { background: var(--global-palette15, #f5a524); color: var(--global-palette8, #000); }
.iao-status-sprzedany  { background: var(--global-palette1, #d81d16); }

/* Info panel */
.iao-info-panel {
    display: flex;
    flex-direction: column;
}
.iao-title {
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 16px;
    line-height: 1.3;
    color: var(--global-palette3, #fff);
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
}
.iao-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--global-palette3, #fff);
    margin-bottom: 6px;
}
.iao-price-netto {
    display: block;
    font-size: 15px;
    font-weight: 400;
    color: var(--global-palette6, #666464);
    margin-top: 2px;
}

/* Key specs grid */
.iao-key-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 20px 0;
    border: 1px solid var(--global-palette7, #414141);
    border-radius: 0;
    overflow: hidden;
}
.iao-key-spec {
    padding: 12px 16px;
    border-bottom: 1px solid var(--global-palette7, #414141);
    border-right: 1px solid var(--global-palette7, #414141);
    display: flex;
    flex-direction: column;
    background: var(--global-palette8, #000);
}
.iao-key-spec:nth-child(2n) {
    border-right: none;
}
.iao-key-spec:nth-last-child(-n+2) {
    border-bottom: none;
}
.iao-key-label {
    font-size: 12px;
    color: var(--global-palette6, #666464);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.iao-key-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--global-palette3, #fff);
}

/* Contact buttons */
.iao-contact-buttons {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
}
.iao-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    border-radius: 0;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
}
.iao-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}
.iao-btn-primary {
    background: var(--global-palette11, #13612e);
    color: #fff;
}
.iao-btn-primary:hover {
    background: #0e4d23;
    color: #fff;
    box-shadow: 0px 15px 25px -7px rgba(0,0,0,0.1);
}
.iao-btn-secondary {
    background: transparent;
    color: var(--global-palette3, #fff);
    border: 1px solid var(--global-palette7, #414141);
}
.iao-btn-secondary:hover {
    background: var(--global-palette7, #414141);
    color: var(--global-palette3, #fff);
    box-shadow: 0px 15px 25px -7px rgba(0,0,0,0.1);
}
.iao-ref-id {
    font-size: 12px;
    color: var(--global-palette6, #666464);
    margin-top: 12px;
}

/* Dolna sekcja — szczegóły */
.iao-details-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.iao-detail-box {
    background: var(--global-palette9, #1d1d1d);
    border: 1px solid var(--global-palette7, #414141);
    border-radius: 0;
    padding: 24px;
}
.iao-detail-box h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--global-palette1, #d81d16);
    color: var(--global-palette3, #fff);
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
}

/* Specs table */
.iao-specs-table {
    width: 100%;
    border-collapse: collapse;
}
.iao-specs-table tr:not(:last-child) {
    border-bottom: 1px solid var(--global-palette7, #414141);
}
.iao-specs-table td {
    padding: 10px 0;
    font-size: 14px;
}
.iao-spec-label {
    color: var(--global-palette6, #666464);
    width: 45%;
}
.iao-spec-value {
    font-weight: 600;
    color: var(--global-palette3, #fff);
}

/* Opis */
.iao-opis-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--global-palette4, #ededed);
}

/* Wyposażenie */
.iao-wyposazenie-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.iao-wyposazenie-list li {
    font-size: 14px;
    padding: 6px 0 6px 24px;
    position: relative;
    color: var(--global-palette4, #ededed);
}
.iao-wyposazenie-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--global-palette11, #13612e);
    font-weight: 700;
}

/* Lightbox */
.iao-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.iao-lightbox.active {
    display: flex;
}
.iao-lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}
.iao-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    line-height: 1;
}
.iao-lightbox-prev,
.iao-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 36px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.iao-lightbox-prev { left: 20px; }
.iao-lightbox-next { right: 20px; }
.iao-lightbox-prev:hover,
.iao-lightbox-next:hover {
    background: rgba(255,255,255,0.25);
}

/* Modal zapytania */
.iao-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99998;
    align-items: center;
    justify-content: center;
}
.iao-modal.active {
    display: flex;
}
.iao-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
}
.iao-modal-content {
    position: relative;
    background: var(--global-palette9, #1d1d1d);
    border: 1px solid var(--global-palette7, #414141);
    padding: 32px;
    width: 100%;
    max-width: 480px;
    margin: 0 20px;
}
.iao-modal-content h3 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 600;
    color: var(--global-palette3, #fff);
    text-transform: uppercase;
}
.iao-modal-car {
    font-size: 14px;
    color: var(--global-palette6, #666464);
    margin: 0 0 24px;
}
.iao-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--global-palette6, #666464);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.iao-modal-close:hover {
    color: var(--global-palette3, #fff);
}
.iao-form-row {
    margin-bottom: 12px;
}
.iao-form-row input,
.iao-form-row textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--global-palette8, #000);
    border: 1px solid var(--global-palette7, #414141);
    color: var(--global-palette3, #fff);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    border-radius: 0;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.iao-form-row input::placeholder,
.iao-form-row textarea::placeholder {
    color: var(--global-palette6, #666464);
}
.iao-form-row input:focus,
.iao-form-row textarea:focus {
    border-color: var(--global-palette1, #d81d16);
}
.iao-btn-full {
    width: 100%;
    margin-top: 4px;
}
.iao-form-status {
    margin-top: 12px;
    font-size: 14px;
    text-align: center;
}
.iao-form-status.success {
    color: var(--global-palette11, #13612e);
}
.iao-form-status.error {
    color: var(--global-palette1, #d81d16);
}

/* Responsive */
@media (max-width: 1024px) {
    .iao-single-oferta {
        padding-top: 160px;
    }
    .iao-top-section {
        gap: 24px;
    }
    .iao-title {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .iao-single-oferta {
        padding-top: 140px;
    }
    .iao-top-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .iao-details-section {
        grid-template-columns: 1fr;
    }
    .iao-title {
        font-size: 20px;
    }
    .iao-price {
        font-size: 26px;
    }
    .iao-key-specs {
        grid-template-columns: 1fr 1fr;
    }
    .iao-contact-buttons {
        flex-direction: column;
    }
    .iao-wyposazenie-list {
        grid-template-columns: 1fr;
    }
    .iao-detail-box {
        padding: 16px;
    }
    .iao-modal-content {
        padding: 24px 16px;
        margin: 0 12px;
        max-height: 90vh;
        overflow-y: auto;
    }
    .iao-modal-content h3 {
        font-size: 18px;
    }
    .iao-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
    .iao-lightbox-prev,
    .iao-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    .iao-lightbox-prev { left: 10px; }
    .iao-lightbox-next { right: 10px; }
}
