/*
 * FornitureitcTheme — home.css (redesign 2026, Fase 2)
 * Solo homepage (front-page.php). Riferimento: REDESIGN/mockup/Main.dc.html e Mobile.dc.html
 * Card, pulsanti e fasce a carosello sono in layout.css.
 */

/* =============================================
   HERO + ORDINE RAPIDO
   ============================================= */
.home-hero {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 24px;
  margin-top: 32px;
}
.home-hero__main {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 56px 56px 48px;
  border-radius: var(--r-lg);
  background: var(--brand);
  color: #fff;
}
.home-hero__eyebrow,
.home-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #AFC0F2;
}
.home-eyebrow { color: var(--muted); }
.home-hero__main h1 {
  margin: 0;
  font-size: 58px;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
}
.home-hero__main p {
  margin: 0;
  max-width: 560px;
  font-size: 18px;
  line-height: 1.55;
  color: #D9DDEB;
}
.home-hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.home-hero__cta .fit-btn { min-height: 52px; padding: 0 26px; }
.home-hero__note { font-size: 14px; color: #D9DDEB; max-width: 320px; line-height: 1.45; }
/* Tricolore: filetto di 6px in fondo all'hero */
.home-hero__flag { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; display: flex; }
.home-hero__flag span { flex: 1 1 0; }
.home-hero__flag span:nth-child(1) { background: var(--ok); }
.home-hero__flag span:nth-child(2) { background: #fff; }
.home-hero__flag span:nth-child(3) { background: var(--sale); }

.home-qo {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  scroll-margin-top: 110px;
}
.home-qo__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.home-qo__head h2 { margin: 0; font-size: 24px; font-weight: 700; }
.home-qo__head span { font-size: 13px; color: var(--muted); }
.home-qo__intro { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.home-qo__form { display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; }
.home-qo__form > label:first-child { font-size: 13px; font-weight: 600; }
.home-qo__form textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--line-input);
  border-radius: var(--r);
  background: #FAFAF8;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}
.home-qo__form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); background: #fff; }
.home-qo__form textarea::placeholder { color: var(--placeholder); }
.home-qo__csv {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand);
  cursor: pointer;
}
.home-qo__csv:hover span { text-decoration: underline; }
.home-qo__csv:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.home-qo__result:empty { display: none; }
.home-qo__result {
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--ground);
  font-size: 14px;
  line-height: 1.5;
}
.home-qo__result.is-ok { background: var(--ok-bg); }
.home-qo__result.is-error { background: #FBE9EC; }
.home-qo__result p { margin: 0 0 4px; }
.home-qo__result ul { margin: 4px 0 0; padding-left: 18px; list-style: disc; }
.home-qo__result code { font-family: var(--font-mono); font-size: 13px; }
.home-qo__locked {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: var(--r);
  background: var(--ground);
  color: var(--ink-2);
}
.home-qo__locked p { margin: 0; font-size: 14px; line-height: 1.5; }
.home-qo__link { font-size: 14px; font-weight: 500; }

/* Collegamento alla pagina Ordine rapido (solo mobile) */
.home-qo-link { display: none; }

/* =============================================
   BARRA VANTAGGI
   ============================================= */
.home-usp {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.home-usp li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-right: 1px solid var(--line-soft);
}
.home-usp li:last-child { border-right: 0; }
.home-usp__ico {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--brand-tint);
  color: var(--brand);
}
.home-usp strong { display: block; font-size: 15px; }
.home-usp li > span:last-child > span { display: block; font-size: 13px; color: var(--muted); }
.home-usp a { color: var(--muted); }
.home-usp a:hover { color: var(--brand); }

/* =============================================
   REPARTI (bento 4 colonne)
   ============================================= */
