:root {
  --font-headings: 'Barlow Condensed', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, 'Noto Sans', 'Liberation Sans', sans-serif;

  --primary: #006db7;
  --primary-dark: #e96f14;
  --secondary: #2c2c2c;
  --accent: #62a5d9;
  --bg-main: #ffffff;
  --bg-soft: #ffffff;
  --border: #d6dfe2;
  --text-main: #0f1010;
  --text-muted: #4f6772;

  /* FULL WIDTH */
  --max-width: 100%;

  /* colonna centrale desktop: SEMPRE 1040px */
  --content-max: 1040px;

  --shadow-soft: 0 8px 24px rgba(0,0,0,0.06);
  --radius-md: 10px;
}


/* Self-hosted headings font (WOFF2) */
@font-face{
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/barlow-condensed-latin-600-normal.woff2') format('woff2');
}
@font-face{
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2');
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 3px 8px rgba(0,0,0,0.04);
  position: relative;
  z-index: 1000;
}

body.site-header-floating-active {
  padding-top: var(--site-header-floating-offset, 0px);
}

.site-header.site-header--floating {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  will-change: transform;
  animation: site-header-slide-down 0.18s ease-out;
}

@keyframes site-header-slide-down {
  from {
    transform: translateY(-100%);
    opacity: 0.98;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-block { display: flex; flex-direction: column; justify-content: center; }
.logo-link { display: inline-flex; align-items: center; }
.logo-img {
  height: clamp(44px, 6vw, 74px);
  width: auto;
  min-width: 0;
  max-width: none;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

/* TOP NAV */
.top-nav { flex: 1; display: flex; justify-content: center; }

.top-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 18px;
  font-size: 0.9rem;
}

.nav-item { position: relative; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2c2c2c;
  padding: 6px 0;
  text-decoration: none;
  font-weight: 500;
}

.nav-link:hover { color: var(--primary); text-decoration: none; }

.nav-link.active {
  color: var(--primary);
  font-weight: 500;
  box-shadow: inset 0 -2px 0 var(--primary);
}

.nav-submenu a.active,
.nav-sublink.active,
.nav-link[aria-current="page"],
.nav-sublink[aria-current="page"] {
  color: var(--primary);
  font-weight: 500;
}

.nav-item.has-children > .nav-link::after { content: "▾"; font-size: 0.7rem; }

.nav-submenu {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background-color: #ffffff;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 999;
}

.nav-submenu li a {
  display: block;
  padding: 6px 12px;
  color: var(--text-main);
  font-size: 0.86rem;
  white-space: nowrap;
}

.nav-submenu li a:hover { background-color: #e8f0fb; color: var(--primary-dark); }

.nav-item.has-children:hover > .nav-submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.header-right { display: flex; align-items: center; gap: 8px; }

/* Carrello anche in editoriale quando il menu è condiviso con lo shop */
body:not(.theme-shop) .shop-cart-btn { position: relative; }
body:not(.theme-shop) .shop-cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #c62828;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.btn-small {
  border-radius: 999px;
  border: 1px solid var(--primary-dark);
  padding: 4px 10px;
  font-size: 0.8rem;
  background-color: #ffffff;
  color: var(--primary-dark);
  cursor: pointer;
  white-space: nowrap;
}

.btn-small:hover { background-color: #f0f6f3; }

.nav-toggle {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 4px 10px;
  font-size: 0.8rem;
  background-color: #ffffff;
  cursor: pointer;
  display: none;
  white-space: nowrap;
}

/* LAYOUT PRINCIPALE: full width + colonna centrale fissa 1040 */
.main-layout {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 16px 32px;

  display: grid;
  grid-template-columns: 260px var(--content-max) 280px;
  gap: 24px;

  justify-content: center;
}

.main-layout > main,
.main-layout main {
  width: 100%;
  justify-self: stretch;
  min-width: 0;
}

/* SIDEBAR SINISTRA */
.sidebar {
  position: sticky;
  top: 90px;
  align-self: flex-start;

  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;

  font-size: 0.88rem;
  min-width: 0;
}

.sidebar-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { margin-bottom: 4px; }

.sidebar-nav a {
  display: block;
  padding: 4px 4px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.86rem;
}

.sidebar-nav a:hover { background-color: #e8f0fb; }

.sidebar-nav a.active {
  background-color: #e96f14;
  color: #ffffff;
}

.sidebar-subtitle {
  margin-top: 8px;
  margin-bottom: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* SIDEBAR DESTRA */
.cta-sidebar {
  position: sticky;
  align-self: flex-start;
  min-width: 0;
}

/* BOX LINK SOPRA CTA */
.cta-links {
  margin-bottom: 14px;
  padding: 14px 14px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--bg-soft);
  box-shadow: var(--shadow-soft);
}

.cta-links .sidebar-title { margin-bottom: 8px; }

/* CTA CARD */
.cta-card {
  background-color: #e8f0fb;
  border-radius: var(--radius-md);
  padding: 16px 14px;
  box-shadow: var(--shadow-soft);
  border: 1px solid #2c7eb7;
  color: var(--secondary);
  font-size: 0.92rem;
}

.cta-card h2 { margin-top: 0; margin-bottom: 8px; font-size: 1.05rem; color: var(--secondary);
  font-weight: 700;
}
.cta-card p { margin-top: 0; margin-bottom: 10px; color: var(--secondary); font-size: 0.9rem; }

.cta-card ul {
  padding-left: 18px;
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--secondary);
}

.cta-card .btn-primary {
  display: inline-block;
  border-radius: 999px;
  border: none;
  background-color: var(--primary-dark);
  color: #ffffff;
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 6px;
}

.cta-card .btn-primary:hover { background-color: var(--primary); text-decoration: none; }

.cta-contact { font-size: 0.82rem; margin-top: 4px; }
.cta-contact a { color: var(--secondary); font-weight: 600; }

/* CONTENUTO */
main article {
  background-color: #ffffff;
  border-radius: var(--radius-md);
 /* border: 1px solid var(--border);
   box-shadow: var(--shadow-soft);*/
  padding: 20px 18px;
}

h1, h2, h3 { color: var(--secondary); margin-top: 0;
letter-spacing: 0.2px;
  text-rendering: optimizeLegibility;
}

h1, h2{
  font-family: var(--font-headings);
}

h3{
  font-family: inherit;
}


h1 {
  font-size: clamp(1.9rem, 3.9vw, 2.9rem);
  margin-bottom: 8px;
  color: #2c2c2c;
  font-weight: 700;
}

h2 { font-size: clamp(1.4rem, 2.3vw, 1.8rem); margin-top: 28px; margin-bottom: 8px; }
h3 { font-size: 1.1rem; margin-top: 20px; margin-bottom: 6px; }

p { margin-top: 0; margin-bottom: 10px; color: var(--text-muted); font-size: 0.95rem; font-weight:normal; }
.lead { font-size: 1.02rem; color: var(--text-main); margin-bottom: 14px; }

ul, ol { padding-left: 20px; margin-top: 0; margin-bottom: 10px; color: var(--text-muted); font-size: 0.95rem; }
hr { border: none; border-top: 1px solid var(--border); margin: 22px 0; }

/* ✅ FILTRI (pill tipo breadcrumb ma più piccoli) */
.filters-wrap {
  display: grid;
  gap: 8px;
  margin: 8px 0 10px;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.filters-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 800;
  margin-right: 2px;
}

.filter-chip {
  display: inline-block;
  padding: 3px 10px;            /* più piccolo dei breadcrumb */
  border-radius: 999px;
  background-color: #62a5d9;     /* stile breadcrumb */
  color: #ffffff;
  font-size: 0.78rem;           /* più piccolo */
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.06); /* leggera “cerchiatura” */
}

.filter-chip:hover {
  background-color: var(--primary);
  color: #ffffff;
  text-decoration: none;
}

.filter-chip.active,
.filter-chip[aria-current="page"] {
  background-color: var(--primary);
  border-color: rgba(0,0,0,0.10);
  color: #ffffff;
}

.filter-chip.active:hover,
.filter-chip[aria-current="page"]:hover {
  background-color: #62a5d9;
}

/* BREADCRUMB */
.breadcrumb { margin-bottom: 8px; }

.breadcrumb-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.breadcrumb-item a,
.breadcrumb-item span {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  background-color: #006db7;
  color: #ffffff;
  font-size: 0.8rem;
  text-decoration: none;
}

.breadcrumb-item a:hover { text-decoration: underline; }

.breadcrumb-separator { color: #62a5d9; font-size: 0.8rem; margin: 0 2px; }

/* IMMAGINI WRAP */
.img-wrap { margin: 12px 0; }
.img-wrap img { border-radius: 16px; }
.img-caption { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* Immagini nel corpo degli articoli (content_html) — stesso radius dell'hero */
main article img { border-radius: 16px; }



/* EMBED YOUTUBE NEL CONTENUTO EDITORIALE */
.article-embed {
  margin: 24px 0;
}

.article-embed-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}

.article-embed-media iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (min-width: 1280px) {
  .article-embed.article-embed-youtube {
    width: calc(100% + 48px);
    max-width: calc(100% + 48px);
    margin-left: -24px;
    margin-right: -24px;
  }
}

/* SOTTOCATEGORIE */
.subcat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 6px;
}

.subcat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  box-shadow: var(--shadow-soft);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subcat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background-color: var(--bg-soft);
  color: var(--primary-dark);
  border: 1px solid var(--border);
  font-weight: 600;
}

.subcat-card h3 { margin: 2px 0 0; font-size: 1.02rem; color: var(--secondary); }
.subcat-card p { margin: 0; font-size: 0.92rem; color: var(--text-muted); }

.subcat-link {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-dark);
}


