/* ==========================================================
   Maison Lumière — foglio di stile
   ========================================================== */

:root {
  --black: #0f0e0c;
  --ink: #1c1a17;
  --gold: #b8975f;
  --champagne: #d9c4a0;
  --champagne-soft: #efe4d0;
  --cream: #f8f4ec;
  --cream-deep: #f1eadd;
  --white: #fffdf9;
  --muted: #6f675c;
  --line: rgba(28, 26, 23, 0.12);

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

/* Evita che le animazioni laterali allarghino la pagina su mobile */
main, .footer { overflow-x: hidden; overflow-x: clip; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.15; }
p { margin: 0 0 1.1em; }

:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container { width: min(1240px, 100% - 48px); margin-inline: auto; }

.section { padding: clamp(80px, 11vw, 150px) 0; }

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
  font-weight: 400;
}

.section-title {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  margin-bottom: 1.6rem;
}
.section-title em { font-style: italic; color: var(--gold); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(40px, 6vw, 70px); }
.section-sub { color: var(--muted); }

/* ---------- Bottoni ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.6rem;
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 400;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.6s var(--ease), border-color 0.6s var(--ease);
}
.btn::before {
  content: "";
  position: absolute; inset: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.7s var(--ease);
  z-index: -1;
}
.btn:hover::before { transform: scaleX(1); transform-origin: left; }

.btn--light { border: 1px solid rgba(255, 253, 249, 0.7); color: var(--white); }
.btn--light::before { background: var(--champagne); }
.btn--light:hover { color: var(--black); border-color: var(--champagne); }

.btn--dark { background: var(--black); color: var(--white); border: 1px solid var(--black); }
.btn--dark::before { background: var(--gold); }
.btn--dark:hover { border-color: var(--gold); }

.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:disabled::before { display: none; }

.btn--gold { background: var(--gold); color: var(--white); border: 1px solid var(--gold); }
.btn--gold::before { background: var(--black); }
.btn--gold:hover { border-color: var(--black); }

/* ==========================================================
   HEADER
   ========================================================== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  color: var(--white);
  transition: background-color 0.6s var(--ease), box-shadow 0.6s var(--ease), color 0.6s var(--ease);
}
.header__inner {
  width: min(1320px, 100% - 48px);
  margin-inline: auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: height 0.6s var(--ease);
}
.header.is-scrolled {
  background: rgba(248, 244, 236, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.header.is-scrolled .header__inner { height: 66px; }

.logo {
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: 0.08em;
  font-weight: 400;
  white-space: nowrap;
}
.logo span { font-style: italic; color: var(--champagne); transition: color 0.6s var(--ease); }
.header.is-scrolled .logo span { color: var(--gold); }

.nav__list { display: flex; gap: clamp(18px, 2.4vw, 38px); }
.nav__link {
  position: relative;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 6px 0;
}
.nav__link::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease);
}
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }

.header__actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  transition: opacity 0.4s var(--ease);
}
.icon-btn:hover { opacity: 0.7; }
.icon-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.badge {
  position: absolute; top: 4px; right: 2px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.62rem;
  line-height: 17px;
  text-align: center;
  font-weight: 400;
  transform: scale(0);
  transition: transform 0.4s var(--ease);
}
.badge.is-visible { transform: scale(1); }
.badge.bump { animation: bump 0.5s var(--ease); }
@keyframes bump { 50% { transform: scale(1.35); } }

.burger { display: none; width: 42px; height: 42px; position: relative; }
.burger span {
  position: absolute; left: 10px; right: 10px;
  height: 1px; background: currentColor;
  transition: transform 0.5s var(--ease), opacity 0.3s var(--ease), top 0.5s var(--ease);
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
  background: var(--black);
}
.hero__bg {
  position: absolute; inset: 0;
  background: url("https://images.unsplash.com/photo-1445205170230-053b83016050?auto=format&fit=crop&w=2000&q=80") center / cover no-repeat;
  transform: scale(1.12);
  animation: heroZoom 14s var(--ease-soft) forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 14, 12, 0.55) 0%, rgba(15, 14, 12, 0.35) 45%, rgba(15, 14, 12, 0.75) 100%);
}
.hero__content { position: relative; z-index: 1; padding: 120px 24px 80px; max-width: 900px; }

.hero__eyebrow {
  font-size: 0.72rem; letter-spacing: 0.45em; text-transform: uppercase;
  color: var(--champagne);
  opacity: 0; animation: fadeUp 1.4s var(--ease) 0.3s forwards;
}
.hero__title {
  font-size: clamp(3.4rem, 11vw, 8.5rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin: 0.3em 0 0.35em;
}
.hero__word {
  display: block;
  opacity: 0;
  filter: blur(8px);
  letter-spacing: 0.25em;
  animation: titleIn 2.2s var(--ease) forwards;
}
.hero__word:first-child { animation-delay: 0.6s; }
.hero__word--accent { font-style: italic; color: var(--champagne); animation-delay: 1s; }
@keyframes titleIn {
  to { opacity: 1; filter: blur(0); letter-spacing: 0.02em; }
}
.hero__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 300;
  margin-bottom: 2.6rem;
  opacity: 0; animation: fadeUp 1.4s var(--ease) 1.8s forwards;
}
.hero .btn { opacity: 0; animation: fadeUp 1.4s var(--ease) 2.2s forwards; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.hero__scroll {
  position: absolute; bottom: 34px; left: 50%;
  width: 1px; height: 60px;
  background: rgba(255, 253, 249, 0.25);
  overflow: hidden;
  opacity: 0; animation: fadeUp 1.4s var(--ease) 2.8s forwards;
}
.hero__scroll span {
  position: absolute; top: -50%; left: 0;
  width: 1px; height: 50%;
  background: var(--champagne);
  animation: scrollLine 2.4s var(--ease-soft) infinite;
}
@keyframes scrollLine { to { top: 100%; } }

/* ==========================================================
   CHI SIAMO
   ========================================================== */
