@charset "utf-8";
/* ==========================================================================
   Area riservata + Catalogo PDF
   Pagine: area-riservata.php, catalogo.php
   Palette e font allineati a custom.css (Ovo / Open Sans, toni cuoio)
   ========================================================================== */

:root {
  --pt-dark: #15110e;
  --pt-brown: #8d6e4f;
  --pt-brown-dark: #6f4c45;
  --pt-leather: #805b3f;
  --pt-gold: #b4936d;
  --pt-gold-light: #e6b96a;
  --pt-beige: #f7f0e8;
  --pt-beige-input: #f7f0e4;
  --pt-line: #e6dccf;
  --pt-text: #5b524b;
  --pt-muted: #8a7f75;
  --pt-white: #fff;
}

.sr-only-focusable:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- Bottoni ------------------------------------------------------- */
.pt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  border: 2px solid var(--pt-dark);
  border-radius: 3px;
  background-color: var(--pt-dark);
  color: var(--pt-white);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.pt-btn:hover,
.pt-btn:focus {
  background-color: var(--pt-brown);
  border-color: var(--pt-brown);
  color: var(--pt-white);
  text-decoration: none;
}
.pt-btn:focus-visible {
  outline: 2px solid var(--pt-gold-light);
  outline-offset: 2px;
}
.pt-btn--outline {
  background-color: transparent;
  color: var(--pt-dark);
  border-color: var(--pt-line);
}
.pt-btn--outline:hover,
.pt-btn--outline:focus {
  background-color: var(--pt-dark);
  border-color: var(--pt-dark);
  color: var(--pt-white);
}
.pt-btn--sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 11px;
}
.pt-btn--block {
  width: 100%;
}

/* ---------- Campi modulo (override focus turchese del tema) --------------- */
.area-riservata__page input[type="text"],
.area-riservata__page input[type="email"],
.area-riservata__page input[type="password"],
.area-riservata__page input[type="tel"],
.area-riservata__page select,
.catalogo__page input[type="search"] {
  background-color: var(--pt-beige-input);
  color: var(--pt-dark);
  margin-bottom: 0;
  height: 48px;
  font-size: 15px;
}
.area-riservata__page select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238d6e4f' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
.area-riservata__page input:focus,
.area-riservata__page select:focus,
.catalogo__page input[type="search"]:focus {
  border-color: var(--pt-brown);
  background-color: var(--pt-white);
  outline: none;
}
.area-riservata__page input::placeholder,
.catalogo__page input::placeholder {
  color: #7d736a;
}

/* ==========================================================================
   1. AREA RISERVATA (registrazione / login)
   ========================================================================== */
.ar-section {
  padding: 100px 0 110px;
  background-color: transparent;
  background-image: linear-gradient(90deg, #ffffff 60.85%, var(--pt-beige) 50%);
}
.ar-intro {
  max-width: 760px;
  margin-bottom: 50px;
}
.ar-intro .heading {
  font-size: 40px;
  line-height: 1.2;
  color: var(--pt-dark);
}
.ar-intro .subheading {
  margin-top: 24px;
  color: var(--pt-text);
}

.ar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.ar-card {
  background-color: var(--pt-white);
  border: 1px solid var(--pt-line);
  box-shadow: 7px 7px 0 0 rgba(147, 110, 85, 0.85);
  padding: 40px;
}
.ar-card--login {
  background-color: var(--pt-dark);
  border-color: var(--pt-dark);
  color: #d9cfc4;
}
.ar-card__eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pt-brown);
  margin-bottom: 8px;
}
.ar-card--login .ar-card__eyebrow {
  color: var(--pt-gold);
}
.ar-card__title {
  font-family: "Ovo", serif;
  font-weight: 400;
  font-size: 28px;
  color: var(--pt-dark);
  margin: 0 0 26px;
}
.ar-card--login .ar-card__title {
  color: var(--pt-white);
}
.ar-card--login p {
  color: #bcb0a4;
}

