/**
 * V6 — Pagină ofertă (layout nativ + legacy V5/V4 în scope)
 */

body.theme-v6 .v6-slot--offer {
  float: none !important;
  width: 100%;
}

body.theme-v6 .v6-offer {
  padding: clamp(32px, 5vw, 56px) 0 clamp(64px, 8vw, 96px);
  background: var(--v6-canvas, #f6f7f9);
}

body.theme-v6 .v6-offer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--v6-gap-lg, 32px);
}

/* set-theme.css: `header { background: var(--header_background_color) }` — nu pe titlul ofertei */
body.theme-v6 header.v6-offer__head,
body.theme-v6 .v6-offer__head {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  min-height: 0;
  padding: 0;
  margin: 0;
}

body.theme-v6 .v6-offer__head--mobile {
  display: none;
}

body.theme-v6 .v6-offer__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 360px);
  gap: var(--v6-gap-lg, 40px);
  align-items: start;
}

body.theme-v6 .v6-offer--reverse .v6-offer__layout {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1.15fr);
}

body.theme-v6 .v6-offer--reverse .v6-offer__main {
  grid-column: 2;
  grid-row: 1;
}

body.theme-v6 .v6-offer--reverse .v6-offer__aside {
  grid-column: 1;
  grid-row: 1;
}

body.theme-v6 .v6-offer--stacked .v6-offer__layout,
body.theme-v6 .v6-offer--gallery .v6-offer__layout {
  grid-template-columns: 1fr;
  max-width: 820px;
  margin-inline: auto;
}

body.theme-v6 .v6-offer--compact .v6-offer__layout {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 28px;
}

body.theme-v6 .v6-offer--gallery .v6-offer__gallery-main img {
  aspect-ratio: 21 / 9;
  max-height: 520px;
}

body.theme-v6 .v6-offer__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--v6-gap, 24px);
}

body.theme-v6 .v6-offer__gallery-main {
  border-radius: var(--v6-radius, 12px);
  overflow: hidden;
  background: #e5e7eb;
  box-shadow: var(--v6-shadow-card);
}

body.theme-v6 .v6-offer__gallery-main img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

body.theme-v6 .v6-offer__gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

body.theme-v6 .v6-offer__thumb {
  border: 2px solid transparent;
  border-radius: var(--v6-radius-sm, 8px);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.theme-v6 .v6-offer__thumb.is-active,
body.theme-v6 .v6-offer__thumb:hover {
  border-color: var(--v6-primary);
  box-shadow: 0 0 0 1px var(--v6-primary);
}

body.theme-v6 .v6-offer__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

body.theme-v6 .v6-offer__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

body.theme-v6 .v6-offer__fact {
  padding: 14px 16px;
  background: var(--v6-surface, #fff);
  border: 1px solid var(--v6-line, #e5e7eb);
  border-radius: var(--v6-radius-sm, 8px);
}

body.theme-v6 .v6-offer__fact-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin-bottom: 4px;
}

body.theme-v6 .v6-offer__fact-value {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--v6-ink);
}

body.theme-v6 .v6-offer__section-title {
  font-family: var(--v6-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--v6-ink);
}

body.theme-v6 .v6-offer__description {
  font-size: 1rem;
  line-height: 1.7;
  color: #374151;
}

body.theme-v6 .v6-offer__description p {
  margin: 0 0 1em;
}

body.theme-v6 .v6-offer__specs {
  padding: 24px;
  background: var(--v6-surface, #fff);
  border: 1px solid var(--v6-line, #e5e7eb);
  border-radius: var(--v6-radius, 12px);
}

body.theme-v6 .v6-offer__specs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 0;
}

body.theme-v6 .v6-offer__spec-item {
  margin: 0;
}

body.theme-v6 .v6-offer__spec-item dt {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6b7280;
  margin: 0 0 4px;
}

body.theme-v6 .v6-offer__spec-item dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--v6-ink);
}

body.theme-v6 .v6-offer__aside {
  min-width: 0;
}

