/**
 * Pre-Owned Section Styles
 * Matches related-models section design pattern
 */

.jac-preowned-section {
    padding: 64px 0 80px;
    background: var(--jac-surface-muted);
}

body.single-models .jac-preowned-section {
    padding-left: 24px;
    padding-right: 24px;
}

body.single-models .jac-preowned-card {
    padding: 0;
    border-radius: var(--space-12);
}

.jac-preowned-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--jac-black);
    margin: 0 0 40px 0;
    text-align: center;
}

/* Grid Layout */
.jac-preowned-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(320px, 1fr));
    gap: 32px;
    margin: 0 auto;
    max-width: 1200px;
}

/* Card Styles */
.jac-preowned-card {
    display: flex;
    flex-direction: column;
    background: var(--jac-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jac-preowned-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Image Section - 4:3 aspect ratio, no border */
.jac-preowned-image-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--jac-surface-soft);
    overflow: hidden;
}

.jac-preowned-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jac-preowned-image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--jac-grey-200);
}

/* Content Section */
.jac-preowned-content {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jac-preowned-name {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--jac-ink);
    line-height: 1.3;
}

.jac-preowned-price {
    margin: 0;
    font-size: 14px;
    color: var(--jac-grey-600);
}

/* Buttons Section */
.jac-preowned-buttons {
    margin-top: 4px;
}

.jac-preowned-cta-btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 999px;
    background: var(--jac-red-a88);
    color: var(--jac-white);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid var(--jac-red-a88);
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.jac-preowned-cta-btn:hover,
.jac-preowned-cta-btn:focus-visible {
    background: var(--jac-red-a72);
    border-color: var(--jac-red-a72);
    box-shadow: 0 10px 20px var(--jac-red-a35);
    color: var(--jac-white);
}

.jac-preowned-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
}

.jac-preowned-meta li {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: var(--jac-grey-700);
    padding: 4px 10px;
    background: var(--jac-surface-soft);
    border-radius: var(--radius-sm);
}

/* View All Button */
.jac-preowned-cta {
    text-align: center;
    margin-top: 48px;
}

.jac-preowned-cta .jac-btn {
    min-width: 200px;
    max-width: 280px;
    width: auto;
    display: inline-block;
    padding: 12px 32px;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .jac-preowned-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .jac-preowned-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 640px) {
    .jac-preowned-section {
        padding: 48px 0 64px;
    }

    .jac-preowned-title {
        font-size: 28px;
        margin-bottom: 32px;
    }

    .jac-preowned-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .jac-preowned-cta {
        margin-top: 32px;
    }

    .jac-preowned-cta .jac-btn {
        width: 100%;
        max-width: 100%;
    }
}
