/* ==================================================
🧢 BLOCKS-MARCHIO.CSS — Vetrineshop
Stili principali per CPT "marchio" — Giant Cat Studio
================================================== */


/* ================================
📦 Wrapper generale scheda marchio
=============================== */
.scheda-marchio {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
  box-sizing: border-box;
}


/* ================================
🏷️ Titolo e header marchio
=============================== */
.header-marchio-flex {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
}

.logo-marchio img {
  max-width: 276px; /* base 240px + 15% */
  height: auto;
  display: block;
  margin-bottom: 1rem;
}

.titolo-marchio {
  flex: 1;
}

.scheda-marchio .entry-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}


/* ================================
🏷️ Categorie e tag del marchio
=============================== */
.tag-marchio .tag {
  display: inline-block;
  background-color: #f0f0f0;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  margin-right: 8px;
  margin-bottom: 8px;
}

.tipi-marchio {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tipi-marchio .term-badge {
  background-color: #f1f1f1;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #444;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
  margin-bottom: 1rem;
}

.tipi-marchio .term-badge:hover {
  background-color: #ddd;
  color: #000;
}


/* ================================
📱 Responsive header marchio
=============================== */
@media (max-width: 768px) {
  .header-marchio-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .titolo-marchio {
    width: 100%;
  }

  .tag-marchio {
    justify-content: center;
  }
}


/* ================================
📄 Contenuto ACF
=============================== */
.acf-block-logo_marchio img {
  max-width: 180px;
  height: auto;
  margin: 1rem auto;
}

.acf-block-sito_marchio a,
.acf-block-instagram_marchio a {
  font-size: 1.1rem;
  color: var(--color-accent);
  font-weight: 500;
}

.acf-block-descrizione_marchio,
.acf-block-contenuto_marchio{
  margin: 2.2rem 0;
  font-size: 1.02rem;
  line-height: 1.72;
  letter-spacing: 0.003em;
  color: #334155;
}
.acf-block-contenuto_marchio h2,
.acf-block-contenuto_marchio h3{
  letter-spacing: -0.015em;
  line-height: 1.12;
}

.acf-block-contenuto_marchio p{
  margin: 0 0 1.1em;
}


/* ================================
🛍️ Negozi Rivenditori — geolocalizzazione
=============================== */
.acf-block-negozi_rivenditori {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 3rem 0 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.acf-block-negozi_rivenditori .titolo-rivenditori{
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  white-space: nowrap;
}

.acf-block-negozi_rivenditori input[type="text"] {
  height: 38px;
  padding: 0 0.75em;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  flex: 1 1 300px;
  min-width: 200px;
  box-sizing: border-box;
}

.acf-block-negozi_rivenditori .label-entro {
  font-size: 1rem;
  margin-left: 0.25em;
  white-space: nowrap;
}

.acf-block-negozi_rivenditori select {
  height: 40px;
  padding: 0 0.5em;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
}

.acf-block-negozi_rivenditori button {
  height: 40px;
  padding: 0 1em;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f9f9f9;
  cursor: pointer;
  transition: background 0.3s ease;
}

.acf-block-negozi_rivenditori button:hover {
  background: #ececec;
}


/* ==================================================
   🛍️ CARD RIVENDITORI — Negozi nella scheda marchio
   ================================================== */

#lista-rivenditori {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  list-style: none;
  padding: 0;
}

/* variante “soft” quando non ci sono prodotti */
#lista-rivenditori .badge-prodotti.is-alt{
  background: #e5e7eb;          /* grigio più presente */
  border: 1px solid #cbd5e1;    /* bordo più deciso */
  color: #111827;               /* testo scuro come CTA */
  box-shadow: none;
}

/* Tablet */
@media (max-width: 1100px){
  #lista-rivenditori{
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile standard: 2 colonne */
@media (max-width: 640px){
  #lista-rivenditori{
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Mobile molto stretto: 1 colonna */
@media (max-width: 380px){
  #lista-rivenditori{
    grid-template-columns: 1fr;
  }
}

.marchio-item {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: background 0.3s ease, transform 0.3s ease;
  min-height: 240px;
  box-sizing: border-box;
}

.marchio-item:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

/* 🎯 Logo centrato e più grande */
.logo-negozio-ridotto {
  margin-bottom: 1rem;
}

.logo-negozio-ridotto img {
  max-width: 160px; /* ✅ più equilibrato */
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .logo-negozio-ridotto img {
    max-width: 120px;
  }
}
.logo-negozio-ridotto{
  min-height: 86px;
  display:flex;
  align-items:center;
  justify-content:center;
}
@media (max-width: 768px){
  .logo-negozio-ridotto{ min-height: 72px; }
}

/* 📋 Info del negozio */
.contenuto-negozio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
}