body.theme-v6 .v6-offer__card {
  position: sticky;
  top: calc(var(--v6-header-h, 72px) + 16px);
  padding: 24px;
  background: var(--v6-surface, #fff);
  border: 1px solid var(--v6-line, #e5e7eb);
  border-radius: var(--v6-radius, 12px);
  box-shadow: var(--v6-shadow-card);
}

body.theme-v6 .v6-offer__title {
  font-family: var(--v6-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  color: var(--v6-ink);
}

body.theme-v6 .v6-offer__loc {
  margin: 0 0 16px;
  font-size: 0.9375rem;
  color: #6b7280;
}

body.theme-v6 .v6-offer__price {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--v6-primary);
  margin-bottom: 8px;
  line-height: 1.1;
}

body.theme-v6 .v6-offer__price-note {
  margin: 0 0 20px;
  font-size: 0.875rem;
  color: #6b7280;
}

body.theme-v6 .v6-offer__aside-facts {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--v6-line, #e5e7eb);
}

body.theme-v6 .v6-offer__aside-title {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

body.theme-v6 .v6-offer__aside-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.theme-v6 .v6-offer__aside-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
  color: #4b5563;
}

body.theme-v6 .v6-offer__aside-list strong {
  color: var(--v6-ink);
  font-weight: 700;
}

body.theme-v6 .v6-offer__agent {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.theme-v6 .v6-offer__agent-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
}

body.theme-v6 .v6-offer__agent-name {
  font-size: 1.0625rem;
  color: var(--v6-ink);
}

body.theme-v6 .v6-offer__agent-line {
  margin: 0;
  font-size: 0.9375rem;
}

body.theme-v6 .v6-offer__agent-line a {
  color: var(--v6-primary);
  text-decoration: none;
}

body.theme-v6 .v6-offer__agent-line a:hover {
  text-decoration: underline;
}

body.theme-v6 .v6-offer__cta {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  text-decoration: none;
}

body.theme-v6 .v6-btn--primary.v6-offer__cta {
  background: var(--v6-primary);
  color: #fff;
  border-radius: var(--v6-radius-sm, 8px);
  padding: 12px 18px;
  font-weight: 600;
}

body.theme-v6 .v6-offer__cta-secondary {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--v6-primary);
  text-decoration: none;
}

body.theme-v6 .v6-offer__cta-secondary:hover {
  text-decoration: underline;
}

body.theme-v6 .v6-offer__share {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--v6-muted, #64748b);
  text-decoration: none;
}

body.theme-v6 .v6-offer__share:hover {
  color: var(--v6-primary);
  text-decoration: underline;
}

/* —— Legacy V5 ofertă în V6 (variante 6–10) —— */
body.theme-v6 .v6-legacy-scope--offer .v5-oferta-wrap,
body.theme-v6 .v6-legacy-scope--offer .v5-oferta-narrow,
body.theme-v6 .v6-legacy-scope--offer .container.v5-oferta-wrap {
  max-width: var(--v6-max, 1180px);
  margin-inline: auto;
  padding: clamp(32px, 5vw, 56px) var(--v6-gutter, 24px) clamp(64px, 8vw, 96px) !important;
  float: none !important;
  width: 100%;
  box-sizing: border-box;
}

body.theme-v6 .v6-legacy-scope--offer .v5-oferta-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 360px) !important;
  gap: var(--v6-gap-lg, 40px) !important;
  align-items: start !important;
}

