/* Deals — buyer-tool styles. Inherits typography + button/container vars from
   the global stylesheet. Layout intentionally minimal so it can be tightened
   visually in a later iteration without rebuilding the markup. */

.deals-page {
  padding-bottom: 4rem;
}

/* ── Form ────────────────────────────────────────────────────────────────── */

.deals-form {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.deals-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.deals-form__row--primary {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.deals-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.deals-form__field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted, #475569);
}

.deals-form__field input,
.deals-form__field select {
  padding: 0.55rem 0.9rem;
  font-size: 0.95rem;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 999px;
  background: #fff;
  color: var(--color-text, #0f172a);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.deals-form__field select {
  /* Reserve room for the dropdown chevron — native renders inside the
     pill cleanly without bumping the right edge. */
  padding-right: 1.6rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.deals-form__field input:focus,
.deals-form__field select:focus {
  outline: none;
  border-color: var(--color-primary, #4361ee);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.deals-form__field input:disabled,
.deals-form__field select:disabled {
  background: #f1f5f9;
  cursor: not-allowed;
}

.deals-form__advanced {
  margin-top: 0.5rem;
  border-top: 1px solid var(--color-border, #e2e8f0);
  padding-top: 1rem;
}

.deals-form__advanced summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-primary, #4361ee);
  padding: 0.25rem 0;
  margin-bottom: 0.75rem;
  user-select: none;
}

.deals-form__actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

/* Disabled state handled by global `button:disabled` rule. */

/* Global .btn-primary has min-width: 12rem + chunky padding, designed for
   main-CTA usage. The deals form + pager use it for utility actions in a
   constrained row — override to a compact size so the pager doesn't
   overflow on narrow viewports (<360px). */
.deals-form__actions .btn-primary,
.deals-pager .btn-primary {
  min-width: auto;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ── Status / loading messages ───────────────────────────────────────────── */

.deals-status {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  min-height: 1.2em;
}

.deals-status:empty {
  display: none;
}

.deals-status[data-kind='loading'] {
  background: #eff6ff;
  color: #1e40af;
}
.deals-status[data-kind='info'] {
  background: #f0fdf4;
  color: #166534;
}
.deals-status[data-kind='error'] {
  background: #fef2f2;
  color: #991b1b;
}

/* ── Skeleton cards (shown while /feed is loading) ───────────────────────── */

@keyframes deals-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.deal-card--skeleton {
  pointer-events: none;
}

.deal-card--skeleton .deal-card__image-wrap,
.deal-card--skeleton .deal-card__skel {
  border-radius: 6px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 1200px 100%;
  animation: deals-shimmer 1.4s infinite linear;
}

.deal-card--skeleton .deal-card__image-wrap {
  aspect-ratio: 4/3;
  border-radius: 0;
}

.deal-card--skeleton .deal-card__body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.deal-card__skel {
  display: block;
  height: 0.9rem;
  border-radius: 4px;
}

.deal-card__skel--title { height: 1.1rem; width: 80%; }
.deal-card__skel--sub   { width: 55%; }
.deal-card__skel--wide  { width: 90%; }
.deal-card__skel--med   { width: 65%; }

/* ── Result cards ────────────────────────────────────────────────────────── */

/* ── Toolbar (count + top pager) ─────────────────────────────────────────── */

.deals-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 1rem;
}

.deals-toolbar__count {
  font-size: 0.95rem;
  color: var(--color-text-muted, #475569);
  font-weight: 500;
}

.deals-toolbar__sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.deals-toolbar__sort-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted, #475569);
  white-space: nowrap;
}

.deals-toolbar__sort-select {
  padding: 0.4rem 1.6rem 0.4rem 0.9rem;
  font-size: 0.9rem;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 999px;
  background: #fff;
  color: var(--color-text, #0f172a);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  cursor: pointer;
}

.deals-pager {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.deals-pager--bottom {
  justify-content: center;
  margin-top: 1.5rem;
}

.deals-pager__indicator {
  font-size: 0.9rem;
  color: var(--color-text-muted, #475569);
  min-width: 7rem;
  text-align: center;
}

/* ── Card grid (4 / 2 / 1 cols by viewport) ──────────────────────────────── */

.deals-results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .deals-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .deals-results {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ── Card shell ──────────────────────────────────────────────────────────── */

.deal-card {
  background: #fff;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.deal-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

/* ── Image / fallback placeholder ────────────────────────────────────────── */

/* Inset image with its own rounded corners — pulls the photo away from
   the card edges and gives the "Asset Search"-style premium feel. */
.deal-card__image-wrap {
  position: relative;
  margin: 0.65rem 0.65rem 0;
  width: calc(100% - 1.3rem);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f1f5f9;
  border-radius: 10px;
}

.deal-card__image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.22);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.deal-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Cross-fade in over the placeholder when load fires. JS un-hides the
     img and adds .is-loaded; CSS transitions opacity 0 → 1. */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.deal-card__image.is-loaded {
  opacity: 1;
}

/* ── Body ────────────────────────────────────────────────────────────────── */

.deal-card__body {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1rem 1rem;
  gap: 0.7rem;
  flex: 1 1 auto;
}

.deal-card__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  letter-spacing: -0.005em;
}

/* ── Mindestersparnis ────────────────────────────────────────────────────── */

.deal-card__savings {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.deal-card__savings-label {
  font-size: 0.68rem;
  color: var(--color-text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.deal-card__savings-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.deal-card__savings-amount {
  font-size: 1.7rem;
  font-weight: 800;
  color: #15803d;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}

/* Pct rendered as a green pill — visually separates "you save €X" from
   "X percent off" so the absolute number reads as the primary anchor. */
.deal-card__savings-pct {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  line-height: 1.2;
}

/* ── Compact spec lines ──────────────────────────────────────────────────── */

.deal-card__specs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  font-size: 0.82rem;
  color: var(--color-text, #0f172a);
}

.deal-card__specs > li {
  margin: 0;
}

.deal-card__specs > li:nth-child(2),
.deal-card__specs > li:nth-child(3),
.deal-card__specs > li:nth-child(4) {
  color: var(--color-text-muted, #475569);
  font-size: 0.78rem;
}

/* ── Pricing block ───────────────────────────────────────────────────────── */

.deal-card__pricing {
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  display: flex;
  flex-direction: column;
}

.deal-card__pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.82rem;
}

.deal-card__pricing-label {
  flex: 1 1 auto;
  color: var(--color-text-muted, #475569);
}

.deal-card__pricing-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-text, #0f172a);
}

.deal-card__pricing-row--muted .deal-card__pricing-value {
  font-weight: 500;
  color: var(--color-text-muted, #475569);
}

/* CTA-like row: All-in Importkosten. Reset button defaults so it sits flush
   in the price stack and looks identical to a regular row, just clickable.
   Chevron rotates when expanded. */
.deal-card__pricing-row--cta {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font: inherit;
  padding: 0.45rem 0;
  border-top: 1px dashed #e2e8f0;
  border-bottom: 1px dashed #e2e8f0;
  margin: 0.15rem 0;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--color-text, #0f172a);
}

.deal-card__pricing-row--cta:hover {
  color: var(--color-primary, #4361ee);
}

.deal-card__pricing-row--cta .deal-card__pricing-label {
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
}

.deal-card__pricing-row--cta .deal-card__pricing-value {
  font-size: 1rem;
  color: inherit;
}

.deal-card__pricing-row--cta[aria-expanded='true'] .deal-card__chevron {
  transform: rotate(90deg);
}

.deal-card__chevron {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--color-primary, #4361ee);
  transition: transform 0.15s ease;
  line-height: 1;
}

.deal-card__pricing-row--ref {
  font-size: 0.78rem;
  align-items: flex-start;
}

.deal-card__pricing-row--ref small {
  font-weight: 500;
  color: var(--color-text-muted, #94a3b8);
}

/* Two-line value stack: range on top, median below — keeps the Marktpreis
   row tidy at narrow card widths instead of mid-text wrapping. */
.deal-card__pricing-value--stacked {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0.1rem;
}

.deal-card__pricing-value--stacked small {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-text-muted, #94a3b8);
  line-height: 1.2;
}

/* ── Inline import-detail (slide-down inside the price block) ────────────── */

.deal-card__import-detail {
  font-size: 0.82rem;
  padding: 0.4rem 0;
  color: var(--color-text, #0f172a);
}

.deal-card__import-detail-empty,
.deal-card__import-detail-error {
  margin: 0;
  padding: 0.4rem 0;
  color: var(--color-text-muted, #475569);
  font-size: 0.82rem;
}

.deal-card__import-detail-error {
  color: #991b1b;
}

.deal-card__items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.deal-card__item {
  display: flex;
  justify-content: space-between;
  padding: 0.22rem 0;
  border-bottom: 1px dashed #e2e8f0;
}

.deal-card__item:last-child {
  border-bottom: none;
}

.deal-card__item span {
  color: var(--color-text-muted, #475569);
}

/* Service Optionen sub-breakdown — appears on hover/focus of the row so
   buyers can see Transport / Anmeldung / Dekra / Novora-Service / Garantie
   without expanding into another panel. */
.deal-card__item--has-tooltip {
  position: relative;
  cursor: help;
}

.deal-card__item-info {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.7rem;
  color: var(--color-primary, #4361ee);
}

.deal-card__item-tooltip {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  /* Opens upward — the breakdown sits near the card bottom inside a
     parent with overflow:hidden, so a downward tooltip would be clipped. */
  bottom: calc(100% + 0.25rem);
  z-index: 20;
  background: #1e293b;
  color: #f1f5f9;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  font-size: 0.74rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.deal-card__item-tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.16rem 0;
  border-bottom: 1px dashed #334155;
}

.deal-card__item-tooltip-row:last-child {
  border-bottom: none;
}

.deal-card__item-tooltip-row > span {
  color: #cbd5e1;
}

.deal-card__item-tooltip-row > strong {
  font-variant-numeric: tabular-nums;
  color: #f8fafc;
}

.deal-card__item--has-tooltip:hover .deal-card__item-tooltip,
.deal-card__item--has-tooltip:focus-within .deal-card__item-tooltip {
  display: block;
}

.deal-card__import-detail-options-link {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
}

.deal-card__import-detail-options-link a {
  color: var(--color-primary, #4361ee);
  text-decoration: none;
  font-weight: 600;
}

.deal-card__import-detail-options-link a:hover {
  text-decoration: underline;
}

/* ── Extras (highlights, on-demand) ──────────────────────────────────────── */

.deal-card__extras {
  margin: 0;
}

.deal-card__highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.deal-card__highlight {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1.4;
  font-weight: 500;
  background: #ecfeff;
  color: #075985;
  border: 1px solid #bae6fd;
}

/* ── Footer (CTA + external links) ───────────────────────────────────────── */

/* IMPORTANT: explicit background + color reset. The global stylesheet has a
   bare `footer { background: var(--dark-text); color: #ccc }` rule that
   would otherwise hit *any* <footer> element nested in the card. We use a
   <div class="deal-card__footer"> in the template now, but keep the reset
   so a future refactor that re-introduces <footer> doesn't regress. */
.deal-card__footer {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: auto;
  padding: 0.6rem 0 0;
  border-top: 1px solid var(--color-border, #e2e8f0);
  background: transparent;
  color: inherit;
}

/* Site-button language: rectangular with the global --border-radius
   (0.25rem). Three actions: one full-width primary on top, two
   brand-blue secondary links split 50/50 below. */
.deal-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--border-radius, 0.25rem);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-muted, #475569);
  text-decoration: none;
  border: 1px solid var(--color-border, #e2e8f0);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
  white-space: nowrap;
}

.deal-card__action:hover {
  background: #f8fafc;
  color: var(--color-primary, #4361ee);
  border-color: #cbd5e1;
}

/* Secondary links — brand-blue outline pill. Filled on hover so they read
   as actionable, not as muted metadata. Aligns visually with the other
   blue links on the site (FAQ, bridge cards). */
.deal-card__action--secondary {
  color: var(--color-primary, #4361ee);
  border-color: var(--color-primary, #4361ee);
  background: #fff;
}

.deal-card__action--secondary:hover {
  background: var(--color-primary, #4361ee);
  color: #fff;
  border-color: var(--color-primary, #4361ee);
}

/* Primary CTA — site brand orange (matches global .btn-secondary). Spans
   the full card width on its own row so it can never get cut off. */
.deal-card__action--primary {
  background: var(--primary-color, #ff9900);
  border-color: var(--primary-color, #ff9900);
  color: #fff;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  width: 100%;
}

.deal-card__action--primary:hover {
  background: #c97c09;
  border-color: #c97c09;
  color: #fff;
}

/* Two secondary links sit on a row split 50/50 so both get the same width
   regardless of label length. */
.deal-card__footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.deal-card__footer-link-icon {
  font-size: 0.85rem;
  line-height: 1;
  transition: transform 0.18s ease;
}

.deal-card__action:hover .deal-card__footer-link-icon {
  transform: translate(2px, -2px);
}

/* "Mehr Details" toggle — text-link, subtle, only visible when there are
   highlights to reveal. Sits on its own row below the link pair. */
.deal-card__action--toggle {
  align-self: flex-start;
  background: transparent;
  border-color: transparent;
  color: var(--color-primary, #4361ee);
  padding: 0.25rem 0;
  font-size: 0.78rem;
}

.deal-card__action--toggle:hover {
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
}

.deal-card__action--toggle[aria-expanded='true'] .deal-card__chevron {
  transform: rotate(180deg);
}

/* ── How-it-works (3 mechanism bullets above the filters) ───────────────── */

.deals-howto {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.deals-howto h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.deals-howto__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.deals-howto__steps > li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.deals-howto__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--color-primary, #4361ee);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.deals-howto__steps p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text, #0f172a);
}

/* ── FAQ (visible HTML twin of the FAQPage JSON-LD) ─────────────────────── */

.deals-faq {
  margin: 2.5rem 0 1rem;
}

.deals-faq h2 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
}

.deals-faq__item {
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  background: #fff;
}

.deals-faq__item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 1.5rem;
}

.deals-faq__item summary::-webkit-details-marker {
  display: none;
}

.deals-faq__item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--color-primary, #4361ee);
  font-weight: 400;
}

.deals-faq__item[open] summary::after {
  content: '−';
}

.deals-faq__item p {
  margin: 0.6rem 0 0.25rem;
  line-height: 1.55;
  color: var(--color-text, #0f172a);
}

.deals-faq__item a {
  color: var(--color-primary, #4361ee);
  font-weight: 600;
}

/* ── Off-ramp bridge (CTAs to Import-Rechner / NoVA-Rechner) ─────────────── */

.deals-bridge {
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border, #e2e8f0);
}

.deals-bridge h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  color: var(--color-text-muted, #475569);
}

.deals-bridge__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.deals-bridge__card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
}

.deals-bridge__card:hover {
  border-color: var(--color-primary, #4361ee);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.deals-bridge__card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.deals-bridge__card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted, #475569);
  line-height: 1.5;
}

.deals-bridge__cta {
  margin-top: auto;
  display: block;
  width: 100%;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════════════
   Per-deal landing page  (Outfit + Bebas Neue loaded via template)
   ══════════════════════════════════════════════════════════════════ */

.deal-page {
  font-family: 'Outfit', var(--body-font, sans-serif);
  padding-bottom: 7rem; /* room for mobile fixed bar */
}

/* ── Sold / expired deal banner ────────────────────────────────── */

.deal-page__sold-banner {
  background: #FEF2F2;
  border-bottom: 1px solid #FECACA;
  padding: 0.85rem 0;
}

.deal-page__sold-banner-inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: #7F1D1D;
}

.deal-page__sold-icon {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  background: #FCA5A5;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #7F1D1D;
}

.deal-page__sold-banner-inner > div {
  flex: 1 1 auto;
  line-height: 1.45;
}

.deal-page__sold-banner-inner strong {
  display: block;
  font-weight: 700;
  color: #991B1B;
}

.deal-page__sold-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  background: #fff;
  border: 1.5px solid #FCA5A5;
  border-radius: 6px;
  color: #991B1B;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.deal-page__sold-cta:hover {
  background: #FEE2E2;
  border-color: #F87171;
}

.deal-page--sold .deal-page__layout {
  opacity: 0.65;
  pointer-events: none;
}


/* ── Breadcrumb ────────────────────────────────────────────────── */

.deal-page__breadcrumb {
  padding: 0.9rem 0 0.5rem;
  font-size: 0.875rem;
}
.deal-page__breadcrumb a {
  color: var(--color-text-muted, #6B7280);
  text-decoration: none;
  transition: color 0.15s;
}
.deal-page__breadcrumb a:hover { color: var(--color-primary, #4361ee); }

/* ── Hero gallery ──────────────────────────────────────────────── */

.deal-page__hero { margin-bottom: 2rem; }

.deal-page__hero-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  background: #111827;
  border-radius: 14px;
  overflow: hidden;
}

@media (max-width: 600px) {
  .deal-page__hero-stage { aspect-ratio: 4 / 3; max-height: 280px; }
}

.deal-page__hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.deal-page__hero-stage:focus-within .deal-page__hero-img,
.deal-page__hero-stage:hover .deal-page__hero-img {
  transform: scale(1.025);
}
.deal-page__hero-stage.no-image .deal-page__hero-img { display: none; }

.deal-page__hero-stage.no-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 24px,
      rgba(255,255,255,0.025) 24px,
      rgba(255,255,255,0.025) 25px
    ),
    linear-gradient(160deg, #1a2035 0%, #111827 100%);
}

.deal-page__hero-stage.no-image .deal-page__hero-overlay {
  background: none;
}

.deal-page__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 60%,
    rgba(0,0,0,0.12) 100%
  );
  pointer-events: none;
}

/* Title block (below gallery, above specs) */

.deal-page__title-block {
  padding: 1.1rem 0 0.25rem;
}

.deal-page__title-block-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #111827;
  margin: 0 0 0.3rem;
  line-height: 1.05;
}

.deal-page__title-block-sub {
  font-size: 0.9rem;
  color: #6B7280;
  margin: 0;
  font-weight: 400;
}

.deal-page__hero-counter {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  background: rgba(0,0,0,0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: 99px;
  pointer-events: none;
}

/* Thumbnail strip */

.deal-page__thumbs-strip {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.deal-page__thumbs-strip::-webkit-scrollbar { display: none; }

.deal-page__thumb {
  flex-shrink: 0;
  width: 90px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 2.5px solid transparent;
  cursor: pointer;
  padding: 0;
  background: #E5E7EB;
  opacity: 0.68;
  transition: opacity 0.15s, border-color 0.15s;
}
.deal-page__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.deal-page__thumb:hover { opacity: 1; }
.deal-page__thumb.is-active {
  border-color: var(--primary-color, #FF9900);
  opacity: 1;
}

/* Fallback header (no images) */

.deal-page__header-fallback { margin-bottom: 1.5rem; }
.deal-page__title-fallback {
  margin: 0 0 0.3rem;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}
.deal-page__subtitle-fallback {
  margin: 0;
  color: var(--color-text-muted, #6B7280);
}

/* ── Mobile fixed savings bar ──────────────────────────────────── */

.deal-page__mobile-bar {
  display: none;
}

@media (max-width: 899px) {
  .deal-page__mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    border-top: 1px solid #E5E7EB;
    padding: 0.75rem 1.1rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  }
}

.deal-page__mobile-bar-savings {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}
.deal-page__mobile-bar-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6B7280;
  font-weight: 600;
  white-space: nowrap;
}
.deal-page__mobile-bar-amount {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.7rem;
  color: #15803D;
  letter-spacing: 0.03em;
  line-height: 1;
  display: block;
}
.deal-page__mobile-bar-pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: #166534;
  background: #DCFCE7;
  border: 1px solid #BBF7D0;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
  display: inline-block;
  margin-top: 0.15rem;
  align-self: flex-start;
}
.deal-page__mobile-bar-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.1rem;
  background: var(--primary-color, #FF9900);
  color: #fff;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s;
}
.deal-page__mobile-bar-btn:hover { background: #CC7A00; color: #fff; }

/* ── Body layout ───────────────────────────────────────────────── */

.deal-page__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 900px) {
  .deal-page__layout { grid-template-columns: 1fr 360px; gap: 2rem; }
  .deal-page { padding-bottom: 4rem; }
}

/* ── Section cards (left column) ───────────────────────────────── */

.deal-page__section {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1rem;
}
.deal-page__section:last-child { margin-bottom: 0; }

.deal-page__section-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9CA3AF;
  margin: 0 0 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #F3F4F6;
}

/* ── Specs grid (striped rows) ─────────────────────────────────── */

.deal-page__specs-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  margin: 0;
  font-size: 0.875rem;
}
.deal-page__specs-grid dt,
.deal-page__specs-grid dd {
  padding: 0.5rem 0.6rem;
  margin: 0;
  border-bottom: 1px solid #F9FAFB;
}
.deal-page__specs-grid dt:last-of-type,
.deal-page__specs-grid dd:last-of-type { border-bottom: none; }
.deal-page__specs-grid dt {
  color: #6B7280;
  white-space: nowrap;
  padding-right: 1.75rem;
  font-weight: 400;
}
.deal-page__specs-grid dd { font-weight: 600; color: #111827; }
/* alternating row tint */
.deal-page__specs-grid dt:nth-child(4n+1),
.deal-page__specs-grid dd:nth-child(4n+2) { background: #F9FAFB; }

/* ── Dealer ────────────────────────────────────────────────────── */

.deal-page__dealer-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 0.3rem;
  color: #111827;
}
.deal-page__dealer-rating {
  margin: 0;
  font-size: 0.875rem;
  color: #6B7280;
}
.deal-page__dealer-stars { color: #F59E0B; }

/* ── Equipment chips ───────────────────────────────────────────── */

.deal-page__chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.deal-page__chips li {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.75rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #374151;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  line-height: 1.4;
  transition: background 0.13s, border-color 0.13s, color 0.13s;
}
.deal-page__chips li:hover {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1D4ED8;
}

/* ── Depreciation bar chart ────────────────────────────────────── */

.deal-page__dep-chart {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.deal-page__dep-row {
  display: grid;
  grid-template-columns: 9rem 1fr 7.5rem 3.2rem;
  align-items: center;
  gap: 0.65rem;
}

@media (max-width: 600px) {
  .deal-page__dep-row {
    grid-template-columns: 7rem 1fr 6rem 3rem;
    gap: 0.4rem;
  }
}

.deal-page__dep-label {
  font-size: 0.82rem;
  color: #374151;
  font-weight: 500;
}

.deal-page__dep-sublabel {
  display: block;
  font-size: 0.7rem;
  color: #9CA3AF;
  font-weight: 400;
  margin-top: 0.1rem;
}

.deal-page__dep-track {
  height: 9px;
  background: #F3F4F6;
  border-radius: 99px;
  overflow: hidden;
}

.deal-page__dep-fill {
  height: 100%;
  border-radius: 99px;
  background: #4361ee;
}

.deal-page__dep-fill--yr1 {
  background: linear-gradient(90deg, #4361ee 0%, #F59E0B 100%);
}

.deal-page__dep-fill--yr3 {
  background: linear-gradient(90deg, #4361ee 0%, #EF4444 100%);
}

.deal-page__dep-amount {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #111827;
  white-space: nowrap;
}

.deal-page__dep-amount--loss { color: #B91C1C; }

.deal-page__dep-pct {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6B7280;
  text-align: right;
  white-space: nowrap;
}

.deal-page__dep-pct--base { color: #4361ee; }

.deal-page__dep-note {
  font-size: 0.78rem;
  color: #9CA3AF;
  line-height: 1.55;
  margin: 0;
  border-top: 1px solid #F3F4F6;
  padding-top: 0.85rem;
}

.deal-page__dep-note strong {
  color: #6B7280;
  font-weight: 600;
}

/* ── Description ───────────────────────────────────────────────── */

.deal-page__description-text {
  font-size: 0.875rem;
  line-height: 1.7;
  color: #6B7280;
  white-space: pre-line;
  max-height: 14rem;
  overflow: hidden;
  position: relative;
}
.deal-page__description-text::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3.5rem;
  background: linear-gradient(to bottom, transparent, #fff);
  pointer-events: none;
}

/* ── Sidebar / cost card ───────────────────────────────────────── */

.deal-page__sidebar { position: sticky; top: 1.5rem; }

.deal-page__cost-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

/* Savings header */
.deal-page__cost-savings {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  border-bottom: 1px solid #BBF7D0;
  padding: 1.25rem 1.5rem;
}
.deal-page__cost-savings-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #15803D;
  margin-bottom: 0.3rem;
}
.deal-page__cost-savings-row {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.deal-page__cost-savings-amount {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #15803D;
  line-height: 1;
}
.deal-page__cost-savings-pct {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #166534;
  background: #fff;
  border: 1px solid #BBF7D0;
  padding: 0.22rem 0.65rem;
  border-radius: 99px;
}

/* Pricing rows */
.deal-page__pricing-table {
  padding: 0.5rem 1.5rem 0.25rem;
  border-bottom: 1px solid #F3F4F6;
}
.deal-page__pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #F9FAFB;
  font-size: 0.815rem;
}
.deal-page__pricing-row:last-child { border-bottom: none; }
.deal-page__pricing-row > span:first-child {
  color: #6B7280;
  flex: 1 1 auto;
  padding-right: 0.25rem;
}
.deal-page__pricing-row > strong,
.deal-page__pricing-row > span:last-child {
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  flex-shrink: 0;
}
.deal-page__pricing-row--muted > span:last-child,
.deal-page__pricing-row--muted > strong {
  font-weight: 400;
  color: #9CA3AF;
}

/* Depreciation block */
.deal-page__depreciation-block {
  padding: 0.25rem 1.5rem;
  border-bottom: 1px solid #F3F4F6;
  border-top: 1px dashed #E5E7EB;
}
.deal-page__depreciation-block .deal-page__pricing-row { border-bottom: none; }

/* CTA buttons */
.deal-page__cost-actions {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.deal-page__cost-btn-primary {
  display: block;
  width: 100%;
  padding: 0.88rem 1rem;
  background: var(--primary-color, #FF9900);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
  transition: background 0.18s, transform 0.15s;
}
.deal-page__cost-btn-primary:hover {
  background: #CC7A00;
  transform: translateY(-1px);
  color: #fff;
}
.deal-page__cost-btn-secondary {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  color: var(--color-primary, #4361ee);
  border: 1.5px solid var(--color-primary, #4361ee);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.deal-page__cost-btn-secondary:hover {
  background: var(--color-primary, #4361ee);
  color: #fff;
}

.deal-page__cost-btn--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  background: #9CA3AF;
  border-color: #9CA3AF;
}

.deal-page__mobile-bar-btn--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #9CA3AF;
  color: #fff;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.65rem 1.1rem;
  white-space: nowrap;
}

.deal-page__availability-note {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  color: #9CA3AF;
  line-height: 1.45;
  text-align: center;
}

/* ── Bottom bridge CTAs ────────────────────────────────────────── */

.deal-page__cta-bottom {
  margin-top: 2rem;
}
