/**
 * Vanzy Premium UI — marketplace transformation overlays
 * Loaded after marketplace.css on production + marketplace pages.
 */

/* ── Premium hero (Big Ben / corridor feel) ── */
.prod-hero-search {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 40px);
  border-bottom: none;
  background: linear-gradient(135deg, var(--vz-navy-deep) 0%, var(--vz-navy) 42%, #1a5f8a 100%);
}

.prod-hero-search__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.prod-hero-search__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.35;
}

.prod-hero-search__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    105deg,
    rgba(18, 48, 92, 0.92) 0%,
    rgba(21, 53, 102, 0.78) 45%,
    rgba(30, 74, 140, 0.55) 100%
  );
}

.prod-hero-search > .prod-wrap {
  position: relative;
  z-index: 2;
}

.prod-hero-search__title {
  color: #fff;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 18ch;
  margin-bottom: 12px;
}

.prod-hero-search__title em,
.prod-hero-search__title .hero-accent {
  font-style: normal;
  color: #7ee8ec;
}

.prod-hero-search__sub {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.95rem, 2.5vw, 1.12rem);
  max-width: 48ch;
  margin-bottom: 20px;
  line-height: 1.5;
}

.prod-hero-search__form {
  background: #fff;
  border-radius: var(--vz-radius-lg);
  padding: 8px;
  box-shadow: var(--vz-shadow-lg);
  max-width: 720px;
  gap: 8px;
}

.prod-hero-search__form input[type='search'] {
  border: none;
  box-shadow: none;
  background: transparent;
  font-size: 1rem;
  min-height: 48px;
}

.prod-hero-search__form select {
  border: 1px solid var(--mp-border);
  border-radius: var(--vz-radius-sm);
  min-height: 48px;
}

.prod-hero-search__form .btn-primary {
  background: var(--vz-navy) !important;
  border-radius: var(--vz-radius-sm);
  min-height: 48px;
  padding-inline: 28px;
  box-shadow: var(--vz-shadow-hero);
}

.prod-hero-search__form .btn-primary:hover {
  background: var(--vz-navy-deep) !important;
}

.prod-hero-actions {
  margin-top: 16px;
  max-width: 720px;
}

.prod-hero-actions .btn-hero-primary {
  background: var(--vz-teal) !important;
  box-shadow: 0 6px 24px rgba(13, 115, 119, 0.35);
}

.prod-hero-actions .btn-hero-secondary {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
  color: #fff !important;
  backdrop-filter: blur(8px);
}

.prod-hero-actions .btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: #fff !important;
  color: #fff !important;
}

/* Category cards — premium with hints */
.prod-quick-nav {
  margin-top: var(--vz-space-lg);
  gap: 12px;
}

.prod-quick-nav__card {
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--vz-radius-lg);
  box-shadow: var(--vz-shadow);
  min-height: 96px;
  padding: 16px 12px;
}

.prod-hero-search .prod-quick-nav__card {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(255, 255, 255, 0.3);
}

.prod-quick-nav__card:hover {
  transform: translateY(-2px);
  box-shadow: var(--vz-shadow-lg);
  border-color: var(--vz-teal);
}

.prod-quick-nav__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--mp-accent-soft);
  font-size: 1.25rem;
}

.prod-quick-nav__card strong {
  font-size: 0.84rem;
  color: var(--vz-ink);
}

.prod-quick-nav__hint {
  font-size: 0.72rem;
  color: var(--vz-muted);
  line-height: 1.3;
}

/* ── Anunțuri recente — horizontal scroll ── */
.prod-recent-listings {
  padding: var(--vz-space-2xl) 0;
  background: var(--vz-paper);
}

.prod-recent-listings__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.prod-recent-listings__head h2 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--vz-ink);
}

.prod-recent-listings__head p {
  margin: 4px 0 0;
  color: var(--vz-muted);
  font-size: 0.92rem;
}

.prod-recent-listings__scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.prod-recent-listings__scroll::-webkit-scrollbar {
  height: 6px;
}

.prod-recent-listings__scroll::-webkit-scrollbar-thumb {
  background: var(--mp-border-strong);
  border-radius: 999px;
}

.prod-recent-listings__grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .prod-recent-listings__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ── Horizontal listing card (Airbnb / booking style) ── */
.listing-card-h {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: var(--vz-radius-lg);
  padding: 12px;
  box-shadow: var(--vz-shadow-sm);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  scroll-snap-align: start;
  flex: 0 0 min(100%, 680px);
  min-width: 0;
}

@media (max-width: 640px) {
  .listing-card-h {
    grid-template-columns: 110px 1fr;
    grid-template-rows: auto auto;
  }

  .listing-card-h__aside {
    grid-column: 1 / -1;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--mp-border);
  }
}

.listing-card-h:hover {
  box-shadow: var(--vz-shadow);
  border-color: var(--mp-border-strong);
  transform: translateY(-1px);
}

