.th-stock,
.th-vehicle-detail {
  --th-red: #c8102e;
  --th-red-dark: #a90d26;
  --th-dark: #0e131c;
  --th-ink: #151923;
  --th-muted: #647084;
  --th-line: #e4e8ef;
  --th-page: #f4f6f9;
  --th-soft: #eef2f7;
  color: var(--th-ink);
  font-family: Arial, Helvetica, sans-serif;
}

.th-stock *,
.th-vehicle-detail * {
  box-sizing: border-box;
}

.th-stock-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 20px 60px;
}

.th-stock-page-header {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
}

.th-stock-page-header p {
  margin: 0;
  color: var(--th-red);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.th-stock-page-header h1 {
  margin: 0;
  color: var(--th-ink);
  font-size: 38px;
  line-height: 1.08;
}

.th-stock-page-header span {
  display: block;
  max-width: 760px;
  color: var(--th-muted);
  font-size: 16px;
  line-height: 1.55;
}

.th-stock-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 200px) minmax(150px, 200px) auto;
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid var(--th-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.th-stock-toolbar input,
.th-stock-toolbar select,
.th-filter-clear {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--th-line);
  border-radius: 7px;
  padding: 10px 12px;
  background: #fff;
  color: var(--th-ink);
  font: inherit;
}

.th-filter-clear {
  width: auto;
  min-width: 128px;
  background: var(--th-dark);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.th-filter-clear:hover,
.th-filter-clear:focus-visible {
  background: var(--th-red);
  outline: none;
}

.th-stock-search-wrap {
  position: relative;
  min-width: 0;
}

.th-stock-suggest {
  position: absolute;
  z-index: 12;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid var(--th-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, .16);
}

.th-stock-suggest[hidden] {
  display: none;
}

.th-stock-suggest button {
  display: block;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-bottom: 1px solid var(--th-line);
  padding: 10px 12px;
  background: #fff;
  color: var(--th-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.th-stock-suggest button:last-child {
  border-bottom: 0;
}

.th-stock-suggest button:hover,
.th-stock-suggest button:focus-visible {
  background: var(--th-soft);
  color: var(--th-red);
  outline: none;
}

.th-stock-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.th-vehicle-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--th-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.th-vehicle-card[hidden] {
  display: none;
}

.th-vehicle-image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  min-height: 0;
  background: var(--th-soft);
  color: #fff;
  text-decoration: none;
}

.th-vehicle-card-img,
.th-vehicle-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease;
}

.th-vehicle-card:hover .th-vehicle-card-img,
.th-vehicle-card:hover .th-vehicle-image img {
  transform: scale(1.025);
}

.th-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.th-featured {
  left: 12px;
  background: var(--th-red);
  color: #fff;
}

.th-status {
  right: 12px;
  background: #fff;
  color: var(--th-ink);
}

.th-status-vendido {
  background: #ef4444;
  color: #fff;
}

.th-status-reservado {
  background: #f59e0b;
  color: #111827;
}

.th-vehicle-body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  padding: 16px;
}

.th-vehicle-body h3 {
  min-height: 48px;
  margin: 0;
  color: var(--th-ink);
  font-size: 18px;
  line-height: 1.32;
}

.th-vehicle-price {
  margin: 0;
  color: var(--th-red);
  font-size: 23px;
  font-weight: 900;
}

.th-vehicle-meta {
  min-height: 42px;
  margin: 0;
  color: var(--th-muted);
  font-size: 14px;
  line-height: 1.45;
}

.th-vehicle-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.th-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none !important;
}

.th-btn-primary {
  background: var(--th-red);
  color: #fff !important;
}

.th-btn-primary:hover,
.th-btn-primary:focus-visible {
  background: var(--th-red-dark);
  color: #fff !important;
}

.th-btn-dark {
  background: var(--th-dark);
  color: #fff !important;
}

.th-btn-light {
  background: var(--th-soft);
  color: var(--th-ink) !important;
}

.th-stock-empty {
  margin: 18px 0;
  color: var(--th-muted);
}

.th-vehicle-detail-page .entry-title,
.th-vehicle-detail-page h1.entry-title,
.th-vehicle-detail-page .page-title,
.th-vehicle-detail-page .wp-block-post-title {
  display: none !important;
}

.th-vehicle-detail-page #header {
  display: none !important;
}

.th-vehicle-detail-page .site-main,
.th-vehicle-detail-page #primary,
.th-vehicle-detail-page .content-area,
.th-vehicle-detail-page article,
.th-vehicle-detail-page .entry-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.th-vehicle-detail {
  background: var(--th-page);
}

.th-detail-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 20px 64px;
}

.th-back-link {
  display: inline-flex;
  margin: 0 0 16px;
  color: var(--th-muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.th-back-link:hover,
.th-back-link:focus-visible {
  color: var(--th-red);
}

.th-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, .72fr);
  gap: 22px;
  align-items: start;
}

