/* Home — hero compatto, sfondo statico (tema), statistiche a rotazione + carrello */

.home-hero.home-hero--premium {
  --hero-logo-blue: #003366;
  --hero-logo-blue-mid: #004a8d;
  --hero-logo-orange: #f2700b;
  --hero-logo-orange-hot: #ff9330;

  position: relative;
  overflow: hidden;
  margin-inline: calc(-1 * var(--space-4));
  padding-block: clamp(8px, 1.5vw, 14px);
  padding-inline: var(--space-4);
  border-block-end: 1px solid var(--color-divider);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--color-primary) 5%, var(--color-bg)) 0%,
    var(--color-bg) 100%
  );
}

@media (min-width: 768px) {
  .home-hero.home-hero--premium {
    margin-inline: calc(-1 * var(--space-6));
    padding-inline: var(--space-6);
  }
}

.home-hero--premium .home-hero__shell {
  position: relative;
  z-index: 1;
  max-width: var(--content-wide);
  margin-inline: auto;
}

/* Carrello decorativo in cima: attraversa tutta la fascia hero e si riempie (loop) */
.home-hero--premium .home-hero__parade {
  position: relative;
  z-index: 1;
  width: calc(100% + 2 * var(--space-4));
  max-width: none;
  margin-inline: calc(-1 * var(--space-4));
  margin-block-end: var(--space-2);
}

@media (min-width: 768px) {
  .home-hero--premium .home-hero__parade {
    width: calc(100% + 2 * var(--space-6));
    margin-inline: calc(-1 * var(--space-6));
  }
}

.home-hero--premium .home-hero__parade-track {
  container-type: inline-size;
  container-name: parade-track;
  position: relative;
  width: 100%;
  min-height: 54px;
  height: auto;
  padding-block: 3px;
  border-block-end: 1px solid color-mix(in srgb, var(--color-divider) 85%, transparent);
}

/* Logo (trainato) + guinzaglio + carrello: si muovono insieme */
.home-hero--premium .home-hero__parade-unit {
  position: absolute;
  inset-block-start: 1px;
  inset-inline-start: 0;
  width: max-content;
  max-width: 100%;
  animation: home-hero-parade-unit-move var(--home-hero-parade-dur, 10s) linear infinite;
  will-change: transform;
}

.home-hero--premium .home-hero__parade-chain {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.2rem;
}

.home-hero--premium .home-hero__parade-logo {
  display: block;
  height: clamp(2.45rem, 6.5vw, 3.05rem);
  width: auto;
  max-width: 11.5rem;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px color-mix(in srgb, var(--color-text) 12%, transparent));
  pointer-events: none;
  user-select: none;
}

.home-hero--premium .home-hero__parade-leash {
  flex: 0 0 0.65rem;
  align-self: center;
  height: 0;
  margin-block: 0;
  border-block-start: 2px dashed color-mix(in srgb, var(--color-text-muted) 70%, transparent);
  opacity: 0.85;
  pointer-events: none;
}

.home-hero--premium .home-hero__parade-cart {
  flex-shrink: 0;
  width: 3.05rem;
  height: 2.85rem;
  color: color-mix(in srgb, var(--color-text-muted) 75%, var(--color-text));
}

.home-hero--premium .home-hero__parade-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Oggetti che “cadono” nel cestino (scaglionati: pieno a destra = fine ciclo) */
.home-hero--premium .home-hero__parade-chip {
  transform-box: fill-box;
  shape-rendering: geometricPrecision;
  animation: home-hero-parade-chip-drop var(--home-hero-parade-dur, 10s) linear infinite;
  will-change: transform, opacity;
}

@keyframes home-hero-parade-chip-drop {
  0% {
    opacity: 0;
    transform: translate(
      calc(var(--parade-ux) * 1px),
      calc(var(--parade-uy) * 1px - var(--parade-fall) * 1px)
    );
  }

  8% {
    opacity: 1;
    transform: translate(calc(var(--parade-ux) * 1px), calc(var(--parade-uy) * 1px));
  }

  100% {
    opacity: 1;
    transform: translate(calc(var(--parade-ux) * 1px), calc(var(--parade-uy) * 1px));
  }
}