.listing-card-h--demo {
  border-color: rgba(13, 115, 119, 0.25);
  background: linear-gradient(180deg, #f8fcfd 0%, #fff 100%);
}

.listing-card-h__media {
  position: relative;
  display: block;
  border-radius: var(--vz-radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--vz-surface);
  text-decoration: none;
}

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

.listing-card-h__media .listing-badge--demo {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  background: var(--vz-teal);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-radius: 4px;
  z-index: 2;
}

.listing-card-h__type {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--vz-ink-soft);
}

.listing-card-h__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.listing-card-h__route {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--vz-ink);
  line-height: 1.25;
}

.listing-card-h__route a {
  color: inherit;
  text-decoration: none;
}

.listing-card-h__route a:hover {
  color: var(--vz-navy);
}

.listing-card-h__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--vz-muted);
}

.listing-card-h__meta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.listing-card-h__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.listing-card-h__tags span {
  padding: 3px 8px;
  background: var(--vz-surface);
  border: 1px solid var(--mp-border);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--vz-ink-soft);
}

.listing-card-h__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
  text-align: right;
  padding-left: 8px;
}

.listing-card-h__price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--vz-navy);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.listing-card-h__carrier {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 0.78rem;
}

.listing-card-h__carrier-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: var(--vz-ink-soft);
  text-decoration: none;
}

.listing-card-h__carrier-name:hover {
  color: var(--vz-navy);
}

.listing-card-h__rating {
  color: var(--mp-gold);
  font-weight: 700;
}

.listing-card-h__verified {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--vz-teal);
  font-weight: 700;
  font-size: 0.72rem;
}

/* Grid listing cards — enhanced vertical */
body.page-marketplace .listing-card,
body.page-production .listing-card {
  border-radius: var(--vz-radius-lg);
  box-shadow: var(--vz-shadow-sm);
}

body.page-marketplace .listing-media {
  height: 180px;
}

body.page-marketplace .listing-price {
  background: var(--vz-navy);
  font-size: 1rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: var(--vz-radius-sm);
}

body.page-marketplace .listing-badge--demo {
  background: var(--vz-teal);
  top: 10px;
  left: 10px;
  bottom: auto;
}

body.page-marketplace .listing-body h3 {
  font-size: 1.05rem;
  font-weight: 800;
}

body.page-marketplace .btn-primary {
  background: var(--vz-navy) !important;
}

body.page-marketplace .btn-primary:hover,
body.page-production .btn-primary:hover {
  background: var(--vz-navy-deep) !important;
}

/* ── De ce Vanzy + carrier CTA ── */
.prod-adv-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .prod-adv-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.prod-adv-grid article {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: var(--vz-radius-lg);
  box-shadow: var(--vz-shadow-sm);
}

.prod-adv-grid article::before {
  content: '✓';
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mp-accent-soft);
  color: var(--vz-navy);
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.85rem;
}

.prod-adv-grid strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--vz-ink);
}

.prod-adv-grid p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--vz-muted);
  line-height: 1.45;
}

.prod-carrier-cta {
  background: linear-gradient(135deg, rgba(30, 74, 140, 0.08) 0%, rgba(13, 115, 119, 0.1) 100%);
  border: 1px solid rgba(30, 74, 140, 0.15);
  border-radius: var(--vz-radius-lg);
  padding: 28px 24px;
  text-align: center;
  margin-top: var(--vz-space-xl);
}

.prod-carrier-cta h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--vz-ink);
}

.prod-carrier-cta p {
  margin: 0 0 16px;
  color: var(--vz-muted);
  max-width: 42ch;
  margin-inline: auto;
}

/* ── How it works — horizontal steps ── */
.prod-steps {
  display: grid;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  counter-reset: step;
}

@media (min-width: 720px) {
  .prod-steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
}

.prod-steps li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 16px;
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: var(--vz-radius-lg);
  box-shadow: var(--vz-shadow-sm);
  text-align: center;
}

.prod-steps__n {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vz-navy);
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.95rem;
}

.prod-steps li strong {
  font-size: 0.92rem;
  color: var(--vz-ink);
}

.prod-steps li p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--vz-muted);
  line-height: 1.45;
}

/* ── Directory cards — business style ── */
.dir-card {
  border-radius: var(--vz-radius-lg);
  box-shadow: var(--vz-shadow-sm);
  display: flex;
  flex-direction: column;
}

.dir-card__link {
  flex: 1;
}

.dir-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--vz-radius);
}

.dir-card__footer {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
  margin-top: auto;
}

.dir-card__cta {
  flex: 1;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: var(--vz-radius-sm);
  text-decoration: none;
}

.dir-card__cta--ghost {
  background: #fff !important;
  border: 1px solid var(--mp-border-strong) !important;
  color: var(--vz-ink-soft) !important;
}

.dir-card__rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--mp-gold);
  font-weight: 700;
}

/* ── Public profile premium ── */
.pp-cover {
  height: 200px;
  border-radius: 0 0 var(--vz-radius-lg) var(--vz-radius-lg);
  overflow: hidden;
  margin-bottom: -48px;
}

@media (min-width: 720px) {
  .pp-cover {
    height: 260px;
    margin-bottom: -56px;
  }
}

