.andcar-heading-left {
    margin-right: auto;
    text-align: left;
}

.andcar-heading-center {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.andcar-heading-right {
    margin-left: auto;
    text-align: right;
}

.andcar-card-sprzedany .andcar-photo::after {
    border-color: #bb2026;
    background: rgba(255, 255, 255, 0.88);
    color: #bb2026;
}

.andcar-photo .status-sprzedany,
.andcar-badge.status-sprzedany {
    background: #bb2026;
}

.andcar-single-photo {
    position: relative;
}

.andcar-single-photo-status {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 9px 13px;
    border-radius: 2px;
    background: #bb2026;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.andcar-card .andcar-kicker {
    max-width: 100%;
    font-size: clamp(14px, 1.2vw, 16px);
    line-height: 1.35;
    letter-spacing: 0.1em;
    overflow-wrap: anywhere;
}

.andcar-single-photo img {
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    background: #f3f4f5;
}

@media (min-width: 641px) {
    .andcar-single-top {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
    }
}

.andcar-single-modern {
    box-sizing: border-box;
    width: min(1240px, calc(100vw - 32px)) !important;
    max-width: 1240px !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

body.single-andcar_auto .entry-content .andcar-single-modern {
    margin-right: auto !important;
    margin-left: auto !important;
    left: auto;
    transform: none;
}

body.single-andcar_auto main {
    padding-top: 24px !important;
}

body.single-andcar_auto .entry-content {
    margin-top: 0 !important;
}

body.single-andcar_auto .andcar-single-modern {
    padding-top: 16px;
}

.andcar-single-modern .andcar-single-top {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(380px, 0.95fr);
    max-width: none;
    gap: 30px;
    align-items: stretch;
    margin-right: 0;
    margin-left: 0;
    margin-bottom: 24px;
}

.andcar-single-modern .andcar-single-photo {
    display: block;
    overflow: hidden;
    border: 1px solid #e1e5ea;
    border-radius: 14px;
    background: #f4f6f8;
}

.andcar-single-left {
    min-width: 0;
}

.andcar-single-left .andcar-details-card {
    margin-top: 24px;
    margin-bottom: 0;
}

body.single-andcar_auto .andcar-single-modern .andcar-single-top .andcar-single-photo {
    display: block !important;
}

.andcar-single-modern .andcar-single-photo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    background: transparent;
}

.andcar-single-modern .andcar-offer-panel {
    position: static;
    top: auto;
    padding: 28px;
    border: 1px solid #dfe3e8;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(23, 33, 43, 0.06);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    box-sizing: border-box;
}

.andcar-single-modern .andcar-update {
    display: inline-block;
    margin: 0 0 18px;
    padding: 4px 9px;
    border: 1px solid #dfe3e8;
    border-radius: 999px;
    color: var(--ac-muted);
    font-size: 11px;
    font-weight: 700;
}

.andcar-single-modern .andcar-offer-panel h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.08;
}

.andcar-single-modern .andcar-short-description {
    margin: 0 0 20px;
    color: var(--ac-muted);
    line-height: 1.55;
}

.andcar-quick-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    margin: 0 0 22px;
    padding: 18px 0;
    border-top: 1px solid var(--ac-line);
    border-bottom: 1px solid var(--ac-line);
}

.andcar-quick-specs div {
    min-width: 0;
}

.andcar-quick-specs dt {
    color: var(--ac-muted);
    font-size: 11px;
}

.andcar-quick-specs dd {
    margin: 3px 0 0;
    font-size: 15px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.andcar-single-modern .andcar-offer-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-bottom: 16px;
}

.andcar-single-modern .andcar-price {
    margin: 0;
    font-size: clamp(28px, 3vw, 38px);
}

.andcar-single-modern .andcar-invoice {
    color: var(--ac-muted);
    font-size: 15px;
    font-weight: 750;
    line-height: 1.35;
}

.andcar-single-modern .andcar-badge {
    margin: 0 0 18px;
    padding: 12px 17px;
    align-self: flex-start;
    font-size: 16px;
    letter-spacing: 0.08em;
    line-height: 1;
}

.andcar-single-modern .andcar-contact-button {
    display: block;
    width: 100%;
    padding: 14px 18px;
    text-align: center;
    box-sizing: border-box;
}

.andcar-offer-actions {
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding-top: 20px;
}

.andcar-single-modern .andcar-otomoto-button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 13px 18px;
    border-color: #bb2026;
    background: #fff;
    color: #bb2026 !important;
    text-align: center;
    box-sizing: border-box;
}

.andcar-single-modern .andcar-otomoto-button:hover {
    background: #bb2026;
    color: #fff !important;
}

.andcar-details-card,
.andcar-description-card,
.andcar-gallery-card {
    margin: 0 0 24px;
    padding: 30px 32px;
    border: 1px solid #dfe3e8;
    border-radius: 14px;
    background: #fff;
}

.andcar-single-left .andcar-details-card {
    padding: 22px 24px;
}

.andcar-details-card h2,
.andcar-description-card h2,
.andcar-gallery-card h2 {
    margin: 0 0 22px;
    font-size: clamp(24px, 3vw, 34px);
}

.andcar-single-left .andcar-details-card h2 {
    margin-bottom: 16px;
    font-size: clamp(24px, 2.4vw, 30px);
}

.andcar-details-card .andcar-specs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    border: 0;
}

.andcar-details-card .andcar-specs div {
    min-width: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
}

.andcar-details-card .andcar-specs dt {
    color: var(--ac-muted);
    font-size: 11px;
}

.andcar-details-card .andcar-specs dd {
    margin: 4px 0 0;
    font-size: 14px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.andcar-description-card .andcar-description {
    width: 100%;
    max-width: none;
    margin: 0;
}

.andcar-description-card .andcar-description-lead {
    margin: 0 0 20px;
    color: var(--ac-ink);
    font-size: 18px;
    font-weight: 650;
    line-height: 1.6;
}

.andcar-gallery-card .andcar-gallery {
    margin: 0;
}

@media (max-width: 900px) {
    .andcar-single-modern .andcar-single-top {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .andcar-single-modern .andcar-offer-panel {
        position: static;
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .andcar-single-modern .andcar-single-photo img {
        height: auto;
        max-height: none;
    }

    .andcar-single-modern .andcar-offer-panel,
    .andcar-details-card,
    .andcar-description-card,
    .andcar-gallery-card {
        padding: 22px 20px;
        border-radius: 10px;
    }

    .andcar-details-card .andcar-specs {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 420px) {
    .andcar-quick-specs,
    .andcar-details-card .andcar-specs {
        grid-template-columns: 1fr;
    }
}

body.single-andcar_auto main > .wp-block-group:first-child {
    display: none;
}