/* Selettore tipologia utente (solo CSS: radio + label) */
.ar-tipo-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ar-tipo-legend {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--pt-dark);
  margin-bottom: 12px;
}
.ar-tipo-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}
.ar-tipo-switch label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  margin: 0;
  padding: 12px 18px;
  border: 2px solid var(--pt-line);
  border-radius: 3px;
  background-color: var(--pt-white);
  font-family: "Ovo", serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--pt-leather);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.ar-tipo-switch label:hover {
  border-color: var(--pt-gold);
}
.ar-tipo-switch label .fa {
  font-size: 20px;
  width: 22px;
  text-align: center;
  color: var(--pt-gold);
}
.ar-tipo-switch label::after {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-left: auto;
  border: 2px solid var(--pt-line);
  border-radius: 50%;
  background-color: var(--pt-white);
  transition: all 0.2s ease;
}
#tipo-privato:checked ~ .ar-tipo-switch label[for="tipo-privato"],
#tipo-azienda:checked ~ .ar-tipo-switch label[for="tipo-azienda"] {
  border-color: var(--pt-brown);
  background-color: var(--pt-beige);
  color: var(--pt-dark);
}
#tipo-privato:checked ~ .ar-tipo-switch label[for="tipo-privato"]::after,
#tipo-azienda:checked ~ .ar-tipo-switch label[for="tipo-azienda"]::after {
  border-color: var(--pt-brown);
  background-color: var(--pt-brown);
  box-shadow: inset 0 0 0 3px var(--pt-beige);
}
#tipo-privato:focus-visible ~ .ar-tipo-switch label[for="tipo-privato"],
#tipo-azienda:focus-visible ~ .ar-tipo-switch label[for="tipo-azienda"] {
  outline: 2px solid var(--pt-gold-light);
  outline-offset: 2px;
}

.ar-form {
  display: none;
}
#tipo-privato:checked ~ .ar-form--privato,
#tipo-azienda:checked ~ .ar-form--azienda {
  display: block;
}

.ar-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}
.ar-fields--single {
  grid-template-columns: minmax(0, 1fr);
}
.ar-field--full {
  grid-column: 1 / -1;
}
.ar-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--pt-dark);
  margin-bottom: 6px;
}
.ar-field label .req {
  color: var(--pt-brown);
}
.ar-card--login .ar-field label {
  color: #e9e1d8;
}
.ar-card--login input[type="email"],
.ar-card--login input[type="password"] {
  background-color: #241d18;
  border-color: #3a2f27;
  color: var(--pt-white);
}
.ar-card--login input::placeholder {
  color: #9b8f84;
}
.ar-card--login input:focus {
  background-color: #2c241e;
  border-color: var(--pt-gold);
}
.ar-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--pt-muted);
}

.ar-captcha {
  margin-top: 4px;
}

.ar-consents {
  margin-top: 6px;
}
.ar-field .ar-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pt-text);
  cursor: pointer;
}
.ar-check input[type="checkbox"] {
  display: block; /* il tema nasconde i checkbox (style.css) */
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--pt-brown);
  cursor: pointer;
}
.ar-check a {
  color: var(--pt-brown);
  font-weight: 700;
  text-decoration: underline;
}

.ar-form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--pt-line);
}
.ar-form__note {
  margin: 0;
  font-size: 12px;
  color: var(--pt-muted);
}

.ar-login-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}
.ar-login-actions .pt-btn {
  background-color: var(--pt-gold);
  border-color: var(--pt-gold);
  color: var(--pt-dark);
}
.ar-login-actions .pt-btn:hover,
.ar-login-actions .pt-btn:focus {
  background-color: var(--pt-white);
  border-color: var(--pt-white);
  color: var(--pt-dark);
}
.ar-link {
  font-size: 13px;
  color: var(--pt-gold-light);
  text-decoration: underline;
  align-self: flex-start;
}
.ar-link:hover {
  color: var(--pt-white);
}

.ar-steps {
  list-style: none;
  margin: 34px 0 0;
  padding: 26px 0 0;
  border-top: 1px solid #3a2f27;
  counter-reset: ar-step;
}
.ar-steps li {
  position: relative;
  padding-left: 44px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.55;
  color: #bcb0a4;
  counter-increment: ar-step;
}
.ar-steps li:last-child {
  margin-bottom: 0;
}
.ar-steps li::before {
  content: counter(ar-step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--pt-gold);
  border-radius: 50%;
  font-family: "Ovo", serif;
  font-size: 14px;
  line-height: 26px;
  text-align: center;
  color: var(--pt-gold-light);
}
.ar-steps strong {
  display: block;
  color: var(--pt-white);
  font-weight: 700;
}

