* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { width: min(100% - 2rem, 88rem); margin-inline: auto; padding-block: 1.25rem 2rem; }
h1, h2, p { margin: 0 0 .65rem; }
.motor-header {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: .9rem 1.5rem; padding: .8rem 0 1.05rem; margin-bottom: 1.15rem;
}
.motor-brand, .motor-header nav { display: flex; align-items: center; gap: .75rem; }
.motor-header nav { flex-wrap: wrap; gap: .55rem 1.1rem; }
.motor-header nav a { font-size: .88rem; text-underline-offset: .22em; }
.motor-brand h1 { font-size: clamp(1.7rem, 2.5vw, 2.25rem); margin: 0; line-height: 1.02; }
.motor-brand p { font-size: .83rem; margin: .14rem 0 0; }
.motor-mark {
  display: grid; place-items: center; flex: none; width: 2.7rem; height: 2.7rem;
  border-radius: .58rem; background: var(--motor-ink, #16332c); color: #fff; font-weight: 760;
}
.workspace {
  display: grid; grid-template-columns: minmax(21rem, .78fr) minmax(0, 1.5fr);
  gap: 1rem; align-items: start;
}
.showroom { display: grid; min-width: 0; gap: 1rem; }
.lower, .controls {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start;
}
.lower { margin-top: 1rem; }
section { padding: 1rem; min-width: 0; }
#catalogo, #vehicle-explorer, #servicios { scroll-margin-top: .75rem; }
.catalog-facets, .catalog-models { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.catalog-facets label, .catalog-explorer .search-field { font-size: .87rem; }
.catalog-facets label { margin-block: .18rem; }
.catalog-facets select { text-overflow: ellipsis; }
.brand-choices { display: flex; flex-wrap: wrap; gap: .35rem; margin: .65rem 0 .55rem; }
.brand-choices button { min-height: 2.05rem; padding: .2rem .58rem; font-size: .8rem; border-radius: 3rem; }
.brand-choices button[aria-pressed="true"] {
  color: white; background: var(--motor-ink, #16332c); border-color: transparent;
}
.catalog-result, .catalog-paging, .vehicle-heading {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
}
.catalog-result { margin: .45rem 0 .25rem; flex-wrap: wrap; }
.catalog-result p { font-size: .86rem; margin: 0; }
#catalog-filters .quiet-button { background: transparent; border-color: transparent; font-size: .82rem; }
.catalog-models { list-style: none; padding: 0; margin: 0; }
.catalog-models li { min-width: 0; }
.catalog-models .catalog-card {
  display: grid; gap: .26rem; align-content: center; width: 100%; min-height: 6.65rem; height: 100%;
  text-align: left; padding: .72rem; border-radius: .65rem; border-color: var(--motor-line, #cbd7d0);
  overflow-wrap: anywhere;
}
.catalog-models .catalog-card[aria-pressed="true"] {
  background: var(--motor-selected, #e3f2eb); border-color: var(--motor-active, #3d745c);
}
.catalog-card img {
  width: 100%; height: 5rem; object-fit: contain; object-position: center;
}
.catalog-card strong { font-weight: 730; line-height: 1.16; }
.catalog-card-make, .catalog-card-meta { font-size: .76rem; line-height: 1.35; }
.catalog-card-meta { color: var(--motor-subtle, #416154); }
.catalog-paging { margin-top: .7rem; }
.vehicle-heading { flex-wrap: wrap; margin-bottom: .65rem; }
.vehicle-heading h2 { margin: 0; font-size: clamp(1.35rem, 2vw, 2rem); line-height: 1.13; }
#representation-badge { margin: .28rem 0 0; color: var(--motor-subtle, #416154); font-size: .82rem; }
#representation-badge:empty { display: none; }
#vehicle-perspectives { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .65rem; }
#vehicle-perspectives button[aria-pressed="true"] {
  background: var(--motor-selected, #e3f2eb); border-color: var(--motor-active, #3d745c);
}
.vehicle[data-perspective="interior"] #stage,
.vehicle[data-perspective="interior"] .viewer-tools,
.vehicle[data-representation-level="0"] .viewer-tools,
.vehicle[data-representation-level="1"] .viewer-tools,
.vehicle[data-representation-level="2"] .viewer-tools { display: none; }
#stage, #representation-media, #representation-empty { height: clamp(19rem, 34vw, 39rem); overflow: hidden; }
#representation-media { margin: 0; background: var(--motor-selected, #e3f2eb); border-radius: .65rem; }
#representation-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
#representation-empty {
  display: grid; place-items: center; text-align: center; padding: 1rem; border-radius: .65rem;
  color: var(--motor-subtle, #416154); background: var(--motor-selected, #e3f2eb);
}
#stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.viewer-tools, .inline { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.viewer-tools { margin-block: .58rem; }
#view-status { margin-bottom: 0; font-size: .82rem; }
#expanded-showroom {
  max-height: calc(100dvh - 1.5rem); width: min(96vw, 90rem); max-width: 96vw;
  border: 0; border-radius: .75rem; padding: .75rem;
}
#expanded-showroom::backdrop { background: rgb(13 28 23 / .66); }
.expanded-toolbar { display: flex; justify-content: end; margin-bottom: .5rem; }
#expanded-showroom #expand-view { display: none; }
#expanded-showroom #stage, #expanded-showroom #representation-media, #expanded-showroom #representation-empty {
  height: max(16rem, calc(100dvh - 17rem));
}
label { display: block; margin-block: .42rem; }
label > select, label > input:not([type=checkbox]), label > textarea { display: block; width: 100%; min-width: 0; margin-top: .25rem; }
.viewer-tools select, .inline select { display: inline; width: auto; margin: 0; }
input[type=color] { min-width: 3rem; }
textarea { resize: vertical; }
summary { cursor: pointer; padding-block: .5rem; }
button, select, input, textarea { font: inherit; max-width: 100%; }
button, select, input, a { touch-action: manipulation; }
button, select, input:not([type=checkbox]), textarea { min-height: 2.65rem; padding: .45rem .65rem; }
a, p, li { overflow-wrap: anywhere; }
ul, ol { padding-left: 1.35rem; }
#evidence img, #evidence video { display: block; max-width: 100%; max-height: 12rem; margin-block: .4rem; }
@media (max-width: 1040px) {
  .workspace { grid-template-columns: minmax(17rem, .85fr) minmax(0, 1.2fr); }
  .controls { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 740px) {
  main { width: calc(100% - 1rem); padding-block: 1rem; }
  .workspace, .lower { grid-template-columns: minmax(0, 1fr); }
  .motor-header nav { width: 100%; gap: .5rem .85rem; }
  section { padding: .8rem; }
  #stage, #representation-media, #representation-empty { height: clamp(18rem, 80vw, 25rem); }
}
.procedure-dialog {
  box-sizing: border-box;
  width: min(46rem, 95vw);
  max-height: 88dvh;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid #87978c;
  border-radius: 1rem;
  background: #fafbf8;
  color: #15291e;
  overflow: auto;
}
.procedure-dialog::backdrop { background: rgb(15 29 23 / 65%); }
.procedure-dialog header, .procedure-dialog .procedure-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.procedure-dialog header h2 { flex: 1 1 16rem; }
.procedure-dialog section { margin-block: .8rem; }
.procedure-dialog .procedure-item { padding-block: .65rem; border-bottom: 1px solid #ccd6ce; }
.procedure-dialog .procedure-item strong { flex: 1 1 100%; }
