/**
 * Honda VDP Override Styles
 * This file contains Honda-specific style fixes for the Birchwood VDP
 * to match the Toyota VDP layout.
 * 
 * Include this file AFTER birchwood-vdp.css
 */

/* ==================== LAYOUT / GRID FIXES ==================== */

/* Force Honda grid to use flexbox for proper stacking */
#birchwoodVDP .row {
    display: flex !important;
    flex-wrap: wrap !important;
}

#birchwoodVDP .bvdp-hero .row {
    display: flex !important;
    flex-wrap: wrap !important;
}

#birchwoodVDP .bvdp-hero .col-md-6 {
    float: none !important;
    flex: 0 0 50%;
    max-width: 50%;
}


/* ==================== SPECS GRID FIXES ==================== */

/* Keep empty spec cells visible to maintain grid structure */
.bvdp-specs-grid .bvdp-spec-cell {
    position: relative;
}

/* Empty cells stay visible but with no content - maintains borders */
.bvdp-specs-grid .bvdp-spec-cell:has(div[style*="font-weight:700"]:empty),
.bvdp-specs-grid .bvdp-spec-cell:has(div[style*="font-weight:700"]:only-child:empty) {
    /* Keep visible - borders maintained */
}

/* Empty value cells stay visible */
.bvdp-specs-grid .bvdp-spec-cell:has(.bvdp-spec-value:empty) {
    /* Keep visible - borders maintained */
}

/* Cells marked as empty via JavaScript still stay visible */
.bvdp-specs-grid .bvdp-spec-cell.is-empty {
    /* Keep visible - borders maintained */
}

/* Ensure specs grid fills available space properly */
/* Use transparent background so missing cells don't show gray */
.bvdp-specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: transparent;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 15px;
    width: 100%;
    overflow: visible;
}

/* Spec cell styling - ensure consistent appearance */
.bvdp-spec-cell {
    padding: 15px 12px;
    font-size: 13px;
    color: #333;
    background: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 70px;
    line-height: 1.4;
    border: none;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    margin: 0;
}

/* Remove right border on last column cells - 3 columns desktop */
.bvdp-spec-cell:nth-child(3n) {
    border-right: none;
}

/* Last row - don't remove bottom border, container border handles outer edge */
/* Last row - don't remove bottom border, container border handles outer edge */
/* Keep all cell bottom borders for consistent appearance */

/* Value styling */
.bvdp-spec-cell > div:first-child,
.bvdp-spec-cell .bvdp-spec-value {
    font-weight: 700 !important;
    margin-bottom: 5px;
    font-size: 14px;
    color: #000;
    word-break: break-word;
    max-width: 100%;
}

/* Label styling */
.bvdp-spec-cell > div:last-child,
.bvdp-spec-cell .bvdp-spec-label {
    font-size: 12px;
    color: #666;
    text-transform: capitalize;
}


/* ==================== ACTION ROW / BUTTONS LAYOUT ==================== */

/* Main action row container - horizontal layout like Toyota */
.bvdp-action-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Inquiry dropdown - auto width, not flex: 1 */
.bvdp-inquiry-dropdown {
    flex: 0 0 auto;
}

/* Primary button - compact, not full width */
.bvdp-btn-primary {
    background: #ec1a2e;
    border: 1px solid #ec1a2e;
    color: #fff !important;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s, border-color 0.2s;
    cursor: pointer;
    white-space: nowrap;
}

.bvdp-btn-primary:hover,
.bvdp-btn-primary:focus {
    background: #d01626;
    border-color: #d01626;
    color: #fff !important;
}

/* Outline button - Customize Payments - FIXED WIDTH */
#birchwoodVDP .bvdp-btn-outline,
.bvdp-btn-outline {
    background: transparent !important;
    border: 2px solid #ec1a2e !important;
    color: #ec1a2e !important;
    padding: 11px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    text-align: center !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    height: auto !important;
    line-height: 1.2 !important;
}

#birchwoodVDP .bvdp-btn-outline:hover,
#birchwoodVDP .bvdp-btn-outline:focus,
.bvdp-btn-outline:hover,
.bvdp-btn-outline:focus {
    background: #ec1a2e !important;
    color: #fff !important;
    text-decoration: none !important;
}


/* ==================== VIEW ALL IMAGES BUTTON ==================== */