.subcat-thumb {
  border-radius: 12px;
  border: 1px solid #e1e9e4;
  overflow: hidden;
  margin-top: 6px;
  width: 100%;
  max-width: 310px;
  aspect-ratio: 1 / 1;
}

.subcat-thumb picture { display: block; width: 100%; height: 100%; }
.subcat-thumb a { display: block; width: 100%; height: 100%; }
.subcat-thumb img {
  border-radius: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* TREE */
.tree-nav { display: grid; gap: 8px; }

.tree-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.tree-toggle:hover { background-color: #e8f0fb; color: var(--primary-dark); }

.tree-caret {
  display: inline-block;
  width: 14px;
  transform: rotate(0deg);
  transition: transform 0.15s ease;
  color: var(--primary-dark);
  flex: 0 0 auto;
}

.tree-toggle[aria-expanded="true"] .tree-caret { transform: rotate(90deg); }

.tree-children {
  list-style: none;
  margin: 0 0 6px 0;
  padding: 6px 0 0 18px;
  border-left: 2px solid #d6e2da;
  display: none;
  gap: 4px;
}

.tree-toggle[aria-expanded="true"] + .tree-children { display: grid; }

.tree-children a {
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: var(--text-main);
  text-decoration: none;
}

.tree-children a:hover { background-color: #e8f0fb; color: var(--primary-dark); }
.tree-children a.active { background-color: var(--primary); color: #ffffff; }

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border);
  background-color: #201d48;
  padding: 12px 16px 18px;
  font-size: 0.8rem;
  color: #ffffff;
}

.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.site-footer a { color: #ffffff; }
.site-footer-logo img { height: 32px; width: auto; display: block; }

.site-footer-social { display: flex; gap: 14px; align-items: center; }
.site-footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff;
  transition: background .15s ease;
  text-decoration: none;
}
.site-footer-social a:hover { background: rgba(255,255,255,.25); }
.site-footer-social svg { display: block; }

/* RESPONSIVE */


/* RESPONSIVE (desktop piccoli / laptop): evita overflow 3-colonne */
/* Varianti layout (desktop: prima delle media queries per corretta cascata) */
body.layout-no-left .sidebar { display: none; }
body.layout-no-left .main-layout {
  grid-template-columns: var(--content-max) 280px;
  justify-content: center;
}

body.layout-no-right .cta-sidebar { display: none; }
body.layout-no-right .main-layout {
  grid-template-columns: 260px var(--content-max);
  justify-content: center;
}

body.layout-full .sidebar,
body.layout-full .cta-sidebar { display: none; }
body.layout-full .main-layout {
  grid-template-columns: minmax(0, 1fr);
  justify-content: center;
  max-width: 1320px;
  margin: 0 auto;
}

@media (max-width: 1600px) {
  /* Laptop: mantieni 3 colonne ma rendi la colonna centrale più stretta
     per evitare overflow su viewport 1440/1512/1536 */
  .main-layout {
    grid-template-columns: 220px minmax(0, 820px) 260px;
    gap: 16px;
    justify-content: center;
  }

  /* Se il layout è senza sinistra/destra/full rispetta la variante */
  body.layout-no-left .main-layout {
    grid-template-columns: minmax(0, 820px) 260px;
    gap: 16px;
    justify-content: center;
  }

  body.layout-no-right .main-layout {
    grid-template-columns: 220px minmax(0, 820px);
    gap: 16px;
    justify-content: center;
  }

  body.layout-full .main-layout {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    max-width: 1320px;
    margin: 0 auto;
  }
}

/* Sotto 1200px: meglio 2 colonne (contenuto + sidebar destra) per leggibilità */
@media (max-width: 1200px) {
  .main-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
    justify-content: stretch;
  }

  .sidebar { display: none !important; }

  body.layout-no-left .main-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    justify-content: stretch;
  }

  body.layout-no-right .main-layout,
  body.layout-full .main-layout {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    max-width: 1320px;
    margin: 0 auto;
  }
}