.dati-negozio {
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
}

.dati-negozio i[data-lucide] {
  stroke: #aaa;
  width: 1rem;
  height: 1rem;
  margin-right: 4px;
  vertical-align: middle;
}

.dati-negozio strong {
  font-weight: 600;
  font-size: 1.1rem;
  color: #000;
}

/* 📍 Indirizzo */
.dati-negozio .indirizzo {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.95rem;
  color: #666;
}

/* ➡️ Distanza */
.distanza-rivenditore {
  display: inline-block;
  margin-left: 0.5em;
  font-size: 0.95rem;
  font-weight: 500;
  color: #555;
}

/* Responsive */
@media (max-width: 768px) {
  .marchio-item {
    padding: 1.5rem 1rem;
  }

  .logo-negozio-ridotto img {
    max-width: 140px;
  }
}
/* ================================
📏 Messaggio ricerca + risultati
=============================== */
#messaggio-ricerca {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background-color: #f8f9fa;
  border-left: 4px solid #ccc;
  font-size: 0.95rem;
  font-style: italic;
  color: #444;
  border-radius: 6px;
  transition: all 0.3s ease;
}

#messaggio-ricerca[data-tipo="posizione-attuale"] {
  border-left-color: #2a82e4;
  background-color: #eef6fd;
}

#messaggio-ricerca[data-tipo="nessun-risultato"] {
  border-left-color: #e43c3c;
  background-color: #fdf0f0;
  font-weight: 500;
  color: #b00000;
}

.distanza-rivenditore {
  margin-left: 0.5em;
  font-size: 0.95rem;
  font-weight: 500;
  color: #555;
}


/* ================================
💡 Marchi Correlati
=============================== */
.marchi-correlati {
  margin-top: 60px;
  padding: 40px 0;
  background-color: #f9f9f9;
}

.marchi-correlati h2{
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 30px;
}

.griglia-marchi-correlati {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.scheda-marchio-correlato {
  width: 150px;
  text-align: center;
}

.logo-marchio-correlato img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  aspect-ratio: 1 / 1;
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 10px;
  transition: transform 0.2s ease;
}

.logo-marchio-correlato img:hover {
  transform: scale(1.05);
}

.scheda-marchio-correlato h3 {
  font-size: 1rem;
  margin: 10px 0 4px;
}

.etichetta-categoria {
  display: inline-block;
  background-color: #eee;
  color: #444;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
}
.vs-fav-heart{
  position:absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.85);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size: 18px;
  font-weight: 900;
}

.vs-fav-heart.is-fav{
  background: rgba(255,255,255,.95);
}

/* ===================================================
   Preferiti marchi – cuore overlay (wishlist style)
   =================================================== */

.scheda-marchio-archivio{
  position: relative;
}

.vs-fav-heart{
  position:absolute;
  top: 12px;
  right: 12px;
  z-index: 10;

  width: 38px;
  height: 38px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  border: 0;
  padding: 0;

  font-size: 22px;
  line-height: 1;
  cursor: pointer;

  color: #111;       /* scuro come wishlist */
  opacity: .9;
  transition: transform .12s ease, opacity .12s ease;
}

.vs-fav-heart:hover{
  opacity: 1;
  transform: scale(1.06);
}

.vs-fav-heart.is-fav{
  opacity: 1;
}
/* ✅ Card negozio cliccabile (wrapper <a>) */
#lista-rivenditori .rivenditore-card{
  display:flex;
  flex-direction:column;
  width:100%;
  height:100%;
  text-decoration:none;
  color:inherit;
}

/* ✅ badge prodotti: visibile quando ON, spazio stabile quando OFF */
/* ===========================
   Badge prodotti — versione finale (premium)
   =========================== */

/* ✅ Badge prodotti: premium + spazio reale sopra (senza cambiare HTML) */

/* spazio tra indirizzo e badge: lo mettiamo qui, non nel badge */
#lista-rivenditori .dati-negozio{
  padding-bottom: 14px;
}

