/* ============================================================
   GALLERIANGELINI — Stili Home (index.html)
   ============================================================ */

/* ============================================================
   STRISCIA ANNIVERSARIO 90 ANNI (subito sotto hero)
   ============================================================ */

.anniversary-strip {
  background-color: var(--color-wood);
  padding: var(--space-4) var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.anniversary-strip__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background-color: var(--color-brass);
  color: var(--color-white);
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  font-weight: 700;
  padding: var(--space-1) var(--space-4);
  letter-spacing: 0.06em;
  border-radius: 100px;
}

.anniversary-strip__text {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-style: italic;
  color: rgba(247,243,236,0.80);
  letter-spacing: 0.02em;
}

.anniversary-strip__diamond {
  width: 6px;
  height: 6px;
  background-color: var(--color-brass);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ============================================================
   HERO SLIDESHOW
   ============================================================ */

.hero {
  position: relative;
  height: calc(100svh - var(--header-height));
  min-height: 560px;
  max-height: 900px;
  overflow: hidden;
}

.hero-slider {
  width: 100%;
  height: 100%;
}

/* Ogni slide */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero-slide.active {
  opacity: 1;
}

.hero-slide__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Overlay scuro per leggibilità testo.
   L'ultimo stop resta leggermente scuro (invece di trasparente) così anche
   il lato destro della foto ha un minimo di velo uniforme: serve da sfondo
   per il watermark "ANGELINI" (.hero-watermark), che altrimenti sparirebbe
   contro le zone chiare/dettagliate della foto (rame, ottone, lampadari). */
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(44, 26, 14, 0.70) 0%,
    rgba(44, 26, 14, 0.30) 60%,
    rgba(44, 26, 14, 0.18) 100%
  );
}

/* Sovraimpressione "ANGELINI" (watermark dell'insegna reale, effetto luxury)
   Usa l'immagine con sfondo trasparente come maschera CSS: la forma delle
   lettere viene riempita con --color-brass a bassa opacità, così il colore
   resta coerente con la palette anche se cambiano le variabili del tema.
   z-index 5: sopra la foto/overlay scuro (.hero-slide), sotto il testo
   leggibile (.hero-content, z-index 10) — non deve mai ostacolare la lettura. */
.hero-watermark {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.hero-watermark::before {
  content: '';
  width: min(62%, 920px);
  aspect-ratio: 547 / 135; /* proporzioni reali dell'insegna ritagliata */
  background-color: var(--color-brass);
  opacity: 0.2;
  -webkit-mask-image: url('../img/logo-angelini.png');
  mask-image: url('../img/logo-angelini.png');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Contenuto hero */
.hero-content {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
}
.hero-content .container {
  padding-top: var(--space-8);
}

.hero-eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-brass);
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 2px;
  background-color: var(--color-brass);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--color-cream);
  line-height: 1.1;
  max-width: 14ch;
  margin-bottom: var(--space-6);
}
.hero-title em {
  font-style: italic;
  color: rgba(247, 243, 236, 0.85);
}

.hero-subtitle {
  font-size: var(--text-md);
  color: rgba(247, 243, 236, 0.80);
  max-width: 45ch;
  line-height: var(--leading-loose);
  margin-bottom: var(--space-10);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.hero-cta .btn--secondary {
  border-color: rgba(247, 243, 236, 0.5);
  color: var(--color-cream);
}
.hero-cta .btn--secondary:hover {
  background-color: rgba(247, 243, 236, 0.15);
  border-color: var(--color-cream);
}

/* Controlli slideshow */
.hero-controls {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(247, 243, 236, 0.40);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
}
.hero-dot.active {
  background-color: var(--color-brass);
  width: 24px;
  border-radius: 4px;
}

/* Frecce prev/next */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(247, 243, 236, 0.15);
  border: 1px solid rgba(247, 243, 236, 0.30);
  color: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-base);
  backdrop-filter: blur(4px);
}
.hero-arrow:hover {
  background-color: rgba(247, 243, 236, 0.30);
}
.hero-arrow--prev { left: var(--space-6); }
.hero-arrow--next { right: var(--space-6); }
.hero-arrow svg { width: 20px; height: 20px; }

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: var(--space-8);
  right: var(--container-pad);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: rgba(247, 243, 236, 0.55);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hero-scroll::after {
  content: '';
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(247,243,236,0.5), transparent);
}