#birchwoodVDP .bvdp-view-all-btn,
.bvdp-view-all-btn {
    display: inline-block !important;
    background: #fff !important;
    border: 2px solid #000 !important;
    color: #000 !important;
    padding: 12px 30px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    transition: all 0.2s !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

#birchwoodVDP .bvdp-view-all-btn:hover,
.bvdp-view-all-btn:hover {
    background: #000 !important;
    color: #fff !important;
    text-decoration: none !important;
}


/* ==================== GALLERY / CAROUSEL FIXES ==================== */

/* Main slider - 4:3 aspect ratio */
.bvdp-main-slider {
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.bvdp-main-slider .slick-slide img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    height: auto;
}

/* Thumbnail slider */
.bvdp-thumb-slider {
    margin: 0 -5px;
}

.bvdp-thumb-slider .slick-slide {
    padding: 0 5px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.bvdp-thumb-slider .slick-slide.slick-current {
    opacity: 1;
}

.bvdp-thumb-slider .slick-slide:hover {
    opacity: 1;
}

.bvdp-thumb-slider img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 4px;
    height: auto;
}

/* Gallery actions */
.bvdp-gallery-actions {
    margin-top: 15px;
    text-align: center;
}


/* ==================== SUMMARY CARD FIXES ==================== */

#birchwoodVDP .bvdp-summary-card,
.bvdp-summary-card {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 25px;
    position: sticky;
    top: 100px;
}


/* ==================== PAYMENT CALCULATOR SECTION ==================== */

#birchwoodVDP .bvdp-payment-section .row {
    display: flex !important;
    flex-wrap: wrap !important;
}

#birchwoodVDP .bvdp-payment-section .col-md-8,
#birchwoodVDP .bvdp-payment-section .col-md-4 {
    float: none !important;
}

#birchwoodVDP .bvdp-payment-section .col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

#birchwoodVDP .bvdp-payment-section .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}


/* ==================== WHY YOU'LL LOVE IT SECTION ==================== */

.bvdp-love-it-section {
    background: #eff4f4;
    padding: 60px 0;
    margin-bottom: 30px;
    position: relative;
}

.bvdp-love-it-section::after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 45px solid transparent;
    border-right: 45px solid transparent;
    border-top: 25px solid #eff4f4;
}

.bvdp-love-content .row {
    display: flex;
    flex-wrap: wrap;
}

.bvdp-love-left-col {
    padding-right: 60px;
}

.bvdp-love-right-col {
    padding-left: 80px;
    border-left: 2px solid #d7dddd;
}

/* Why You'll Love It - Main title */
#birchwoodVDP .bvdp-love-it-section .bvdp-section-title,
.bvdp-love-it-section .bvdp-section-title {
    font-size: 28px !important;
    font-weight: 400 !important;
    margin-bottom: 35px !important;
    color: #333 !important;
    text-align: center !important;
    font-style: italic !important;
}

/* Section subtitles */
#birchwoodVDP .bvdp-love-subtitle,
.bvdp-love-subtitle {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin-bottom: 25px !important;
    color: #000 !important;
    line-height: 1.4 !important;
}

/* Bullet list in left column */
#birchwoodVDP .bvdp-love-left-col ul,
.bvdp-love-left-col ul {
    list-style: disc !important;
    padding-left: 20px !important;
    margin: 0 0 25px 0 !important;
}

#birchwoodVDP .bvdp-love-left-col ul li,
.bvdp-love-left-col ul li {
    font-size: 15px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    margin-bottom: 8px !important;
    padding: 0 !important;
}

/* Dealer name paragraph */
#birchwoodVDP .bvdp-love-left-col p,
.bvdp-love-left-col p {
    font-size: 15px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    margin-bottom: 15px !important;
}

#birchwoodVDP .bvdp-love-left-col p strong,
.bvdp-love-left-col p strong {
    font-weight: 700 !important;
    color: #000 !important;
}

/* Features list with checkmarks */
.bvdp-love-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bvdp-love-features-list li {
    display: flex;
    align-items: center;
    margin-top: 15px;
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}

.bvdp-love-features-list li:first-child {
    margin-top: 0;
}

.bvdp-love-features-list li .fa {
    margin-right: 15px;
    font-size: 18px;
    color: #cc0000;
    flex-shrink: 0;
}


/* ==================== FEATURES SECTION ==================== */

.bvdp-features-section {
    padding: 50px 0;
    background-color: #fff;
}

/* Section titles */
#birchwoodVDP .bvdp-section-title,
.bvdp-section-title {
    font-size: 26px !important;
    font-weight: 700 !important;
    margin-bottom: 25px !important;
    color: #000 !important;
    text-align: center !important;
}

/* Description text */
#birchwoodVDP .bvdp-description-content,
.bvdp-description-content {
    max-height: 150px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
    font-size: 15px !important;
    line-height: 1.7 !important;
    color: #333 !important;
}