@media (max-width: 1280px) {
  .top-menu { gap: 10px; font-size: 0.82rem; }
  .nav-link { white-space: nowrap; }
}

@media (max-width: 1100px) {
  /*
    Mobile menu fix (SEO-safe):
    - dropdown full-width sotto l'header (overlay)
    - scrollabile con max-height
    - sotto-menu chiusi di default, aperti al tap sulla voce padre
    - body-lock quando aperto per evitare scroll sotto
  */
  .site-header-inner {
    flex-wrap: wrap;
    align-items: center;
    position: relative; /* anchor per il dropdown */
  }

  .top-nav {
    order: 3;
    width: 100%;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #e96f14;
    border-top: 1px solid var(--border);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
    z-index: 1100;
    padding: 6px 16px 10px;
    max-height: calc(100vh - 60px);
    max-height: calc(100dvh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .top-nav.open { display: block; }

  .top-menu {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
    padding: 4px 0;
    border-top: 0;
    margin-top: 0;
    font-size: 0.95rem;
  }

  .nav-item { width: 100%; border-bottom: 1px solid rgba(0,0,0,.08); }
  .nav-item:last-child { border-bottom: none; }
  .nav-link { width: 100%; padding: 10px 0; font-weight: 600; }

  /* Sotto-menu: chiusi di default, aperti con classe .sub-open */
  .nav-submenu {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 6px;
    margin-bottom: 0;
    display: none;
  }

  .nav-item.has-children.sub-open > .nav-submenu { display: block; }

  /* Freccia ruotata quando aperto */
  .nav-item.has-children > .nav-link::after {
    transition: transform .15s ease;
    display: inline-block;
  }
  .nav-item.has-children.sub-open > .nav-link::after {
    transform: rotate(180deg);
  }

  .nav-submenu li a {
    padding: 7px 0 7px 18px;
    font-weight: 400;
    font-size: 0.88rem;
  }

  .nav-sub-viewall {
    font-weight: 600 !important;
    color: var(--primary-dark);
  }

  .nav-toggle { display: inline-flex; padding: 6px 16px; font-size: 0.9rem; }

  .main-layout {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  .sidebar { display: none !important; }
  .cta-sidebar { position: static; display: block; margin-top: 16px; }

  /* Varianti layout: su mobile tutto single-column */
  body.layout-no-left .main-layout,
  body.layout-no-right .main-layout {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }
  body.layout-full .main-layout {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    max-width: 1320px;
    margin: 0 auto;
  }

  .subcat-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  main article { padding: 16px 14px; }
  .logo-img { height: 34px; }
}

/* TOC livelli (H3) */
.sidebar-link.level-3 { padding-left: 14px; font-size: 0.84rem; }
.sidebar-link.level-3::before { content: "– "; opacity: 0.7; }

/* =========================
   Flash messages (Shop PRG)
   ========================= */

.flash-wrap { width: 100%; }
.flash-inner {
  max-width: 1040px;
  margin: 10px auto 0;
  padding: 0 12px;
  display: grid;
  gap: 8px;
}

.flash {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.95rem;
  line-height: 1.2;
  background: var(--bg-soft);
  color: var(--text-main);
}

.flash-success {
  border-color: rgba(0,134,80,0.40);
  background: rgba(0,134,80,0.12);
}

.flash-warning {
  border-color: rgba(199,218,58,0.55);
  background: rgba(199,218,58,0.16);
}

.flash-error {
  border-color: rgba(220,38,38,0.35);
  background: rgba(220,38,38,0.08);
}


/* === Pagination (categorie) === */
.cms-pagination{margin-top:14px;}
.cms-pagination-inner{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;align-items:center;}
.cms-pagination-ellipsis{color:var(--text-muted);padding:0 4px;}
/* Spazio sopra i numeri della paginazione */
.cms-pagination{
  padding-top: 16px;
}

/* === Related posts (single) === */
.rel-box{
  margin-top: 8px;
}
.rel-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.rel-card{
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  padding: 12px;
}
.rel-card:hover{
  background: var(--bg-soft);
  text-decoration: none;
}
.rel-thumb{
  display: block;
  width: 90px;
  height: 90px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.rel-thumb picture,
.rel-thumb img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rel-thumb-fallback{
  display: block;
  width: 90px;
  height: 90px;
}
.rel-body{min-width:0; display:grid; gap:4px;}
.rel-title{
  font-weight: 900;
  color: var(--secondary);
  line-height: 1.15;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.rel-lead{
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.rel-cta{
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 0.92rem;
}

@media (max-width: 1100px){
  .rel-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px){
  .rel-grid{ grid-template-columns: minmax(0, 1fr); }
  .rel-card{ grid-template-columns: 110px minmax(0, 1fr); }
}


/* =========================================================
   CATEGORY: GALLERIA (testo + immagini)
   - Scoped: usa .cat-gallery-block
   - Non impatta categorie senza sezione galleria
   ========================================================= */

.cat-gallery-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 900px){
  .cat-gallery-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.cat-gallery-item{ margin:0; }

.cat-gallery-item .cms-pic,
.cat-gallery-item img{
  display:block;
  width:100%;
  height:auto;
  border-radius:14px;
}

.cat-gallery-item .cms-pic{
  overflow:hidden;
  border:1px solid var(--border);
  background: var(--bg-soft);
}

.cat-gallery-item figcaption{
  margin-top:6px;
  font-size:0.92rem;
  line-height:1.35;
  color: var(--text-muted);
}

/* =========================================================
   Gallery Lightbox (progressive enhancement)
   - Scoped: .gallery-lightbox / .gallery-zoom-link
   - NO brand colors, solo layout/accessibilità
   ========================================================= */

.gallery-zoom-link{
  display:block;
  color:inherit;
  text-decoration:none;
}

.gallery-zoom-link:focus{
  outline:2px solid currentColor;
  outline-offset:3px;
}

.gallery-lightbox[hidden]{ display:none; }

.gallery-lightbox{
  position:fixed;
  inset:0;
  z-index:9999;
}

.gallery-lightbox__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.82);
}

.gallery-lightbox__dialog{
  position:relative;
  margin:24px auto;
  max-width:min(1100px, calc(100vw - 32px));
  max-height:calc(100vh - 48px);
  background:#fff;
  border-radius:18px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.gallery-lightbox__top{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px;
  border-bottom:1px solid var(--border);
  background:var(--bg-soft);
}

.gallery-lightbox__spacer{ flex:1; }

.gallery-lightbox__btn{
  border:1px solid var(--border);
  background:#fff;
  border-radius:12px;
  padding:8px 10px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
}

.gallery-lightbox__btn:disabled{
  opacity:.5;
  cursor:default;
}

.gallery-lightbox__figure{
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  min-height:0;
}

.gallery-lightbox__img{
  display:block;
  width:100%;
  height:auto;
  max-height:calc(100vh - 140px);
  object-fit:contain;
  background:#000;
}

.gallery-lightbox__caption{
  padding:10px 12px;
  font-size:.95rem;
  color:var(--text-muted);
}

@media (max-width: 760px){
  .gallery-lightbox__dialog{ margin:12px auto; max-width:calc(100vw - 16px); max-height:calc(100vh - 24px); }
  .gallery-lightbox__btn{ padding:8px 9px; }
}

/* Evita scroll della pagina sottostante */
body.glb-open{ overflow:hidden; }

/* PRINT: stampa solo l'immagine (no header/footer) */
@media print {
  @page{ margin:10mm; }
  body.glb-open *{ visibility:hidden !important; }
  body.glb-open #gallery-lightbox,
  body.glb-open #gallery-lightbox *{ visibility:visible !important; }

  #gallery-lightbox{ position:static; inset:auto; }
  .gallery-lightbox__backdrop{ display:none !important; }
  .gallery-lightbox__top{ display:none !important; }
  .gallery-lightbox__dialog{ margin:0; max-width:none; max-height:none; border-radius:0; border:0; }
  .gallery-lightbox__figure{ break-inside:avoid; page-break-inside:avoid; }
  .gallery-lightbox__img{ max-height:none; max-width:100% !important; height:auto !important; background:transparent; }
}

/* =====================================================
   BLOCCO CATEGORIA: template editoriale-shop
   - Stili allineati allo shop (cards + CTA)
   - Scoped per evitare regressioni
   ===================================================== */

/*
  Nota: il blocco prodotti può comparire anche su post/pagine editoriali.
  Usiamo una classe generica "editorial-shop-products" per riutilizzare
  gli stessi stili senza caricare shop.css fuori dal tema shop.
*/
:where(.cat-shop-products, .editorial-shop-products){ margin-top:10px; }
:where(.cat-shop-products, .editorial-shop-products) h2{ margin-top:0; }

:where(.cat-shop-products, .editorial-shop-products) .product-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-top:10px;
}

:where(.cat-shop-products, .editorial-shop-products) .product-card{
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto 1fr;
  min-width:0;
}

:where(.cat-shop-products, .editorial-shop-products) .product-media{
  position:relative;
  overflow:hidden;
  background:var(--bg-soft);
  aspect-ratio:4/3;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--text-muted);
  font-weight:700;
  border-bottom:1px solid var(--border);
}

/* Badge prodotto (shop) anche nei blocchi editoriali */
:where(.cat-shop-products, .editorial-shop-products) .shop-badge{
  position:absolute;
  top:10px;
  right:10px;
  z-index:3;
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:.78rem;
  font-weight:900;
  line-height:1;
  letter-spacing:.01em;
  box-shadow:var(--shadow-soft);
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  color:var(--text);
}
:where(.cat-shop-products, .editorial-shop-products) .shop-badge--bestseller{
  background:#fff3e0;
  border-color:#ffe0b2;
  color:#7a4b00;
}
:where(.cat-shop-products, .editorial-shop-products) .shop-badge--new{
  background:#e8f5e9;
  border-color:#c8e6c9;
  color:#1b5e20;
}
:where(.cat-shop-products, .editorial-shop-products) .shop-badge--deal{
  background:#ffebee;
  border-color:#ffcdd2;
  color:#b00020;
}

:where(.cat-shop-products, .editorial-shop-products) .product-media picture,
:where(.cat-shop-products, .editorial-shop-products) .product-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  max-width:100%;
}

:where(.cat-shop-products, .editorial-shop-products) .product-body{
  /* allineato a shop.css */
  padding:12px 12px 14px;
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
}

:where(.cat-shop-products, .editorial-shop-products) .product-title{ margin:0; font-size:1rem; line-height:1.25; color:var(--secondary); }
:where(.cat-shop-products, .editorial-shop-products) .product-title a{ color:inherit; text-decoration:none; }
:where(.cat-shop-products, .editorial-shop-products) .product-title a:hover{ text-decoration:underline; }

:where(.cat-shop-products, .editorial-shop-products) .product-meta{
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:baseline;
  min-width:0;
}

/* Prezzi + sconto (replica shop.css, scoped) */
:where(.cat-shop-products, .editorial-shop-products) .price-wrap{
  display:inline-flex;
  align-items:baseline;
  gap:8px;
  flex-wrap:wrap;
  min-width:0;
}
:where(.cat-shop-products, .editorial-shop-products) .price-wrap.has-discount{
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
}
:where(.cat-shop-products, .editorial-shop-products) .price-wrap.has-discount .price-old{ margin-right:0; }

:where(.cat-shop-products, .editorial-shop-products) .price{ font-weight:900; color:var(--primary-dark); }
:where(.cat-shop-products, .editorial-shop-products) .price-old{ color:#9aa3a0; text-decoration:line-through; font-weight:400; font-size:.92rem; }

/* Prezzo "stile Amazon": intero grande + decimali piccoli (solo UI, testo reale) */
:where(.cat-shop-products, .editorial-shop-products) .shop-price{
  display:inline-flex;
  align-items:flex-start; /* allineamento in alto senza andare sopra */
  line-height:1;
  font-variant-numeric: tabular-nums;
}
:where(.cat-shop-products, .editorial-shop-products) .shop-price__int{
  font-size:2.0rem;
  font-weight:600;
  letter-spacing:-0.01em;
}
:where(.cat-shop-products, .editorial-shop-products) .shop-price__dec{
  font-size:1.0rem;
  margin-left:2px;
}
:where(.cat-shop-products, .editorial-shop-products) .shop-price__cur{
  font-size:1.0rem;
  margin-left:3px;
}

:where(.cat-shop-products, .editorial-shop-products) .shop-price--hero .shop-price__int{ font-size:2.0rem; font-weight:600; }
:where(.cat-shop-products, .editorial-shop-products) .shop-price--hero .shop-price__dec{ font-size:1.0rem; }
:where(.cat-shop-products, .editorial-shop-products) .shop-price--hero .shop-price__cur{ font-size:1.0rem; }

:where(.cat-shop-products, .editorial-shop-products) .shop-price--old .shop-price__int{ font-size:1.0rem; font-weight:400; letter-spacing:0; }
/* Prezzo "vecchio" barrato: mantieni intero+decimali+valuta con stessa dimensione (no decimali "in alto") */
:where(.cat-shop-products, .editorial-shop-products) .shop-price--old{
  align-items:baseline;
  color:#9aa3a0;
  text-decoration:line-through;
  text-decoration-thickness:1px;
}
:where(.cat-shop-products, .editorial-shop-products) .shop-price--old .shop-price__int,
:where(.cat-shop-products, .editorial-shop-products) .shop-price--old .shop-price__dec,
:where(.cat-shop-products, .editorial-shop-products) .shop-price--old .shop-price__cur{
  font-size:1.0rem;
  font-weight:400;
  letter-spacing:0;
}

:where(.cat-shop-products, .editorial-shop-products) .discount-badge{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  background:#ffebee;
  border:1px solid #ffcdd2;
  color:#b00020;
  font-weight:900;
  font-size:.78rem;
  line-height:1;
}

:where(.cat-shop-products, .editorial-shop-products) .sku{
  color:var(--text-muted);
  font-size:.82rem;
}

:where(.cat-shop-products, .editorial-shop-products) .note-soft{ margin:0; color:var(--text-muted); font-size:.92rem; }

/* CTA / bottoni (replica shop.css, senza cambiare colori) */
:where(.cat-shop-products, .editorial-shop-products) .shop-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--primary-dark);
  font-weight:700;
  font-size:.9rem;
  cursor:pointer;
  text-decoration:none;
  white-space:nowrap;
  max-width:100%;
  box-sizing:border-box;
  line-height:1;
  height:42px;
}
:where(.cat-shop-products, .editorial-shop-products) .shop-btn:hover{ background:#fff1e8; text-decoration:none; }
:where(.cat-shop-products, .editorial-shop-products) .shop-btn-primary{
  background:var(--primary-dark);
  color:#fff;
  border-color:var(--primary-dark);
}
:where(.cat-shop-products, .editorial-shop-products) .shop-btn-primary:hover{ background:#c9692b; border-color:#c9692b; }

:where(.cat-shop-products, .editorial-shop-products) .product-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:auto; }

.cat-shop-products-cta{ margin:12px 0 0; }
.cat-shop-products-cta-link{ font-weight:700; }

@media (max-width: 900px){
  :where(.cat-shop-products, .editorial-shop-products) .product-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px){
  :where(.cat-shop-products, .editorial-shop-products) .product-grid{ grid-template-columns:minmax(0, 1fr); }
}

/* =============================
   Recently viewed band (footer)
   Editorial frontend ONLY (shop keeps its own styles in shop.css)
   Progressive enhancement: hidden until JS renders
   ============================= */

body:not(.theme-shop) .recently-viewed-band{
  background:#f3f4f6;
  border-top:1px solid rgba(0,0,0,0.08);
  margin-top:28px;
}

body:not(.theme-shop) .recently-viewed-inner{
  max-width:none;
  width:100%;
  margin:0;
  padding:36px 16px 72px;
  box-sizing:border-box;
}

body:not(.theme-shop) .recently-viewed-title{
  margin:0 0 10px 0;
  font-size:1.25rem;
  font-weight:500;
  color:var(--text-main);
}

/* Defensive reset if any legacy markup uses UL/LI */
body:not(.theme-shop) .recently-viewed-list,
body:not(.theme-shop) .recently-viewed-list ul{
  list-style:none;
  padding:0;
  margin:0;
}

body:not(.theme-shop) .recently-viewed-list li{ margin:0; padding:0; }

body:not(.theme-shop) .recently-viewed-list{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:10px;
}

body:not(.theme-shop) .recently-viewed-list > a,
body:not(.theme-shop) .recently-viewed-list .rv-card{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border:1px solid rgba(0,0,0,0.06);
  background:rgba(255,255,255,0.75);
  border-radius:12px;
  text-decoration:none;
  min-width:0;
  color:inherit;
}

body:not(.theme-shop) .recently-viewed-list > a:hover,
body:not(.theme-shop) .recently-viewed-list .rv-card:hover{
  background:#fff;
  text-decoration:none;
}

body:not(.theme-shop) .recently-viewed-list > a .rv-thumb,
body:not(.theme-shop) .rv-thumb{
  width:56px;
  height:56px;
  border-radius:12px;
  overflow:hidden;
  flex:0 0 56px;
  background:rgba(0,0,0,0.04);
}

body:not(.theme-shop) .rv-thumb img{
  display:block;
  width:56px;
  height:56px;
  object-fit:cover;
}

body:not(.theme-shop) .rv-thumb-ph{
  display:block;
  width:56px;
  height:56px;
}

body:not(.theme-shop) .rv-meta{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}

body:not(.theme-shop) .rv-name{
  font-size:0.88rem;
  line-height:1.15;
  font-weight:700;
  color:var(--text-main);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

body:not(.theme-shop) .rv-price{
  font-size:0.82rem;
  color:var(--text-muted);
  font-weight:600;
}

@media (max-width:900px){
  body:not(.theme-shop) .recently-viewed-list{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

@media (max-width:600px){
  body:not(.theme-shop) .recently-viewed-inner{ padding:12px 12px; }
  body:not(.theme-shop) .recently-viewed-title{ font-size:0.9rem; margin-bottom:8px; }
  body:not(.theme-shop) .recently-viewed-list{ grid-template-columns:1fr; }
  body:not(.theme-shop) .recently-viewed-list{
    display:flex;
    gap:10px;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity;
    padding-bottom:4px;
  }
  body:not(.theme-shop) .recently-viewed-list > a,
  body:not(.theme-shop) .recently-viewed-list .rv-card{
    flex:0 0 88%;
    scroll-snap-align:start;
    padding:8px 8px;
    border-radius:10px;
  }
  body:not(.theme-shop) .rv-thumb,
  body:not(.theme-shop) .rv-thumb img,
  body:not(.theme-shop) .rv-thumb-ph{
    width:48px;
    height:48px;
    flex-basis:48px;
  }
  body:not(.theme-shop) .rv-name{ font-size:0.85rem; }
  body:not(.theme-shop) .rv-price{ font-size:0.8rem; }
}



/* Editoriale: CTA verso categoria Shop (banner) */
.cat-shop-products-cta {
  margin: 18px 0 26px;
}

.cat-shop-products-cta-link {
  display: block;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff4e0; /* arancione chiaro */
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.cat-shop-products-cta-link:hover,
.cat-shop-products-cta-link:focus {
  text-decoration: none;
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.cat-shop-products-cta-link:active {
  transform: translateY(1px);
}

/* Micro “freccia” visiva senza cambiare testo */
.cat-shop-products-cta-link::after {
  content: " →";
  font-weight: 800;
}

/* Mobile: un filo più compatto */
@media (max-width: 900px) {
  .cat-shop-products-cta {
    margin: 14px 0 22px;
  }
  .cat-shop-products-cta-link {
    padding: 12px 14px;
    border-radius: 12px;
  }
}

/* ==========================================================
   GIOCATTOLI.NET — Step 7 visual: no inline styles
   ========================================================== */

/* Hub tassonomie (.html) */
.gio-hub-hero-media{border-radius:12px;overflow:hidden;margin-bottom:24px;}
.gio-hub-hero-media img,.gio-hub-hero-img{width:100%;height:auto;display:block;}

.gio-hub-count{margin:0;color:var(--text-muted);font-size:.92rem;}
.gio-hub-description{margin-bottom:24px;max-width:750px;color:var(--text-muted);font-size:.95rem;}
.gio-hub-description-bottom{margin-top:32px;margin-bottom:0;}

.gio-hub-filters{margin-bottom:20px;}
.gio-hub-filters-row{display:flex;gap:8px;flex-wrap:wrap;}
.gio-hub-chip-count{font-size:.78em;margin-left:2px;color:var(--text-muted);}

.gio-hub-parent-link{margin-bottom:16px;}
.gio-hub-parent-btn{font-size:.9rem;}

.gio-hub-grid{margin-top:12px;}
.gio-hub-score-wrap{margin-bottom:4px;}
.gio-hub-score-badge{background:var(--primary,#0a7d5a);color:#fff;font-size:.78rem;font-weight:800;padding:2px 7px;border-radius:4px;display:inline-block;}

.gio-price-row{display:flex;gap:6px;align-items:baseline;flex-wrap:wrap;}
.gio-hub-card-excerpt{margin:4px 0 0;color:var(--text-muted);font-size:.85rem;}

.gio-hub-empty{text-align:center;padding:48px 16px;color:var(--text-muted,#888);}
.gio-hub-empty-title{font-size:1.1rem;margin:0;color:inherit;}
.gio-hub-empty-link{margin-top:8px;}

/* Prodotto (.html) */
.gio-product-no-image{border:1px dashed var(--border);border-radius:12px;background:#fff;padding:40px;color:var(--text-muted);text-align:center;}

.gio-product-score-row{display:flex;align-items:center;gap:10px;margin-bottom:12px;}
.gio-product-score-badge{background:var(--primary,#0a7d5a);color:#fff;font-size:1.3rem;font-weight:800;padding:6px 14px;border-radius:8px;line-height:1;display:inline-flex;align-items:baseline;gap:2px;}
.gio-product-score-outof{font-size:.7em;opacity:.8;}
.gio-product-score-label{font-weight:700;color:var(--text-muted);}

.gio-product-meta{margin:10px 0 8px;}
.gio-product-actions{margin:14px 0;}

/* ───────────────────────────────────────────────────────────
   GIOCATTOLI.NET — Affiliate offers (best + other offers)
   SEO/CWV: logo box fixed size to avoid CLS.
─────────────────────────────────────────────────────────── */
.gio-best-offer-btn{display:block;}
.gio-offer-btn-inner{display:flex;align-items:center;gap:10px;justify-content:space-between;}
.gio-offer-main{display:flex;flex-direction:column;gap:2px;min-width:0;}
.gio-offer-merchant{font-weight:800;line-height:1.1;}
.gio-offer-price{font-weight:800;white-space:nowrap;}
.gio-offer-shipping{font-size:.86rem;color:var(--text-muted);line-height:1.1;}
.gio-offer-ext{margin-left:10px;opacity:.9;}
.gio-offer-logo{display:inline-flex;align-items:center;justify-content:center;width:64px;height:24px;flex:0 0 auto;background:rgba(0,0,0,.03);border-radius:6px;overflow:hidden;}
.gio-offer-logo img,.gio-offer-logo picture,.gio-offer-logo source{max-width:100%;max-height:100%;}

.gio-best-offer-text{display:flex;align-items:center;gap:10px;background:rgba(10,125,90,.06);border:1px solid rgba(10,125,90,.18);border-radius:12px;padding:10px 12px;margin:10px 0 0;}
.gio-best-offer-text img{display:block;max-width:144px;height:auto;}
.gio-best-offer-text span{font-weight:800;color:var(--text-main);}

.gio-product-block-offers{margin-top:16px;}
.gio-offers-list{display:flex;flex-direction:column;gap:8px;}
.gio-offer-row{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:10px 12px;border:1px solid var(--border,#e5e7eb);border-radius:12px;background:#fff;text-decoration:none;color:inherit;}
.gio-offer-row:hover{border-color:rgba(10,125,90,.35);}
.gio-offer-row .gio-offer-main{flex:1;}

.gio-product-block{margin-top:14px;}
.gio-product-block-highlights{margin-top:16px;}
.gio-product-subtitle{font-size:1rem;margin:0 0 8px;}
.gio-product-list{margin:0;padding-left:20px;}
.gio-product-list-item{margin-bottom:4px;}

.gio-product-tax-group{margin-top:14px;}
.gio-product-tax-label{font-weight:800;color:var(--text-main);margin-bottom:6px;}
.gio-product-tax-tags{display:flex;gap:6px;flex-wrap:wrap;}
.gio-tag-btn{padding:5px 10px;font-size:.82rem;}

.gio-product-section{margin-top:32px;}
.gio-product-section.gio-product-extra{margin-top:28px;}

.gio-product-specs-table{width:100%;border-collapse:collapse;margin-top:8px;}
.gio-product-specs-row{border-bottom:1px solid var(--border,#e5e7eb);}
.gio-product-specs-th{padding:8px 12px;font-weight:700;width:40%;vertical-align:top;}
.gio-product-specs-td{padding:8px 12px;}

.gio-product-richtext{color:var(--text-muted);font-size:.95rem;}

/* ── Valutazione Generale (blocco editoriale prodotto) ── */
.gio-overall-rating{
  display:flex;gap:20px;align-items:center;
  background:linear-gradient(135deg,#e8f5e9 0%,#c8e6c9 100%);
  border:1px solid #a5d6a7;border-radius:14px;
  padding:20px 24px;margin-top:32px;
}
.gio-overall-rating__img{flex-shrink:0;}
.gio-overall-rating__img img{width:100px;height:auto;display:block;}
.gio-overall-rating__body{flex:1;min-width:0;}
.gio-overall-rating__title{
  font-size:1.15rem;font-weight:800;margin:0 0 8px;
  color:#2e7d32;
}
.gio-overall-rating__text{
  font-size:.93rem;color:#333;line-height:1.55;
}
.gio-overall-rating__text p{margin:0 0 6px;}
.gio-overall-rating__text p:last-child{margin-bottom:0;}
@media(max-width:600px){
  .gio-overall-rating{flex-direction:column;text-align:center;padding:16px;}
  .gio-overall-rating__img img{width:80px;margin:0 auto;}
}

.related-box{margin-top:36px;}
.gio-related-score{font-weight:700;margin-top:4px;color:var(--text-muted);}

/* ── Ricerche correlate (sotto-linee auto-generate nelle pagine hub) ── */
.gio-related-searches{margin-top:32px;padding:20px 0 0;border-top:1px solid var(--border,#e5e7eb);}
.gio-related-searches__title{font-size:1.05rem;font-weight:700;margin:0 0 12px;color:var(--text-main);}
.gio-related-searches__list{display:flex;flex-wrap:wrap;gap:8px;}
.gio-related-searches__tag{
  display:inline-flex;align-items:center;gap:4px;
  padding:6px 14px;border-radius:999px;
  border:1px solid var(--border,#e5e7eb);
  background:#fff;color:var(--text-main);
  font-size:.88rem;text-decoration:none;
  transition:border-color .15s,background .15s;
}
.gio-related-searches__tag:hover{
  border-color:var(--primary);background:rgba(0,109,183,.06);color:var(--primary);
}
.gio-related-searches__count{font-size:.78rem;color:var(--text-muted);}



/* ==========================================================
   Hub tassonomie (.html) — FIX responsive sidebar destra
   Scopo: se esiste una regola hub-specific (es. gutter sinistro) più specifica,
   questi override garantiscono che sotto i breakpoint la sidebar destra scenda sotto.
   SEO-safe: solo CSS, nessun markup/JS.
   ========================================================== */
@media (max-width: 1200px){
  body.page-gio-hub.layout-no-left .main-layout{
    grid-template-columns: minmax(0, 1fr) 280px !important;
    justify-content: center !important;
  }
}

@media (max-width: 1100px){
  body.page-gio-hub.layout-no-left .main-layout{
    grid-template-columns: minmax(0, 1fr) !important;
    justify-content: stretch !important;
  }
  body.page-gio-hub.layout-no-left .cta-sidebar{
    position: static !important;
    display: block !important;
    margin-top: 16px !important;
  }
}


/* ==========================================================
   GIOCATTOLI.NET — CTA colori hub tassonomie + correlati prodotto
   SEO-safe: solo CSS mirato, nessun impatto su routing/markup/JSON-LD.
   ========================================================== */
.gio-hub-card-actions > .shop-btn.shop-btn-primary,
.related-box .product-actions > .shop-btn.shop-btn-primary{
  background:#006db7;
  color:#fff;
  border-color:#006db7;
}
.gio-hub-card-actions > .shop-btn.shop-btn-primary:hover,
.related-box .product-actions > .shop-btn.shop-btn-primary:hover{
  background:#005e9d;
  border-color:#005e9d;
}


/* ── Lista articoli categoria editoriale ───────────────────────────── */
.cat-post-list{
  display:grid;
  gap:12px;
}
.cat-post-card{
  display:grid;
  grid-template-columns:104px minmax(0, 1fr);
  gap:14px;
  align-items:start;
  padding:14px;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
 /* box-shadow:var(--shadow-soft); */
}
.cat-post-card--no-thumb{
  grid-template-columns:minmax(0, 1fr);
}
.cat-post-thumb{
  display:block;
  width:104px;
  height:104px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--border);
  background:var(--bg-soft);
}
.cat-post-thumb picture,
.cat-post-thumb img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}
.cat-post-body{
  min-width:0;
  display:grid;
  gap:6px;
}
.cat-post-title{
  margin:0;
  font-size:1.02rem;
  line-height:1.24;
  color:var(--secondary);
}
.cat-post-title a{
  color:inherit;
  text-decoration:none;
}
.cat-post-title a:hover{
  text-decoration:underline;
}
.cat-post-excerpt{
  margin:0;
  color:var(--text-muted);
  font-size:0.94rem;
  line-height:1.4;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
@media (max-width: 640px){
  .cat-post-card{
    grid-template-columns:84px minmax(0, 1fr);
    gap:10px;
    padding:12px;
  }
  .cat-post-card--no-thumb{
    grid-template-columns:minmax(0, 1fr);
  }
  .cat-post-thumb{
    width:84px;
    height:84px;
    border-radius:12px;
  }
}

 /* sezione età; */
.subcat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.subcat-card {
  padding: 8px 6px;
  min-height: 0;
}

.subcat-card img {
  display: block;
  max-width: 64px;
  width: 100%;
  height: auto;
  margin: 0 auto 4px;
}

.subcat-card .subcat-link {
  display: block;
  margin-top: 0;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.2;
}

@media (max-width: 1200px) {
  .subcat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .subcat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .subcat-card {
    padding: 8px 6px;
  }

  .subcat-card img {
    max-width: 60px;
  }
}

@media (max-width: 520px) {
  .subcat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* GIOCATTOLI.NET — Hub tassonomie: badge miglior prezzo + merchant */
body.page-gio-hub .gio-hub-best-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
  min-width:0;
  max-width:100%;
}
body.page-gio-hub .gio-hub-best-meta{
  display:inline-flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  min-width:0;
}
body.page-gio-hub .gio-hub-best-badge{
  display:block;
  width:96px;
  height:auto;
  max-width:100%;
}
body.page-gio-hub .gio-hub-best-merchant{
  display:block;
  flex:0 0 auto;
}
body.page-gio-hub .gio-hub-best-merchant-text{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(0,0,0,.04);
  border:1px solid rgba(0,0,0,.08);
  color:var(--text-main);
  font-size:.82rem;
  font-weight:700;
  line-height:1;
}
body.page-gio-hub .gio-hub-card-actions .gio-hub-offer{
  align-items:flex-start;
  max-width:100%;
}
body.page-gio-hub .gio-hub-card-actions .gio-hub-offer-btn{
  max-width:100%;
}

/* Desktop: allinea in basso il pulsante Dettagli con il pulsante offerta */
@media (min-width: 901px){
  body.page-gio-hub .gio-hub-card-actions{
    align-items:flex-end;
    flex-wrap:nowrap;
  }

  body.page-gio-hub .gio-hub-card-actions > .shop-btn.shop-btn-primary,
  body.page-gio-hub .gio-hub-card-actions > .gio-hub-buy-form,
  body.page-gio-hub .gio-hub-card-actions > .gio-hub-offer{
    align-self:flex-end;
  }

  body.page-gio-hub .gio-hub-card-actions > .gio-hub-offer{
    margin-left:auto;
  }
}

@media (max-width: 640px){
  body.page-gio-hub .gio-hub-best-badge{
    width:88px;
  }
}
