/* Tweedehands – verberg oude layout vóór JS (voorkomt flits van lege sectie) */
html.pa-th-boot [data-position="tweedehands"],
html.pa-th-boot .u-section-3,
html.pa-th-boot .mod-recentcars,
body.pa-th-page [data-position="tweedehands"],
body.pa-th-page .u-section-3,
body.pa-th-page .mod-recentcars {
    display: none !important;
}

/* Tweedehands – verberg oude auto-module */
[data-position="tweedehands"],
.mod-recentcars {
    display: none !important;
}

/* Geen lege ruimte bovenaan op overzichtspagina */
body.pa-th-page .u-section-2,
body.pa-th-page .u-section-2 .u-sheet-1,
body.pa-th-page .u-section-2 .u-position-1,
body.pa-th-page .u-section-2 .u-block,
body.pa-th-page .u-section-2 .u-block-container {
    min-height: 0 !important;
    height: auto !important;
}

body.pa-th-page .u-section-3 {
    display: none !important;
}

body.pa-th-page .pa-th-mount {
    max-width: 1140px;
    margin: 0 auto;
    padding: 32px 16px 48px;
}

.pa-th-loading {
    text-align: center;
    color: #666;
    padding: 48px 16px;
    font-family: Montserrat, sans-serif;
}

/* Detailpagina – reset NicePage conflicten */
body.pa-th-detail-page .pa-th-detail-section,
body.pa-th-detail-page .u-section-1.pa-th-detail-section {
    background: #f6f7fb;
    text-align: left !important;
    min-height: 0 !important;
    padding: 0 !important;
}

body.pa-th-detail-page .pa-th-detail-sheet,
body.pa-th-detail-page .u-section-1 .pa-th-detail-sheet,
body.pa-th-detail-page .u-section-1 .u-sheet-1 {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 32px 20px 64px !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
}

body.pa-th-detail-page .u-product-1,
body.pa-th-detail-page .u-gallery-1,
body.pa-th-detail-page .u-section-1 .u-product-1,
body.pa-th-detail-page .u-section-1 .u-gallery-1,
body.pa-th-detail-page .u-section-1 .u-text-1,
body.pa-th-detail-page .u-section-1 .u-text-2,
body.pa-th-detail-page .u-section-1 .u-text-3 {
    display: none !important;
}

body.pa-th-detail-page .pa-th-detail,
body.pa-th-detail-page .pa-th-detail * {
    box-sizing: border-box;
}

body.pa-th-detail-page .pa-th-detail img {
    max-width: 100%;
    height: auto;
}

.pa-th-categories {
    margin: 0 auto 28px;
}

.pa-th-categories__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.pa-th-cat-btn {
    padding: 10px 22px;
    border: 1px solid rgba(67, 69, 231, 0.25);
    border-radius: 50px;
    background: #fff;
    color: #4345e7;
    font-family: Montserrat, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.pa-th-cat-btn:hover {
    background: rgba(67, 69, 231, 0.08);
    transform: translateY(-2px);
}

.pa-th-cat-btn.is-active {
    background: #4345e7;
    color: #fff;
    border-color: #4345e7;
    box-shadow: 0 4px 16px rgba(67, 69, 231, 0.25);
}

.pa-th-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 13px;
}

@media (max-width: 991px) {
    .pa-th-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .pa-th-grid {
        grid-template-columns: 1fr;
    }
}

.pa-th-card {
    background: #fff;
    box-shadow: 0 0 12px rgba(128, 128, 128, 0.55);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s;
}

.pa-th-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(67, 69, 231, 0.15);
}

.pa-th-card__image-link {
    display: block;
}

.pa-th-card__image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.pa-th-card__image--empty {
    background: #f0f0f0;
}

