/* Shared finishing touches and editorial pages. All assets stay local. */
:root { --radius-card: 20px; --radius-button: 999px; }
/* Scrollbars: thin and rounded, drawn from the page palette in both themes. */
:root { --scroll-thumb: #434343; --scroll-thumb-hover: #6A6A6A; }
:root[data-theme="light"] { --scroll-thumb: #CFCFC8; --scroll-thumb-hover: #9A9A9A; }
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) { --scroll-thumb: #CFCFC8; --scroll-thumb-hover: #9A9A9A; }
}
html { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) var(--bg); scrollbar-gutter: stable; }
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) var(--bg); }
@supports selector(::-webkit-scrollbar) {
    * { scrollbar-width: auto; scrollbar-color: auto; }
    ::-webkit-scrollbar { width: 12px; height: 12px; }
    ::-webkit-scrollbar-track { background: var(--bg); border-left: 1px solid var(--border); }
    ::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border: 3px solid var(--bg); border-radius: 999px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }
    ::-webkit-scrollbar-button { display: block; width: 12px; height: 12px; background: var(--bg); }
    ::-webkit-scrollbar-button:vertical:start:decrement,
    ::-webkit-scrollbar-button:vertical:end:increment { display: block; height: 0; background: transparent; }
    ::-webkit-scrollbar-corner { background: var(--bg); }
}
@media (forced-colors: active) {
    * { scrollbar-color: auto; scrollbar-width: auto; }
}
.ui-icon { width: 24px; height: 24px; flex-shrink: 0; }
.button { padding-inline: 1.4rem; }
.menu-toggle { border-radius: 999px; }
.filter-field input, .filter-field select { border-radius: 12px; }
.car-card, .inquiry-panel, .contact-detail { border-radius: var(--radius-card); }
.gallery-main img { border-radius: 20px; }
.home-hero { border-radius: 0 0 28px 28px; }
.hero__foot { justify-content: center; }
.home-content { padding-bottom: 4rem; }
.section-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); margin-right: 0.7rem; vertical-align: middle; }

/* One contact destination on home: its footer. */
.site-footer { background: transparent; border-top: 0; }
.footer-contact { padding-bottom: 2rem; }
.footer-contact__panel {
    display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem;
    padding: 3.5rem; border: 1px solid var(--border); border-radius: 28px;
    background: var(--surface);
}
.footer-contact__intro .eyebrow { color: var(--text-muted); font-size: 0.68rem; letter-spacing: 0.16em; }
.footer-contact__intro h2 { font-size: clamp(2.5rem, 4.5vw, 4rem); letter-spacing: -0.05em; margin-bottom: 1rem; }
.footer-contact__intro > p:not(.eyebrow) { color: var(--text-muted); line-height: 1.75; }
.footer-contact__intro .text-link { margin-top: 0.8rem; }
.footer-contact__actions { align-self: center; display: grid; justify-items: start; gap: 1.2rem; }
.footer-phone { display: grid; gap: 0.3rem; text-decoration: none; }
.footer-phone .eyebrow { color: var(--text-muted); font-size: 0.68rem; }
.footer-phone > span:last-child { font-size: clamp(1.25rem, 2.3vw, 1.8rem); font-weight: 500; letter-spacing: -0.02em; }
.footer-phone > span:last-child > span { font-size: 1.1rem; margin-left: 0.4rem; }
.footer-location { display: flex; align-items: center; gap: 0.5rem; margin: 0; color: var(--text-muted); font-size: 0.8rem; }
.footer-location .ui-icon { width: 16px; height: 16px; }
.site-footer__inner { border-top: 1px solid var(--border); padding-block: 1.65rem; }
.site-footer__meta { font-size: 0.75rem; gap: 1.5rem; }
.site-footer__meta a { text-decoration: none; }
.back-to-top span { margin-left: 0.45rem; }

