* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--brand-body-font, "Noto Sans JP","Yu Gothic",Meiryo,Arial,sans-serif);
    background: #f6f6f4;
    color: #161616;
}


h1,h2,h3,h4,h5,h6,
.hero h1,
.section-head,
.price-breakdown h2,
dialog h2{
    font-family:var(
        --brand-heading-font,
        "Noto Sans JP","Yu Gothic",Meiryo,Arial,sans-serif
    );
}

button,
input,
select,
textarea{
    font-family:inherit;
}


.top {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5vw;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid #ddd;
}

.brand {
    font-weight: 900;
    letter-spacing: .16em;
    color: #c40000;
    text-decoration: none;
    font-size: 1.35rem;
}

.top nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.top a,
.top button {
    color: #222;
    background: none;
    border: 0;
    text-decoration: none;
    font-size: .95rem;
    cursor: pointer;
}

.hero {
    padding: 70px 5vw 40px;
    background-position:center top;
    background-size:contain;
    background-repeat:no-repeat;
    background-image:
        linear-gradient(
            rgba(0,0,0,var(--hero-overlay-opacity,.08)),
            rgba(0,0,0,var(--hero-overlay-opacity,.08))
        ),
        var(--hero-desktop-image,none);
    color: #fff;
    transition: background-image .2s ease;
}

.hero h1 {
    font-size: clamp(2.1rem, 5vw, 4.5rem);
    max-width: 850px;
    margin: .2em 0;
}

.hero-copy-wrap p {
    max-width: 680px;
    line-height: 1.6;
    text-shadow: 0 1px 7px #0009;
}

.hero-copy-wrap h1 {
    text-shadow: 0 2px 14px #0008;
}

.search {
    margin-top: 35px;
    background: rgba(
        255,
        255,
        255,
        var(--marketplace-search-form-opacity,.92)
    );
    color: #222;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 18px 45px #0005;
}

.search-main-grid {
    display: grid;
    grid-template-columns: 1.15fr 1.35fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
}

.search label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: .78rem;
    font-weight: 700;
}

.search input,
.search select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 7px;
    background: #fff;
    min-height: 43px;
}