.home-sec { margin-top: 64px; }
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: 250px 250px;
  grid-auto-rows: minmax(150px, auto);
  gap: 16px;
}
.bento__tile {
  display: flex;
  gap: 12px;
  min-width: 0;
  padding: 24px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.bento__tile:hover { color: var(--ink); text-decoration: none; border-color: var(--brand); box-shadow: 0 8px 24px rgba(15,26,69,.08); }
.bento__tile:hover strong { color: var(--brand); }
.bento__txt { display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-width: 0; }
.bento__txt strong { font-family: var(--font-display); font-size: 21px; font-weight: 700; line-height: 1.15; }
.bento__desc { font-size: 14px; line-height: 1.6; color: var(--muted); }
.bento__count { margin-top: auto; font-family: var(--font-mono); font-size: 13px; color: var(--brand); }
.bento__img { object-fit: contain; mix-blend-mode: multiply; flex-shrink: 0; }

.bento__tile--alto { grid-row: span 2; flex-direction: column; padding: 28px; }
.bento__tile--alto .bento__txt { flex: 0 0 auto; }
.bento__tile--alto strong { font-size: 26px; }
.bento__tile--alto .bento__img { margin-top: auto; align-self: center; width: 250px; height: 250px; max-width: 100%; }
.bento__tile--immagine .bento__img { width: 130px; height: 200px; }
.bento__tile--conteggio { flex-direction: column; }
.bento__tile--conteggio .bento__txt { height: 100%; }
.bento__tile--tenue,
.bento__tile--tenue-largo { background: var(--ground-2); border-color: transparent; }
.bento__tile--tenue .bento__desc,
.bento__tile--tenue-largo .bento__desc { color: var(--ink-2); }
.bento__tile--tenue-largo { grid-column: span 2; padding: 24px 28px; }

/* =============================================
   MARCHE IN CATALOGO
   ============================================= */
.home-brands {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 56px;
  padding: 28px 0;
  border-top: 1px solid #DEDBD2;
  border-bottom: 1px solid #DEDBD2;
}
.home-brands__label {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.home-brands__list {
  flex: 1 1 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  overflow-x: auto;
  scrollbar-width: none;
}
.home-brands__list::-webkit-scrollbar { display: none; }
.home-brands__list a { color: var(--ink-2); white-space: nowrap; padding: 6px 0; }
.home-brands__list a:hover { color: var(--brand); text-decoration: none; }

/* =============================================
   LISTINI + DIVENTA RIVENDITORE
   ============================================= */
.home-duo {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 24px;
  margin-top: 64px;
}
.home-duo h2 { margin: 0; font-size: 30px; line-height: 1.1; }
.home-listini {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.home-listini p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.home-listini__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 8px; }

.home-join {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px;
  border-radius: var(--r-lg);
  background: var(--brand-deep);
  color: #fff;
}
.home-join h2 { color: #fff; }
.home-join .fit-btn { align-self: flex-start; }
.home-join__intro { margin: 0; font-size: 15px; line-height: 1.6; color: #C4CAE0; }
.home-join__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.home-join__steps li { display: flex; flex-direction: column; gap: 10px; }
.home-join__steps span { font-family: var(--font-mono); font-size: 14px; color: #AFC0F2; }
.home-join__steps strong { font-size: 17px; line-height: 1.3; }
.home-join__steps p { margin: 0; font-size: 14px; line-height: 1.55; color: #C4CAE0; }
.home-join__contacts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 18px; }
.home-join__contacts li { display: flex; align-items: center; gap: 12px; }
.home-join__contacts .fit-ico { color: #AFC0F2; }
.home-join__contacts a { color: #fff; }

/* =============================================
   TABLET (< 1025px)
   ============================================= */
@media (max-width: 1024px) {
  .home-hero { grid-template-columns: 1fr; gap: 12px; margin-top: 4px; }
  .home-hero__main { gap: 14px; padding: 28px 22px 30px; border-radius: 14px; }
  .home-hero__eyebrow { font-size: 12px; }
  .home-hero__main h1 { font-size: 32px; line-height: 1.05; }
  .home-hero__main p { font-size: 15px; line-height: 1.5; }
  .home-hero__cta .fit-btn { min-height: 50px; }
  .home-hero__flag { height: 5px; }
  .home-qo { padding: 20px 18px; border-radius: var(--r-md); scroll-margin-top: 16px; }
  /* con la pagina dedicata, su mobile la card completa lascia il posto al collegamento */
  .home-hero.has-qo-page .home-qo { display: none; }
  .home-qo-link {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    color: var(--ink);
  }
  .home-qo-link:hover { color: var(--ink); text-decoration: none; border-color: var(--brand); }
  .home-qo-link__ico {
    width: 44px; height: 44px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; background: var(--brand-tint); color: var(--brand);
  }
  .home-qo-link__txt { display: flex; flex-direction: column; flex: 1 1 auto; }
  .home-qo-link__txt strong { font-size: 15px; }
  .home-qo-link__txt span { font-size: 13px; color: var(--muted); }

  .home-usp { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
  .home-usp li { padding: 16px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .home-usp li:nth-child(odd) { border-right: 1px solid var(--line-soft); }
  .home-usp li:nth-last-child(-n+2) { border-bottom: 0; }

  .home-sec { margin-top: 28px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: auto; gap: 10px; }
  .bento__tile { padding: 14px; border-radius: var(--r-md); }
  .bento__tile--alto,
  .bento__tile--immagine { grid-row: auto; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 14px; }
  .bento__tile--alto .bento__img,
  .bento__tile--immagine .bento__img { width: 100%; height: 110px; margin: 0; }
  .bento__tile--alto .bento__txt { flex: 1 1 auto; }
  .bento__txt { gap: 4px; }
  .bento__txt strong,
  .bento__tile--alto strong { font-size: 15px; font-family: var(--font-body); font-weight: 600; }
  .bento__tile--alto .bento__desc,
  .bento__tile--immagine .bento__desc,
  .bento__tile--conteggio .bento__desc { display: none; }
  .bento__desc { font-size: 13px; line-height: 1.45; }
  .bento__count { margin-top: 4px; }

  .home-brands { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 28px; padding: 18px 0; }
  .home-brands__list { width: 100%; justify-content: flex-start; gap: 28px; font-size: 20px; }

  .home-duo { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
  .home-duo h2 { font-size: 22px; }
  .home-listini, .home-join { padding: 22px; gap: 12px; border-radius: 14px; }
  .home-join__steps { grid-template-columns: 1fr; gap: 14px; }
  .home-listini__cta .fit-btn, .home-join .fit-btn { flex: 1 1 auto; align-self: stretch; }
}

@media (max-width: 600px) {
  .home-hero__long { display: none; }
  .home-hero__cta { flex-direction: column; align-items: stretch; }
  .home-hero__login { display: none; } /* "Accedi" è già nell'header */
  /* Vantaggi: 2×2 con i soli titoli (il mockup mobile non li mostra, qui restano compatti) */
  .home-usp li { gap: 10px; padding: 12px; }
  .home-usp__ico { width: 36px; height: 36px; border-radius: 8px; }
  .home-usp__ico .fit-ico { width: 18px; height: 18px; }
  .home-usp strong { font-size: 13px; line-height: 1.3; }
  .home-usp li > span:last-child > span { display: none; }
}