/* ============================================================
   SEZIONE STATS / NUMERI
   ============================================================ */

.stats-band {
  background-color: var(--color-wood);
  padding-block: var(--space-12);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  text-align: center;
}
.stat-item__number {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--color-brass);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.stat-item__label {
  font-size: var(--text-sm);
  color: rgba(247, 243, 236, 0.65);
  letter-spacing: 0.05em;
}

/* ============================================================
   SEZIONE PRESENTAZIONE AZIENDA (home)
   ============================================================ */

.about-home {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}
.about-home__image {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.about-home__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Badge anno fondazione sovrapposto */
.about-home__badge {
  position: absolute;
  bottom: var(--space-6);
  right: calc(-1 * var(--space-6));
  background-color: var(--color-brass);
  color: var(--color-white);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.about-home__badge strong {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1;
}
.about-home__badge span {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-home__text {
  padding-block: var(--space-8);
}
.about-home__text h2 {
  text-align: left;
  margin-bottom: var(--space-6);
}
.about-home__text h2::after {
  margin-inline: 0;
}
.about-home__text p {
  margin-bottom: var(--space-5);
}

/* Mini-statistiche integrate nella sezione about */
.about-home__stats {
  display: flex;
  gap: var(--space-8);
  margin: var(--space-8) 0 var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-cream-dark, #D4C9B8);
}

.stat-mini {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stat-mini__num {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--color-brass);
  line-height: 1;
}

.stat-mini__label {
  font-size: var(--text-xs);
  color: var(--color-gray-mid);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ============================================================
   SEZIONE CATEGORIE
   ============================================================ */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.category-card {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
}

/* SOSTITUIRE: foto di categoria */
.category-card__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.category-card:hover .category-card__bg {
  transform: scale(1.06);
}

.category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(44,26,14,0.85) 0%, rgba(44,26,14,0.1) 55%);
  transition: background var(--transition-base);
}
.category-card:hover .category-card__overlay {
  background: linear-gradient(to top, rgba(44,26,14,0.90) 0%, rgba(44,26,14,0.25) 55%);
}

.category-card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-6);
  color: var(--color-cream);
}
.category-card__name {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-1);
  line-height: 1.2;
}
.category-card__count {
  font-size: var(--text-xs);
  opacity: 0.7;
  letter-spacing: 0.05em;
}
.category-card__arrow {
  position: absolute;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-brass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transform: translateX(8px);
  opacity: 0;
  transition: all var(--transition-base);
}
.category-card:hover .category-card__arrow {
  transform: translateX(0);
  opacity: 1;
}