/* ==========================================================================
   2. CATALOGO (utente approvato)
   ========================================================================== */
.cat-section {
  padding: 40px 0 90px;
  background-color: #fff;
}
.cat-section .container {
  width: auto;
  max-width: 1480px;
  padding-left: 30px;
  padding-right: 30px;
}

/* Barra utente */
.cat-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding-bottom: 22px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--pt-line);
}
.cat-topbar__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pt-brown);
  margin: 0;
}
.cat-topbar__label .fa {
  margin-right: 6px;
}
.cat-user {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.cat-user__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--pt-text);
  line-height: 1.3;
}
.cat-user__name .fa {
  font-size: 26px;
  color: var(--pt-gold);
}
.cat-user__name strong {
  color: var(--pt-dark);
}

/* Layout due colonne */
.cat-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

/* Sidebar categorie */
.cat-sidebar {
  position: sticky;
  top: 30px;
}
.cat-toggle-input {
  display: block; /* annulla display:none del tema per mantenere il focus da tastiera */
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cat-toggle-btn {
  display: none;
}
.cat-toggle-input + .cat-toggle-btn::before {
  content: none;
  display: none;
}
.cat-nav {
  background-color: var(--pt-dark);
  padding: 26px 0 14px;
}
.cat-nav__title {
  font-family: "Ovo", serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--pt-white);
  margin: 0 24px 14px;
}
.cat-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cat-nav__item + .cat-nav__item {
  border-top: 1px dotted #4a3d33;
}
.cat-nav__cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 24px;
  font-family: "Ovo", serif;
  font-size: 18px;
  color: #a59a8f;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}
.cat-nav__cat::-webkit-details-marker {
  display: none;
}
.cat-nav__cat::marker {
  content: "";
}
.cat-nav__cat:hover,
.cat-nav__group[open] > .cat-nav__cat {
  color: var(--pt-white);
}
.cat-nav__cat:focus-visible {
  outline: 2px solid var(--pt-gold-light);
  outline-offset: -2px;
}
.cat-nav__cat .fa {
  font-size: 12px;
  color: var(--pt-gold);
  transition: transform 0.2s ease;
}
.cat-nav__group[open] > .cat-nav__cat .fa {
  transform: rotate(180deg);
}
.cat-nav__group.is-current > .cat-nav__cat {
  color: var(--pt-gold-light);
}
.cat-nav__sub {
  list-style: none;
  margin: 0;
  padding: 0 0 12px;
}
.cat-nav__sub a {
  position: relative;
  display: block;
  padding: 9px 24px 9px 40px;
  font-size: 14px;
  line-height: 1.4;
  color: #c9bdb1;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.cat-nav__sub a::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 50%;
  width: 6px;
  height: 1px;
  background-color: #6f6156;
}
.cat-nav__sub a:hover,
.cat-nav__sub a:focus {
  color: var(--pt-white);
  background-color: rgba(255, 255, 255, 0.04);
}
.cat-nav__sub a:focus-visible {
  outline: 2px solid var(--pt-gold-light);
  outline-offset: -2px;
}
.cat-nav__sub a.is-active {
  color: var(--pt-dark);
  background-color: var(--pt-gold-light);
  border-left-color: var(--pt-white);
  font-weight: 700;
}
.cat-nav__sub a.is-active::before {
  background-color: var(--pt-dark);
}

/* Area centrale */
.cat-main {
  min-width: 0;
  container-type: inline-size;
  container-name: catmain;
}
.cat-breadcrumb {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  color: var(--pt-muted);
}
.cat-breadcrumb li + li::before {
  content: "\203A";
  margin: 0 9px;
  color: var(--pt-gold);
}
.cat-breadcrumb a {
  color: var(--pt-brown);
}
.cat-breadcrumb a:hover {
  color: var(--pt-dark);
}
.cat-breadcrumb [aria-current="page"] {
  color: var(--pt-dark);
  font-weight: 700;
}