.bvdp-description-content.expanded {
    max-height: none;
}

.bvdp-read-more {
    display: inline-block;
    margin-top: 15px;
    font-weight: 700;
    color: #ec1a2e;
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
}

.bvdp-read-more:hover {
    color: #000;
}

/* Accordion - Features & Specifications */
#birchwoodVDP .bvdp-accordion .panel-default,
.bvdp-accordion .panel-default {
    border: none !important;
    box-shadow: none !important;
    border-bottom: 1px solid #ddd !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    background: transparent !important;
}

#birchwoodVDP .bvdp-accordion .panel-heading,
.bvdp-accordion .panel-heading {
    background-color: transparent !important;
    border: none !important;
    padding: 20px 0 !important;
}

#birchwoodVDP .bvdp-accordion .panel-title a,
.bvdp-accordion .panel-title a {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-weight: 600 !important;
    color: #000 !important;
    text-decoration: none !important;
    font-size: 16px !important;
    background: transparent !important;
}

#birchwoodVDP .bvdp-accordion .panel-title a:hover,
#birchwoodVDP .bvdp-accordion .panel-title a:focus,
.bvdp-accordion .panel-title a:hover,
.bvdp-accordion .panel-title a:focus {
    text-decoration: none !important;
    color: #333 !important;
    background: transparent !important;
}

/* Chevron/arrow icon */
#birchwoodVDP .bvdp-accordion .panel-title a::after,
.bvdp-accordion .panel-title a .fa,
.bvdp-accordion .panel-title a .chevron {
    color: #999 !important;
    font-size: 14px !important;
}

#birchwoodVDP .bvdp-accordion .panel-body,
.bvdp-accordion .panel-body {
    border-top: none !important;
    padding: 0 0 25px 0 !important;
    background: transparent !important;
}


/* ==================== SIMILAR VEHICLES SECTION ==================== */

.bvdp-similar-section {
    padding: 50px 0;
    background: #f8f8f8;
}

.bvdp-similar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    text-align: center;
}

#birchwoodVDP .bvdp-similar-header h2,
.bvdp-similar-header h2 {
    font-size: 28px !important;
    font-weight: 700 !important;
    margin: 0 0 15px 0 !important;
    color: #000 !important;
    text-align: center !important;
}

.bvdp-similar-search-link {
    color: #ec1a2e;
    font-weight: 600;
    text-decoration: none;
}

.bvdp-similar-search-link:hover {
    text-decoration: underline;
}


/* ==================== STICKY HEADER ==================== */

.bvdp-sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.bvdp-sticky-header.is-visible {
    transform: translateY(0);
}

.bvdp-sticky-content {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 0;
    padding-left: 15px;
    gap: 15px;
    min-height: 60px;
}

/* Contact button */
.bvdp-contact-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ec1a2e;
    border: none;
    color: #fff;
    padding: 0 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.bvdp-contact-btn:hover,
.bvdp-contact-btn:focus,
.bvdp-contact-btn.is-open {
    background: #d01626;
}


/* ==================== MOBILE RESPONSIVE ==================== */

@media (max-width: 991px) {
    /* Force columns to stack on tablet/mobile */
    #birchwoodVDP .bvdp-hero .col-md-6,
    #birchwoodVDP .bvdp-hero .col-lg-6,
    #birchwoodVDP .bvdp-hero .col-sm-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Gallery column first, info second on mobile */
    #birchwoodVDP .bvdp-hero .row {
        flex-direction: column !important;
    }

    #birchwoodVDP .bvdp-hero .col-md-6:first-child {
        order: 1;
        margin-bottom: 20px;
    }

    #birchwoodVDP .bvdp-hero .col-md-6:last-child {
        order: 2;
    }

    /* Payment calculator columns stack */
    #birchwoodVDP .bvdp-payment-section .col-md-8,
    #birchwoodVDP .bvdp-payment-section .col-md-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Summary card full width when stacked */
    #birchwoodVDP .bvdp-summary-card,
    .bvdp-summary-card {
        width: 100% !important;
        margin-top: 20px;
    }

    /* Love It Section */
    .bvdp-love-left-col {
        padding-right: 15px;
        margin-bottom: 40px;
        border-bottom: 2px solid #d7dddd;
        padding-bottom: 40px;
    }

    .bvdp-love-right-col {
        padding-left: 15px;
        border-left: none;
    }

    .bvdp-love-subtitle {
        font-size: 20px;
    }

    /* Love It section columns */
    #birchwoodVDP .bvdp-love-it-section .col-md-6,
    #birchwoodVDP .bvdp-love-it-section .col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