/* Internal pages use a quieter editorial introduction, not another home hero. */
.page-editorial .site-main { padding-top: 3.5rem; padding-bottom: 4.5rem; }
.editorial-intro { max-width: none; margin-bottom: 3.5rem; }
.editorial-intro .eyebrow { font-size: 0.68rem; letter-spacing: 0.16em; margin-bottom: 1.4rem; }
.editorial-intro h1 { font-size: clamp(2.6rem, 5.3vw, 4.65rem); letter-spacing: -0.055em; line-height: 1.08; margin-bottom: 1.35rem; }
.muted-heading { color: var(--text-muted); }
.editorial-intro > p:last-child { max-width: 50ch; font-size: 1rem; line-height: 1.7; }

/* Cars: photographic masthead, rounded filter panel, useful status tabs. */
.collection-hero { position: relative; isolation: isolate; overflow: hidden; min-height: 320px; border-radius: 28px; background: #111719; color: #fff; margin-bottom: 2rem; }
.collection-hero > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 70% 62%; }
.collection-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(9, 16, 19, 0.97), rgba(9, 16, 19, 0.78) 40%, rgba(9, 16, 19, 0.12)); }
.collection-hero__copy { padding: 2.8rem 3rem; }
.collection-hero__copy .eyebrow { color: #ced6d7; font-size: 0.65rem; letter-spacing: 0.18em; margin-bottom: 1.3rem; }
.collection-hero__copy h1 { font-size: clamp(2.5rem, 4.5vw, 4rem); letter-spacing: -0.05em; line-height: 1.05; margin-bottom: 1.1rem; }
.collection-hero__copy > p:last-child { color: #ced6d7; font-size: 0.9rem; margin-bottom: 0; }
.collection-hero__label { position: absolute; bottom: 2rem; right: 2rem; font-size: 0.65rem; letter-spacing: 0.1em; color: #fff; }
.page-cars .filter-form { padding: 1.8rem 2rem; margin: 0 0 3rem; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
.filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; }
.filter-heading h2 { display: flex; align-items: center; gap: 0.75rem; font-size: 1.05rem; margin: 0; }
.filter-heading p { font-size: 0.78rem; color: var(--text-muted); margin: 0; }
.page-cars .filter-grid { gap: 1.15rem; }
.page-cars .filter-field label { font-size: 0.65rem; letter-spacing: 0.06em; }
.page-cars .filter-field input, .page-cars .filter-field select { height: 44px; background-color: var(--bg); }
.page-cars .filter-actions { padding-top: 0.2rem; }
.page-cars .filter-actions .button, .page-cars .filter-actions .clear-filters { min-height: 42px; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; }
.results-heading h2 { margin-bottom: 0.45rem; font-size: 1.6rem; letter-spacing: -0.035em; }
.results-summary { margin: 0; font-size: 0.8rem; }
.status-tabs { display: flex; padding: 4px; border: 1px solid var(--border); border-radius: 999px; gap: 3px; }
.status-tabs a { padding: 0.5rem 0.95rem; font-size: 0.75rem; color: var(--text-muted); text-decoration: none; border-radius: 999px; white-space: nowrap; }
.status-tabs a[aria-current] { background: var(--accent); color: var(--accent-contrast); }
.empty-state--collection { flex-direction: column; text-align: center; justify-content: center; padding-block: 3.4rem; border-style: dashed; background: transparent; gap: 1.35rem; }
.empty-state--collection > .text-link { margin: 0; }
.empty-state--collection h3 { font-size: 1.3rem; letter-spacing: -0.02em; }
.empty-state--collection .empty-state__icon { width: 4rem; height: 4rem; flex-basis: 4rem; background: var(--surface); color: var(--accent-2); }

/* About: a visual brand panel alongside the owner's original, editable copy. */
.story-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 1.5rem; }
.story-visual { position: relative; overflow: hidden; min-height: 500px; isolation: isolate; border-radius: 24px; background: #12191b; color: #fff; }
.story-visual > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 47% center; z-index: -2; }
.story-visual::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 19, 22, 0.5), transparent 35%, rgba(11, 19, 22, 0.96)); }
.story-visual__caption { position: absolute; inset: auto 2rem 2rem; display: grid; justify-items: start; gap: 1.2rem; }
.story-visual__caption .eyebrow { color: #d8dfdf; font-size: 0.65rem; letter-spacing: 0.17em; margin: 0; }
.story-visual__name { font-family: Manrope, sans-serif; font-size: clamp(1.7rem, 2.5vw, 2.25rem); line-height: 1.2; letter-spacing: -0.04em; }
.location-pill { display: inline-flex; align-items: center; gap: 0.5rem; border: 1px solid #667477; background: rgba(20, 30, 32, 0.5); padding: 0.4rem 0.8rem; border-radius: 999px; font-size: 0.72rem; }
.location-pill .ui-icon { width: 14px; height: 14px; }
.story-panel { padding: 2.5rem; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
.story-panel > .eyebrow { font-size: 0.65rem; letter-spacing: 0.15em; color: var(--text-muted); margin-bottom: 1rem; }
.story-panel h2 { font-size: 1.65rem; letter-spacing: -0.035em; }
.about-copy { font-size: 0.97rem; line-height: 1.95; color: var(--text-muted); }
.story-panel > .text-link { margin-top: 0.65rem; }

/* Contact: two obvious actions, with visit guidance rather than a fake map. */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 1.5rem; }
.contact-methods { display: grid; gap: 1rem; align-content: start; }
.contact-method { display: flex; align-items: center; gap: 1.35rem; padding: 2rem; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); color: var(--text); text-decoration: none; }
.contact-method--call { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.method-icon { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; flex-shrink: 0; border: 1px solid currentColor; border-radius: 50%; }
.method-copy { display: grid; gap: 0.5rem; min-width: 0; }
.method-copy .eyebrow { color: inherit; font-size: 0.6rem; letter-spacing: 0.12em; margin: 0; }
.method-title { font-family: Manrope, sans-serif; font-size: 1.7rem; font-weight: 550; letter-spacing: -0.04em; }
.method-detail { font-size: 0.85rem; overflow-wrap: anywhere; }
.method-arrow { margin-left: auto; font-size: 1.5rem; }
.contact-method:focus-visible { outline-color: var(--accent-2); outline-offset: 4px; }
.visit-panel { padding: 1.5rem 2rem 2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; }
.route-art { color: var(--text-muted); margin: -1rem -1.5rem 0; }
.route-art svg { width: 100%; max-height: 140px; }
.visit-panel .eyebrow { color: var(--accent-2); font-size: 0.65rem; letter-spacing: 0.13em; }
.visit-panel h2 { font-size: 1.7rem; letter-spacing: -0.035em; }
.visit-panel > p:not(.eyebrow) { color: var(--text-muted); font-size: 0.9rem; line-height: 1.8; }
.visit-address { display: flex; align-items: flex-start; gap: 0.7rem; padding-top: 1.25rem; margin-top: 1.25rem; border-top: 1px solid var(--border); }
.visit-address .ui-icon { width: 19px; height: 19px; color: var(--text-muted); }
.visit-address p { margin: 0; line-height: 1.7; color: var(--text); }
.contact-hours { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem; }
.contact-hours h2 { font-size: 1rem; }
.contact-hours p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

@media (prefers-reduced-motion: no-preference) {
    .contact-method { transition: transform 350ms var(--motion-ease), border-color 350ms var(--motion-ease), box-shadow 350ms var(--motion-ease); }
    .contact-method:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
    .method-arrow { transition: transform 350ms var(--motion-ease); }
    .contact-method:hover .method-arrow { transform: translate(2px, -2px); }
    .status-tabs a { transition: background-color 250ms ease, color 250ms ease; }
    .status-tabs a:not([aria-current]):hover { background: var(--surface-2); color: var(--text); }
}
@media (max-width: 900px) {
    .story-layout, .contact-layout { grid-template-columns: 1fr; }
    .story-visual { min-height: 350px; }
    .story-visual > img { object-position: center 55%; }
    .footer-contact__panel { padding: 2.5rem; gap: 2rem; }
}
@media (max-width: 639px) {
    .home-hero { border-radius: 0 0 20px 20px; }
    .home-content { padding-bottom: 2rem; }
    .footer-contact__panel { grid-template-columns: 1fr; padding: 1.75rem; border-radius: 24px; gap: 2rem; }
    .footer-contact__actions { width: 100%; border-top: 1px solid var(--border); padding-top: 1.5rem; }
    .site-footer__meta { gap: 0.8rem 1.25rem; }
    .page-editorial .site-main { padding-top: 2rem; padding-bottom: 2.5rem; }
    .editorial-intro { margin-bottom: 2rem; }
    .editorial-intro h1 { font-size: clamp(2.2rem, 9.2vw, 3.3rem); }
    .editorial-intro > p:last-child { font-size: 0.9rem; }
    .collection-hero { min-height: 290px; border-radius: 22px; }
    .collection-hero__copy { padding: 2rem 1.5rem 3.5rem; }
    .collection-hero__label { right: auto; left: 1.5rem; bottom: 1.4rem; }
    .page-cars .filter-form { padding: 1.4rem; border-radius: 22px; }
    .filter-heading { align-items: flex-start; flex-direction: column; gap: 0.5rem; margin-bottom: 1.4rem; }
    .results-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
    .empty-state--collection { padding: 2rem 1.25rem; align-items: center; }
    .empty-state--collection > div { flex: 0 1 auto; }
    .empty-state--collection h3 { font-size: 1.1rem; }
    .story-panel { padding: 1.6rem; }
    .story-visual__caption { inset: auto 1.5rem 1.5rem; }
    .story-panel h2 { font-size: 1.4rem; }
    .about-copy { font-size: 0.9rem; line-height: 1.85; }
    .contact-method { padding: 1.5rem 1.2rem; gap: 0.85rem; }
    .method-icon { width: 2.6rem; height: 2.6rem; }
    .method-icon .ui-icon { width: 19px; height: 19px; }
    .method-title { font-size: 1.45rem; }
    .method-detail { font-size: 0.75rem; }
    .method-copy .eyebrow { font-size: 0.52rem; }
    .method-arrow { font-size: 1.1rem; }
    .visit-panel { padding: 1.5rem; }
}

@media (min-width: 901px) {
    .page-cars .filter-field:nth-child(3) { grid-column: span 2; }
}

.brand__icon { flex: 0 0 42px; width: 42px; height: 42px; object-fit: contain; }
.brand__icon--light { display: none; }
:root[data-theme="light"] .brand__icon--dark { display: none; }
:root[data-theme="light"] .brand__icon--light { display: block; }
.page-home .site-header .brand__icon--dark { display: block; }
.page-home .site-header .brand__icon--light { display: none; }
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .brand__icon--dark { display: none; }
    :root:not([data-theme="dark"]) .brand__icon--light { display: block; }
    :root .page-home .site-header .brand__icon--dark { display: block; }
    :root .page-home .site-header .brand__icon--light { display: none; }
}
.inventory-feedback { display: flex; align-items: center; gap: 1rem; min-height: 1.5rem; color: var(--text-muted); font-size: .85rem; margin: 0 0 1rem; }
.inventory-feedback:has([data-inventory-message]:empty) { min-height: 0; margin: 0; }
#inventory-panel[aria-busy="true"] .car-grid, #inventory-panel[aria-busy="true"] .empty-state { opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
    #inventory-panel.is-updated .car-grid, #inventory-panel.is-updated .empty-state { animation: fade-in-up 350ms var(--motion-ease) backwards; }
}


/* About prose: discourage ordinary selection/copying, without blocking links,
   browser shortcuts, context menus, or assistive-technology access. */
[data-copy-protected] { -webkit-user-select: none; user-select: none; }
.location-map-link { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.location-map-link:hover { text-decoration-thickness: 2px; }
.location-map-link:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; border-radius: 3px; }

/* Specifications: centre each label and value inside its tile. */
.spec-grid > div { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.spec-grid dt, .spec-grid dd { margin-inline: 0; text-align: center; }

/* Filter dropdowns: one chevron, centred vertically and inset from the right edge. */
.filter-field select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%239A9A9A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px 8px;
}
:root[data-theme="light"] .filter-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%235A5A5A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .filter-field select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%235A5A5A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }
}