.about { background: var(--cream); }
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: center;
}
.about__media { position: relative; }
.about__media img {
  position: relative; z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.about__frame {
  position: absolute;
  inset: 28px -28px -28px 28px;
  border: 1px solid var(--champagne);
}
.about__text > p:not(.eyebrow) { color: var(--muted); max-width: 520px; }

.values { margin-top: 2.6rem; display: grid; gap: 1.6rem; }
.values li { display: flex; gap: 1.4rem; align-items: flex-start; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.values__num { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 1.3rem; min-width: 2rem; line-height: 1.3; }
.values h3 { font-size: 1.35rem; margin-bottom: 0.3rem; }
.values p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* ==========================================================
   VISIONE — video sfilata
   ========================================================== */
.vision {
  position: relative;
  min-height: 88vh;
  min-height: 88svh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
  background: var(--black);
}
/* L'immagine statica fa da anteprima e da riserva se il video non viene caricato */
.vision__media {
  position: absolute; inset: 0;
  background: url("../assets/video/sfilata-poster.jpg") center / cover no-repeat;
}
.vision__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.8s var(--ease);
}
.vision__video.is-playing { opacity: 1; }
.vision__overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(15, 14, 12, 0.3) 0%, rgba(15, 14, 12, 0.65) 100%),
    linear-gradient(180deg, rgba(15, 14, 12, 0.35) 0%, rgba(15, 14, 12, 0.2) 50%, rgba(15, 14, 12, 0.5) 100%);
}
.vision__content { position: relative; z-index: 1; padding: 110px 24px; max-width: 780px; }
.vision__content .eyebrow { color: var(--champagne); }
.vision__title {
  font-size: clamp(2.8rem, 7.5vw, 5.8rem);
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: 1.8rem;
  text-shadow: 0 2px 30px rgba(15, 14, 12, 0.35);
}
.vision__title em { font-style: italic; color: var(--champagne); }
.vision__line { display: block; width: 64px; height: 1px; margin: 0 auto 1.8rem; background: var(--champagne); }
.vision__text {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 300;
  color: rgba(248, 244, 236, 0.88);
  max-width: 520px;
  margin: 0 auto;
}
.vision__toggle {
  position: absolute; right: 28px; bottom: 28px; z-index: 2;
  width: 44px; height: 44px;
  border: 1px solid rgba(255, 253, 249, 0.4);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--white);
  opacity: 0.75;
  transition: opacity 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s var(--ease);
}
.vision__toggle[hidden] { display: none; }
.vision__toggle:hover { opacity: 1; border-color: var(--champagne); color: var(--champagne); }
.vision__toggle svg { grid-area: 1 / 1; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.vision__toggle .icon-play { display: none; }
.vision__toggle.is-paused .icon-play { display: block; }
.vision__toggle.is-paused .icon-pause { display: none; }

/* ==========================================================
   COLLEZIONE
   ========================================================== */
.collection { background: var(--white); }

.filters {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px 28px;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.filter {
  font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.filter:hover { color: var(--ink); }
.filter.is-active { color: var(--ink); border-color: var(--gold); }

.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2.6vw, 36px) clamp(16px, 2vw, 28px);
}

.card { cursor: pointer; transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.card.is-hidden { display: none; }
.card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--cream-deep);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease), filter 1s var(--ease);
}
.card:hover .card__media img { transform: scale(1.06); filter: brightness(0.92); }