.cat-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 30px;
  margin-bottom: 30px;
}
.cat-head__title {
  font-family: "Ovo", serif;
  font-weight: 400;
  font-size: 38px;
  line-height: 1.15;
  color: var(--pt-dark);
  margin: 0;
}
.cat-head__count {
  display: block;
  margin-top: 8px;
  font-family: "Noto Serif", serif;
  font-style: italic;
  font-size: 15px;
  color: var(--pt-leather);
}

/* Ricerca */
.cat-search {
  position: relative;
  flex: 0 1 340px;
  min-width: 240px;
  margin: 0;
}
.cat-search input[type="search"] {
  padding-right: 52px;
  -webkit-appearance: none;
}
.cat-search button {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--pt-brown);
  font-size: 16px;
  cursor: pointer;
}
.cat-search button:hover {
  color: var(--pt-dark);
}

/* Griglia schede */
.cat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 26px 22px;
}
@container catmain (max-width: 479px) {
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
}
@container catmain (min-width: 480px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container catmain (min-width: 640px) {
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container catmain (min-width: 920px) {
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.cat-card {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--pt-white);
  border: 1px solid var(--pt-line);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.cat-card:hover {
  border-color: var(--pt-gold);
  box-shadow: 7px 7px 0 0 rgba(147, 110, 85, 0.85);
  transform: translate(-2px, -2px);
}
.cat-card__thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: var(--pt-beige);
}
.cat-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.cat-card:hover .cat-card__thumb img {
  transform: scale(1.04);
}
.cat-card__thumb--icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-image: linear-gradient(160deg, var(--pt-beige) 0%, #efe3d3 100%);
}
.cat-card__thumb--icon .fa {
  font-size: 64px;
  color: var(--pt-brown);
}
.cat-card__thumb--icon span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--pt-leather);
}
.cat-card__badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 8px;
  background-color: var(--pt-dark);
  color: var(--pt-white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.cat-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 18px 18px 20px;
}
.cat-card__title {
  font-family: "Ovo", serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.3;
  color: var(--pt-dark);
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}
.cat-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.cat-card__actions .pt-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 10px;
  white-space: nowrap;
}

/* Schede strette: pulsanti uno sotto l'altro */
@container (max-width: 250px) {
  .cat-card__actions {
    flex-direction: column;
  }
  .cat-card__actions .pt-btn {
    flex: 0 0 auto;
    width: 100%;
  }
}

/* Paginazione */
.cat-pagination {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--pt-line);
}
.cat-pagination ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.cat-pagination__num,
.cat-pagination__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--pt-line);
  border-radius: 3px;
  background-color: var(--pt-white);
  font-family: "Ovo", serif;
  font-size: 17px;
  line-height: 1;
  color: var(--pt-leather);
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.cat-pagination__step {
  font-family: "Open Sans", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0 16px;
}
.cat-pagination__step .fa {
  font-size: 16px;
}
a.cat-pagination__num:hover,
a.cat-pagination__step:hover,
a.cat-pagination__num:focus,
a.cat-pagination__step:focus {
  border-color: var(--pt-dark);
  background-color: var(--pt-dark);
  color: var(--pt-white);
  text-decoration: none;
}
a.cat-pagination__num:focus-visible,
a.cat-pagination__step:focus-visible {
  outline: 2px solid var(--pt-gold-light);
  outline-offset: 2px;
}
.cat-pagination__num.is-active {
  border-color: var(--pt-brown);
  background-color: var(--pt-brown);
  color: var(--pt-white);
}
.cat-pagination__step.is-disabled {
  opacity: 0.45;
  cursor: default;
}

