/**
 * Navbar app — allineata a `index.html` / `search.html` (fascia parade + barra sticky).
 * Colori brand come Tailwind statico: teal #00d2ff, orange #f97316, dark #0b1120.
 */

/* Usato da `spisa-theme-head.js` (icone sole/luna) senza Tailwind */
.hidden {
  display: none !important;
}

/* Sticky sull’intero header (fascia + nav): così la chrome resta in cima al
   viewport su tutte le route SPA, inclusa la scheda prodotto; solo-nav sticky
   dentro un parent in-flow poteva far “uscire” la barra allo scroll. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ——— Fascia parade ——— */
.site-header__band {
  width: 100%;
  background: rgba(11, 17, 32, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

html.light .site-header__band,
[data-theme='light'] .site-header__band {
  background: #ffffff;
  border-bottom-color: #e2e8f0;
}

.site-header__band-inner {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .site-header__band-inner {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .site-header__band-inner {
    padding-inline: 2rem;
  }
}

.site-header__parade-track {
  overflow: hidden;
}

.site-header__parade-unit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-header__parade-title {
  font-size: 1.125rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  white-space: nowrap;
  color: #fff;
}

html.light .site-header__parade-title,
[data-theme='light'] .site-header__parade-title {
  color: #0f172a;
}

.site-header__parade-dots {
  opacity: 0.7;
  font-size: 0.75rem;
  white-space: nowrap;
  color: #94a3b8;
}

html.light .site-header__parade-dots,
[data-theme='light'] .site-header__parade-dots {
  color: #64748b;
}

.site-header__parade-cart-wrap {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.5rem;
  color: #00d2ff;
}

.site-header__parade-cart-wrap svg {
  width: 100%;
  height: 100%;
}

/* ——— Nav principale ——— */
.site-header__nav {
  position: relative;
  background: rgba(11, 17, 32, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html.light .site-header__nav,
[data-theme='light'] .site-header__nav {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: #e2e8f0;
}

.site-header__nav-inner {
  box-sizing: border-box;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}

@media (min-width: 640px) {
  .site-header__nav-inner {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 768px) {
  .site-header__nav-inner {
    min-height: 5rem;
  }
}

@media (min-width: 1024px) {
  .site-header__nav-inner {
    padding-inline: 2rem;
  }
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  border-radius: 0.5rem;
  padding: 0.125rem;
  transition: opacity 120ms ease;
}

.site-header__brand:hover {
  opacity: 0.9;
}

.site-header__brand-icon {
  flex-shrink: 0;
  font-size: 2rem;
  line-height: 1;
  color: #00d2ff;
  transition: transform 0.2s ease;
}

.site-header__brand:hover .site-header__brand-icon {
  transform: scale(1.05);
}

.site-header__brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
}

@media (min-width: 768px) {
  .site-header__brand-text {
    font-size: 1.5rem;
  }
}

html.light .site-header__brand-text,
[data-theme='light'] .site-header__brand-text {
  color: #0f172a;
}

.site-header__brand-accent {
  color: #f97316;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .site-header__actions {
    gap: 0.5rem;
  }
}

/* Slot controlli home (SPA) */
.navbar__home-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-inline-end: 0.125rem;
}

@media (min-width: 640px) {
  .navbar__home-actions {
    margin-inline-end: 0.25rem;
  }
}

/* Pill «Chi siamo» / «Vista catalogo» */
.site-header__pill {
  display: none;
  align-items: center;
  flex-shrink: 0;
  padding: 0.5rem 0.875rem;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid rgba(0, 210, 255, 0.4);
  color: #00d2ff;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

@media (min-width: 640px) {
  .site-header__pill {
    display: inline-flex;
    font-size: 0.875rem;
    padding-inline: 0.875rem;
  }
}

.site-header__pill:hover {
  background: rgba(0, 210, 255, 0.1);
}

/* Pill marketing attiva (stesso effetto di contact.html) */
.site-header__pill.site-header__pill--active,
.site-header__pill[aria-current='page'] {
  font-weight: 800;
  border-color: #00d2ff;
  background: #00d2ff;
  color: #0b1120;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.site-header__pill.site-header__pill--active:hover,
.site-header__pill[aria-current='page']:hover {
  background: #00d2ff;
  color: #0b1120;
}

html.light .site-header__pill,
[data-theme='light'] .site-header__pill {
  border-color: rgba(0, 210, 255, 0.5);
  color: #0369a1;
}

html.light .site-header__pill.site-header__pill--active,
html.light .site-header__pill[aria-current='page'],
[data-theme='light'] .site-header__pill.site-header__pill--active,
[data-theme='light'] .site-header__pill[aria-current='page'] {
  border-color: #00d2ff;
  background: #00d2ff;
  color: #0b1120;
}

html.light .site-header__pill:hover,
[data-theme='light'] .site-header__pill:hover {
  background: rgba(0, 210, 255, 0.15);
}

html.light .site-header__pill.site-header__pill--active:hover,
html.light .site-header__pill[aria-current='page']:hover,
[data-theme='light'] .site-header__pill.site-header__pill--active:hover,
[data-theme='light'] .site-header__pill[aria-current='page']:hover {
  background: #00d2ff;
  color: #0b1120;
}

.site-header__pill--chi-siamo {
  display: inline-flex;
}

.site-header__pill--contattaci {
  display: inline-flex;
}

.site-header__pill--dove-siamo {
  display: inline-flex;
}

/* Cerca: solo mobile */
.site-header__search-mob {
  display: inline-flex;
  padding: 0.625rem;
  /* Stesso teal del bottone «Chi siamo» (pill marketing) */
  color: #00d2ff;
  text-decoration: none;
  border-radius: 9999px;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

html.light .site-header__search-mob,
[data-theme='light'] .site-header__search-mob {
  color: #0369a1;
}

.site-header__search-mob:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

html.light .site-header__search-mob:hover,
[data-theme='light'] .site-header__search-mob:hover {
  color: #0f172a;
  background: rgba(226, 232, 240, 0.8);
}

.site-header__search-mob.site-header__search-mob--active {
  color: #00d2ff;
  border: 1px solid rgba(0, 210, 255, 0.55);
  background: rgba(0, 210, 255, 0.18);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.28);
}

html.light .site-header__search-mob.site-header__search-mob--active,
[data-theme='light'] .site-header__search-mob.site-header__search-mob--active {
  color: #0369a1;
  border-color: rgba(0, 210, 255, 0.5);
  background: rgba(0, 210, 255, 0.14);
}

@media (min-width: 768px) {
  .site-header__search-mob {
    display: none;
  }
}

.site-header__catalog {
  display: none;
}

@media (min-width: 768px) {
  .site-header__catalog {
    display: inline-flex;
  }
}

/* Icone rotonde carrello / tema / impostazioni / menù */
.site-header__icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem;
  /* Stesso teal del bottone «Chi siamo» (pill), non grigio — vale su tutte le viste (#settings, #compare, …) */
  color: #00d2ff;
  text-decoration: none;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  border-radius: 9999px;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

html.light .site-header__icon-btn,
[data-theme='light'] .site-header__icon-btn {
  color: #0369a1;
}

.site-header__icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

html.light .site-header__icon-btn:hover,
[data-theme='light'] .site-header__icon-btn:hover {
  color: #0f172a;
  background: rgba(226, 232, 240, 0.8);
}

.site-header__icon-btn i {
  font-size: 1.125rem;
  line-height: 1;
}

.site-header__cart.site-header__icon-btn i {
  transition: transform 0.2s ease;
}

.site-header__cart:hover i {
  transform: scale(1.1);
}

.site-header__settings {
  display: inline-flex;
}

.site-header__app-menu {
  display: inline-flex;
}

@media (min-width: 640px) {
  .site-header__app-menu {
    display: none;
  }
}

.site-header__app-menu i {
  font-size: 1.25rem;
}

/* Badge carrello (come home statica) */
.home-nav-cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 4px;
  border-radius: 9999px;
  background: #f97316;
  color: #0b1120;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.125rem;
  text-align: center;
  transform: translate(30%, -20%);
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.home-nav-cart-badge[hidden] {
  display: none !important;
}

.site-header__cart.active,
.site-header__cart[aria-current='page'] {
  color: #00d2ff;
  background: rgba(0, 210, 255, 0.15);
}

.site-header__settings.active,
.site-header__settings[aria-current='page'] {
  color: #00d2ff;
  background: rgba(0, 210, 255, 0.15);
}