.card__quick {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px;
  text-align: center;
  font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase;
  background: rgba(255, 253, 249, 0.92);
  transform: translateY(100%);
  transition: transform 0.7s var(--ease);
}
.card:hover .card__quick, .card:focus-visible .card__quick { transform: none; }

.card__tag {
  position: absolute; top: 14px; left: 14px;
  font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase;
  background: var(--black); color: var(--champagne);
  padding: 4px 10px;
}

.card__info { padding-top: 16px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.card__name { font-family: var(--serif); font-size: 1.25rem; line-height: 1.25; }
.card__cat { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin: 2px 0 0; }
.card__price { font-size: 0.95rem; white-space: nowrap; color: var(--ink); }

/* Prodotto esaurito */
.card--out .card__media img { filter: grayscale(0.6) opacity(0.75); }
.card--out:hover .card__media img { filter: grayscale(0.4) opacity(0.85); }
.card__tag--out { background: var(--cream); color: var(--ink); border: 1px solid var(--line); }

/* Caricamento dal database */
.card--skeleton { cursor: default; pointer-events: none; }
.card--skeleton .card__media,
.card--skeleton .card__info span {
  background: linear-gradient(100deg, var(--cream-deep) 30%, var(--cream) 50%, var(--cream-deep) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.8s var(--ease-soft) infinite;
}
.card--skeleton .card__info { display: block; }
.card--skeleton .card__info span { display: block; height: 14px; width: 70%; margin-bottom: 10px; }
.card--skeleton .card__info span + span { width: 35%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.products__empty {
  grid-column: 1 / -1;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--muted);
  padding: 40px 0;
}

/* Cuore wishlist */
.heart {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 253, 249, 0.9);
  transition: background-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.heart:hover { transform: scale(1.08); }
.heart svg {
  width: 18px; height: 18px;
  fill: transparent; stroke: var(--ink); stroke-width: 1.3;
  transition: fill 0.4s var(--ease), stroke 0.4s var(--ease);
}
.heart.is-active svg { fill: var(--gold); stroke: var(--gold); }
.heart.pop svg { animation: heartPop 0.6s var(--ease); }
.heart.pop::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid var(--gold);
  animation: ring 0.7s var(--ease) forwards;
}
@keyframes heartPop {
  0% { transform: scale(1); }
  30% { transform: scale(0.7); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
@keyframes ring {
  from { transform: scale(0.8); opacity: 1; }
  to { transform: scale(1.7); opacity: 0; }
}
.heart--lg { position: relative; top: auto; right: auto; width: 54px; height: 54px; border: 1px solid var(--line); background: transparent; flex-shrink: 0; }
.heart--lg svg { width: 21px; height: 21px; }

/* ==========================================================
   MODALE PRODOTTO
   ========================================================== */
.modal {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.modal[hidden] { display: none; }
.modal.is-open { opacity: 1; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15, 14, 12, 0.7); }
.modal__panel {
  position: relative;
  width: min(1020px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
  transform: translateY(30px);
  transition: transform 0.7s var(--ease);
}
.modal.is-open .modal__panel { transform: none; }
.modal__close {
  position: absolute; top: 10px; right: 14px; z-index: 2;
  font-size: 2rem; line-height: 1;
  width: 44px; height: 44px;
  font-weight: 300;
  transition: transform 0.5s var(--ease), color 0.4s;
}
.modal__close:hover { transform: rotate(90deg); color: var(--gold); }
.modal__media { background: var(--cream-deep); min-height: 100%; }
.modal__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.modal__body { padding: clamp(28px, 5vw, 56px); display: flex; flex-direction: column; }
.modal__title { font-size: clamp(1.9rem, 3vw, 2.5rem); font-weight: 300; margin-bottom: 0.4rem; }
.modal__price { font-size: 1.15rem; color: var(--gold); margin-bottom: 1.4rem; }
.modal__desc { color: var(--muted); }
.modal__material { font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; }

.sizes { margin: 0.6rem 0 1.8rem; }
.sizes__label { font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; margin-bottom: 0.7rem; }
.sizes__list { display: flex; flex-wrap: wrap; gap: 8px; }
.size {
  min-width: 48px; height: 44px; padding: 0 12px;
  border: 1px solid var(--line);
  font-size: 0.82rem; letter-spacing: 0.06em;
  transition: border-color 0.4s var(--ease), background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.size:hover:not(:disabled) { border-color: var(--ink); }
.size.is-selected { background: var(--black); color: var(--white); border-color: var(--black); }
.size:disabled { color: #bdb6ab; text-decoration: line-through; cursor: not-allowed; }
.sizes.shake .sizes__list { animation: shake 0.5s var(--ease); }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.modal__actions { display: flex; gap: 12px; margin-top: auto; }
.modal__actions .btn { flex: 1; }
.modal__note { font-size: 0.78rem; color: var(--muted); margin: 1.2rem 0 0; }

/* ==========================================================
   GALLERIA
   ========================================================== */
.gallery { background: var(--cream); }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  grid-auto-flow: dense;
  gap: 14px;
}
.gallery__item {
  display: block;
  padding: 0;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--cream-deep);
}
.gallery__item:nth-child(1),
.gallery__item:nth-child(4) { grid-row: span 2; }
.gallery__item:nth-child(5),
.gallery__item:nth-child(8) { grid-column: span 2; }
.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.6s var(--ease), filter 1s var(--ease);
  filter: saturate(0.85);
}
.gallery__item::after {
  content: attr(data-caption);
  position: absolute; inset: auto 0 0 0;
  padding: 40px 18px 16px;
  color: var(--white);
  font-family: var(--serif); font-style: italic; font-size: 1.1rem;
  background: linear-gradient(transparent, rgba(15, 14, 12, 0.6));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.gallery__item:hover img { transform: scale(1.05); filter: saturate(1); }
.gallery__item:hover::after { opacity: 1; transform: none; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(15, 14, 12, 0.96);
  display: flex; align-items: center; justify-content: center;
  padding: 60px 70px;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__figure { margin: 0; text-align: center; max-width: 100%; }
.lightbox__figure img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px);
  margin-inline: auto;
  object-fit: contain;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.lightbox__figure img.is-changing { opacity: 0; transform: scale(0.98); }
.lightbox figcaption {
  color: var(--champagne);
  font-family: var(--serif); font-style: italic; font-size: 1.15rem;
  margin-top: 16px;
}
.lightbox__close, .lightbox__nav {
  position: absolute;
  color: var(--white);
  font-weight: 300;
  transition: color 0.4s var(--ease), transform 0.5s var(--ease);
}
.lightbox__close { top: 14px; right: 20px; font-size: 2.4rem; width: 50px; height: 50px; }
.lightbox__close:hover { color: var(--champagne); transform: rotate(90deg); }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 3rem; width: 56px; height: 80px; }
.lightbox__nav:hover { color: var(--champagne); }
.lightbox__nav--prev { left: 10px; }
.lightbox__nav--next { right: 10px; }

/* ==========================================================
   RECENSIONI
   ========================================================== */
.reviews { background: var(--black); color: var(--cream); }
.reviews .section-title { color: var(--white); }
.reviews .section-title em { color: var(--champagne); }
.reviews__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review {
  position: relative;
  padding: 44px 36px 36px;
  border: 1px solid rgba(217, 196, 160, 0.2);
  transition: border-color 0.7s var(--ease), transform 0.7s var(--ease);
}
.review:hover { border-color: rgba(217, 196, 160, 0.55); transform: translateY(-4px); }
.review::before {
  content: "\201C";
  position: absolute; top: 4px; right: 26px;
  font-family: var(--serif);
  font-size: 5rem;
  color: rgba(217, 196, 160, 0.25);
  line-height: 1;
}
.stars { display: flex; gap: 4px; margin-bottom: 1.4rem; }
.stars svg { width: 14px; height: 14px; fill: var(--champagne); }
.stars svg.is-empty { fill: rgba(217, 196, 160, 0.25); }
.review__text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--cream);
  margin-bottom: 1.8rem;
}
.review__author { display: flex; align-items: center; gap: 14px; }
.review__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(217, 196, 160, 0.14);
  color: var(--champagne);
  font-family: var(--serif); font-size: 1.1rem;
}
.review__name { font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; margin: 0; color: var(--white); }
.review__meta { font-size: 0.8rem; color: rgba(248, 244, 236, 0.5); margin: 0; }