/* Lightbox anteprima PDF */
html.pdf-lightbox-open {
  overflow: hidden;
}
.pdf-lightbox {
  width: min(1100px, calc(100vw - 48px));
  height: calc(100vh - 48px);
  height: calc(100dvh - 48px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background-color: var(--pt-dark);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.pdf-lightbox::backdrop {
  background-color: rgba(21, 17, 14, 0.82);
}
.pdf-lightbox[open] {
  animation: pdf-lightbox-in 0.22s ease-out;
}
@keyframes pdf-lightbox-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.pdf-lightbox__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.pdf-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 14px 18px 14px 24px;
  border-bottom: 1px solid #3a2f27;
}
.pdf-lightbox__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-family: "Ovo", serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
  color: var(--pt-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdf-lightbox__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}
.pdf-lightbox__download {
  background-color: var(--pt-gold);
  border-color: var(--pt-gold);
  color: var(--pt-dark);
}
.pdf-lightbox__download:hover,
.pdf-lightbox__download:focus {
  background-color: var(--pt-white);
  border-color: var(--pt-white);
  color: var(--pt-dark);
}
.pdf-lightbox__close {
  background-color: transparent;
  border-color: #5a4a3e;
  color: var(--pt-white);
}
.pdf-lightbox__close:hover,
.pdf-lightbox__close:focus {
  background-color: var(--pt-white);
  border-color: var(--pt-white);
  color: var(--pt-dark);
}
.pdf-lightbox__body {
  flex: 1 1 auto;
  min-height: 0;
  background-color: #3a332e;
}
.pdf-lightbox__body iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background-color: #fff;
}

/* Nessun documento */
.cat-empty {
  padding: 70px 30px;
  text-align: center;
  background-color: var(--pt-beige);
  border: 1px dashed var(--pt-gold);
}
.cat-empty .fa {
  font-size: 46px;
  color: var(--pt-gold);
  margin-bottom: 16px;
}
.cat-empty p {
  font-family: "Ovo", serif;
  font-size: 22px;
  line-height: 1.35;
  color: var(--pt-dark);
  margin: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1440px) {
  .cat-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
  }
  .cat-section .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* Sotto 1200px: la sidebar diventa pulsante "Categorie" sopra i contenuti
   (il menu del sito resta fisso a sinistra fino a 991px). */
@media (max-width: 1199px) {
  .ar-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
  }
  .ar-section {
    background-image: none;
    background-color: #fff;
  }

  .cat-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }
  .cat-sidebar {
    position: relative;
    top: 0;
  }
  .cat-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 0 20px;
    background-color: var(--pt-dark);
    color: var(--pt-white);
    font-family: "Ovo", serif;
    font-size: 18px;
    text-transform: none;
    font-weight: 400;
    cursor: pointer;
  }
  .cat-toggle-input + .cat-toggle-btn {
    color: var(--pt-white);
    font-size: 18px;
  }
  .cat-toggle-btn__current {
    flex: 1 1 auto;
    min-width: 0;
    font-family: "Open Sans", sans-serif;
    font-size: 12px;
    color: var(--pt-gold-light);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cat-toggle-btn .fa-angle-down {
    font-size: 20px;
    color: var(--pt-gold);
    transition: transform 0.2s ease;
  }
  .cat-toggle-input:checked + .cat-toggle-btn .fa-angle-down {
    transform: rotate(180deg);
  }
  .cat-toggle-input:focus-visible + .cat-toggle-btn {
    outline: 2px solid var(--pt-gold-light);
    outline-offset: 2px;
  }
  .cat-nav {
    display: none;
    padding-top: 6px;
    border-top: 1px solid #3a2f27;
  }
  .cat-nav__title {
    display: none;
  }
  .cat-toggle-input:checked ~ .cat-nav {
    display: block;
  }
}

@media (max-width: 991px) {
  .ar-section {
    padding: 60px 0 70px;
  }
  .ar-intro {
    margin-bottom: 36px;
  }
  .ar-intro .heading {
    font-size: 32px;
  }
  .cat-section {
    padding-top: 30px;
  }
  .cat-head__title {
    font-size: 32px;
  }
}

