/* ════════════════════════════════════════════════════════════
   HUB PER NOME DI STRAIN — hub.css  (/seeds, /seeds/{slug})
   Palette "Emerald Noir" (come strain.css). Tabella → card sotto 760px.
════════════════════════════════════════════════════════════ */

.hub {
  --hb-bg:        #070b09;
  --hb-panel:     rgba(255, 255, 255, 0.035);
  --hb-panel-2:   #0b120e;
  --hb-line:      rgba(52, 211, 153, 0.18);
  --hb-line-soft: rgba(255, 255, 255, 0.07);
  --hb-em:        #34d399;
  --hb-em-bright: #6ee7b7;
  --hb-em-deep:   #059669;
  --hb-gold:      #f5c451;
  --hb-text:      #e8f5ee;
  --hb-dim:       rgba(232, 245, 238, 0.66);
  --hb-radius:    14px;

  box-sizing: border-box;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 24px 16px 56px;
  color: var(--hb-text);
  font-family: 'Open Sans', system-ui, sans-serif;
  line-height: 1.55;
}
.hub *, .hub *::before, .hub *::after { box-sizing: border-box; }
.hub h1, .hub h2 { font-family: 'Montserrat', sans-serif; line-height: 1.2; color: var(--hb-text); }
.hub h2 { font-size: 1.3rem; margin: 0 0 14px; }
.hub a { color: var(--hb-em-bright); }
.hub .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hub section { margin-top: 28px; }

/* ── anteprima admin / breadcrumb ── */
.hub-preview {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 16px;
  border: 1px dashed var(--hb-gold); border-radius: 10px;
  background: rgba(245, 196, 81, 0.08); color: var(--hb-gold); font-size: .9rem;
}
.hub-preview a { color: var(--hb-gold); font-weight: 700; margin-left: auto; }
.hub-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--hb-dim); margin-bottom: 14px; }
.hub-crumbs a { color: var(--hb-dim); text-decoration: none; }
.hub-crumbs a:hover { color: var(--hb-em-bright); }

/* ── testata ── */
.hub-hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin: 0 0 10px; }
.hub-sub { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 14px; color: var(--hb-dim); font-size: .95rem; }
.hub-sub span + span::before { content: none; }
.hub-sub-price { color: var(--hb-em-bright); font-weight: 700; }
.hub-type { display: inline-flex; gap: 6px; align-items: center; padding: 1px 10px; border-radius: 999px; border: 1px solid var(--hb-line); }
.hub-type--auto { color: var(--hb-gold); border-color: rgba(245, 196, 81, .35); }
.hub-sibling {
  display: inline-flex; gap: 8px; align-items: center;
  padding: 7px 14px; margin-bottom: 18px; border-radius: 999px;
  background: var(--hb-panel); border: 1px solid var(--hb-line); text-decoration: none; font-size: .9rem;
}
.hub-sibling:hover { border-color: var(--hb-em); }

.hub-photos {
  list-style: none; margin: 0; padding: 0 0 6px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.hub-photos a {
  display: block; position: relative; overflow: hidden; border-radius: var(--hb-radius);
  background: var(--hb-panel-2); border: 1px solid var(--hb-line-soft); text-decoration: none;
  aspect-ratio: 1 / 1;
}
.hub-photos img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.hub-photos a:hover img { transform: scale(1.04); }
.hub-photos span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78)); color: #fff; font-size: .85rem; font-weight: 600;
}

/* ── in breve ── */
.hub-facts {
  padding: 16px 18px; border-radius: var(--hb-radius);
  background: var(--hb-panel); border: 1px solid var(--hb-line);
}
.hub-facts dl { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 0; }
.hub-facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--hb-dim); }
.hub-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 1.05rem; }
.hub-intro { margin: 14px 0 0; color: var(--hb-text); }
.hub-hero .hub-intro { margin: 0 0 8px; color: var(--hb-dim); max-width: 760px; }