.search-submit {
    background: var(--brand-button-background,var(--brand-primary,#263786));
    color: var(--brand-button-text,#fff);
    border: 0;
    border-radius: 8px;
    font-weight: 800;
    padding: 13px 22px;
    min-height: 43px;
    cursor: pointer;
}

.search-expanders {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

.expander-button {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #bbb;
    border-radius: 999px;
    background: var(--brand-button-background,var(--brand-primary,#263786));
    color: var(--brand-button-text,#fff);
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 700;
}

.expandable-panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #ddd;
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px;
}

.optional-grid {
    align-items: end;
}

.check-row {
    flex-direction: row !important;
    align-items: center;
    gap: 10px !important;
    min-height: 43px;
}

.check-row input {
    width: auto;
    min-height: auto;
}

.extras-note {
    margin: 12px 0 0;
    color: #666;
    font-size: .82rem;
}

.section {
    padding: 55px 5vw;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
}

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

.card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 24px #0001;
}

.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #ddd;
}

.card-body {
    padding: 20px;
}

.specs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 14px 0;
}

.specs span {
    background: #eee;
    border-radius: 20px;
    padding: 6px 10px;
    font-size: .8rem;
}

.price {
    font-size: 1.25rem;
    font-weight: 800;
}

.card button {
    width: 100%;
    padding: 12px;
    background: var(--brand-button-background,var(--brand-primary,#263786));
    color: var(--brand-button-text,#fff);
    border: 0;
    border-radius: 7px;
    cursor: pointer;
}

.provider {
    font-size: .78rem;
    font-weight: 800;
    color: #8b0000;
    text-transform: uppercase;
    letter-spacing: .04em;
}

dialog {
    width: min(900px, 94vw);
    border: 0;
    border-radius: 15px;
    padding: 30px;
}

dialog::backdrop {
    background: #0009;
}

.close {
    float: right;
    border: 0;
    background: none;
    font-size: 2rem;
}

.gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 8px;
}

.gallery img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.feature-list {
    columns: 2;
}

.soldout {
    grid-column: 1 / -1;
    padding: 50px;
    background: #fff;
    border-radius: 12px;
    text-align: center;
}

.location-control {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.location-control select {
    min-width: 0;
    flex: 1;
}

.map-button {
    white-space: nowrap;
}

.pickup-map-panel {
    margin-top: 14px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
}

.pickup-map-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.pickup-map-heading h2 {
    margin: 0;
    font-size: 1.1rem;
}

.pickup-map {
    height: 380px;
    border-radius: 12px;
    overflow: hidden;
}

.map-select-location {
    margin-top: 8px;
}

.leaflet-popup-content button {
    cursor: pointer;
}

/* v1.0.65.5 compact pickup-location flow */

.pickup-launch-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pickup-launch-field > span {
    font-weight: 600;
}

.pickup-launch-button {
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    text-align: left;
}

.pickup-launch-button small {
    display: block;
    margin-top: 3px;
    font-weight: 400;
    opacity: .75;
    white-space: normal;
}

.pickup-map-dialog {
    width: min(920px, calc(100vw - 24px));
    max-width: none;
    border: 0;
    border-radius: 16px;
    padding: 0;
    background: transparent;
}

.pickup-map-dialog::backdrop {
    background: rgba(0, 0, 0, .48);
}

.pickup-map-dialog .pickup-map-panel {
    margin: 0;
    max-height: calc(100vh - 30px);
    overflow: auto;
}

.map-location-selector {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.map-location-selector select {
    width: 100%;
}

/* v1.0.65.6 pickup-map interaction */

.marketplace-location-marker-wrap {
    background: transparent;
    border: 0;
}

.marketplace-location-marker {
    display: block;
    position: relative;
    width: 28px;
    height: 28px;
    background: #d00000;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 3px 9px rgba(0, 0, 0, .38);
}

.marketplace-location-marker::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    left: 7px;
    top: 7px;
}

.marketplace-location-marker-wrap.is-selected
.marketplace-location-marker {
    box-shadow:
        0 0 0 4px rgba(208, 0, 0, .28),
        0 3px 9px rgba(0, 0, 0, .42);
    transform: rotate(-45deg) scale(1.12);
}

.marketplace-location-label {
    display: none;
    background: #fff;
    color: #161616;
    border: 1px solid rgba(0, 0, 0, .22);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
    font-weight: 700;
    padding: 5px 8px;
    white-space: nowrap;
}

.pickup-map.show-location-labels
.marketplace-location-label {
    display: block;
}

.marketplace-location-label::before {
    display: none;
}

/* Responsive */

@media (max-width: 1100px) {
    .search-main-grid {
        grid-template-columns: 1fr 1fr;
    }

    .search-submit {
        grid-column: 1 / -1;
    }

    .grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .location-control {
        flex-direction: column;
    }

    .pickup-map {
        height: 320px;
    }

    .pickup-map-dialog {
        width: calc(100vw - 12px);
    }

    .pickup-map-dialog .pickup-map-panel {
        padding: 12px;
    }
}

@media (max-width: 700px) {
    .top {
        padding: 0 18px;
    }

    .top nav a {
        display: none;
    }

    .hero {
        padding: 45px 18px 25px;
    }

    .search-main-grid,
    .panel-grid {
        grid-template-columns: 1fr;
    }

    .search-expanders {
        flex-wrap: wrap;
    }

    .section {
        padding: 35px 18px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: block;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .feature-list {
        columns: 1;
    }
}

/* Batch 18.56 — restore vehicle detail presentation and improve live pricing */

/* Result images show the whole vehicle instead of cropping roof/bumpers. */
.card img {
    object-fit: contain;
    object-position: center;
    padding: 8px;
    background: #f4f5f6;
}

.marketplace-vehicle-card {
    cursor: pointer;
}
.marketplace-vehicle-card:focus-visible {
    outline: 3px solid #111;
    outline-offset: 3px;
}

/* Restore the original rounded modal and keep scrolling inside its content. */
#vehicleDialog {
    position: relative;
    width: min(960px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100vh - 32px);
    padding: 0;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    color: #161616;
    box-shadow: 0 24px 70px rgba(0,0,0,.3);
}

#vehicleDialog::backdrop {
    background: rgba(0,0,0,.58);
}

#vehicleDetail {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 30px;
}

/* Always-visible close control. Explicit colour prevents theme inheritance
   from producing white text on a white button. */
#vehicleDialog .close {
    position: absolute;
    z-index: 20;
    top: 12px;
    right: 14px;
    float: none;
    display: inline-flex;
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid #d7d7d7;
    border-radius: 999px;
    background: #fff;
    color: #161616 !important;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

#vehicleDialog .close:hover {
    background: #f2f2f2;
}

#vehicleDetail > h2 {
    padding-right: 48px;
}

/* Whole-image gallery: no clipping at top or bottom. */
#vehicleDetail .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px,100%), 1fr));
    gap: 10px;
    margin: 12px 0 18px;
}

#vehicleDetail .gallery img {
    display: block;
    width: 100%;
    height: min(320px, 42vh);
    object-fit: contain;
    object-position: center;
    padding: 8px;
    background: #f4f5f6;
    border-radius: 10px;
}