@media (max-width: 767px) {
  .ar-card {
    padding: 28px 20px;
    box-shadow: 5px 5px 0 0 rgba(147, 110, 85, 0.85);
  }
  .ar-card__title {
    font-size: 24px;
  }
  .ar-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .ar-form__footer {
    flex-direction: column;
    align-items: stretch;
  }
  .ar-form__footer .pt-btn {
    width: 100%;
  }

  .cat-section .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .cat-head {
    flex-direction: column;
    align-items: stretch;
  }
  .cat-search {
    flex-basis: auto;
    min-width: 0;
    width: 100%;
  }

  .pdf-lightbox {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
  }
  .pdf-lightbox__bar {
    flex-wrap: wrap;
    padding: 12px 16px;
  }
  .pdf-lightbox__title {
    flex-basis: 100%;
    font-size: 17px;
  }
  .pdf-lightbox__actions {
    width: 100%;
  }
  .pdf-lightbox__actions .pt-btn {
    flex: 1 1 0;
  }
}

@media (max-width: 575px) {
  .ar-section {
    padding: 40px 0 56px;
  }
  .ar-intro .heading {
    font-size: 27px;
  }
  .ar-intro .subheading {
    font-size: 16px;
    line-height: 28px;
    margin-top: 16px;
  }
  .ar-tipo-switch {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .ar-tipo-switch label {
    min-height: 54px;
    font-size: 17px;
  }

  .cat-topbar {
    margin-bottom: 24px;
  }
  .cat-topbar__label {
    width: 100%;
  }
  .cat-user {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
  .cat-head__title {
    font-size: 28px;
  }
  .cat-empty {
    padding: 50px 20px;
  }
  .cat-empty p {
    font-size: 19px;
  }
  .cat-pagination {
    margin-top: 34px;
  }
  .cat-pagination ul {
    gap: 6px;
  }
  .cat-pagination__step span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .cat-pagination__step {
    padding: 0 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cat-card,
  .cat-card__thumb img,
  .pt-btn,
  .cat-nav__cat .fa {
    transition: none;
  }
  .pdf-lightbox[open] {
    animation: none;
  }
  .cat-card:hover {
    transform: none;
  }
}

/* ==========================================================================
   Area riservata - logica (messaggi, errori, antispam, varianti)
   ========================================================================== */

/* Modulo unico di registrazione: sempre visibile, la tipologia e' solo un dato */
.ar-form--unico {
  display: block;
}

/* Honeypot antispam: fuori dallo schermo, non nascosto con display:none */
.ar-hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Messaggi */
.ar-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 24px;
  padding: 14px 18px;
  border-left: 4px solid var(--pt-gold);
  background-color: var(--pt-beige);
  color: var(--pt-dark);
  font-size: 14px;
  line-height: 1.5;
}
.ar-alert .fa {
  margin-top: 2px;
  font-size: 18px;
}
.ar-alert--ok {
  border-left-color: #3f7d4a;
  background-color: #eef6ef;
}
.ar-alert--ok .fa {
  color: #3f7d4a;
}
.ar-alert--errore {
  border-left-color: #a33a2c;
  background-color: #fbeeeb;
}
.ar-alert--errore .fa {
  color: #a33a2c;
}
.ar-alert--info .fa {
  color: var(--pt-brown);
}

/* Errori sui singoli campi */
.ar-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
  color: #a33a2c;
}
.ar-field input[aria-invalid="true"],
.ar-field select[aria-invalid="true"] {
  border-color: #a33a2c;
}
.ar-check input[aria-invalid="true"] {
  outline: 2px solid #a33a2c;
  outline-offset: 2px;
}
.ar-card--login .ar-error {
  color: #f0a597;
}

/* Recupero password: una sola card centrata */
.ar-single {
  max-width: 520px;
  margin: 0 auto;
}

/* Menu catalogo: "Tutti i documenti" e categorie senza sottocategorie */
.cat-nav__all,
.cat-nav__cat--link {
  display: block;
  padding: 14px 24px;
  font-family: "Ovo", serif;
  font-size: 18px;
  color: #a59a8f;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 0.2s ease;
}
.cat-nav__all:hover,
.cat-nav__all:focus,
.cat-nav__cat--link:hover,
.cat-nav__cat--link:focus {
  color: var(--pt-white);
  text-decoration: none;
}
.cat-nav__all.is-active,
.cat-nav__cat--link.is-active {
  color: var(--pt-gold-light);
  border-left-color: var(--pt-gold-light);
}

.cat-pagination__num.is-gap {
  border-color: transparent;
  background: none;
}