/* ── tabella di confronto ── */
.hub-table-wrap { overflow-x: auto; border-radius: var(--hb-radius); border: 1px solid var(--hb-line); }
.hub-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.hub-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--hb-panel-2); color: var(--hb-dim); text-align: left; font-weight: 600;
  padding: 10px 12px; border-bottom: 1px solid var(--hb-line); white-space: nowrap;
}
.hub-table thead button {
  all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; color: inherit;
}
.hub-table thead button::after { content: '↕'; opacity: .35; font-size: .8em; }
.hub-table th[aria-sort="ascending"] button::after { content: '↑'; opacity: 1; color: var(--hb-em); }
.hub-table th[aria-sort="descending"] button::after { content: '↓'; opacity: 1; color: var(--hb-em); }
.hub-table thead button:focus-visible { outline: 2px solid var(--hb-em); outline-offset: 3px; border-radius: 4px; }
.hub-table td { padding: 10px 12px; border-bottom: 1px solid var(--hb-line-soft); vertical-align: middle; }
.hub-table tbody tr:last-child td { border-bottom: 0; }
.hub-table tbody tr:hover { background: rgba(52, 211, 153, 0.05); }
.hub-c-bank { display: flex; gap: 10px; align-items: center; min-width: 190px; }
.hub-c-bank img { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; background: #fff; flex: none; }
.hub-c-bank span { display: flex; flex-direction: column; }
.hub-c-bank small, .hub-c-price small { color: var(--hb-dim); font-size: .8rem; }
.hub-c-gen { max-width: 220px; font-size: .85rem; }
.hub-c-price strong { color: var(--hb-em-bright); font-size: 1.05rem; }
.hub-c-price small { display: block; }
.hub-per { color: var(--hb-dim); font-size: .8rem; margin-left: 2px; }
.hub-na { color: rgba(232, 245, 238, 0.35); }
.hub-c-links { white-space: nowrap; text-align: right; }
.hub-btn {
  display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; margin: 2px 0 2px 6px;
  border-radius: 999px; border: 1px solid var(--hb-line); color: var(--hb-text) !important;
  text-decoration: none; font-weight: 600; font-size: .85rem;
}
.hub-btn:hover { border-color: var(--hb-em); }
.hub-btn--buy { background: var(--hb-em-deep); border-color: var(--hb-em-deep); color: #fff !important; }
.hub-btn--buy:hover { background: var(--hb-em); border-color: var(--hb-em); color: #04130c !important; }
.hub-btn:focus-visible { outline: 2px solid var(--hb-em-bright); outline-offset: 2px; }

/* ── descrizione, tag, FAQ, simili ── */
.hub-desc-body { max-width: 820px; }
.hub-desc-body p { margin: 0 0 12px; }
.hub-note { color: var(--hb-dim); font-size: .88rem; }
.hub-tags ul, .hub-similar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hub-tags li {
  display: inline-flex; gap: 8px; align-items: center; padding: 5px 12px 5px 6px; border-radius: 999px;
  background: var(--hb-panel); border: 1px solid var(--hb-line-soft); font-size: .88rem;
}
.hub-tags li img { width: 22px; height: 22px; object-fit: contain; }
.hub-tags li b { color: var(--hb-dim); font-weight: 600; font-size: .78rem; }
.hub-faq details {
  border: 1px solid var(--hb-line-soft); border-radius: 10px; background: var(--hb-panel);
  padding: 0 16px; margin-bottom: 8px;
}
.hub-faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.hub-faq summary:focus-visible { outline: 2px solid var(--hb-em); outline-offset: 2px; border-radius: 4px; }
.hub-faq details p { margin: 0 0 14px; color: var(--hb-dim); }
.hub-similar a {
  display: inline-flex; gap: 8px; align-items: baseline; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--hb-line); text-decoration: none; background: var(--hb-panel);
}
.hub-similar a:hover { border-color: var(--hb-em); }
.hub-similar small { color: var(--hb-dim); }
.hub-disclaimer { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--hb-line-soft); color: var(--hb-dim); font-size: .8rem; }
.hub-disclaimer p { margin: 0 0 6px; }

/* ── indice /seeds ── */
.hub-letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 8px; }
.hub-letters a {
  min-width: 34px; padding: 5px 8px; text-align: center; border-radius: 8px;
  border: 1px solid var(--hb-line); text-decoration: none; font-weight: 700;
}
.hub-letter h2 { border-bottom: 1px solid var(--hb-line-soft); padding-bottom: 6px; }
.hub-letter ul { list-style: none; margin: 0; padding: 0; columns: 3 240px; column-gap: 24px; }
.hub-letter li { break-inside: avoid; padding: 4px 0; }
.hub-letter a { text-decoration: none; }
.hub-letter small { color: var(--hb-dim); margin-left: 6px; }
.hub-letter .fa-bolt { color: var(--hb-gold); margin-left: 4px; font-size: .8em; }

/* ── mobile: righe della tabella come card ── */
@media (max-width: 760px) {
  .hub-photos { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; }
  .hub-photos li { scroll-snap-align: start; }
  .hub-table-wrap { border: 0; overflow: visible; }
  .hub-table thead { display: block; }
  .hub-table thead tr { display: flex; flex-wrap: wrap; gap: 6px; }
  .hub-table thead th { position: static; padding: 0; border: 0; background: none; }
  .hub-table thead th:not(:has(button)) { display: none; }
  .hub-table thead button { padding: 5px 10px; border: 1px solid var(--hb-line); border-radius: 999px; font-size: .82rem; }
  .hub-table tbody, .hub-table tr, .hub-table td { display: block; }
  .hub-table tbody tr {
    margin-top: 12px; padding: 12px 14px; border-radius: var(--hb-radius);
    border: 1px solid var(--hb-line); background: var(--hb-panel);
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px;
  }
  .hub-table td { padding: 0; border: 0; }
  .hub-table td[data-label]::before {
    content: attr(data-label); display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--hb-dim);
  }
  .hub-c-bank, .hub-c-links, .hub-c-gen { grid-column: 1 / -1; }
  .hub-table td.hub-empty { display: none; }  /* dato mancante: niente riga "–" nella card */
  .hub-c-gen { max-width: none; }
  .hub-c-links { text-align: left; display: flex; gap: 8px; }
  .hub-btn { margin: 4px 0 0; flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-photos img { transition: none; }
}