.pa-th-card__body {
    padding: 24px 30px 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.pa-th-card__title {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: Montserrat, sans-serif;
}

.pa-th-card__title a {
    color: inherit;
    text-decoration: none;
}

.pa-th-card__meta {
    margin: 0 0 8px;
    font-size: 0.8125rem;
    color: #666;
}

.pa-th-card__desc {
    margin: 0 0 12px;
    font-size: 0.9375rem;
    color: #444;
    flex: 1;
}

.pa-th-card__price {
    margin: 0 0 16px;
    font-weight: 700;
    color: #4345e7;
    font-size: 1rem;
}

.pa-th-card__btn {
    display: inline-block;
    margin: 0 auto;
    padding: 10px 28px;
    border: 2px solid #4345e7;
    color: #4345e7;
    text-transform: uppercase;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.25s, color 0.25s;
}

.pa-th-card__btn:hover {
    background: #4345e7;
    color: #fff;
}

.pa-th-empty {
    text-align: center;
    color: #666;
    padding: 48px 16px;
    font-style: italic;
}

/* Detail layout */
.pa-th-detail {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.pa-th-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    padding: 10px 18px;
    border: 2px solid rgba(67, 69, 231, 0.2);
    border-radius: 50px;
    color: #4345e7;
    font-weight: 700;
    text-decoration: none;
    font-family: Montserrat, sans-serif;
    font-size: 0.9rem;
    background: #fff;
    transition: background 0.25s, border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.pa-th-back__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.pa-th-back:hover {
    background: rgba(67, 69, 231, 0.08);
    border-color: #4345e7;
    transform: translateX(-2px);
    box-shadow: 0 4px 14px rgba(67, 69, 231, 0.12);
}

.pa-th-detail__layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 40px;
    align-items: start;
    width: 100%;
}

@media (max-width: 991px) {
    .pa-th-detail__layout {
        grid-template-columns: 1fr !important;
        gap: 28px;
    }
}

.pa-th-detail__info {
    text-align: left;
}

.pa-th-detail__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.pa-th-detail__chip {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 50px;
    background: rgba(67, 69, 231, 0.1);
    color: #4345e7;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: Montserrat, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Slideshow */
.pa-th-slideshow {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1);
    overflow: hidden;
    width: 100%;
}

.pa-th-slideshow__stage {
    position: relative;
    background: linear-gradient(180deg, #f8f9fc 0%, #eef1f7 100%);
    aspect-ratio: 4 / 3;
    min-height: 280px;
    max-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pa-th-slideshow__main {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    display: block;
    padding: 20px;
}

.pa-th-slideshow__counter {
    position: absolute;
    bottom: 14px;
    right: 14px;
    padding: 6px 12px;
    border-radius: 50px;
    background: rgba(17, 24, 39, 0.72);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: Montserrat, sans-serif;
    letter-spacing: 0.04em;
    z-index: 2;
    pointer-events: none;
}

.pa-th-slideshow__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #4345e7;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14);
    transition: background 0.2s, transform 0.2s, color 0.2s;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.pa-th-slideshow__nav svg {
    width: 22px;
    height: 22px;
    display: block;
}

.pa-th-slideshow__nav:hover {
    background: #4345e7;
    color: #fff;
    transform: translateY(-50%) scale(1.06);
}

.pa-th-slideshow__nav--prev { left: 14px; }
.pa-th-slideshow__nav--next { right: 14px; }

.pa-th-slideshow__thumbs {
    display: flex;
    gap: 10px;
    padding: 14px 16px 16px;
    overflow-x: auto;
    background: #fff;
    border-top: 1px solid #eceef4;
}

.pa-th-slideshow__thumb {
    flex: 0 0 auto;
    padding: 0;
    border: 2px solid transparent;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0.65;
    transition: border-color 0.2s, opacity 0.2s, transform 0.2s;
}

.pa-th-slideshow__thumb:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.pa-th-slideshow__thumb.is-active {
    border-color: #4345e7;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(67, 69, 231, 0.2);
}

.pa-th-slideshow__thumb img {
    width: 88px;
    height: 66px;
    object-fit: cover;
    display: block;
}

.pa-th-slideshow--empty .pa-th-slideshow__stage,
.pa-th-detail__image--empty {
    width: 100%;
    min-height: 320px;
    background: linear-gradient(135deg, #f0f0f0, #e8e8ec);
}

.pa-th-detail__title {
    margin: 0 0 12px;
    font-size: 1.85rem;
    font-weight: 800;
    text-transform: uppercase;
    font-family: Montserrat, sans-serif;
    color: #111;
    line-height: 1.2;
}

.pa-th-detail__price {
    margin: 0 0 20px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #4345e7;
}

.pa-th-detail__intro {
    margin: 0 0 24px;
    font-size: 1.05rem;
    line-height: 1.65;
    color: #444;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8ebf3;
}

.pa-th-detail__cta {
    margin-top: 8px;
    padding-top: 8px;
}

.pa-th-detail__contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    background: #4345e7;
    color: #fff !important;
    font-family: Montserrat, sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none !important;
    box-shadow: 0 8px 24px rgba(67, 69, 231, 0.35);
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}

.pa-th-detail__contact:hover {
    background: #3537c4;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(67, 69, 231, 0.4);
}

.pa-th-specs-block {
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid #e8ebf3;
    border-radius: 12px;
    padding: 20px 22px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.pa-th-specs-block__title {
    margin: 0 0 16px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4345e7;
    font-family: Montserrat, sans-serif;
}

.pa-th-specs-grid {
    display: grid;
    grid-template-columns: minmax(120px, 38%) 1fr;
    gap: 10px 16px;
    margin: 0;
}

.pa-th-specs-grid dt {
    margin: 0;
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.pa-th-specs-grid dd {
    margin: 0;
    color: #1a1a2e;
    font-weight: 600;
    font-size: 0.95rem;
}

.pa-th-specs-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #333;
}

@media (max-width: 575px) {
    .pa-th-specs-grid {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .pa-th-specs-grid dt {
        margin-top: 8px;
    }
}

/* Legacy detail classes (fallback JS) */
.pa-th-detail__main-image,
.pa-th-detail__thumbs,
.pa-th-detail__thumb,
.pa-th-detail__specs {
    display: none;
}