/* ==========================================================
   NEWSLETTER
   ========================================================== */
.newsletter {
  position: relative;
  padding: clamp(90px, 12vw, 150px) 0;
  text-align: center;
  background: var(--champagne-soft);
}
.newsletter__inner { max-width: 700px; }
.newsletter .section-title { margin-bottom: 2.4rem; }
.newsletter__form {
  display: flex;
  max-width: 520px;
  margin-inline: auto;
  border-bottom: 1px solid var(--ink);
}
.newsletter__form input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 1rem 0.2rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
}
.newsletter__form input::placeholder { color: var(--muted); }
.newsletter__form input:focus { outline: none; }
.newsletter__form .btn { padding-inline: 2rem; }
.newsletter__msg { min-height: 1.6em; margin-top: 1rem; font-size: 0.9rem; transition: opacity 0.5s var(--ease); }
.newsletter__msg.is-error { color: #9b3b2e; }
.newsletter__msg.is-ok { color: var(--gold); font-family: var(--serif); font-style: italic; font-size: 1.15rem; }

/* ==========================================================
   CONTATTI
   ========================================================== */
.contact { background: var(--cream); }
.contact__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 90px); align-items: stretch; }
.contact__block { margin-bottom: 1.8rem; }
.contact__block h3 {
  font-family: var(--sans);
  font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; font-weight: 400;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.contact__block p { margin: 0; }
.contact__block a { border-bottom: 1px solid transparent; transition: border-color 0.4s var(--ease); }
.contact__block a:hover { border-color: var(--gold); }
.hours { margin: 0; }
.hours div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
.hours dt { font-weight: 400; }
.hours dd { margin: 0; color: var(--muted); text-align: right; }

.socials { display: flex; gap: 10px; }
.socials a {
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease), color 0.5s var(--ease);
}
.socials a:hover { background: var(--black); border-color: var(--black); color: var(--champagne); }
.socials svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }

.contact__map { min-height: 420px; position: relative; }
.contact__map iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  filter: grayscale(1) sepia(0.15) contrast(0.95);
  transition: filter 0.8s var(--ease);
}
.contact__map:hover iframe { filter: none; }

/* ==========================================================
   FOOTER
   ========================================================== */
.footer { background: var(--black); color: rgba(248, 244, 236, 0.7); padding: 80px 0 30px; font-size: 0.92rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid rgba(217, 196, 160, 0.15); }
.logo--footer { color: var(--white); display: inline-block; margin-bottom: 1rem; font-size: 1.8rem; }
.footer__brand p { max-width: 300px; }
.footer h4 {
  font-family: var(--sans); font-weight: 400;
  font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--champagne);
  margin-bottom: 1.2rem;
}
.footer li { margin-bottom: 0.5rem; }
.footer a { transition: color 0.4s var(--ease); }
.footer a:hover { color: var(--champagne); }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 26px; font-size: 0.8rem; }
.footer__bottom p { margin: 0; }

/* ==========================================================
   PANNELLI LATERALI (CARRELLO E WISHLIST)
   ========================================================== */
.drawer { position: fixed; inset: 0; z-index: 350; }
.drawer[hidden] { display: none; }
.drawer__backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 14, 12, 0.55);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.drawer.is-open .drawer__backdrop { opacity: 1; }

.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(460px, 100%);
  display: flex; flex-direction: column;
  background: var(--cream);
  box-shadow: -20px 0 60px rgba(15, 14, 12, 0.18);
  transform: translateX(100%);
  transition: transform 0.75s var(--ease);
}
.drawer.is-open .drawer__panel { transform: none; }