/* Extras left, price breakdown right. */
.detail-commerce-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .85fr);
    gap: 28px;
    align-items: start;
    margin-top: 22px;
}

.detail-options-panel,
.detail-price-panel {
    min-width: 0;
}

.detail-options-panel h3,
.detail-price-panel h3 {
    margin-top: 0;
}

#vehicleDetail .detail-options {
    display: grid;
    gap: 10px;
    margin: 0;
}

#vehicleDetail .check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
}

#vehicleDetail .check-row:hover {
    background: #fafafa;
}

#vehicleDetail .check-row input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex: 0 0 auto;
}

#vehicleDetail .check-row span {
    display: grid;
    gap: 3px;
}

#vehicleDetail .check-row small {
    color: #666;
}

#vehicleDetail #detailReturnLocationLabel {
    display: grid;
    gap: 6px;
    padding: 8px 0 4px 28px;
}

#vehicleDetail #detailReturnLocationLabel[hidden] {
    display: none;
}

#vehicleDetail #detailReturnLocation {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
}

.detail-price-panel {
    position: sticky;
    top: 18px;
    padding: 18px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fafafa;
}

.detail-live-price {
    display: grid;
    gap: 0;
    margin: 0 0 16px;
}

.price-breakdown-row,
.price-breakdown-total {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 0;
}

.price-breakdown-row {
    border-bottom: 1px solid #ddd;
}

.price-breakdown-row span {
    display: grid;
    gap: 2px;
}

.price-breakdown-row small {
    color: #666;
    font-size: .82rem;
}

.price-breakdown-row strong,
.price-breakdown-total strong {
    white-space: nowrap;
}

.price-breakdown-total {
    margin-top: 2px;
    padding-top: 14px;
    font-size: 1.2rem;
    font-weight: 800;
}

#vehicleDetail #detailBook {
    width: 100%;
    min-height: 46px;
}

@media (max-width: 760px) {
    #vehicleDialog {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
    }

    #vehicleDetail {
        max-height: calc(100vh - 16px);
        padding: 22px 16px 24px;
    }

    .detail-commerce-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .detail-price-panel {
        position: static;
    }

    #vehicleDetail .gallery img {
        height: min(280px, 38vh);
    }
}


