/* ============================================================
   CAR DETAIL PAGE — fc-detail.css
   ============================================================
   WooCommerce-style product page layout for single car posts.
   Depends on: fc-style.css (for .fc-badge, .fc-card__attr,
   .fc-card__feat, .fc-card__quote-btn, .fc-grid, etc.)
   ============================================================ */

/* ===== DETAIL WRAPPER ===== */
.fc-detail {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

.fc-detail__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== BANNER / BREADCRUMB ===== */
.fc-detail__banner {
    background: #0d0c1b;
    padding: 40px 0 30px;
    margin-bottom: 0;
}

.fc-detail__banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.fc-detail__banner-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px;
    font-family: var(--font-heading);
}

.fc-detail__breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    font-size: 14px;
    color: #aaa;
}

.fc-detail__breadcrumb a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
}

.fc-detail__breadcrumb a:hover {
    color: #fff;
}

.fc-detail__breadcrumb-sep {
    margin: 0 8px;
    color: #666;
}

.fc-detail__breadcrumb-current {
    color: var(--e-global-color-accent, #B9944F);
    font-weight: 500;
}

/* ===== HERO SECTION ===== */
.fc-detail__hero {
    padding: 40px 0 30px;
}

.fc-detail__hero > .fc-detail__container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

/* ===== GALLERY ===== */
.fc-detail__gallery-col {
    min-width: 0; /* Prevent grid blowout */
    overflow: hidden;
}

.fc-detail__gallery {
    position: sticky;
    top: 100px;
}

.fc-detail__main-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #eaeaea;
    aspect-ratio: 16 / 11;
}

.fc-detail__main-img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

/* Image badges on gallery */
.fc-detail__image-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

/* ===== THUMBNAIL STRIP ===== */
.fc-detail__thumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    position: relative;
}

.fc-detail__thumbs-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
    flex: 1;
    min-width: 0;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.fc-detail__thumbs-track::-webkit-scrollbar {
    display: none;
}

.fc-detail__thumb {
    flex: 0 0 88px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
    position: relative;
}

.fc-detail__thumb:hover {
    transform: scale(1.05);
}