@keyframes home-hero-parade-unit-move {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(100cqw - 100%));
  }
}

/* Due colonne su desktop: marchio + ricerca | statistiche */
.home-hero--premium .home-hero__layout {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}

@media (min-width: 768px) {
  .home-hero--premium .home-hero__layout {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: var(--space-5);
    align-items: center;
    justify-items: stretch;
  }
}

.home-hero--premium .home-hero__copy {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.28rem, 0.9vw, 0.45rem);
}

@media (min-width: 768px) {
  .home-hero--premium .home-hero__copy {
    text-align: start;
    align-items: flex-start;
  }
}

.home-hero--premium .home-hero__metrics-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 768px) {
  .home-hero--premium .home-hero__metrics-wrap {
    place-self: center;
    justify-content: center;
    width: 100%;
    max-width: min(340px, 100%);
  }
}

/* Logo più grande */
.home-hero--premium .home-hero__logo-wrap {
  display: flex;
  justify-content: center;
  margin-block-end: 0;
}

@media (min-width: 768px) {
  .home-hero--premium .home-hero__logo-wrap {
    justify-content: flex-start;
  }
}

.home-hero--premium .home-hero__logo {
  display: block;
  width: clamp(176px, 46vw, 336px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  background: none;
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 4px 14px color-mix(in srgb, var(--color-text) 12%, transparent));
}

.home-hero--premium .home-hero__eyebrow {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.home-hero--premium .home-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.home-hero--premium .home-hero__title-accent {
  display: inline;
  background: linear-gradient(
    100deg,
    var(--hero-logo-blue) 0%,
    var(--hero-logo-blue-mid) 18%,
    var(--hero-logo-orange) 38%,
    var(--hero-logo-orange-hot) 52%,
    var(--hero-logo-blue-mid) 68%,
    var(--hero-logo-orange) 82%,
    var(--hero-logo-blue) 100%
  );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  .home-hero--premium .home-hero__title-accent {
    animation: home-hero-logo-sheen 12s ease-in-out infinite;
  }
}

@keyframes home-hero-logo-sheen {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.home-hero--premium .home-hero__subtitle {
  margin: 0;
  max-width: 36rem;
  margin-inline: auto;
  font-size: clamp(0.78rem, 1.4vw, 0.9rem);
  line-height: 1.4;
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .home-hero--premium .home-hero__subtitle {
    margin-inline: 0;
  }
}

.home-hero--premium .home-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  justify-content: center;
  margin-top: 0.12rem;
}

@media (min-width: 768px) {
  .home-hero--premium .home-hero__chips {
    justify-content: flex-start;
  }
}

.home-hero--premium .home-hero__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.42rem;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}

.home-hero--premium .home-hero__metrics {
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
  padding: var(--space-3);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xs);
  text-align: center;
}

.home-hero--premium .home-hero__metrics-head {
  margin-block-end: var(--space-2);
  padding-block-end: var(--space-2);
  border-bottom: 1px solid var(--color-divider);
  text-align: center;
}