/* Batch 18.57 — detailed live extra pricing */
.price-breakdown-extra .price-free {
    color: var(--brand-success, #137333);
    font-weight: 800;
}


/* Batch 18.63 — optional-extra information */
.extra-option-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:8px;
}
.extra-option-row .check-row{
    min-width:0;
}
.extra-info-button.text-button{
    width:24px;
    height:24px;
    min-width:24px;
    min-height:24px;
    padding:0!important;
    border:1px solid currentColor!important;
    border-radius:50%!important;
    background:transparent!important;
    color:var(--brand-link,var(--brand-primary,#263786))!important;
    font:700 13px/1 Arial,sans-serif!important;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
}
.extra-info-button.text-button:hover{
    background:color-mix(
        in srgb,
        var(--brand-link,var(--brand-primary,#263786)) 10%,
        transparent
    )!important;
}
.extra-free{
    color:var(--brand-success,#137333)!important;
    font-weight:800;
}
.extra-info-dialog{
    width:min(520px,calc(100vw - 28px));
    max-width:none;
    border:0;
    border-radius:14px;
    padding:0;
    background:var(--brand-surface,#fff);
    color:var(--brand-text,#161616);
    box-shadow:0 22px 70px rgba(0,0,0,.32);
}
.extra-info-dialog::backdrop{
    background:rgba(0,0,0,.48);
}
.extra-info-dialog-inner{
    position:relative;
    padding:24px;
}
.extra-info-dialog-inner h3{
    margin:0 42px 14px 0;
}
.extra-info-text{
    white-space:pre-wrap;
    line-height:1.65;
}
.extra-info-close{
    position:absolute!important;
    top:10px!important;
    right:10px!important;
}

/* v1.0.87 configurable extras */
.extra-exclusive-group{border:0;padding:0;margin:0 0 12px;min-width:0}.extra-exclusive-group legend{font-weight:800;margin:0 0 8px}.extra-quantity-row{display:flex;align-items:center;justify-content:space-between;gap:14px}.extra-quantity-row small{display:block;margin-top:4px;opacity:.72}.extra-quantity-control{display:flex;align-items:center;gap:6px}.extra-quantity-control button{width:34px;height:34px;padding:0;border:1px solid #bbb;border-radius:8px;background:#fff;color:#161616}.extra-quantity-control input{width:52px;min-height:34px;text-align:center;border:1px solid #bbb;border-radius:8px}.extra-option-row input[type=radio]{width:auto;min-height:auto}


/* v1.0.88 — polished optional-extra controls */

/*
 * Exclusive choices such as insurance are presented as proper selectable
 * cards. The entire row is clickable, with the radio on the left, description
 * in the middle and price aligned on the right.
 */
#vehicleDetail .extra-exclusive-group{
    display:grid;
    gap:8px;
    margin:0 0 16px;
}

#vehicleDetail .extra-exclusive-group legend{
    width:100%;
    margin:0 0 2px;
    padding:0;
    font-size:1rem;
    font-weight:800;
}

#vehicleDetail .extra-exclusive-group .extra-option-row,
#vehicleDetail label.extra-option-row{
    display:grid;
    grid-template-columns:22px minmax(0,1fr);
    align-items:center;
    gap:11px;
    width:100%;
    min-height:52px;
    padding:11px 13px;
    margin:0;
    border:1px solid #dedede;
    border-radius:10px;
    background:var(--brand-surface,#fff);
    cursor:pointer;
}

#vehicleDetail .extra-exclusive-group .extra-option-row:hover,
#vehicleDetail label.extra-option-row:hover{
    background:
        color-mix(
            in srgb,
            var(--brand-primary,#263786) 4%,
            var(--brand-surface,#fff)
        );
}

#vehicleDetail .extra-exclusive-group input[type="radio"],
#vehicleDetail label.extra-option-row input[type="checkbox"]{
    width:18px;
    height:18px;
    min-width:18px;
    min-height:18px;
    margin:0;
    accent-color:var(--brand-button-background,var(--brand-primary,#263786));
    justify-self:center;
}

#vehicleDetail .extra-option-row > span{
    min-width:0;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    column-gap:10px;
    row-gap:3px;
}

#vehicleDetail .extra-option-row > span > strong{
    min-width:0;
    font-weight:700;
    line-height:1.3;
}

#vehicleDetail .extra-option-row > span > small{
    grid-column:2;
    grid-row:1;
    margin:0;
    white-space:nowrap;
    color:var(--brand-text,#161616);
    font-size:.9rem;
}

#vehicleDetail .extra-option-row > span .extra-info-button{
    grid-column:1;
    grid-row:2;
    justify-self:start;
    margin:1px 0 0;
}

/*
 * Free extras should look intentionally included/value-adding rather than like
 * an awkward zero-price checkbox.
 */
#vehicleDetail label.extra-option-row:has([data-extra-checkbox]) > span > small{
    font-weight:700;
}

#vehicleDetail label.extra-option-row:has([data-extra-checkbox]) > span > small:where(:not(:empty)){
    color:var(--brand-success,#137333);
}

/*
 * Keep the tiny information control visually secondary. It does not inherit
 * the normal themed action-button styling.
 */
#vehicleDetail .extra-info-button.text-button{
    width:20px!important;
    height:20px!important;
    min-width:20px!important;
    min-height:20px!important;
    padding:0!important;
    margin-left:5px!important;
    vertical-align:middle;
    border:1px solid var(--brand-link,var(--brand-primary,#263786))!important;
    border-radius:50%!important;
    background:transparent!important;
    color:var(--brand-link,var(--brand-primary,#263786))!important;
    font:700 11px/18px Arial,sans-serif!important;
}

/* Quantity rows remain compact and aligned with the card system. */
#vehicleDetail .extra-quantity-row{
    min-height:58px;
    padding:10px 13px;
    border:1px solid #dedede;
    border-radius:10px;
    background:var(--brand-surface,#fff);
}

#vehicleDetail .extra-quantity-row > div:first-child{
    display:block;
    min-width:0;
}

#vehicleDetail .extra-quantity-row > div:first-child > strong{
    display:inline;
}

#vehicleDetail .extra-quantity-row > div:first-child > small{
    display:block;
    margin-top:4px;
}

@media(max-width:600px){
    #vehicleDetail .extra-option-row > span{
        grid-template-columns:minmax(0,1fr) auto;
    }

    #vehicleDetail .extra-exclusive-group .extra-option-row,
    #vehicleDetail label.extra-option-row{
        padding:10px 11px;
    }
}


/* 18.80: public Marketplace theme contract */
.search-submit,
.expander-button,
.card button,
.detail-proceed,
.price-breakdown button[type=button],
.price-breakdown button[type=submit],
.marketplace-primary-action{
    background:var(
        --brand-button-background,
        var(--brand-primary,#263786)
    )!important;
    color:var(--brand-button-text,#fff)!important;
}

/* Neutral controls intentionally remain light and always get dark text. */
.map-button,
.close,
.extra-info-button,
.extra-quantity-control button{
    color:var(--brand-text,#161616);
}

/* Apply tenant typography consistently across the public Marketplace. */
html,
body{
    font-family:var(
        --brand-body-font,
        "Noto Sans JP","Yu Gothic",Meiryo,Arial,sans-serif
    );
}

.search-main-grid > [hidden],.pickup-launch-field[hidden]{display:none!important}.single-location-footer{margin-top:44px;padding:28px 5vw;background:var(--brand-surface,#fff);color:var(--brand-text,#222);border-top:1px solid #ddd}.single-location-footer-grid{display:grid;grid-template-columns:minmax(280px,1.35fr) minmax(180px,.8fr) minmax(180px,.8fr);gap:26px;align-items:start}#singleLocationMap{width:100%;min-height:300px;border-radius:14px;overflow:hidden}.single-location-footer-text,.single-location-footer-address{white-space:pre-line;line-height:1.65}@media(max-width:800px){.single-location-footer-grid{grid-template-columns:1fr}}

/* 18.85 — Google Maps directions from Marketplace map pins */
.marketplace-map-popup{display:grid;gap:8px;min-width:180px;line-height:1.4}
.marketplace-map-directions{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 12px;border-radius:8px;background:var(--brand-button-background,var(--brand-primary,#263786));color:var(--brand-button-text,#fff)!important;text-decoration:none;font-weight:800}
.marketplace-map-directions:hover,.marketplace-map-directions:focus{filter:brightness(.95)}


/* 18.89 — complete responsive hero artwork */
.hero{
    min-height:420px;
}
@media(max-width:700px){
    .hero{
        min-height:0;
        padding:28px 16px 18px;
        background-image:
            linear-gradient(
                rgba(0,0,0,var(--hero-overlay-opacity,.08)),
                rgba(0,0,0,var(--hero-overlay-opacity,.08))
            ),
            var(--hero-mobile-image,var(--hero-desktop-image,none));
        background-size:contain;
        background-position:center top;
    }
    .hero-copy-wrap{
        max-width:72%;
        min-height:120px;
    }
    .hero h1{
        font-size:clamp(1.65rem,8vw,2.4rem);
        line-height:1.05;
    }
    .hero-copy-wrap p{
        line-height:1.35;
        margin:.35rem 0;
    }
    .search{
        margin-top:14px;
        padding:14px;
    }
}


/* 18.91 — compact search form and clean vehicle cards */

/*
 * Hidden destination/pickup controls must not participate in the grid.
 * Author CSS on .search label previously overrode the browser's native
 * [hidden] rule, leaving blank columns.
 */
.search [hidden],
.search-main-grid > [hidden]{
    display:none!important;
}

.search{
    width:min(820px,100%);
    max-width:820px;
    margin-left:0;
    margin-right:auto;
}

.search-main-grid{
    grid-template-columns:repeat(
        auto-fit,
        minmax(230px,1fr)
    );
    gap:12px;
}

.search input[type="datetime-local"]{
    min-width:0;
    width:100%;
}

/*
 * Hero artwork is always scaled to the full available width.
 * JS sets the hero's minimum height from the selected artwork's natural
 * aspect ratio so the top/bottom can never be cropped.
 */
.hero{
    width:100%;
    max-width:none;
    background-size:100% auto;
    background-position:center top;
    background-repeat:no-repeat;
}

/* Vehicle media area should blend with white-background product images. */
.card img,
.marketplace-vehicle-card img{
    object-fit:contain;
    object-position:center;
    background:#fff!important;
}

.card,
.marketplace-vehicle-card{
    background:#fff;
}

@media(max-width:700px){
    .search{
        width:100%;
        max-width:none;
    }

    .search-main-grid{
        grid-template-columns:1fr;
    }

    .hero{
        /*
         * The mobile-specific artwork still spans the complete page width.
         * The natural-aspect JS height keeps it compact when the uploaded
         * mobile artwork itself is compact.
         */
        background-size:100% auto;
        background-position:center top;
    }

    .card img,
    .marketplace-vehicle-card img{
        background:#fff!important;
    }
}


/* 18.92 — equal bottom alignment across vehicle cards */
.marketplace-vehicle-card{
    display:flex;
    flex-direction:column;
    height:100%;
}

.marketplace-vehicle-card .card-body{
    display:flex;
    flex-direction:column;
    flex:1 1 auto;
}

.marketplace-vehicle-card .vehicle-card-bottom{
    margin-top:auto;
    display:grid;
    gap:10px;
}

.marketplace-vehicle-card .vehicle-card-bottom .availability,
.marketplace-vehicle-card .vehicle-card-bottom .price{
    margin:0;
}

.marketplace-vehicle-card .vehicle-card-bottom button{
    margin-top:2px;
}

/* 18.92 — independently configurable hero vertical spacing */
#eyebrow{
    display:block;
    margin-top:var(--hero-eyebrow-gap,0px);
}

#heroTitle{
    margin-top:var(--hero-headline-gap,8px);
}

#heroText{
    margin-top:var(--hero-description-gap,8px);
}

.search{
    margin-top:var(--hero-search-gap,35px);
}

.single-location-footer [hidden]{display:none!important}
.single-location-footer[data-layout="map-only"] .single-location-footer-grid{
    grid-template-columns:minmax(0,1fr);
}
.single-location-footer[data-layout="text-only"] .single-location-footer-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
}
.single-location-footer[data-layout="map-text"] .single-location-footer-grid{
    grid-template-columns:minmax(280px,1.35fr) minmax(180px,.8fr) minmax(180px,.8fr);
}
@media(max-width:800px){
    .single-location-footer[data-layout="map-only"] .single-location-footer-grid,
    .single-location-footer[data-layout="text-only"] .single-location-footer-grid,
    .single-location-footer[data-layout="map-text"] .single-location-footer-grid{
        grid-template-columns:1fr;
    }
}


/* 18.95 — hero copy layout and intentional line breaks */

/*
 * Hero copy entered in Marketplace Configuration is content, so explicit
 * newlines must be rendered rather than collapsed by normal HTML whitespace.
 */
#eyebrow,
#heroTitle,
#heroText{
    white-space:pre-line;
}

/*
 * The old copy wrapper was too narrow, causing headlines to wrap even when
 * the administrator had not inserted a line break. Desktop now has enough
 * width for a deliberate headline layout while retaining a sensible maximum.
 */
.hero-copy-wrap{
    width:min(92vw,1120px);
    max-width:1120px;
}

#heroTitle{
    max-width:1100px;
}

#heroText{
    max-width:1000px;
}

@media(max-width:700px){
    .hero-copy-wrap{
        width:100%;
        max-width:100%;
    }

    #heroTitle,
    #heroText{
        max-width:100%;
    }
}