.pp-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pp-hero {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px 0;
  flex-wrap: wrap;
}

.pp-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: var(--vz-shadow);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--vz-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--vz-navy);
  margin-top: 48px;
}

.pp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pp-hero__main h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 48px 0 8px;
}

.pp-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 12px 0;
}

.pp-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pp-stat strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--vz-navy);
}

.pp-stat span {
  font-size: 0.78rem;
  color: var(--vz-muted);
  font-weight: 600;
}

.pp-listing {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: var(--vz-radius-lg);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s;
}

.pp-listing:hover {
  box-shadow: var(--vz-shadow);
}

.pp-listing img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--vz-radius-sm);
}

.pp-listings {
  display: grid;
  gap: 12px;
}

.pp-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0;
}

@media (min-width: 640px) {
  .pp-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pp-stats > div {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: var(--vz-radius-lg);
  text-align: center;
  box-shadow: var(--vz-shadow-sm);
}

.pp-stats > div strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--vz-navy);
  margin-bottom: 4px;
}

.pp-stats > div span {
  font-size: 0.78rem;
  color: var(--vz-muted);
  font-weight: 600;
}

/* ── Publish wizard ── */
.pub-wizard-steps {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: var(--vz-radius-lg);
  overflow: hidden;
}

.pub-wizard-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--vz-muted);
  border-right: 1px solid var(--mp-border);
  position: relative;
}

.pub-wizard-step:last-child {
  border-right: none;
}

.pub-wizard-step__n {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--vz-surface);
  border: 2px solid var(--mp-border);
  font-weight: 800;
  font-size: 0.82rem;
}

.pub-wizard-step.is-active {
  color: var(--vz-navy);
  background: var(--mp-accent-soft);
}

.pub-wizard-step.is-active .pub-wizard-step__n {
  background: var(--vz-navy);
  border-color: var(--vz-navy);
  color: #fff;
}

.pub-wizard-step.is-done {
  color: var(--vz-teal);
}

.pub-wizard-step.is-done .pub-wizard-step__n {
  background: var(--vz-teal);
  border-color: var(--vz-teal);
  color: #fff;
}

.pub-form-step[hidden] {
  display: none !important;
}

.pub-wizard-nav {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.pub-wizard-nav .btn {
  min-height: 48px;
  flex: 1;
  font-weight: 700;
  border-radius: var(--vz-radius);
}

/* ── Header publish CTA ── */
body.page-production .header-cta .btn-header-publish,
body.page-marketplace .header-cta .btn-header-publish {
  background: var(--vz-navy) !important;
  border-radius: var(--vz-radius-sm);
  box-shadow: var(--vz-shadow-hero);
  gap: 6px;
}

body.page-production .nav-desktop a.active,
body.page-production .nav-desktop a:hover {
  color: var(--vz-navy) !important;
  background: var(--mp-accent-soft) !important;
}

/* ── Mobile bottom nav ── */
@media (max-width: 1199px) {
  body.page-production,
  body.page-marketplace {
    padding-bottom: calc(var(--vz-bottom-nav) + 16px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.page-production .app-bottom-nav,
  body.page-marketplace .app-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: calc(var(--vz-bottom-nav) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--mp-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -4px 24px rgba(18, 32, 46, 0.08);
  }

  .app-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--vz-muted);
    text-decoration: none;
    min-height: 48px;
    transition: color 0.15s;
  }

  .app-bottom-nav a svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .app-bottom-nav a.active {
    color: var(--vz-navy);
  }

  .app-bottom-nav a.is-publish {
    color: var(--vz-teal);
  }

  .app-bottom-nav a.is-publish svg {
    background: var(--vz-teal);
    color: #fff;
    border-radius: 50%;
    padding: 6px;
    width: 32px;
    height: 32px;
    box-shadow: 0 4px 12px rgba(13, 115, 119, 0.35);
  }

  .app-bottom-nav a.is-publish.active {
    color: var(--vz-teal-deep);
  }
}

@media (min-width: 1200px) {
  body.page-production .app-bottom-nav,
  body.page-marketplace .app-bottom-nav {
    display: none !important;
  }
}

/* ── Route planner — map dominant ── */
body.page-route-planner .route-planner__map-col {
  min-height: min(70vh, 640px);
}

body.page-route-planner .route-planner__map-slot,
body.page-route-planner .vanzy-map-shell__frame {
  min-height: min(65vh, 580px);
  flex: 1;
}

@media (max-width: 959px) {
  body.page-route-planner .route-planner__map-col {
    order: -1;
    min-height: 320px;
  }

  body.page-route-planner .route-planner__map-slot {
    min-height: 300px;
  }
}

body.page-route-planner .route-planner__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px;
  background: var(--vz-surface);
  border-radius: var(--vz-radius);
  margin-top: 12px;
}

body.page-route-planner .route-planner__summary-item strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--vz-navy);
}

body.page-route-planner .route-planner__summary-item span {
  font-size: 0.78rem;
  color: var(--vz-muted);
  font-weight: 600;
}