/* badge in basso (auto) + stile premium */
#lista-rivenditori .badge-prodotti{
  margin-top: auto;
  min-height: 42px;
  padding: 8px 16px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  border-radius: 999px;

  border: 1px solid rgba(17,24,39,.95);
  background: linear-gradient(180deg, #111827 0%, #0b1220 100%);
  color: #fff;

  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: .01em;

  box-shadow: 0 10px 24px rgba(0,0,0,.14);
}

/* OFF: invisibile ma mantiene spazio */
#lista-rivenditori .badge-prodotti.is-off{
  visibility: hidden;
}

/* =========================================================
   MOBILE — testo badge più corto (senza cambiare stile)
   ========================================================= */
@media (max-width: 640px){

  #lista-rivenditori .badge-prodotti.is-on{
    font-size: 0; /* nasconde il testo originale */
  }

  #lista-rivenditori .badge-prodotti.is-on::after{
    content: "Prodotti in vetrina";
    font-size: 12px;          /* stesso peso visivo */
    font-weight: 800;
    letter-spacing: .01em;
  }

}
/* =========================================================
   BRAND HERO — single marchio
   Data: 2026-01-31
   ========================================================= */

.scheda-marchio .brand-hero{
  margin: 18px 0 26px;
  padding: 22px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f8fafc;
}

.scheda-marchio .brand-hero__top{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  align-items: start;
}

.scheda-marchio .brand-hero__logo{
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 16px;
  min-height: 180px;
}