.fc-detail__thumb--active {
    border-color: var(--color-primary, #3813C2);
}

.fc-detail__thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Thumbnail nav arrows */
.fc-detail__thumbs-nav {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-size: 12px;
}

.fc-detail__thumbs-nav:hover {
    background: var(--color-primary, #3813C2);
    color: #fff;
    border-color: var(--color-primary, #3813C2);
}

/* ===== INFO COLUMN ===== */
.fc-detail__info-col {
    min-width: 0; /* Prevent grid blowout */
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Availability */
.fc-detail__availability {
    margin-bottom: 12px;
}

.fc-detail__availability .fc-badge {
    font-size: 12px;
    padding: 5px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.fc-detail__availability .fc-badge i {
    font-size: 12px;
}

/* Title */
.fc-detail__title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: #0d0c1b;
    margin: 0 0 8px;
    font-family: var(--font-heading);
}

.fc-detail__trim {
    font-weight: 400;
    color: #777;
    font-size: 20px;
}

/* Company & Type Badges */
.fc-detail__tax-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.fc-detail__tax-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.fc-detail__tax-badge--company {
    background: #f0f0f0;
    color: #333;
}

.fc-detail__tax-badge--company:hover {
    background: #0d0d0d;
    color: #fff;
}

.fc-detail__tax-badge--type {
    background: var(--e-global-color-accent, #3813C2);
    color: #fff;
}

.fc-detail__tax-badge--type:hover {
    background: #2a0e94;
    color: #fff;
}

.fc-detail__tax-badge i {
    font-size: 12px;
}

/* Performance Badge */
.fc-detail__perf-badge {
    margin-bottom: 16px;
}

.fc-detail__perf-badge .fc-badge {
    font-size: 12px;
    padding: 5px 14px;
    border-radius: 20px;
}

/* Quick Specs Pills */
.fc-detail__quick-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.fc-detail__qspec {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #eef2f7;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    white-space: nowrap;
}

.fc-detail__qspec i {
    font-size: 13px;
    color: var(--e-global-color-accent, #3813C2);
}

.fc-detail__qspec--warranty {
    background: #f0faf4;
    color: #2d6a4f;
}

.fc-detail__qspec--warranty i {
    color: #2d6a4f;
}

/* Badge Groups (Attributes + Features) */
.fc-detail__attrs,
.fc-detail__feats {
    margin-bottom: 16px;
}

.fc-detail__badge-heading {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
}

.fc-detail__badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Reuse card badge styles at a slightly larger size for detail page */
.fc-detail__badge.fc-card__attr,
.fc-detail__badge.fc-card__feat {
    padding: 6px 14px;
    font-size: 12.5px;
    border-radius: 8px;
}

/* CTA Button */
.fc-detail__cta {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.fc-detail__cta .fc-card__quote-btn {
    max-width: 320px;
    padding: 14px 32px;
    font-size: 16px;
}

/* ===== SECTIONS ===== */
.fc-detail__section {
    padding: 40px 0;
    border-top: 1px solid #eee;
}

.fc-detail__section-title {
    font-size: 24px;
    font-weight: 700;
    color: #0d0c1b;
    margin: 0 0 24px;
    font-family: var(--font-heading);
    position: relative;
    padding-bottom: 12px;
}

.fc-detail__section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--color-primary, #3813C2);
    border-radius: 2px;
}

/* ===== DESCRIPTION ===== */
.fc-detail__description-content {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    max-width: 900px;
}

.fc-detail__description-content p {
    margin-bottom: 16px;
}

.fc-detail__description-content p:last-child {
    margin-bottom: 0;
}

/* ===== SPECIFICATIONS TABLE ===== */
.fc-detail__specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    max-width: 900px;
}

.fc-detail__spec-row {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.fc-detail__spec-row:hover {
    background: #fafbfc;
}

/* Every odd row gets right border (for 2-column layout) */
.fc-detail__spec-row:nth-child(odd) {
    border-right: 1px solid #f0f0f0;
}

/* Remove bottom border from last two rows */
.fc-detail__spec-row:nth-last-child(-n+2) {
    border-bottom: none;
}

.fc-detail__spec-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    min-width: 140px;
    flex-shrink: 0;
}

.fc-detail__spec-label i {
    font-size: 13px;
    color: var(--e-global-color-accent, #3813C2);
    width: 16px;
    text-align: center;
}

.fc-detail__spec-value {
    font-size: 14px;
    font-weight: 500;
    color: #0d0c1b;
    flex: 1;
}

/* ===== RELATED CARS ===== */
.fc-detail__related {
    padding-bottom: 60px;
}

.fc-detail__related .fc-grid {
    margin-bottom: 0;
}

/* ===== RESPONSIVE ===== */

/* Tablet — stack gallery on top */
@media (max-width: 992px) {
    .fc-detail__hero > .fc-detail__container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .fc-detail__gallery {
        position: static;
    }

    .fc-detail__banner-title {
        font-size: 24px;
    }

    .fc-detail__title {
        font-size: 26px;
    }

    .fc-detail__trim {
        font-size: 17px;
    }

    .fc-detail__specs-grid {
        grid-template-columns: 1fr;
    }

    .fc-detail__spec-row:nth-child(odd) {
        border-right: none;
    }

    /* Re-add borders for single column */
    .fc-detail__spec-row {
        border-right: none;
    }

    .fc-detail__spec-row:not(:last-child) {
        border-bottom: 1px solid #f0f0f0;
    }
}

/* Small tablet */
@media (max-width: 767px) {
    .fc-detail__banner {
        padding: 28px 0 20px;
    }

    .fc-detail__banner-title {
        font-size: 20px;
    }

    .fc-detail__hero {
        padding: 24px 0 20px;
    }

    .fc-detail__section {
        padding: 30px 0;
    }

    .fc-detail__title {
        font-size: 22px;
    }

    .fc-detail__quick-specs {
        gap: 6px;
    }

    .fc-detail__qspec {
        padding: 5px 10px;
        font-size: 12px;
    }

    .fc-detail__cta .fc-card__quote-btn {
        max-width: 100%;
        width: 100%;
    }

    .fc-detail__thumb {
        flex: 0 0 72px;
        height: 52px;
    }

    .fc-detail__spec-label {
        min-width: 120px;
    }

    /* Related cars 2 columns on tablet */
    .fc-detail__related .fc-grid {
        --fc-columns: 2 !important;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .fc-detail__banner {
        padding: 20px 0 14px;
    }

    .fc-detail__banner-title {
        font-size: 18px;
    }

    .fc-detail__breadcrumb {
        font-size: 12px;
    }

    .fc-detail__hero > .fc-detail__container {
        gap: 20px;
    }

    .fc-detail__title {
        font-size: 20px;
    }

    .fc-detail__section-title {
        font-size: 20px;
    }

    .fc-detail__tax-badge {
        font-size: 12px;
        padding: 4px 10px;
    }

    .fc-detail__spec-row {
        padding: 10px 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .fc-detail__spec-label {
        min-width: auto;
    }

    .fc-detail__thumb {
        flex: 0 0 64px;
        height: 46px;
    }

    /* Related cars 1 column on mobile */
    .fc-detail__related .fc-grid {
        --fc-columns: 1 !important;
    }
}

/* ===== GALLERY IMAGE TRANSITION ===== */
.fc-detail__main-image--loading .fc-detail__main-img {
    opacity: 0.3;
}

/* ===== LIGHTBOX (optional future enhancement placeholder) ===== */
.fc-detail__main-image {
    cursor: zoom-in;
}
