/*
Theme Name: Retiro Automóveis
Description: Vitrine de veículos novos e seminovos da Retiro Automóveis.
Version: 1.0.11
Requires PHP: 8.2
Text Domain: retiro-automoveis
*/

:root {
    color-scheme: light;
    --ink: #181d1b;
    --muted: #515a53;
    --paper: #f7f8f5;
    --white: #fff;
    --line: #d7dcd5;
    --accent: #ddf472;
    --dark: #161b18;
    --deep-green: #28352c;
    --shell: 82rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font: 1rem/1.55 "Segoe UI", system-ui, sans-serif;
}
body :is(h1, h2, h3, p, figure, dl, dd) { margin: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.035em; overflow-wrap: anywhere; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #55753b; outline-offset: 3px; }
.hero :focus-visible, .site-header :focus-visible, .sell :focus-visible, .site-footer :focus-visible { outline-color: var(--accent); }
.shell { width: min(calc(100% - 5rem), var(--shell)); margin-inline: auto; }
[id] { scroll-margin-top: 1.25rem; }
.skip-link { position: fixed; inset: .75rem auto auto .75rem; z-index: 10; background: var(--white); padding: .75rem; transform: translateY(-180%); }
.skip-link:focus { transform: none; }

.button {
    display: inline-flex;
    min-height: 2.875rem;
    justify-content: center;
    align-items: center;
    padding: .68rem 1.15rem;
    border: 1px solid transparent;
    border-radius: .6rem;
    background: var(--deep-green);
    color: var(--white);
    font-size: .91rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
}
.button:hover { background-color: #394b3d; }
.button--accent { background: var(--accent); color: var(--ink); }
.button--accent:hover { background-color: #ebfa9f; }
.button--pale { background: #232a24c9; border-color: #9ba69d; }
.button--pale:hover { background: #435047; }
.button--outline { border-color: #a7b2a6; color: var(--deep-green); background: var(--white); }
.button--outline:hover { background: #ebf0e8; }
.button--compact { min-height: 2.5rem; padding: .4rem .75rem; }
.eyebrow { font-size: .79rem; line-height: 1.4; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }

.site-header { background: var(--dark); color: var(--white); border-bottom: 1px solid #3e473f; }
.site-header__inner { min-height: 5.25rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.3rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; justify-self: start; white-space: nowrap; text-decoration: none; }
.brand img { width: clamp(3.5rem, 8vw, 4.75rem); border-radius: .32rem; background: var(--white); }
.brand strong, .brand small { display: block; line-height: 1; }
.brand strong { font-size: 1.45rem; letter-spacing: -.05em; }
.brand small { margin-top: .18rem; color: #ced5cb; font-size: .76rem; }
.main-nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem clamp(1rem, 3vw, 2.75rem); }
.main-nav a, .site-footer a { font-size: .9rem; font-weight: 650; text-decoration: none; }
.main-nav a:hover, .site-footer a:hover { text-decoration: underline; }
.button--header { justify-self: end; min-height: 2.6rem; color: var(--accent); background: transparent; border-color: #6d7e67; }

.hero {
    position: relative;
    overflow: clip;
    isolation: isolate;
    background-color: #141b16;
    color: var(--white);
}
.hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 0 0 auto;
    width: min(68%, 75rem);
    background-image: linear-gradient(90deg, #141b16, #141b16aa 23%, #141b1618 58%), url("assets/showroom.webp?fachada=1");
    background-position: center, center 51%;
    background-size: cover;
}
.hero__inner { display: flex; align-items: center; position: relative; min-height: clamp(30rem, 40vw, 43rem); padding-block: 4.5rem; }
.hero__copy { max-width: 39rem; }
.hero h1 { margin-block: .9rem 1.05rem; font-size: clamp(3.25rem, 6.4vw, 6.25rem); font-weight: 780; line-height: .95; letter-spacing: -.07em; }
.hero h1 span, .hero .eyebrow { color: var(--accent); }
.hero__copy > p:not(.eyebrow) { color: #eef2eb; max-width: 32ch; font-size: clamp(1rem, 1.4vw, 1.18rem); }
.hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.8rem; }
.hero__caption { position: absolute; bottom: .9rem; right: 0; color: #f5f5f2; background: #131913eb; border-radius: .25rem; padding: .15rem .45rem; font-size: .77rem; }
.notice { margin-top: 1.5rem; padding: 1rem; border-radius: .5rem; border: 1px solid var(--line); background: var(--white); }

.inventory { padding-block: clamp(3rem, 6vw, 5.1rem); }
.inventory__intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; margin-bottom: 1.75rem; }
.inventory__intro h2, .sell h2 { font-size: clamp(2.1rem, 3.8vw, 3.4rem); }
.inventory__intro p { color: var(--muted); margin-top: .4rem; }
.inventory-tabs { display: flex; max-width: 100%; flex-wrap: wrap; gap: .25rem; padding: .3rem; border: 1px solid var(--line); border-radius: .72rem; background: var(--white); }
.inventory-tabs a { min-height: 2.3rem; padding: .45rem .9rem; border-radius: .43rem; font-size: .91rem; font-weight: 700; text-decoration: none; }
.inventory-tabs a:hover { background: #f3f6ef; }
.inventory-tabs a[aria-current] { color: var(--white); background: var(--deep-green); }
.catalog-form__search { display: grid; grid-template-columns: auto minmax(10rem, 1fr) auto; align-items: center; gap: .75rem; padding: .85rem 1rem; margin-bottom: 1.3rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--white); }
.catalog-form__search label { font-weight: 700; padding-inline: .2rem .6rem; }
input:not([type="checkbox"]), select { min-width: 0; max-width: 100%; min-height: 2.875rem; padding: .55rem .72rem; border: 1px solid #aab4aa; border-radius: .45rem; background-color: var(--white); color: var(--ink); }
select {
    appearance: none;
    padding-right: 2rem;
    background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
    background-position: right .9rem center, right .6rem center;
    background-size: .31rem .31rem;
    background-repeat: no-repeat;
}
.inventory__body { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.filters-toggle { display: none; }
.filters { padding: 1.18rem; background: var(--white); border: 1px solid var(--line); border-radius: .85rem; }
.filters__heading { display: flex; justify-content: space-between; align-items: baseline; gap: .65rem; margin-bottom: .85rem; }
.filters__heading h3 { font-size: 1.3rem; }
.filters__heading a { color: var(--muted); font-size: .87rem; font-weight: 650; }
.filters__check { display: flex; align-items: center; gap: .6rem; min-height: 2.75rem; font-weight: 650; font-size: .91rem; }
.filters__check input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--deep-green); }
.field { display: grid; gap: .28rem; margin-top: .75rem; font-size: .89rem; font-weight: 650; }
.field :is(input, select) { width: 100%; font-weight: 400; }
.filters__submit { margin-top: 1rem; width: 100%; }
.results-bar { min-height: 3.4rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: .75rem; padding: .35rem 0; }
.results-bar p { font-size: .96rem; font-weight: 700; }
.results-bar__sort { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; font-size: .89rem; }
.results-bar__sort select { min-height: 2.5rem; }

.empty-state { min-height: 21rem; display: grid; justify-items: center; align-content: center; text-align: center; padding: clamp(1rem, 4vw, 3rem); border: 1px dashed #b3bdb2; border-radius: .85rem; background: #f0f3ed; }
.empty-state__mark { position: relative; width: 2.4rem; height: 2.4rem; margin-bottom: 1.1rem; border: .19rem solid #64745e; border-radius: 100%; }
.empty-state__mark::after { content: ""; position: absolute; width: .88rem; height: .18rem; right: -.68rem; bottom: -.23rem; transform: rotate(45deg); background: #64745e; }
.empty-state h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); }
.empty-state p { margin-top: .5rem; color: var(--muted); }
.empty-state .button { margin-top: 1rem; }
.vehicle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.vehicle-card { min-width: 0; display: flex; flex-direction: column; overflow: clip; border-radius: .8rem; border: 1px solid var(--line); background: var(--white); }
.vehicle-card__photo { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1.55; background: #e7ebe6; text-decoration: none; }
.vehicle-card__photo:focus-visible { outline-offset: -4px; z-index: 1; }
.vehicle-card__photo-image, .gallery__stage img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-card__photo-image { position: absolute; inset: 0; }
.vehicle-card__condition { position: absolute; top: .65rem; right: .65rem; padding: .2rem .55rem; background: #f7faf4; color: var(--deep-green); border-radius: .25rem; font-size: .79rem; font-weight: 750; }
.vehicle-card__promotional-badge { position: absolute; bottom: .65rem; left: .65rem; width: 7.25rem; max-width: calc(100% - 1.3rem); height: 2.2rem; object-fit: contain; object-position: left bottom; }
.photo-placeholder { display: grid; place-items: center; width: 100%; min-height: 100%; color: #4e5a51; font-weight: 650; background: repeating-linear-gradient(135deg, #e6ebe6, #e6ebe6 10px, #edf0eb 10px, #edf0eb 20px); }
.vehicle-card__content { display: flex; flex: 1; flex-direction: column; padding: 1.1rem; }
.vehicle-card__flags { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .55rem; color: #304131; font-size: .78rem; font-weight: 750; }
.vehicle-card__flags span { padding: .18rem .45rem; border-radius: .24rem; background: #edf4da; }
.vehicle-card__flags span[aria-hidden="true"] { order: 1; visibility: hidden; }
.vehicle-card h3 { font-size: 1.35rem; }
.vehicle-card h3 a { text-decoration: none; }
.vehicle-card h3 a:hover { text-decoration: underline; }
.vehicle-card__trim { color: var(--muted); font-size: .9rem; margin-top: .28rem; }
.vehicle-card__specs, .feature-list { display: flex; flex-wrap: wrap; gap: .38rem; list-style: none; padding: 0; }
.vehicle-card__specs { margin: .8rem 0 0; font-size: .8rem; color: #414a43; }
.vehicle-card__specs li, .feature-list li { padding: .18rem .43rem; background: #f0f3ef; border-radius: .25rem; overflow-wrap: anywhere; }
.vehicle-card__purchase { display: grid; gap: .42rem; padding-top: .9rem; margin-top: auto; }
.vehicle-card__purchase small, .vehicle-detail__price small { color: var(--muted); }
.vehicle-card__purchase strong { font-size: 1.35rem; line-height: 1.1; }
.vehicle-card__purchase .button { margin-top: .35rem; }
.vehicle-card__contact { text-align: center; font-weight: 650; font-size: .86rem; padding: .45rem .2rem .15rem; }
.pagination { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-top: 1.35rem; }

.vehicle-detail { padding-block: 2rem 1rem; }
.vehicle-detail__nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: .5rem 1rem; margin-bottom: 1.1rem; }
.back-link { display: inline-flex; align-items: center; min-height: 2.9rem; font-weight: 700; }
.share { display: grid; justify-items: end; }
.share [role="status"] { color: var(--muted); font-size: .85rem; }
.vehicle-detail__body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.gallery__stage { display: grid; gap: .4rem; overflow: hidden; border-radius: .8rem; background: #e3e9e4; }
.gallery__stage :is(figure, .photo-placeholder) { aspect-ratio: 1.55; }
.gallery__stage img { object-fit: contain; }
.gallery__controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .65rem; margin-top: .65rem; }
.gallery__controls :is([data-gallery-prev], [data-gallery-next]) { min-width: 2.8rem; padding: .35rem; font-size: 1.4rem; }
.vehicle-detail__summary { padding: clamp(1rem, 2.8vw, 2rem); border-radius: .8rem; border: 1px solid var(--line); background: var(--white); }
.vehicle-detail__summary h1 { margin-top: .5rem; font-size: clamp(2rem, 4vw, 3.4rem); }
.vehicle-detail__trim { color: var(--muted); margin-top: .45rem; }
.vehicle-detail__price { display: grid; margin-block: 1.05rem; }
.vehicle-detail__price strong { font-size: clamp(1.75rem, 3vw, 2.6rem); }
.vehicle-detail__specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; padding-block: .9rem 1rem; border-top: 1px solid var(--line); }
.vehicle-detail__specs dt { color: var(--muted); font-size: .85rem; }
.vehicle-detail__specs dd { font-weight: 700; overflow-wrap: anywhere; }
.vehicle-detail__summary .button { width: 100%; }
.vehicle-detail__notes { display: grid; gap: 1rem; margin-top: 1.35rem; }
.vehicle-detail__notes section { padding: 1.3rem; border-radius: .8rem; border: 1px solid var(--line); background: var(--white); }
.vehicle-detail__notes h2 { margin-bottom: .7rem; font-size: 1.35rem; }
.multiline { white-space: pre-line; overflow-wrap: anywhere; }

.sell { background: var(--deep-green); color: var(--white); }
.sell__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.5rem clamp(2rem, 6vw, 5rem);
    padding-block: clamp(2.75rem, 5.5vw, 5rem);
}
.sell__copy { max-width: 38rem; }
.sell .eyebrow { color: var(--accent); margin-bottom: .5rem; }
.sell__copy p:not(.eyebrow) { color: #e2ebe0; margin-top: .75rem; }
.sell .button { min-width: 11rem; }
.contact { background: #edf4da; border-block: 1px solid #d5dfbd; }
.contact__inner { padding-block: 1.05rem 1.25rem; }
.contact h2 { margin-bottom: .65rem; color: var(--deep-green); font-size: 1.25rem; }
.contact__links { display: grid; grid-template-columns: minmax(0, 1.55fr) repeat(2, minmax(0, 1fr)); gap: .55rem; margin: 0; font-style: normal; }
.contact__links a { display: grid; align-content: center; gap: .12rem; min-height: 44px; padding: .6rem .85rem; border: 1px solid #bfcda6; border-radius: .55rem; background: var(--white); color: var(--deep-green); text-decoration: none; overflow-wrap: anywhere; }
.contact__links a:hover strong { text-decoration: underline; }
.contact__links span { color: var(--muted); font-size: .82rem; font-weight: 650; }
.contact__links strong { font-size: 1.02rem; }

@media (max-width: 45rem) {
    .contact__links { grid-template-columns: minmax(0, 1fr); }
}
.site-footer { background: var(--dark); color: #e8eee7; }
.site-footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.35rem; padding-block: 2rem; }
.site-footer p span { display: block; font-size: .86rem; color: #c8d3c8; }
.standard-page { min-height: 55vh; padding-block: 3rem; }
.standard-page h1 { margin-bottom: 1.4rem; }
.standard-page :is(article, p) { margin-bottom: 1rem; }

@media (max-width: 73rem) {
    .vehicle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 53rem) {
    .shell { width: calc(100% - 3rem); }
    .site-header__inner { gap: .9rem; }
    .button--header { display: none; }
    .site-header__inner { grid-template-columns: 1fr auto; }
    .inventory__body { grid-template-columns: 12rem minmax(0, 1fr); gap: .8rem; }
    .filters { padding: .8rem; }
    .vehicle-detail__body { grid-template-columns: 1fr; }
}
@media (max-width: 42rem) {
    .shell { width: calc(100% - 2rem); }
    .sell__inner { grid-template-columns: minmax(0, 1fr); }
    .sell .button { width: min(100%, 22rem); min-width: 0; }
    .site-header__inner { grid-template-columns: 1fr; gap: .75rem; padding-block: .85rem; }
    .main-nav { gap: .35rem 1.4rem; }
    .main-nav a { min-height: 2rem; display: inline-flex; align-items: center; }
    .hero::before {
        width: 100%;
        background-image: linear-gradient(180deg, #141b160a 8rem, #141b16bf 12rem, #141b16ed 16rem, #141b16 21rem), url("assets/showroom.webp?fachada=1");
        background-position: center, 40% top;
        background-size: 100% 100%, max(100%, 26rem) auto;
        background-repeat: no-repeat;
    }
    .hero__inner { align-items: end; min-height: 32rem; padding-block: 12rem 3.5rem; }
    .hero h1 { font-size: clamp(2.6rem, 10.6vw, 4.25rem); }
    .catalog-form__search { grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; padding: .7rem; }
    .catalog-form__search label { grid-column: 1 / -1; }
    .inventory__body { grid-template-columns: minmax(0, 1fr); }
    .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .65rem; }
    .filters-toggle { display: inline-flex; margin-bottom: .8rem; }
    .filters[data-collapsed] { display: none; }
    .filters__heading, .filters__check, .filters__submit { grid-column: 1 / -1; }
}
@media (max-width: 30rem) {
    .vehicle-grid { grid-template-columns: 1fr; }
    .inventory-tabs a { padding-inline: .62rem; }
    .pagination { gap: .4rem; font-size: .85rem; }
    .pagination .button { padding-inline: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