.scheda-marchio .brand-hero__logo img{
  max-width: 220px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.scheda-marchio .brand-hero__title{
  margin: 0 0 10px;
  font-size: clamp(2.2rem, 3.2vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.scheda-marchio .brand-hero__lead{
  margin: 0 0 14px;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #334155;
  max-width: 65ch;
}

.scheda-marchio .brand-hero__meta{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 8px 0 10px;
}

.scheda-marchio .brand-hero__links{
  display:flex;
  gap: 8px;
  align-items:center;
}

.scheda-marchio .brand-pill{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}

.scheda-marchio .brand-pill:hover{
  background: #f1f5f9;
}

/* =========================
   CTA NEGOZI — outline elegante
   ========================= */
.scheda-marchio .brand-hero__stat{
  margin-left: auto;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 8px 14px;
  border-radius: 999px;

  background: #fff;
  border: 1px solid #e2e8f0;

  color: #0f172a;

  font-size: 13px;
  font-weight: 700;
  line-height: 1;

  white-space: nowrap;
}

/* numero leggermente più forte */
.scheda-marchio .brand-stat__num{
  font-weight: 800;
}

/* label più morbida */
.scheda-marchio .brand-stat__label{
  font-weight: 600;
  opacity: .85;
}
.scheda-marchio .brand-stat__label{
  letter-spacing: 0.01em;
}

.scheda-marchio .brand-stat__num{
  font-weight: 900;
  font-size: 18px;
}

.scheda-marchio .brand-stat__label{
  font-weight: 800;
  font-size: 13px;
  opacity: .9;
}

.scheda-marchio .brand-hero__tags,
.scheda-marchio .brand-hero__cats{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.scheda-marchio .brand-tag{
  display:inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.scheda-marchio .brand-cat{
  display:inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  text-decoration:none;
  font-size: 13px;
  font-weight: 800;
}

.scheda-marchio .brand-cat:hover{
  background:#f1f5f9;
}

/* Responsive */
@media (max-width: 900px){
  .scheda-marchio .brand-hero__top{
    grid-template-columns: 1fr;
  }
  .scheda-marchio .brand-hero__stat{
    margin-left: 0;
  }
  .scheda-marchio .brand-hero__logo{
    min-height: 140px;
  }
}
/* =========================================================
   Brand Hero — cluster pillole
   ========================================================= */

.scheda-marchio .brand-hero__links{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.scheda-marchio .brand-pill{
  display: inline-flex;
  align-items: center;
  gap: 7px;

  padding: 10px 14px;
  min-height: 42px;
  border-radius: 999px;

  border: 1px solid #e5e7eb;
  background: #fff;

  color: #0f172a;
  text-decoration: none;

  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1;
  letter-spacing: 0.012em;

  transition:
    background .18s ease,
    border-color .18s ease,
    transform .18s ease,
    box-shadow .18s ease;
}

/* =========================================================
   Brand Hero — gerarchia pillole
   ========================================================= */

/* primaria: Preferiti */
/* =========================================================
   Preferiti — versione premium soft (NO dark)
   ========================================================= */

.scheda-marchio .brand-pill--fav{
  border-color: #d1d5db;
  background: #f8fafc;
  color: #0f172a;

  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}

/* hover elegante */
.scheda-marchio .brand-pill--fav:hover{
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.scheda-marchio .brand-pill--fav:hover{
  background: #111827;
  border-color: #111827;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
}

/* secondarie: sito / instagram */
.scheda-marchio .brand-pill:not(.brand-pill--fav):hover{
  background: #f8fafc;
  border-color: #d1d5db;
  transform: translateY(-1px);
}
.scheda-marchio .brand-pill:hover{
  background: #f8fafc;
  border-color: #d1d5db;
  transform: translateY(-1px);
}

.scheda-marchio .brand-pill:hover{
  background: #f1f5f9;
}

/* =========================================================
   Brand Hero — lead full width (no truncation)
   ========================================================= */

.scheda-marchio .brand-hero__lead{
  margin: 0 0 16px;
  max-width: none;
  padding-right: 180px;
  font-size: 1.06rem;
  line-height: 1.62;
  letter-spacing: 0.005em;
  color: #334155;
}

@media (max-width: 900px){
  .scheda-marchio .brand-hero__lead{
    padding-right: 0;
    font-size: 1rem;
    line-height: 1.6;
  }
}

/* =========================================================
   Preferiti — pill dinamica con nome marchio
   ========================================================= */

.scheda-marchio .brand-pill--fav{
  cursor: pointer;
  user-select: none;
  position: relative;
}

/* Cuore */
.scheda-marchio .brand-pill--fav::before{
  content: "♡";
  font-size: 16px;
  font-weight: 700;
  opacity: .85;
}

/* Testo OFF (usa data attribute) */
.scheda-marchio .brand-pill--fav .brand-pill__label::after{
  content: "Aggiungi " attr(data-brand-name) " nei preferiti";
}

/* Stato ON */
.scheda-marchio .brand-pill--fav[aria-pressed="true"]::before{
  content: "❤️";
}

/* Testo ON */
.scheda-marchio .brand-pill--fav[aria-pressed="true"] .brand-pill__label::after{
  content: attr(data-brand-name) " è nei tuoi preferiti";
}

/* Mobile: pill compatte */
@media (max-width: 640px){
  .scheda-marchio .brand-pill{
    padding: 7px 10px;
    font-size: 14px;
  }
}

/* Locator rivenditori — stati UI */
.acf-block-negozi_rivenditori.is-active{
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px 12px;
  border: 1px solid #e2e8f0;
}

.acf-block-negozi_rivenditori .is-loading{
  opacity: .65;
  pointer-events: none;
}

.acf-block-negozi_rivenditori button.is-primary{
  border-color:#0f172a;
  background:#0f172a;
  color:#fff;
}

/* =========================
   TITLE + STAT
========================= */
.brand-hero__heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:8px;
}

/* =========================
   DESKTOP
========================= */
@media (min-width: 769px){

  .brand-hero__heading{
    align-items:center;
  }

  .brand-hero__stat{
    margin-left:auto;
  }

}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px){

  .brand-hero__heading{
    display: contents;
  }

  .brand-hero__title{
    order: 1;
  }

  .brand-hero__cats{
    order: 2;
    margin: 8px 0 12px;
  }

  .brand-hero__stat{
    order: 3;
    margin: 0 0 14px;
  }

  .brand-hero__lead{
    order: 4;
  }

  .brand-hero__meta{
    order: 5;
  }

  .brand-hero__tags{
    order: 6;
  }

  .scheda-marchio .brand-hero__main{
    display: flex;
    flex-direction: column;
  }
}

/* =========================
   HERO — respiro desktop
   ========================= */
@media (min-width: 769px){

  .scheda-marchio .brand-hero__heading{
    margin-bottom: 12px;
  }

  .scheda-marchio .brand-hero__cats{
    margin-top: 0;
    margin-bottom: 14px;
  }

  .scheda-marchio .brand-hero__lead{
    margin: 0 0 18px;
  }

  .scheda-marchio .brand-hero__meta{
    margin-top: 0;
    margin-bottom: 12px;
  }

  .scheda-marchio .brand-hero__tags{
    margin-top: 12px;
  }
}


