/* =========================================================
   Inventory Archive — Base tokens & layout
   ========================================================= */
.inv-archive {
  --gap: 20px;
  --accent: #cf1e27;
  --border: #ddd;
  color: var(--off-black, #111);
}

/* =========================================================
   "Shop By Manufacturer" widget (/products/new/ only)
   ========================================================= */
.inv-shop-by-make {
  margin: 0 0 24px;
  padding: 18px 20px 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.inv-shop-by-make__heading {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent, #cf1e27);
}

/* On phone widths the slider is hidden and the accordion (which has its
   own toggle/heading via the <summary>) takes over. Drop the duplicate
   h2 + collapse the bordered wrapper so the accordion sits flush. */
@media (max-width: 767px) {
  .inv-shop-by-make {
    padding: 0;
    border: 0;
    background: transparent;
  }
  .inv-shop-by-make__heading {
    display: none;
  }
}

.inv-shop-by-make__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* Desktop: stretch the grid to exactly --inv-sbm-cols columns (the PHP
   layer caps at 4) so 3 brands fill the row instead of leaving a hole. */
@media (min-width: 540px) {
  .inv-shop-by-make__grid {
    grid-template-columns: repeat(var(--inv-sbm-cols, 4), minmax(0, 1fr));
  }
}

.inv-shop-by-make__tile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  min-height: 90px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.inv-shop-by-make__tile:hover,
.inv-shop-by-make__tile:focus-visible {
  border-color: var(--accent, #cf1e27);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.inv-shop-by-make__tile.is-active {
  border-color: var(--accent, #cf1e27);
  border-width: 2px;
  cursor: default;
}

.inv-shop-by-make__tile img {
  max-height: 56px;
  max-width: 100%;
  object-fit: contain;
}

/* Text-only tile for manufacturers without a configured logo. */
.inv-shop-by-make__tile--text {
  color: var(--off-black, #111);
}

.inv-shop-by-make__tile--text:hover .inv-shop-by-make__name,
.inv-shop-by-make__tile--text:focus-visible .inv-shop-by-make__name {
  color: var(--accent, #cf1e27);
}

.inv-shop-by-make__name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.2;
  transition: color 0.15s ease;
}

/* =========================================================
   Make × road-group pill shortcuts (/products/new/ only)
   ========================================================= */
.inv-pill-shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 8px;
  margin: 0 0 20px;
}

.inv-pill-shortcut {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  /* Override the parent theme's main/footer dotted underline on links */
  border-bottom: 1px solid var(--accent);
  transition: background-color 0.15s, color 0.15s;
}

.inv-pill-shortcut:hover,
.inv-pill-shortcut:focus-visible {
  background: var(--accent);
  color: #fff;
}

.inv-pill-shortcut.is-active {
  background: var(--accent);
  color: #fff;
  cursor: default;
}

/* =========================================================
   Results bar (count, sort, pagination)
   ========================================================= */
.inv-resultsbar {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 15px;
  margin: 0 0 30px;
}

.inv-results-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

/* Visually hidden labels (for sort/page controls) */
.inv-visually-hidden .inv-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.inv-count {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--accent);
}

.inv-results-controls select {
  border-radius: 5px;
  border: 1px solid var(--accent);
  font-size: 15px;
  padding: 8px 10px;
}

@media (min-width: 1025px) {
  .inv-results-controls select {
    font-size: 18px;
    padding: 8px 15px;
  }
}

/* Simple inline layout helper (used in results + bottom bar) */
.inv-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Buttons that are used in archive/empty states */
.inv-btn-primary {
  font-size: 17px;
  padding: 8px 10px;
}

.inv-btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.inv-btn-blank {
  background: transparent;
  color: var(--accent);
  border: 1px solid transparent;
}

/* =========================================================
   Grid
   ========================================================= */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  margin-bottom: 20px;
}

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

@media (max-width: 640px) {
  .inv-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Empty state
   ========================================================= */
.inv-empty {
  display: block;
  border: 2px dashed var(--accent);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  margin: 10px 0 30px;
}

.inv-empty[hidden] {
  display: none;
}

/* =========================================================
   Cards
   ========================================================= */
.inv-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease;
}

.inv-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.inv-card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.inv-card-media {
  background: #f7f7f7;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  display: block;
  position: relative;
  margin: 0;
  border-radius: 0;
}

.inv-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Tag pill — floats over the image (top-left). Flat light-grey pill
   with an exclamation-circle icon, kept readable on any photo via a
   soft drop-shadow. */
.inv-sale-ribbon {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.inv-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  background: #f4f4f5;
  color: #111;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.inv-tag-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #4a4a4a;
}

.inv-tag-label {
  white-space: nowrap;
}

.inv-card-body {
  padding: 0;
}

.inv-title {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 8px;
  line-height: 1.3;
  color: #000;
}

.inv-meta {
  margin: 0;
}

.inv-meta--stack {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  row-gap: 4px;
}

.inv-meta--stack dt {
  font-size: 13px;
  font-weight: 700;
}

.inv-meta--stack dt::after {
  content: ':';
  margin-left: 2px;
}

.inv-meta--stack dd {
  font-size: 13px;
  margin: 0;
}

.inv-ctas {
  display: grid;
  gap: 12px;
  padding: 24px;
  padding-top: 0;
  margin-top: auto;
}

.inv-ctas .btn {
  justify-content: flex-start;
  font-size: 16px;
  padding: 12px 15px;
}

.inv-ctas .btn.btn--outline {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.inv-ctas .btn.btn--outline:hover {
  background: var(--accent);
  color: #fff;
}

/* Icon sizing inside CTAs */
.inv-ctas .gb-shape svg {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: -2px;
  fill: #fff;
}

/* =========================================================
   Bottom bar / pagination
   ========================================================= */
.inv-bottombar.inv-bottombar--stack {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 12px;
  padding: 10px 0;
}

.inv-results-controls--bottom {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
}

#invNextPage[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

/* =========================================================
   Utilities
   ========================================================= */
.is-hidden {
  display: none !important;
}

.inv-archive--loading #invTop,
.inv-archive--loading #invGrid,
.inv-archive--loading #invBottomBar {
  visibility: hidden;
}

.no-strikethrough {
    text-decoration: none;
}

.age-message {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 3px;
}

.age-message svg {
    width: 1.1em;
    height: 1.1em;
}

.customized-message {
    font-size: 15px;
    text-align: center;
    margin-bottom: 10px;
    font-style: italic;
}

.btn-group {
    display: flex;
    column-gap: 5px;
}

.btn-group .btn {
    flex-grow: 1;
}

.btn-alt {
    background: #333;
}

.btn-group .btn:hover {
    background: #000;
}
/* =========================================================
   SRP card title area + simplified CTA stack (mock-aligned)
   ========================================================= */

.inv-card-titles {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 14px 18px 18px;
}

.inv-card-titles:hover .inv-title {
  color: var(--accent);
}

.inv-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b6b6b;
  margin-bottom: 4px;
}

.inv-card-titles .inv-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.25;
  color: #111;
  text-transform: none;
}