.drawer__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 30px 32px 22px;
  border-bottom: 1px solid var(--line);
}
.drawer__head .eyebrow { margin-bottom: 0.4rem; }
.drawer__title { font-size: 2rem; font-weight: 300; }
.drawer__count { font-style: italic; color: var(--gold); font-size: 1.3rem; }
.drawer__close {
  width: 44px; height: 44px; margin: -6px -10px 0 0;
  font-size: 2rem; font-weight: 300; line-height: 1;
  transition: transform 0.5s var(--ease), color 0.4s var(--ease);
}
.drawer__close:hover { transform: rotate(90deg); color: var(--gold); }

.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 32px; }

/* Riga prodotto */
.line {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), height 0.45s var(--ease) 0.15s, padding 0.45s var(--ease) 0.15s;
}
.line:last-child { border-bottom: 0; }
.line--enter { animation: lineIn 0.8s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms + 250ms); }
@keyframes lineIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: none; }
}
.line.is-leaving { opacity: 0; transform: translateX(30px); padding-block: 0; border-color: transparent; }

.line__img {
  width: 88px; height: 112px;
  object-fit: cover;
  background: var(--cream-deep);
  cursor: pointer;
  transition: opacity 0.4s var(--ease);
}
.line__img:hover { opacity: 0.85; }
.line__info { min-width: 0; display: flex; flex-direction: column; }
.line__cat { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 0 0 2px; }
.line__name { font-size: 1.25rem; line-height: 1.2; margin-bottom: 4px; }
.line__meta { font-size: 0.84rem; color: var(--muted); margin: 0; }
.line__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; }
.line__price { font-size: 0.98rem; white-space: nowrap; }
.line__remove {
  width: 32px; height: 32px; margin: -4px -6px 0 0;
  font-size: 1.4rem; line-height: 1; font-weight: 300;
  color: var(--muted);
  transition: color 0.4s var(--ease), transform 0.5s var(--ease);
}
.line__remove:hover { color: var(--ink); transform: rotate(90deg); }
.line__link {
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 4px 0;
  border-bottom: 1px solid var(--gold);
  transition: color 0.4s var(--ease);
}
.line__link:hover { color: var(--gold); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.qty button { width: 32px; height: 32px; font-size: 1rem; transition: background-color 0.4s var(--ease); }
.qty button:hover:not(:disabled) { background: var(--cream-deep); }
.qty button:disabled { color: #c3bcb1; cursor: default; }
.qty span { min-width: 26px; text-align: center; font-size: 0.88rem; }

/* Stato vuoto */
.drawer__empty {
  text-align: center;
  padding: 70px 10px;
  animation: lineIn 0.8s var(--ease) 0.25s both;
}
.drawer__empty[hidden] { display: none; }
.drawer__empty svg { width: 42px; height: 42px; fill: none; stroke: var(--gold); stroke-width: 0.9; margin: 0 auto 20px; display: block; }
.drawer__empty-title { font-family: var(--serif); font-size: 1.6rem; margin-bottom: 0.4rem; }
.drawer__empty p:not(.drawer__empty-title) { color: var(--muted); margin-bottom: 2rem; }

/* Riepilogo */
.drawer__foot {
  padding: 22px 32px 28px;
  border-top: 1px solid var(--line);
  background: var(--white);
}
.drawer__foot[hidden] { display: none; }
.summary { margin: 0 0 20px; }
.summary div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 0.92rem; color: var(--muted); }
.summary dd { margin: 0; }
.summary .summary__total {
  color: var(--ink);
  padding-top: 12px; margin-top: 8px;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.summary__total dt { font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase; }
.summary__total dd { font-family: var(--serif); font-size: 1.8rem; }
.summary > .summary__total:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.btn--block { width: 100%; }
.drawer__note { font-size: 0.78rem; color: var(--muted); text-align: center; margin: 12px 0 0; transition: color 0.4s var(--ease); }
.drawer__note.is-highlight { color: var(--gold); }

/* ==========================================================
   TOAST
   ========================================================== */
.toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 500;
  transform: translate(-50%, 30px);
  background: var(--black); color: var(--cream);
  padding: 14px 26px;
  font-size: 0.85rem; letter-spacing: 0.04em;
  border-left: 2px solid var(--gold);
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
  max-width: calc(100% - 32px);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================
   SCROLL REVEAL
   ========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
  transition-delay: var(--delay, 0s);
}
.reveal--left { transform: translateX(-50px); }
.reveal--right { transform: translateX(50px); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1080px) {
  .products { grid-template-columns: repeat(3, 1fr); }
  .reviews__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 70px; }

  .burger { display: block; }

  /* Menu mobile a tendina: sfondo opaco, sotto l'header, sopra i contenuti */
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    z-index: 99;
    background: var(--cream);
    color: var(--ink);
    border-top: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(15, 14, 12, 0.15);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.7s var(--ease), visibility 0s linear 0.7s;
  }
  .header.is-scrolled .nav { top: 66px; }
  .nav.is-open {
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    visibility: visible;
    transition: max-height 0.7s var(--ease), visibility 0s;
  }
  .nav__list { flex-direction: column; gap: 0; padding: 12px 24px 28px; }
  .nav__list li {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
    border-bottom: 1px solid var(--line);
  }
  .nav__list li:last-child { border-bottom: 0; }
  .nav.is-open li { opacity: 1; transform: none; }
  .nav.is-open li:nth-child(1) { transition-delay: 0.10s; }
  .nav.is-open li:nth-child(2) { transition-delay: 0.15s; }
  .nav.is-open li:nth-child(3) { transition-delay: 0.20s; }
  .nav.is-open li:nth-child(4) { transition-delay: 0.25s; }
  .nav.is-open li:nth-child(5) { transition-delay: 0.30s; }
  .nav.is-open li:nth-child(6) { transition-delay: 0.35s; }
  .nav__link {
    display: block;
    padding: 16px 0;
    font-family: var(--serif);
    font-size: 1.5rem;
    letter-spacing: 0.04em;
    text-transform: none;
  }
  .nav__link::after { display: none; }
  .nav__link.is-active { color: var(--gold); font-style: italic; }

  /* Header sempre leggibile quando il menu è aperto */
  .header.menu-open { background: var(--cream); color: var(--ink); }
  .header.menu-open .logo span { color: var(--gold); }

  .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 560px; margin-right: 28px; }

  .modal__panel { grid-template-columns: 1fr; }
  .modal__media img { aspect-ratio: 4 / 3; }

  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .header__inner { width: calc(100% - 24px); gap: 8px; }
  .logo { font-size: 1.3rem; letter-spacing: 0.05em; }
  .icon-btn { width: 38px; }

  .products { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; }
  .card__info { flex-direction: column; gap: 2px; }
  .card__name { font-size: 1.08rem; }
  .card__quick { display: none; }
  .heart { width: 34px; height: 34px; top: 8px; right: 8px; }
  .heart svg { width: 16px; height: 16px; }
  .card__tag { top: 8px; left: 8px; font-size: 0.56rem; padding: 3px 7px; }
  .heart--lg { width: 54px; height: 54px; }

  .filters { gap: 4px 18px; }

  .reviews__grid { grid-template-columns: 1fr; }
  .review { padding: 36px 26px 28px; }

  .gallery__grid { grid-auto-rows: 160px; gap: 8px; }

  .newsletter__form { flex-direction: column; border-bottom: 0; gap: 14px; }
  .newsletter__form input { border-bottom: 1px solid var(--ink); text-align: center; }

  .modal { padding: 0; align-items: end; }
  .modal__panel { max-height: 92vh; max-height: 92dvh; transform: translateY(100%); }
  .modal__close { background: rgba(255, 253, 249, 0.9); border-radius: 50%; top: 10px; right: 10px; }

  .lightbox { padding: 60px 12px; }
  .lightbox__nav { top: auto; bottom: 10px; transform: none; }
  .lightbox__nav--prev { left: calc(50% - 70px); }
  .lightbox__nav--next { right: calc(50% - 70px); }

  .drawer__panel { width: 100%; box-shadow: none; }
  .drawer__head { padding: 22px 20px 16px; }
  .drawer__title { font-size: 1.7rem; }
  .drawer__body { padding: 4px 20px; }
  .drawer__foot { padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); }
  .line { grid-template-columns: 76px 1fr auto; gap: 14px; padding: 18px 0; }
  .line__img { width: 76px; height: 98px; }
  .line__name { font-size: 1.12rem; }
  .qty button { width: 36px; height: 36px; }

  .vision { min-height: 78vh; min-height: 78svh; }
  .vision__media { background-image: url("../assets/video/sfilata-poster-mobile.jpg"); }
  .vision__content { padding: 90px 20px; }
  .vision__toggle { right: 16px; bottom: 16px; }

  .hours div { flex-direction: column; gap: 0; }
  .hours dd { text-align: left; }

  .contact__map { min-height: 320px; }
  .footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .footer__bottom { flex-direction: column; text-align: center; align-items: center; }
}