body.theme-v6 .v6-legacy-scope--offer .v5-oferta-side {
  background: var(--v6-surface, #fff) !important;
  border: 1px solid var(--v6-line, #e5e7eb) !important;
  border-radius: var(--v6-radius, 12px) !important;
  box-shadow: var(--v6-shadow-card) !important;
  color: var(--v6-ink) !important;
  position: sticky !important;
  top: calc(var(--v6-header-h, 72px) + 16px) !important;
}

body.theme-v6 .v6-legacy-scope--offer .v5-oferta-side h1 {
  color: var(--v6-ink) !important;
  font-family: var(--v6-display) !important;
}

body.theme-v6 .v6-legacy-scope--offer .v5-oferta-pret {
  color: var(--v6-primary) !important;
}

body.theme-v6 .v6-legacy-scope--offer .v5-agent-box {
  border-top-color: var(--v6-line, #e5e7eb) !important;
}

body.theme-v6 .v6-legacy-scope--offer .v5-agent-box strong {
  color: var(--v6-ink) !important;
}

body.theme-v6 .v6-legacy-scope--offer .v5-gallery-main img,
body.theme-v6 .v6-legacy-scope--offer .v5-gallery-hero img {
  border-radius: var(--v6-radius, 12px);
  width: 100%;
  object-fit: cover;
}

body.theme-v6 .v6-legacy-scope--offer .v4-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

body.theme-v6 .v6-legacy-scope--offer .v4-fact {
  background: var(--v6-surface, #fff);
  border: 1px solid var(--v6-line, #e5e7eb);
  border-radius: var(--v6-radius-sm, 8px);
  padding: 12px 14px;
}

body.theme-v6 .v6-legacy-scope--offer .v4-fact span {
  color: #6b7280 !important;
}

body.theme-v6 .v6-legacy-scope--offer .v4-fact strong {
  color: var(--v6-ink) !important;
}

body.theme-v6 .v6-legacy-scope--offer .v4-specs-section {
  background: var(--v6-surface, #fff);
  border: 1px solid var(--v6-line, #e5e7eb);
  border-radius: var(--v6-radius, 12px);
  padding: 24px;
  margin-top: 24px;
}

body.theme-v6 .v6-legacy-scope--offer .v4-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
}

@media (max-width: 991px) {
  body.theme-v6 .v6-offer {
    padding: 20px 0 48px;
  }

  body.theme-v6 .v6-offer__inner {
    gap: 20px;
  }

  body.theme-v6 .v6-offer__head--mobile {
    display: block;
    padding: 18px 16px;
    background: var(--v6-surface, #fff) !important;
    border: 1px solid var(--v6-line, #e5e7eb);
    border-radius: var(--v6-radius, 12px);
    box-shadow: var(--v6-shadow-card, 0 1px 3px rgba(15, 23, 42, 0.06));
  }

  body.theme-v6 .v6-offer__head--mobile .v6-offer__title {
    font-size: clamp(1.25rem, 5vw, 1.55rem);
    color: var(--v6-ink) !important;
    margin-bottom: 6px;
  }

  body.theme-v6 .v6-offer__head--mobile .v6-offer__loc {
    margin-bottom: 12px;
    color: #6b7280 !important;
  }

  body.theme-v6 .v6-offer__head--mobile .v6-offer__price--mobile {
    margin-bottom: 0;
    font-size: clamp(1.35rem, 5vw, 1.65rem);
  }

  body.theme-v6 .v6-offer__title--desktop,
  body.theme-v6 .v6-offer__loc--desktop,
  body.theme-v6 .v6-offer__price:not(.v6-offer__price--mobile) {
    display: none;
  }

  body.theme-v6 .v6-offer__layout,
  body.theme-v6 .v6-offer--reverse .v6-offer__layout,
  body.theme-v6 .v6-offer--compact .v6-offer__layout {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  body.theme-v6 .v6-offer--reverse .v6-offer__main,
  body.theme-v6 .v6-offer--reverse .v6-offer__aside {
    grid-column: 1;
  }

  body.theme-v6 .v6-offer__gallery-main {
    border-radius: var(--v6-radius-sm, 10px);
  }

  body.theme-v6 .v6-offer__gallery-main img {
    aspect-ratio: 4 / 3;
    max-height: none;
  }

  /* Thumbs orizontale pe mobil — offer-gallery-mobile.css */

  body.theme-v6 .v6-offer__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body.theme-v6 .v6-offer__card {
    position: static;
    padding: 18px 16px;
  }

  body.theme-v6 .v6-offer__prose,
  body.theme-v6 .v6-offer__specs {
    padding: 18px 16px;
  }

  body.theme-v6 .v6-offer__specs-grid {
    grid-template-columns: 1fr;
  }

  body.theme-v6 .v6-legacy-scope--offer .v5-oferta-hero {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  body.theme-v6 .v6-offer__facts {
    grid-template-columns: 1fr;
  }
}
