/* ============================================================
   S5 — 11 INVENTORY  (single clean module, rewritten 2026-06-15)
   Layout: horizontal white-plate row [media | body].
   body = head(title + price chip) / spec row (middot list) / CTA.
   Selectors are prefixed `html body .s5-inventory-v2` (specificity
   0,2,2) so they beat the parent monolith style.css inventory block
   (`body.post-type-archive-car .dag-inv-card`, 0,2,1) WITHOUT an
   !important storm. !important is kept only on a few layout props
   the monolith also forces, and on the page background.
   Stacks to a vertical card < 861px. No version-append layers.
   ============================================================ */

/* ---- page chrome ---- */
.s5-inventory-v2 { background: var(--a-concrete) !important; }
html body .s5-inventory-v2 .dag-inventory__header { background: transparent; border: 0; border-bottom: 2px solid var(--a-ink); padding: 30px 0 18px; }
html body .s5-inventory-v2 .dag-inventory__header, html body .s5-inventory-v2 .dag-inventory__header * { color: var(--a-ink); }
html body .s5-inventory-v2 .dag-inventory__header h1 { font-size: clamp(38px, 5vw, 72px); letter-spacing: -.025em; margin: 0; }
html body .s5-inventory-v2 .dag-filter-form { background: transparent; border: 0; border-bottom: 1px solid var(--a-line); padding: 14px 0 18px; display: flex; gap: 14px; flex-wrap: wrap; align-items: end; }
html body .s5-inventory-v2 .dag-filter-form label { color: var(--a-muted); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
html body .s5-inventory-v2 .dag-found { color: var(--a-muted); font-size: 13px; letter-spacing: .04em; padding: 16px 0; }

/* ---- list ---- */
html body .s5-inventory-v2 .dag-inv-list { display: flex !important; flex-direction: column; gap: 22px; padding-top: 8px; }

/* ---- card: white plate, horizontal row ---- */
html body .s5-inventory-v2 .dag-inv-card {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(280px, 44%) 1fr !important;
  column-gap: clamp(26px, 3vw, 48px);
  align-items: center;
  background: var(--a-white) !important;
  border: 1px solid var(--a-line) !important;
  border-radius: 2px !important;
  padding: clamp(16px, 2vw, 22px) !important;
  margin: 0 !important;
  box-shadow: 0 1px 2px rgba(22,23,15,.05) !important;
  overflow: visible !important;
  height: auto !important;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
html body .s5-inventory-v2 .dag-inv-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(22,23,15,.12) !important;
  border-color: var(--a-line-strong) !important;
}

/* ---- media ---- */
html body .s5-inventory-v2 .dag-inv-card__media {
  position: relative; display: block; overflow: hidden;
  border-radius: 2px; background: var(--a-concrete);
  height: auto; min-height: 0; padding: 0;
}
html body .s5-inventory-v2 .dag-inv-card__media::before,
html body .s5-inventory-v2 .dag-inv-card__media::after { content: none; }
html body .s5-inventory-v2 .dag-inv-card__media img {
  width: 100% !important; height: auto !important; aspect-ratio: 16/10 !important;
  object-fit: cover !important; position: static !important; display: block;
  transition: transform .5s ease;
}
html body .s5-inventory-v2 .dag-inv-card:hover .dag-inv-card__media img { transform: scale(1.05); }
html body .s5-inventory-v2 .dag-sold-badge {
  position: absolute; left: 12px; top: 12px; z-index: 3;
  background: var(--a-red); color: #fff; font-size: 11px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; border-radius: 2px;
}

/* ---- body ---- */
html body .s5-inventory-v2 .dag-inv-card__body {
  position: static !important; display: flex !important; flex-direction: column;
  gap: 12px; min-width: 0; height: auto; padding: 0; background: transparent; border: 0;
}

/* head: title + price chip */
html body .s5-inventory-v2 .dag-inv-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
html body .s5-inventory-v2 .dag-inv-card__title { margin: 0; padding: 0; background: transparent; border: 0; }
html body .s5-inventory-v2 .dag-inv-card__title a {
  color: var(--a-ink); text-decoration: none;
  font-size: clamp(22px, 2.2vw, 34px); letter-spacing: -.02em; line-height: 1.12;
}
html body .s5-inventory-v2 .dag-inv-card:hover .dag-inv-card__title a,
html body .s5-inventory-v2 .dag-inv-card__title a:hover { color: var(--a-green); }
html body .s5-inventory-v2 .dag-inv-card__price {
  flex: 0 0 auto; align-self: flex-start;
  background: var(--a-green) !important; color: #faf8f5 !important; border: 0 !important; font-weight: 800;
  font-size: clamp(16px, 1.4vw, 20px); line-height: 1; padding: 9px 14px; border-radius: 2px; white-space: nowrap;
}
html body .s5-inventory-v2 .dag-inv-card__price.is-sold { background: var(--a-red) !important; }

/* spec row: middot-separated inline list (NEVER a collapsing grid) */
html body .s5-inventory-v2 .dag-inv-card__specs {
  list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--a-line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0;
  color: var(--a-ink-2); font-size: 13.5px; letter-spacing: .02em;
}
html body .s5-inventory-v2 .dag-inv-card__specs li { display: inline-flex; align-items: center; }
html body .s5-inventory-v2 .dag-inv-card__specs li:not(:last-child)::after { content: "\00B7"; margin: 0 10px; color: var(--a-line-strong); }

/* CTA (green; whole-card click handled by title overlay, CTA stays on top) */
html body .s5-inventory-v2 .dag-inv-card__cta {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  background: var(--a-green) !important; color: #faf8f5 !important; border: 1px solid var(--a-green) !important;
  min-height: 44px; padding: 0 22px; border-radius: 2px; box-shadow: none !important;
  font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 12.5px; text-decoration: none;
  position: relative; z-index: 2; transition: background .2s ease, gap .2s ease;
}
html body .s5-inventory-v2 .dag-inv-card__cta:hover { background: var(--a-green-hover) !important; border-color: var(--a-green-hover) !important; gap: 12px; }

/* whole-card clickable via title overlay */
html body .s5-inventory-v2 .dag-inv-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* ---- pagination ---- */
html body .s5-inventory-v2 .page-numbers { background: var(--a-white); color: var(--a-ink); border: 1px solid var(--a-line); border-radius: 0; }
html body .s5-inventory-v2 .page-numbers.current, html body .s5-inventory-v2 a.page-numbers:hover { background: var(--a-green); color: #faf8f5; border-color: var(--a-green); }

/* ---- tablet / mobile: stack media over body ---- */
@media (max-width: 860px) {
  html body .s5-inventory-v2 .dag-inv-card { grid-template-columns: 1fr !important; row-gap: 16px; align-items: stretch; }
  html body .s5-inventory-v2 .dag-inv-card__head { flex-wrap: wrap; gap: 10px; }
  html body .s5-inventory-v2 .dag-inv-card__title a { font-size: clamp(21px, 6vw, 28px); }
  html body .s5-inventory-v2 .dag-inv-card__cta { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  html body .s5-inventory-v2 .dag-inv-card { padding: 14px !important; }
  html body .s5-inventory-v2 .dag-inv-card__specs { font-size: 12.5px; }
  html body .s5-inventory-v2 .dag-inv-card__specs li:not(:last-child)::after { margin: 0 7px; }
}