.inv-subtitle {
  display: block;
  font-size: 13px;
  color: #6b6b6b;
  font-weight: 500;
}

/* Mock-aligned CTA layout: View details (primary) + Get approved /
   Trade value (outlined, side-by-side). */
.inv-ctas--srp {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px 18px;
}

.inv-ctas--srp .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.inv-ctas--srp .inv-cta-primary,
.inv-ctas--srp .inv-cta-primary:hover,
.inv-ctas--srp .inv-cta-primary:focus-visible {
  background: var(--accent, #cf1e27);
  color: #fff;
  border: 1px solid var(--accent, #cf1e27);
  box-shadow: none;
}

.inv-ctas--srp .inv-cta-primary:hover,
.inv-ctas--srp .inv-cta-primary:focus-visible {
  background: #b51820;
  border-color: #b51820;
}

.inv-ctas--srp .inv-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.inv-ctas--srp .inv-cta-secondary,
.inv-ctas--srp .inv-cta-secondary:hover,
.inv-ctas--srp .inv-cta-secondary:focus-visible {
  background: #4a4a4a;
  color: #fff;
  border: 1px solid #4a4a4a;
  box-shadow: none;
  text-shadow: none;
}

.inv-ctas--srp .inv-cta-secondary:hover,
.inv-ctas--srp .inv-cta-secondary:focus-visible {
  background: #333;
  border-color: #333;
  color: #fff;
}