@media (max-width: 767px) {
    /* Force all columns to full width on mobile */
    #birchwoodVDP .col-md-6,
    #birchwoodVDP .col-lg-6,
    #birchwoodVDP .col-sm-6,
    #birchwoodVDP .col-md-4,
    #birchwoodVDP .col-lg-4,
    #birchwoodVDP .col-md-8,
    #birchwoodVDP .col-lg-8,
    #birchwoodVDP .col-md-3,
    #birchwoodVDP .col-lg-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        float: none !important;
    }

    /* Ensure rows are flexbox */
    #birchwoodVDP .row {
        display: flex !important;
        flex-wrap: wrap !important;
        flex-direction: column !important;
    }

    /* Specs grid - 2 columns on mobile */
    .bvdp-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Fix border logic for 2 columns on mobile */
    .bvdp-spec-cell:nth-child(3n) {
        border-right: 1px solid #e0e0e0;
    }
    .bvdp-spec-cell:nth-child(2n) {
        border-right: none;
    }

    /* Hero section */
    .bvdp-hero {
        padding: 15px 0 30px;
    }

    .bvdp-hero .col-md-6:first-child,
    .bvdp-hero .col-md-6:last-child {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Gallery - constrain width to prevent overflow */
    .bvdp-gallery {
        max-width: 100%;
        overflow: hidden;
    }

    .bvdp-main-slider {
        max-width: 100%;
        overflow: hidden;
    }

    .bvdp-main-slider .slick-slide img {
        aspect-ratio: 4 / 3;
        height: auto;
        max-width: 100%;
    }

    .bvdp-thumb-slider {
        max-width: 100%;
        overflow: hidden;
    }

    .bvdp-thumb-slider img {
        aspect-ratio: 4 / 3;
        height: auto;
    }

    /* Slick slider arrows - keep within bounds */
    .bvdp-main-slider .slick-prev {
        left: 10px !important;
    }

    .bvdp-main-slider .slick-next {
        right: 10px !important;
    }

    /* Title */
    .bvdp-title {
        font-size: 22px;
    }

    /* Price */
    .bvdp-price-value {
        font-size: 28px;
    }

    /* Action row - stack buttons on mobile */
    .bvdp-action-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .bvdp-action-row .bvdp-btn-primary,
    .bvdp-action-row .bvdp-btn-outline,
    .bvdp-action-row .bvdp-inquiry-dropdown {
        width: 100% !important;
    }

    .bvdp-action-row .bvdp-inquiry-dropdown .dropdown-toggle {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Customize Payments - full width on mobile */
    #birchwoodVDP .bvdp-btn-outline,
    .bvdp-btn-outline {
        width: 100% !important;
    }

    /* Love It Section */
    .bvdp-love-it-section {
        padding: 40px 0;
    }

    .bvdp-section-title {
        font-size: 22px;
        margin-bottom: 25px;
    }

    /* Similar vehicles */
    .bvdp-similar-carousel-wrapper {
        padding: 0 30px;
    }

    .bvdp-similar-header {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    /* Sticky header mobile styles */
    .bvdp-sticky-vehicle-info,
    .bvdp-sticky-pricing {
        display: none !important;
    }

    .bvdp-sticky-header {
        background: #ec1a2e !important;
        border: none !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    }

    .bvdp-sticky-content {
        justify-content: center;
        padding: 0 !important;
        border: none !important;
    }

    .bvdp-contact-btn {
        width: 100%;
        justify-content: center;
        padding: 16px 20px;
        font-size: 18px;
        font-weight: 700;
        letter-spacing: 0.5px;
        border: none !important;
        background: #ec1a2e !important;
    }

    .bvdp-contact-btn:hover,
    .bvdp-contact-btn:focus {
        background: #ec1a2e !important;
        border: none !important;
    }

    .bvdp-contact-btn-text {
        display: inline;
    }
}

@media (max-width: 480px) {
    /* Single column specs on very small screens */
    .bvdp-specs-grid {
        grid-template-columns: 1fr;
    }

    .bvdp-spec-cell {
        padding: 12px;
        min-height: 50px;
    }

    /* Title */
    .bvdp-title {
        font-size: 20px;
    }

    /* Price */
    .bvdp-price-value {
        font-size: 24px;
    }

    /* Gallery images - maintain 4:3 aspect ratio */
    .bvdp-main-slider .slick-slide img {
        aspect-ratio: 4 / 3;
        height: auto;
    }

    .bvdp-thumb-slider img {
        aspect-ratio: 4 / 3;
        height: auto;
    }
}