/* ---------- Cursore gemma (js/cursor.js) ---------- */
/* Il cursore nativo si nasconde solo quando lo script è attivo con un mouse */
.has-gem-cursor, .has-gem-cursor * { cursor: none !important; }
.has-gem-cursor :is(input, textarea, [contenteditable="true"]) { cursor: text !important; }
.has-gem-cursor :is(input[type="checkbox"], input[type="radio"], input[type="range"], input[type="submit"], input[type="button"]) { cursor: none !important; }

.gem-cursor,
.gem-cursor__dot {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  transition: opacity 0.35s var(--ease-soft);
}
.gem-cursor { width: 0; height: 0; }

.gem-cursor-visible .gem-cursor,
.gem-cursor-visible .gem-cursor__dot { opacity: 1; }
.gem-cursor-text .gem-cursor,
.gem-cursor-text .gem-cursor__dot { opacity: 0; }

/* Il corpo è centrato sul punto del cursore; qui avvengono scala e stati */
.gem-cursor__body {
  position: absolute;
  left: -11px; top: -11px;
  width: 22px; height: 22px;
  transition: transform 0.45s var(--ease);
}
.gem-cursor-hover .gem-cursor__body { transform: scale(1.55); }
.gem-cursor-press .gem-cursor__body { transform: scale(0.82); transition-duration: 0.15s; }
.gem-cursor-hover.gem-cursor-press .gem-cursor__body { transform: scale(1.3); }

