/* ============================================================
   REDESIGN — VARIANTE A3 · "Maiolica"
   Evoluzione PIÙ AUDACE della variante A verso l'anima
   artigianale siciliana: più colore (navy + oro + terracotta +
   verde maiolica), bordi decorativi, chip categoria, titoli
   Fraunces. Override: si carica DOPO styles.css. Richiede Fraunces.
   ============================================================ */

:root {
  --bg: #f4ebdc;
  --paper: #fffaf0;
  --paper-strong: #fffdf6;
  --ink: #16314f;
  --muted: #6c6b66;
  --accent: #1c5b8c;        /* azzurro maiolica */
  --accent-dark: #133f63;
  --gold: #c79a3e;
  --gold-soft: #f0dca8;
  --terra: #c8642f;         /* terracotta */
  --maiolica-green: #3f8f73;
  --line: rgba(22, 49, 79, 0.16);
  --shadow: 0 26px 60px rgba(22, 49, 79, 0.14);
}

body {
  background:
    radial-gradient(circle at 10% 6%, rgba(199, 154, 62, 0.14), transparent 26%),
    radial-gradient(circle at 90% 8%, rgba(63, 143, 115, 0.12), transparent 24%),
    linear-gradient(180deg, #fcf5e8 0%, #f3ebdb 55%, #f6eedd 100%) !important;
  font-size: 1.03rem;
}

/* --- Display caldo: Fraunces, con sottolineatura colorata --- */
.hero h1,
.section-heading h2,
.atelier-copy h2,
.story-panel h2,
.cta-section h2,
.collection-landing-copy h1,
#collection-page-title,
.home-path-copy strong {
  font-family: "Fraunces", "Cormorant Garamond", Georgia, serif !important;
  font-weight: 600 !important;
  letter-spacing: -0.012em !important;
  line-height: 0.98 !important;
  color: var(--accent-dark) !important;
}
.hero h1 { font-size: clamp(3.5rem, 5.8vw, 6rem) !important; }
.section-heading h2 {
  font-size: clamp(2.5rem, 4.2vw, 4.2rem) !important;
  display: inline-block;
  padding-bottom: 10px;
  background: linear-gradient(90deg, var(--terra), var(--gold)) no-repeat left bottom / 64px 4px;
}

/* --- Etichette: maiuscoletto terracotta con pallino --- */
.eyebrow,
.hero-logo-kicker {
  letter-spacing: 0.26em !important;
  font-size: 0.7rem !important;
  color: var(--terra) !important;
  font-weight: 700 !important;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(199,154,62,0.25);
}

/* --- Hero pieno; pannello con cornice maiolica --- */
@media (min-width: 761px) {
  body.home-page .hero-text { display:block !important; max-width:680px; margin-inline:auto; font-size:1.14rem; }
  body.home-page .hero-actions { display:flex !important; justify-content:center; gap:16px; margin-top:24px; }
  body.home-page .hero-copy { text-align:center; }
}
.hero-copy {
  background: linear-gradient(180deg, #fffaf0, #fff6e9) !important;
  border: 1px solid var(--gold-soft) !important;
  border-radius: 24px !important;
  box-shadow: 0 24px 50px rgba(22,49,79,0.12) !important;
  backdrop-filter:none !important;
  position: relative;
}
.hero-copy::after {
  content:""; position:absolute; inset:8px; border-radius:18px;
  border:1px solid rgba(199,154,62,0.35); pointer-events:none;
}
.hero::after { color: rgba(28,91,140,0.06); }

/* --- Superfici: carta calda con banda decorativa maiolica in alto --- */
body .topbar,
body .bomboniere-section,
body .collection-section,
body .collection-story-block,
body .collection-bottom-cta,
body .collection-landing-hero,
body .atelier-section,
body .story-section,
body .cta-section,
body .trust-band {
  background: var(--paper) !important;
  border: 1px solid var(--gold-soft) !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: none !important;
  position: relative;
  overflow: hidden;
}
body .collection-section::before,
body .bomboniere-section::before,
body .atelier-section::before,
body .collection-landing-hero::before {
  content:"";
  position:absolute; left:0; right:0; top:0; height:6px;
  background: repeating-linear-gradient(90deg,
    var(--accent) 0 22px, var(--terra) 22px 44px, var(--gold) 44px 66px, var(--maiolica-green) 66px 88px);
  opacity: 0.85;
}

/* --- SHOP: pannello filtri come scheda calda con select a pillola --- */
body .collection-search-bar,
body .collection-filter-panel {
  background: linear-gradient(180deg, #fff7ea, #fffaf2) !important;
  border: 1px solid var(--gold-soft) !important;
  border-radius: 16px !important;
  padding: 16px !important;
}
body #catalog-search,
body .collection-filter-field select {
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  padding: 10px 14px !important;
  color: var(--accent-dark) !important;
}
body #catalog-search:focus,
body .collection-filter-field select:focus { outline:none; border-color: var(--accent) !important; }
body .collection-search-label {
  letter-spacing: 0.2em; text-transform: uppercase;
  font-size: 0.64rem; color: var(--terra) !important; font-weight: 700;
}
body .collection-view-switch .ghost-button.is-active {
  background: var(--accent) !important; color:#fff !important; border-color: var(--accent) !important;
}

/* --- Card prodotto: tinta calda, cornice oro, chip categoria --- */
body .product-grid,
body .product-grid.product-grid-overview {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
  gap: 20px !important;
}
body .product-card,
body .product-card-overview {
  background: linear-gradient(180deg, #fffdf7, #fff7ea) !important;
  border: 1px solid var(--gold-soft) !important;
  border-radius: 18px !important;
  box-shadow: 0 16px 34px rgba(22,49,79,0.10) !important;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
body .product-card:hover,
body .product-card-overview:hover {
  transform: translateY(-5px);
  border-color: var(--terra) !important;
  box-shadow: 0 26px 50px rgba(200,100,47,0.20) !important;
}
body .product-body,
body .product-body-overview { background: transparent !important; }
body .product-title-link,
body .product-card h3 {
  font-family: "Fraunces", Georgia, serif !important; font-weight: 600 !important;
}
body .product-fact {
  background: rgba(28,91,140,0.08) !important;
  border-radius: 999px !important;
  color: var(--accent-dark) !important;
}
.product-price,
.product-price-current { color: var(--terra) !important; font-weight: 700 !important; }

/* --- Bottoni: terracotta caldo + azzurro maiolica --- */
.primary-button {
  background: linear-gradient(180deg, var(--terra), #a94f22) !important;
  border: 1px solid #a94f22 !important;
  border-radius: 999px !important;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 26px rgba(200,100,47,0.28) !important;
}
.secondary-button,
.ghost-button {
  border-radius: 999px !important;
  border: 1px solid var(--accent) !important;
  color: var(--accent-dark) !important;
  letter-spacing: 0.02em;
}
.secondary-button:hover,
.ghost-button:hover { background: var(--accent) !important; color:#fff !important; border-color: var(--accent) !important; }

/* --- Footer: banda maiolica --- */
body .site-footer {
  border-top: 6px solid transparent;
  border-image: repeating-linear-gradient(90deg, var(--accent) 0 22px, var(--terra) 22px 44px, var(--gold) 44px 66px, var(--maiolica-green) 66px 88px) 6;
}

/* ============================================================
   A3 · HERO EDITORIALE — "atelier sul mare" (v2)
   Foto HD intera (mai tagliata) su bokeh sfocato, testo
   editoriale direttamente sulla foto, grana fine, vignetta,
   filo d'oro animato, ingresso scaglionato, marquee e scroll cue.
   ============================================================ */

/* sfondo soffuso dietro tutta la home */
body.home-page {
  background:
    linear-gradient(180deg, rgba(252,245,232,0.93), rgba(243,235,219,0.96) 55%, rgba(246,238,221,0.98)),
    url("./assets/images/sfondo-sito.webp") center top / cover no-repeat fixed,
    linear-gradient(180deg, #fcf5e8 0%, #f3ebdb 55%, #f6eedd 100%) !important;
}

/* contenitore */
body.home-page .hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 26px;
  min-height: 64vh;
  background: #0b2238 !important;
  box-shadow: 0 40px 90px rgba(11,34,56,0.32);
  isolation: isolate;
}
body.home-page #hero.reveal,
body.home-page .hero.reveal { opacity: 1 !important; transform: none !important; }

/* sfondo sfocato (bokeh mare/cielo) */
body.home-page .hero::before {
  content: ""; position: absolute; inset: -6%; z-index: 0;
  background: url("./assets/images/background-ceramiche-corallo.webp") center 42% / cover no-repeat;
  filter: blur(34px) brightness(0.7) saturate(1.12);
  transform: scale(1.16);
}

/* foto HD intera (contain): la pigna è SEMPRE tutta in campo */
body.home-page .a3-hero-photo {
  position: absolute; inset: 0; z-index: 1;
  background: url("./assets/images/background-ceramiche-corallo.webp") 38% center / contain no-repeat;
  transform-origin: center center;
  animation: a3Zoom 20s ease-in-out infinite alternate;
  will-change: transform;
  filter: drop-shadow(0 30px 60px rgba(5,18,33,0.5)) saturate(1.05) contrast(1.03);
}
@keyframes a3Zoom { from { transform: scale(1.0); } to { transform: scale(1.085); } }
@media (prefers-reduced-motion: reduce) { body.home-page .a3-hero-photo { animation: none; } }

/* grana cinematografica */
body.home-page .a3-grain {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.10; mix-blend-mode: overlay;
}

/* scrim + vignetta: scurisce la DESTRA per leggibilità del testo */
body.home-page .hero::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  left: auto; bottom: auto; color: transparent; font-size: 0;
  background:
    linear-gradient(270deg, rgba(4,14,26,0.66) 0%, rgba(4,14,26,0.2) 34%, rgba(4,14,26,0) 58%),
    linear-gradient(180deg, rgba(7,20,35,0.26) 0%, rgba(7,20,35,0) 26%, rgba(7,20,35,0) 72%, rgba(5,15,27,0.5) 100%),
    radial-gradient(150% 120% at 40% 42%, rgba(0,0,0,0) 56%, rgba(0,0,0,0.28) 100%);
}

/* lettering masthead in alto a sinistra (chiaro) */
body.home-page .a3-hero-lockup {
  position: absolute; top: 5%; left: 5%; z-index: 6;
  display: flex; flex-direction: column; line-height: 1;
  color: #fdf6ea; pointer-events: none;
  text-shadow: 0 2px 18px rgba(4,14,26,0.6);
}
.a3-lk-script { font-family: "Pinyon Script", cursive; font-size: clamp(2.1rem, 3.4vw, 3.2rem); line-height: 0.7; margin-left: 0.12em; color: #f3e2bd; }
.a3-lk-name { font-family: "Cormorant Garamond", "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: 0.22em; font-size: clamp(1.4rem, 2.7vw, 2.5rem); color: #fdf6ea; }
.a3-lk-sub { font-family: "Manrope", sans-serif; text-transform: uppercase; letter-spacing: 0.34em; font-weight: 600; font-size: clamp(0.5rem, 0.78vw, 0.68rem); margin-top: 0.6em; color: #e7c98a; }

/* etichetta verticale sul bordo SINISTRO (la destra ora ospita il testo) */
body.home-page .a3-side {
  position: absolute; left: 22px; right: auto; top: 50%; z-index: 6;
  writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg);
  text-transform: uppercase; letter-spacing: 0.42em; font-size: 0.6rem; font-weight: 600;
  color: rgba(253,246,234,0.6); pointer-events: none;
}

/* TESTO editoriale, niente box, a DESTRA, centrato in verticale */
body.home-page .hero-copy {
  position: absolute; z-index: 5;
  right: 5%; left: auto; top: 50%; bottom: auto; transform: translateY(-50%);
  width: min(500px, 45%); max-width: 500px; margin: 0 !important;
  text-align: left !important;
  background: none !important; border: none !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; padding: 0 !important;
}
body.home-page .hero-copy::after { content: none !important; }
body.home-page .hero-copy::before {
  content: ""; display: block; height: 2px; width: 0; margin: 0 0 18px;
  background: linear-gradient(90deg, var(--gold), var(--terra));
  animation: a3Line 1100ms 250ms cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes a3Line { to { width: 96px; } }

body.home-page .hero-copy .eyebrow,
body.home-page #hero-eyebrow { color: #f0d49a !important; }
body.home-page #hero-eyebrow::before { background: #e7c98a !important; box-shadow: none !important; }
body.home-page .hero h1 {
  color: #fdf6ea !important;
  font-size: clamp(2.4rem, 3.6vw, 4rem) !important;
  line-height: 1.0 !important;
  margin: 0 0 0.5rem !important;
  text-shadow: 0 3px 30px rgba(4,12,24,0.55);
  background: none !important;
  padding: 0 !important;
}
body.home-page .hero-text {
  color: rgba(253,246,234,0.9) !important;
  font-size: 1.08rem !important; max-width: 46ch;
  text-shadow: 0 1px 12px rgba(4,12,24,0.4);
}
body.home-page .hero-actions { margin-top: 22px; }

/* ingresso scaglionato del testo */
body.home-page .hero-copy > * { animation: a3Up 900ms cubic-bezier(.2,.7,.2,1) both; }
body.home-page .hero-copy > *:nth-child(1) { animation-delay: 0.18s; }
body.home-page .hero-copy > *:nth-child(2) { animation-delay: 0.30s; }
body.home-page .hero-copy > *:nth-child(3) { animation-delay: 0.42s; }
body.home-page .hero-copy > *:nth-child(4) { animation-delay: 0.54s; }
@keyframes a3Up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* scroll cue */
body.home-page .a3-scroll {
  position: absolute; left: 50%; bottom: 58px; z-index: 6; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid rgba(253,246,234,0.6); border-radius: 14px; display: block;
}
body.home-page .a3-scroll span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; border-radius: 2px;
  background: #fdf6ea; transform: translateX(-50%); animation: a3Dot 1.8s ease-in-out infinite;
}
@keyframes a3Dot { 0% { opacity: 0; top: 8px; } 30% { opacity: 1; } 65% { opacity: 1; top: 22px; } 100% { opacity: 0; top: 22px; } }

/* marquee in basso */
body.home-page .a3-marquee {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; overflow: hidden;
  border-top: 1px solid rgba(246,231,199,0.3);
  background: linear-gradient(180deg, rgba(7,20,35,0), rgba(5,15,27,0.6)); padding: 11px 0;
}
body.home-page .a3-marquee__track { display: flex; width: max-content; animation: a3Marquee 30s linear infinite; }
body.home-page .a3-marquee span {
  white-space: nowrap; text-transform: uppercase; letter-spacing: 0.28em;
  font-size: 0.66rem; font-weight: 600; color: rgba(253,246,234,0.82);
}
@keyframes a3Marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (min-width: 761px) {
  body.home-page .hero { min-height: 86vh; }
  body.home-page .hero-text { display: block !important; margin-inline: 0 !important; }
  body.home-page .hero-actions { display: flex !important; justify-content: flex-start !important; gap: 14px; }
}

/* MOBILE: banner foto in alto (pigna intera + lettering), testo sotto su carta */
@media (max-width: 760px) {
  body.home-page .hero {
    min-height: 0 !important; display: block !important; padding: 0 !important;
    background: var(--paper) !important; border: 1px solid var(--gold-soft); border-radius: 20px;
  }
  body.home-page .hero::before { inset: auto; top: 0; left: 0; right: 0; bottom: auto; height: 58vh; }
  body.home-page .a3-hero-photo { position: relative; height: 58vh; animation: none; }
  body.home-page .a3-grain { inset: auto; top: 0; left: 0; right: 0; height: 58vh; }
  body.home-page .hero::after {
    inset: auto; top: 0; left: 0; right: 0; height: 58vh;
    background: linear-gradient(180deg, rgba(7,20,35,0.22), rgba(7,20,35,0) 42%);
  }
  body.home-page .a3-hero-lockup { top: 16px; left: 16px; }
  body.home-page .a3-side,
  body.home-page .a3-scroll,
  body.home-page .a3-marquee { display: none !important; }
  body.home-page .hero-copy {
    position: static !important; transform: none !important;
    top: auto !important; right: auto !important; bottom: auto !important;
    width: auto !important; max-width: none !important;
    margin: 0 !important; padding: 24px 20px 22px !important; background: var(--paper) !important;
  }
  body.home-page .hero h1 { color: var(--accent-dark) !important; text-shadow: none; font-size: clamp(2.1rem, 8vw, 3rem) !important; }
  body.home-page .hero-copy .eyebrow,
  body.home-page #hero-eyebrow { color: var(--terra) !important; }
  body.home-page .hero-text { color: var(--muted) !important; text-shadow: none; }
}

/* ============================================================
   A3 · HEADER — bottone "Home" (pillola cobalto con icona casa)
   Sostituisce il testo "Home" nudo con un pulsante coerente con
   gli altri tondi (menu/carrello) e con la palette maiolica.
   ============================================================ */
.app-header-brand {
  gap: 8px !important;
  padding: 0 16px !important;
  background: linear-gradient(180deg, #fffaf0, #fff3e3) !important;
  border: 1px solid var(--gold-soft) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 6px 16px rgba(22, 49, 79, 0.07) !important;
}
.app-header-brand:hover,
.app-header-brand:focus-visible {
  background: linear-gradient(180deg, #fff6ea, #ffece0) !important;
  border-color: var(--terra) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 22px rgba(200, 100, 47, 0.16) !important;
}
.app-header-brand__hint {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  color: var(--accent-dark) !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  transition: color 0.18s ease;
}
.app-header-brand__hint::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2.6 1.5 11.2l1.5 1.85L4 12.3V21h6v-5.4h4V21h6v-8.7l1 .75 1.5-1.85z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2.6 1.5 11.2l1.5 1.85L4 12.3V21h6v-5.4h4V21h6v-8.7l1 .75 1.5-1.85z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.app-header-brand:hover .app-header-brand__hint,
.app-header-brand:focus-visible .app-header-brand__hint {
  color: var(--terra) !important;
}

/* ============================================================
   A3 · BARRA LATERALE (drawer) — rifinitura maiolica
   Solo estetica: nessuna modifica a posizione / transform / z-index
   / visibilità, così il menù continua a funzionare.
   ============================================================ */
.app-drawer__panel {
  background:
    linear-gradient(180deg, #fffaf0 0%, #fff4e6 60%, #fdeedd 100%) !important;
  box-shadow: 22px 0 60px rgba(11, 34, 56, 0.22) !important;
  border-right: 4px solid transparent;
  border-image: repeating-linear-gradient(180deg,
    var(--accent) 0 18px, var(--terra) 18px 36px, var(--gold) 36px 54px, var(--maiolica-green) 54px 72px) 4;
}

/* testata "Navigazione / Chiudi" come pillola calda */
.navbar-mobile-head.app-drawer__head {
  background: linear-gradient(180deg, #fffaf0, #fff3e3) !important;
  border: 1px solid var(--gold-soft);
  box-shadow: 0 10px 26px rgba(22, 49, 79, 0.12);
}
.app-drawer__head > span {
  color: var(--accent-dark) !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

/* cornice logo nel drawer: carta calda */
.app-drawer__brand .brand-logo-frame {
  background: linear-gradient(180deg, #fffdf7, #fff6ea) !important;
  border: 1px solid var(--gold-soft) !important;
  box-shadow: 0 14px 30px rgba(22, 49, 79, 0.1) !important;
}

/* voci di menù: schede calde, inchiostro cobalto, bordo oro */
.app-drawer__nav a {
  background: linear-gradient(180deg, #fffdf7, #fff6ea) !important;
  border: 1px solid var(--gold-soft) !important;
  color: var(--ink) !important;
  font-weight: 600;
  border-radius: 14px !important;
}
.app-drawer__nav a:hover {
  background: linear-gradient(180deg, #fff7ec, #ffeede) !important;
  border-color: var(--terra) !important;
  color: var(--accent-dark) !important;
}
.app-drawer__nav a[aria-current="page"] {
  background: linear-gradient(180deg, #fff4e3, #ffe9d6) !important;
  border-color: var(--terra) !important;
  color: var(--accent-dark) !important;
}
/* sottolineatura animata in terracotta+oro (override del blu di base) */
.app-drawer__nav a::after {
  background: linear-gradient(90deg, var(--terra), var(--gold)) !important;
}

/* etichetta "In questa pagina": maiuscoletto terracotta */
.app-drawer__section-label {
  color: var(--terra) !important;
  letter-spacing: 0.2em;
}

/* link "Area Riservata": discreto ma leggibile */
.app-drawer__nav a.admin-link {
  background: transparent !important;
  border: 1px dashed var(--line) !important;
  color: var(--muted) !important;
}

/* carrello nel footer del drawer: bottone terracotta coerente */
.app-drawer__footer .cart-button {
  background: linear-gradient(180deg, var(--terra), #a94f22) !important;
  border: 1px solid #a94f22 !important;
  border-radius: 999px !important;
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(200, 100, 47, 0.26) !important;
}