.th-detail-gallery,
.th-detail-summary,
.th-detail-panel,
.th-contact-card {
  border: 1px solid var(--th-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.th-detail-gallery {
  overflow: hidden;
}

.th-gallery-main {
  position: relative;
  background: var(--th-soft);
}

.th-gallery-main-button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.th-gallery-main img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.th-photo-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(14, 19, 28, .82);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.th-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  background: #fff;
}

.th-gallery-thumbs button {
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 7px;
  padding: 0;
  background: var(--th-soft);
  cursor: pointer;
}

.th-gallery-thumbs button.is-active {
  border-color: var(--th-red);
}

.th-gallery-thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.th-detail-summary {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 16px;
  padding: 22px;
}

.th-detail-kicker {
  margin: 0;
  color: var(--th-red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.th-detail-summary h1 {
  margin: 0;
  color: var(--th-ink);
  font-size: 30px;
  line-height: 1.12;
}

.th-detail-price {
  margin: 0;
  color: var(--th-red);
  font-size: 31px;
  font-weight: 900;
}

.th-detail-quick-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.th-detail-quick-specs div {
  min-height: 72px;
  border: 1px solid var(--th-line);
  border-radius: 7px;
  padding: 11px;
  background: #fafbfc;
}

.th-detail-quick-specs span {
  display: block;
  margin: 0 0 4px;
  color: var(--th-muted);
  font-size: 12px;
  font-weight: 800;
}

.th-detail-quick-specs strong {
  display: block;
  color: var(--th-ink);
  font-size: 15px;
  line-height: 1.25;
}

.th-detail-actions {
  display: grid;
  gap: 10px;
}

.th-detail-note {
  margin: 0;
  color: var(--th-muted);
  font-size: 13px;
  line-height: 1.45;
}

.th-announced-at {
  margin: 0;
  border-top: 1px solid var(--th-line);
  padding-top: 12px;
  color: var(--th-muted);
  font-size: 12px;
  font-weight: 800;
}

.th-detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
  margin-top: 22px;
}

.th-detail-panel,
.th-contact-card {
  padding: 24px;
}

.th-detail-panel h2,
.th-contact-card h2 {
  margin: 0 0 14px;
  color: var(--th-ink);
  font-size: 22px;
  line-height: 1.2;
}

.th-detail-panel h2:not(:first-child) {
  margin-top: 26px;
}

.th-detail-panel p,
.th-contact-card p {
  margin: 0 0 14px;
  color: var(--th-muted);
  font-size: 15px;
  line-height: 1.65;
}

.th-vehicle-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.th-optionals-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.th-optionals-list li {
  position: relative;
  min-height: 42px;
  border: 1px solid var(--th-line);
  border-radius: 7px;
  padding: 11px 12px 11px 34px;
  background: #fafbfc;
  color: var(--th-ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.th-optionals-list li::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--th-red);
}

.th-tech-note {
  margin-top: 14px !important;
  border-left: 3px solid var(--th-red);
  padding-left: 12px;
  color: var(--th-muted);
}

.th-vehicle-specs div {
  border: 1px solid var(--th-line);
  border-radius: 7px;
  padding: 12px;
  background: #fafbfc;
}

.th-vehicle-specs dt {
  margin: 0 0 4px;
  color: var(--th-muted);
  font-size: 12px;
  font-weight: 800;
}

.th-vehicle-specs dd {
  margin: 0;
  color: var(--th-ink);
  font-size: 15px;
  font-weight: 800;
}

.th-contact-card {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 10px;
}

.th-contact-lines {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--th-line);
  color: var(--th-muted);
  font-size: 13px;
  line-height: 1.45;
}

.th-price-compare {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  border: 1px solid var(--th-line);
  border-radius: 8px;
  padding: 14px;
  background: #fafbfc;
}

.th-price-compare h3 {
  margin: 0 0 4px;
  color: var(--th-ink);
  font-size: 16px;
  line-height: 1.2;
}

.th-price-compare div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--th-line);
  padding-top: 8px;
  color: var(--th-muted);
  font-size: 13px;
}

.th-price-compare strong {
  color: var(--th-ink);
  white-space: nowrap;
}

.th-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 52px 18px 18px;
  background: rgba(0, 0, 0, .88);
}

.th-gallery-modal[hidden] {
  display: none;
}

.th-gallery-modal img {
  display: block;
  max-width: min(1180px, 100%);
  max-height: 86vh;
  border-radius: 8px;
  object-fit: contain;
}

.th-gallery-close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 7px;
  padding: 9px 13px;
  background: #fff;
  color: var(--th-ink);
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 980px) {
  .th-stock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .th-stock-toolbar {
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 1fr);
  }

  .th-detail-hero,
  .th-detail-content-grid {
    grid-template-columns: 1fr;
  }

  .th-detail-summary,
  .th-contact-card {
    position: static;
  }
}

@media (max-width: 680px) {
  .th-stock-page {
    padding: 30px 14px 46px;
  }

  .th-stock-page-header h1 {
    font-size: 30px;
  }

  .th-stock-toolbar,
  .th-stock-grid,
  .th-vehicle-actions,
  .th-vehicle-specs,
  .th-optionals-list {
    grid-template-columns: 1fr;
  }

  .th-filter-clear {
    width: 100%;
  }

  .th-detail-shell {
    padding: 18px 12px 44px;
  }

  .th-detail-hero,
  .th-detail-content-grid {
    gap: 14px;
  }

  .th-gallery-main img {
    aspect-ratio: 4 / 3;
  }

  .th-gallery-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .th-detail-summary,
  .th-detail-panel,
  .th-contact-card {
    padding: 18px;
  }

  .th-detail-summary h1 {
    font-size: 24px;
  }

  .th-detail-price {
    font-size: 27px;
  }
}

@media (max-width: 420px) {
  .th-detail-quick-specs,
  .th-gallery-thumbs {
    grid-template-columns: 1fr 1fr;
  }
}