/* Placeholder colori per categorie (da rimuovere) */
.cat-bg-1 { background-color: #5C3D20; }
.cat-bg-2 { background-color: #7A5030; }
.cat-bg-3 { background-color: #4A3520; }
.cat-bg-4 { background-color: #6B4828; }
.cat-bg-5 { background-color: #3A2C1E; }
.cat-bg-6 { background-color: #8A6030; }
.cat-bg-7 { background-color: #4E3A28; }
.cat-bg-8 { background-color: #5A4030; }

/* ============================================================
   SEZIONE PRODOTTI IN EVIDENZA
   ============================================================ */

/* Contenitore del carosello: posiziona le frecce prev/next ai lati */
.featured-carousel {
  position: relative;
}

/* Griglia → riga scorrevole orizzontalmente. Ogni card ha una larghezza
   fissa (vedi .featured-grid .product-card sotto) così tutte le card
   restano leggibili indipendentemente da quante sono in totale. */
.featured-grid {
  display: flex;
  gap: var(--space-8);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Momentum scroll nativo su iOS: lo swipe resta fluido invece di
     fermarsi di scatto quando si solleva il dito. */
  -webkit-overflow-scrolling: touch;
  padding-block: var(--space-2); /* spazio per l'ombra al hover delle card */
  /* Nasconde la scrollbar di sistema: la navigazione avviene con le
     frecce (desktop) o lo swipe (touch), non serve mostrarla. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.featured-grid::-webkit-scrollbar {
  display: none;
}
.featured-grid .product-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
}

/* Frecce prev/next del carosello */
.featured-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-white);
  color: var(--color-wood);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-fast), opacity var(--transition-fast);
}
.featured-carousel__nav:hover {
  background-color: var(--color-brass);
  color: var(--color-white);
}
.featured-carousel__nav--prev { left: -22px; }
.featured-carousel__nav--next { right: -22px; }
/* Aggiunta da JS quando non c'è più nulla da scorrere in quella direzione */
.featured-carousel__nav.is-disabled {
  opacity: 0;
  pointer-events: none;
}
/* Su mobile/tablet la navigazione avviene con lo swipe: le frecce,
   pensate per il mouse, si nascondono per non sovrapporsi alle card. */
@media (max-width: 768px) {
  .featured-carousel__nav { display: none; }
}

/* Barra di progresso sottile del carosello: indica in modo discreto
   quanto c'è ancora da scorrere. Larghezza e posizione della "thumb"
   (.featured-carousel__progress-bar) aggiornate via JS ad ogni scroll
   (vedi updateCarouselProgress in home-supabase.js). */
.featured-carousel__progress {
  position: relative;
  width: 120px;
  height: 3px;
  margin: var(--space-6) auto 0;
  background-color: var(--color-beige);
  border-radius: 100px;
  overflow: hidden;
}
.featured-carousel__progress-bar {
  position: absolute;
  top: 0;
  height: 100%;
  background-color: var(--color-brass);
  border-radius: 100px;
  /* transition solo su left: lo scroll stesso è già fluido (scroll-behavior
     smooth / swipe nativo), qui serve solo ad ammorbidire il salto quando
     la barra viene mossa dalle frecce prev/next */
  transition: left var(--transition-fast);
}

/* Avviso "collezione completa in negozio" sotto i pezzi in evidenza */
.showroom-notice {
  margin-top: var(--space-12);
  padding: var(--space-8) var(--space-10);
  background-color: var(--color-cream-dark);
  border: 1px solid var(--color-beige);
  border-radius: var(--radius-lg);
  text-align: center;
  max-width: 820px;
  margin-inline: auto;
}
.showroom-notice__icon {
  width: 32px;
  height: 32px;
  color: var(--color-brass);
  margin-bottom: var(--space-4);
}
.showroom-notice p {
  font-size: var(--text-md);
  line-height: var(--leading-loose);
  color: var(--color-wood-light);
  max-width: 56ch;
  margin-inline: auto;
}
.showroom-notice__cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-8);
}

/* ============================================================
   SEZIONE CITAZIONE / QUOTE
   ============================================================ */

.quote-section {
  background-color: var(--color-wood);
  padding-block: var(--space-24);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.quote-section::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-serif);
  font-size: 20rem;
  color: rgba(176, 136, 80, 0.08);
  line-height: 1;
  pointer-events: none;
}
.quote-text {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-xl), 3vw, var(--text-3xl));
  font-weight: 500;
  font-style: italic;
  color: var(--color-cream);
  max-width: 22ch;
  margin-inline: auto;
  line-height: 1.4;
  margin-bottom: var(--space-8);
}
.quote-author {
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-brass);
}

/* ============================================================
   RESPONSIVE — Home
   ============================================================ */

@media (max-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8) var(--space-12);
  }
}

@media (max-width: 768px) {
  .hero-arrow { display: none; }
  .hero-scroll { display: none; }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .about-home {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  .about-home__badge {
    right: var(--space-6);
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Su mobile ogni card occupa quasi tutta la larghezza, con un accenno
     della successiva: invita a scorrere per vedere gli altri pezzi. */
  .featured-grid .product-card {
    flex-basis: 85vw;
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