.gem-cursor__gem { position: relative; display: block; width: 100%; height: 100%; overflow: visible; }
.gem-cursor__fill { fill: url(#gemFill); fill-opacity: 0.92; transition: fill-opacity 0.45s var(--ease); }
.gem-cursor__facets { fill: none; stroke: #fffaf0; stroke-width: 0.6; stroke-opacity: 0.85; stroke-linejoin: round; transition: stroke 0.45s var(--ease), stroke-opacity 0.45s var(--ease); }
.gem-cursor__edge { fill: none; stroke: #8f7142; stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* Sopra elementi cliccabili: gemma quasi trasparente con contorno netto,
   così il testo sottostante resta leggibile */
.gem-cursor-hover .gem-cursor__fill { fill-opacity: 0.16; }
.gem-cursor-hover .gem-cursor__facets { stroke: var(--gold); stroke-opacity: 0.55; }

/* Bagliore: solo opacità e scala, animate dal compositore */
.gem-cursor__halo {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 228, 208, 0.75) 0%, rgba(217, 196, 160, 0.35) 38%, rgba(217, 196, 160, 0) 70%);
  opacity: 0.45;
  animation: gemBreathe 3.6s ease-in-out infinite;
  transition: opacity 0.45s var(--ease);
}
.gem-cursor-hover .gem-cursor__halo { opacity: 1; animation-duration: 2s; }

/* Scintillii */
.gem-cursor__spark {
  position: absolute;
  width: 8px; height: 8px;
  opacity: 0;
  transform: scale(0.2);
}
.gem-cursor__spark svg { display: block; width: 100%; height: 100%; fill: #fffaf0; filter: drop-shadow(0 0 1.5px rgba(184, 151, 95, 0.9)); }
.gem-cursor__spark--a { top: -3px; right: -4px; animation: gemTwinkle 3.2s ease-in-out infinite; }
.gem-cursor__spark--b { bottom: 5px; left: -5px; width: 6px; height: 6px; animation: gemTwinkle 3.2s ease-in-out 1.6s infinite; }
.gem-cursor-hover .gem-cursor__spark { animation-duration: 1.6s; }

.gem-cursor__dot {
  width: 4px; height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1px rgba(255, 250, 240, 0.7);
}

@keyframes gemBreathe {
  0%, 100% { transform: scale(0.85); }
  50% { transform: scale(1.1); }
}
@keyframes gemTwinkle {
  0%, 55%, 100% { opacity: 0; transform: scale(0.2) rotate(0deg); }
  70% { opacity: 1; transform: scale(1) rotate(45deg); }
  85% { opacity: 0; transform: scale(0.3) rotate(90deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