.home-hero--premium .home-hero__metrics-kicker {
  margin: 0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.home-hero--premium .home-hero__metrics-title {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

/* Ticker: carrello + testo che scorre da destra → sinistra */
.home-hero--premium .home-hero__ticker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 4.25rem;
}

.home-hero--premium .home-hero__ticker-cart {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  color: var(--color-primary);
  transition: transform 0.45s cubic-bezier(0.34, 1.25, 0.64, 1);
}

.home-hero--premium .home-hero__ticker-cart--push {
  transform: translateX(8px);
}

.home-hero--premium .home-hero__ticker-cart-svg {
  width: 1.45rem;
  height: 1.45rem;
}

.home-hero--premium .home-hero__ticker-track {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.home-hero--premium .home-hero__ticker-slide {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
  align-items: center;
  text-align: center;
  will-change: transform, opacity;
  transition:
    transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.42s ease;
}

.home-hero--premium .home-hero__ticker-slide--jump {
  transition: none !important;
}

.home-hero--premium .home-hero__ticker-slide--out {
  transform: translate3d(-20px, 0, 0);
  opacity: 0;
}

.home-hero--premium .home-hero__ticker-slide--from-right {
  transform: translate3d(28px, 0, 0);
  opacity: 0;
}

.home-hero--premium .home-hero__ticker-value {
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 3.2vw, 1.72rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  line-height: 1.05;
}

.home-hero--premium .home-hero__ticker-label {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.38;
  color: var(--color-text-muted);
}

.home-hero--premium .home-hero__metric-note {
  margin: var(--space-2) 0 0;
  font-size: 0.58rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

/* Ricerca + link */
.home-hero--premium .home-hero__search-block {
  margin-top: 0.2rem;
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
}

.home-hero--premium .home-hero__search-block--compact {
  margin-top: 0;
}

@media (min-width: 768px) {
  .home-hero--premium .home-hero__search-block--compact {
    margin-top: -0.15rem;
  }
}

@media (min-width: 768px) {
  .home-hero--premium .home-hero__search-block {
    margin-inline: 0;
  }
}

.home-hero--premium .home-hero__search-slot {
  width: 100%;
}

.home-hero--premium .home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  justify-content: center;
  margin-top: 0.15rem;
}

@media (min-width: 768px) {
  .home-hero--premium .home-hero__actions {
    justify-content: flex-start;
  }
}

.home-hero--premium .home-hero__link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
  transition: opacity var(--transition-interactive);
}

.home-hero--premium .home-hero__link:hover {
  opacity: 0.85;
}

.home-hero--premium .home-hero__disclaimer {
  margin: var(--space-3) 0 0;
  max-width: 46rem;
  margin-inline: auto;
  padding-inline: var(--space-2);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.55;
  text-align: center;
  color: var(--color-text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .home-hero--premium .home-hero__ticker-cart {
    transition: none;
  }

  .home-hero--premium .home-hero__ticker-slide {
    transition: none;
  }

  .home-hero--premium .home-hero__title-accent {
    animation: none;
    background-position: 0 50%;
  }

  .home-hero--premium .home-hero__parade-unit,
  .home-hero--premium .home-hero__parade-chip {
    animation: none !important;
  }

  .home-hero--premium .home-hero__parade-unit {
    inset-inline-start: 50%;
    transform: translateX(-50%);
  }

  .home-hero--premium .home-hero__parade-chip {
    opacity: 1 !important;
    transform: translate(calc(var(--parade-ux) * 1px), calc(var(--parade-uy) * 1px)) !important;
  }
}

/* SearchBar hero */
@import url('./search-action-button.css');

.search-bar--hero {
  width: 100%;
  flex: 1 1 auto;
}

.search-bar--hero .search-bar__form {
  margin: 0;
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 0;
  border: none;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 24px color-mix(in srgb, var(--color-text) 14%, transparent);
  transition: box-shadow var(--transition-interactive);
}

.search-bar--hero .search-bar__form:focus-within {
  box-shadow: 0 0 0 3px var(--color-primary-subtle), 0 10px 28px color-mix(in srgb, var(--color-text) 18%, transparent);
}

.search-bar--hero .search-bar__input {
  min-block-size: 36px;
  height: 36px;
  padding-block: 0;
  padding-inline: var(--space-3);
  font-size: 0.88rem;
  font-weight: 400;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #111827;
}

.search-bar--hero .search-bar__input::placeholder {
  color: #6b7280;
}

.search-bar--hero .search-bar__input:focus-visible {
  outline: none;
  box-shadow: none;
}

.search-bar__hero-submit {
  inline-size: auto;
  min-inline-size: 2.75rem;
  padding-inline: 0.85rem;
  flex-shrink: 0;
  border: none;
  border-inline-start: none;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-interactive);
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 0;
}

.search-bar--hero .search-bar__form {
  padding-right: 0.15rem;
}

.search-bar--hero .search-bar__hero-submit.search-action-btn--has-query {
  min-inline-size: 4rem;
}

.search-bar--hero .search-bar__hero-submit:not(.search-action-btn--has-query) {
  min-inline-size: 8.5rem;
  max-inline-size: 10rem;
}

.search-bar__hero-submit:hover {
  background: var(--color-primary-hover);
}
