/* SHARED BASE - included inline in every page */
    :root {
      --pri: #8B2020;
      --pri-light: #b03030;
      --bg-dark: #1a0808;
      --light: #f8f4f4;
      --text: #222;
      --muted: #666;
      --rad: 8px;
      --trans: .22s ease;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0
    }

    html {
      scroll-behavior: smooth
    }

    body {
      font-family: 'Segoe UI', Arial, sans-serif;
      color: var(--text);
      background: #fff;
      line-height: 1.6
    }

    a {
      color: inherit;
      text-decoration: none
    }

    img {
      max-width: 100%;
      display: block
    }

    header {
      position: sticky;
      top: 0;
      z-index: 100;
      background: var(--bg-dark);
      box-shadow: 0 2px 12px rgba(0, 0, 0, .5)
    }

    nav {
      max-width: 1200px;
      margin: 0 auto;
      padding: .8rem 1.5rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem
    }

    .logo-wrap img {
      height: 45px;
      width: auto
    }

    .logo-text {
      font-size: 1.35rem;
      font-weight: 800;
      color: #fff;
      letter-spacing: 2px;
      border: 2px solid var(--pri);
      padding: .25rem .8rem;
      display: none
    }

    .logo-text span {
      color: var(--pri-light)
    }

    .nav-links {
      display: flex;
      gap: 1.8rem;
      list-style: none
    }

    .nav-links a {
      color: rgba(255, 255, 255, .8);
      font-size: .9rem;
      font-weight: 500;
      transition: color var(--trans)
    }

    .nav-links a:hover,
    .nav-links a.active {
      color: #fff
    }

    .nav-links a.active {
      border-bottom: 2px solid var(--pri);
      padding-bottom: 2px
    }

    .nav-cta {
      background: var(--pri) !important;
      color: #fff !important;
      padding: .4rem 1rem;
      border-radius: var(--rad);
      font-weight: 600 !important
    }

    #menu-toggle {
      display: none;
      background: none;
      border: none;
      cursor: pointer;
      padding: .3rem
    }

    #menu-toggle span {
      display: block;
      width: 24px;
      height: 2px;
      background: #fff;
      margin: 5px 0
    }

    .breadcrumb {
      background: var(--light);
      padding: .7rem 1.5rem;
      font-size: .82rem;
      color: var(--muted);
      border-bottom: 1px solid #e8dede
    }

    .breadcrumb-inner {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      gap: .4rem;
      flex-wrap: wrap
    }

    .breadcrumb a {
      color: var(--pri)
    }

    .page-hero {
      background: var(--bg-dark);
      color: #fff;
      padding: 2.8rem 1.5rem 2.2rem;
      position: relative;
      overflow: hidden
    }

    .page-hero::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(ellipse at 70% 50%, rgba(139, 32, 32, .2), transparent 70%)
    }

    .page-hero-inner {
      max-width: 1200px;
      margin: 0 auto;
      position: relative;
      display: flex;
      align-items: center;
      gap: 1.8rem
    }

    .page-hero-icon {
      font-size: 3.2rem
    }

    .tag {
      display: inline-block;
      background: rgba(139, 32, 32, .25);
      color: #f5c6c6;
      font-size: .75rem;
      font-weight: 700;
      padding: .2rem .7rem;
      border-radius: 50px;
      margin-bottom: .6rem;
      letter-spacing: .3px
    }

    .page-hero h1 {
      font-size: clamp(1.5rem, 3vw, 2.2rem);
      font-weight: 800;
      margin-bottom: .3rem
    }

    .page-hero p {
      color: rgba(255, 255, 255, .7);
      font-size: .95rem;
      max-width: 580px
    }

    .page-body {
      max-width: 1200px;
      margin: 0 auto;
      padding: 2.5rem 1.5rem;
      display: grid;
      grid-template-columns: 250px 1fr;
      gap: 2.5rem;
      align-items: start
    }

    .sidebar {
      position: sticky;
      top: 72px
    }

    .sidebar-box {
      background: var(--light);
      border: 1px solid #e8dede;
      border-radius: var(--rad);
      overflow: hidden;
      margin-bottom: 1rem
    }

    .sidebar-title {
      background: var(--pri);
      color: #fff;
      padding: .65rem 1rem;
      font-size: .83rem;
      font-weight: 700;
      letter-spacing: .5px
    }

    .sidebar-nav {
      list-style: none
    }

    .sidebar-nav li a {
      display: flex;
      align-items: center;
      gap: .6rem;
      padding: .6rem 1rem;
      font-size: .87rem;
      color: var(--text);
      border-bottom: 1px solid #e8dede;
      transition: background var(--trans)
    }

    .sidebar-nav li a:hover {
      background: #f0e8e8;
      color: var(--pri)
    }

    .sidebar-nav li a.active {
      background: #f0e8e8;
      color: var(--pri);
      font-weight: 600;
      border-left: 3px solid var(--pri)
    }

    .sidebar-nav li:last-child a {
      border-bottom: none
    }

    .arrow {
      margin-left: auto;
      font-size: .75rem;
      color: var(--muted)
    }

    .sidebar-cta {
      background: var(--pri);
      color: #fff;
      border-radius: var(--rad);
      padding: 1rem;
      text-align: center
    }

    .sidebar-cta p {
      font-size: .82rem;
      opacity: .85;
      margin-bottom: .6rem
    }

    .sidebar-cta a {
      display: inline-block;
      background: #fff;
      color: var(--pri);
      padding: .4rem 1rem;
      border-radius: 6px;
      font-size: .82rem;
      font-weight: 700
    }

    .section-label {
      font-size: 1rem;
      font-weight: 700;
      color: var(--pri);
      margin-bottom: 1.2rem;
      padding-bottom: .4rem;
      border-bottom: 2px solid var(--light);
      display: flex;
      align-items: center;
      gap: .5rem
    }

    .section-label::before {
      content: '';
      display: inline-block;
      width: 4px;
      height: 18px;
      background: var(--pri);
      border-radius: 2px
    }

    /* CATALOG CARDS */
    .catalog-card {
      background: #fff;
      border: 1px solid #e8dede;
      border-radius: var(--rad);
      margin-bottom: 1.4rem;
      overflow: hidden;
      transition: box-shadow var(--trans)
    }

    .catalog-card:hover {
      box-shadow: 0 4px 16px rgba(139, 32, 32, .1)
    }

    .catalog-card-header {
      padding: 1rem 1.2rem;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap
    }

    .catalog-meta h2 {
      font-size: .95rem;
      font-weight: 700;
      color: var(--pri);
      margin-bottom: .2rem
    }

    .catalog-meta p {
      font-size: .82rem;
      color: var(--muted)
    }

    .btn-sfoglia {
      background: var(--pri);
      color: #fff;
      border: none;
      padding: .45rem 1rem;
      border-radius: 6px;
      font-size: .82rem;
      font-weight: 700;
      cursor: pointer;
      transition: var(--trans);
      white-space: nowrap
    }

    .btn-sfoglia:hover {
      background: var(--pri-light)
    }

    /* THUMBS */
    .catalog-thumbs {
      padding: 0 1.2rem 1rem;
      display: flex;
      gap: 1rem;
      flex-wrap: wrap
    }

    .thumb {
      width: 100px;
      cursor: pointer;
      text-align: center
    }

    .thumb-img {
      width: 100px;
      height: 130px;
      border-radius: 6px;
      overflow: hidden;
      border: 2px solid transparent;
      transition: var(--trans);
      background: var(--light);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: .4rem
    }

    .thumb-img img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block
    }

    .thumb-img .fallback {
      font-size: 2.5rem
    }

    .thumb:hover .thumb-img {
      border-color: var(--pri);
      transform: scale(1.04);
      box-shadow: 0 4px 12px rgba(139, 32, 32, .2)
    }

    .thumb span {
      font-size: .72rem;
      color: var(--muted);
      line-height: 1.3;
      display: block
    }

    /* MODAL */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .88);
      z-index: 999;
      flex-direction: column
    }

    .modal-overlay.open {
      display: flex
    }

    .modal-top {
      background: var(--bg-dark);
      padding: .7rem 1.2rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid rgba(139, 32, 32, .3);
      flex-shrink: 0;
      gap: 1rem
    }

    .modal-top h3 {
      color: #fff;
      font-size: .9rem;
      font-weight: 700;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis
    }

    .mclose {
      background: rgba(139, 32, 32, .35);
      color: #fff;
      border: none;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      font-size: 1rem;
      cursor: pointer;
      transition: var(--trans);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0
    }

    .mclose:hover {
      background: var(--pri)
    }

    .modal-body {
      flex: 1;
      min-height: 0;
      position: relative
    }

    #pdf-viewer {
      width: 100%;
      height: 100%
    }

    .viewer-loading {
      position: absolute;
      inset: 0;
      background: #2a2a2a;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: rgba(255, 255, 255, .55);
      gap: .8rem;
      font-size: .88rem;
      pointer-events: none;
      z-index: 10
    }

    .viewer-loading.hidden {
      display: none
    }

    .spinner {
      width: 36px;
      height: 36px;
      border: 3px solid rgba(255, 255, 255, .15);
      border-top-color: var(--pri);
      border-radius: 50%;
      animation: spin .7s linear infinite
    }

    @keyframes spin {
      to {
        transform: rotate(360deg)
      }
    }

    /* FOOTER */
    footer {
      background: var(--bg-dark);
      color: rgba(255, 255, 255, .7);
      padding: 2rem 1.5rem 1rem;
      margin-top: 3rem
    }

    .footer-inner {
      max-width: 1200px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
      gap: 1.5rem;
      margin-bottom: 1.5rem
    }

    footer p,
    footer li {
      font-size: .82rem
    }

    footer h4 {
      color: #fff;
      font-size: .87rem;
      margin-bottom: .5rem
    }

    footer ul {
      list-style: none
    }

    footer ul li {
      margin-bottom: .3rem
    }

    footer ul li a:hover {
      color: #fff
    }

    .footer-bottom {
      border-top: 1px solid rgba(255, 255, 255, .1);
      padding-top: .8rem;
      font-size: .77rem;
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: .3rem
    }

    @media(max-width:880px) {
      .page-body {
        grid-template-columns: 1fr
      }

      .sidebar {
        position: static
      }
    }

    @media(max-width:580px) {
      .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        padding: 1rem 1.5rem;
        gap: .8rem;
        z-index: 99
      }

      .nav-links.open {
        display: flex
      }

      #menu-toggle {
        display: block
      }

      nav {
        position: relative
      }
    }