/* Catalogo 2026 da sfogliare (01/12/2026) — app/views/pages/catalogo.php + app/assets/js/catalogo2026.js */

.cb26 {
  --cb-ink: #1b1b1b;
  --cb-soft: #5c5a55;
  --cb-line: #e6e3dc;
  --cb-acc: #E87722;
  --cb-acc-ink: #B95900;
  --cb-sand: #faf9f6;
  --cb-stage: #23211e;
  --cb-ui: 'Montserrat', system-ui, sans-serif;
  font-family: var(--cb-ui);
  color: var(--cb-ink);
  background: var(--cb-sand);
  padding: 34px 0 56px;
}

/* ------------------------------------------------------------ testata */
.cb26-head {
  max-width: 1320px;
  margin: 0 auto 22px;
  padding: 0 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 40px;
  flex-wrap: wrap;
}
.cb26-head__text { max-width: 720px; }
.cb26-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--cb-acc-ink);
  margin-bottom: 8px;
}
.cb26-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--cb-ink);
}
.cb26-sub { margin: 0; font-size: 14px; line-height: 1.65; color: var(--cb-soft); }
.cb26-head__dl { display: flex; gap: 10px; flex-wrap: wrap; }
.cb26-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none !important;
  border: 1px solid var(--cb-ink);
  transition: background .2s, color .2s, border-color .2s;
}
.cb26-btn small { font-weight: 500; letter-spacing: .04em; opacity: .75; margin-left: 4px; text-transform: none; }
.cb26-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cb26-btn--pieno { background: var(--cb-acc); border-color: var(--cb-acc); color: #fff !important; }
.cb26-btn--pieno:hover { background: var(--cb-acc-ink); border-color: var(--cb-acc-ink); }
.cb26-btn--vuoto { background: #fff; color: var(--cb-ink) !important; border-color: var(--cb-line); }
.cb26-btn--vuoto:hover { border-color: var(--cb-ink); }

/* ------------------------------------------------------------ visore */
.cb26-viewer {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  background:
    radial-gradient(ellipse 70% 60% at 50% 42%, rgba(255, 255, 255, .09), transparent 70%),
    var(--cb-stage);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .55);
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
  scroll-margin-top: var(--fms-nav-total-h, 120px);
}
.cb26-stage {
  position: relative;
  height: clamp(440px, calc(100vh - var(--fms-nav-total-h, 120px) - 92px), 1040px);
  height: clamp(440px, calc(100svh - var(--fms-nav-total-h, 120px) - 92px), 1040px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cb26-viewer.is-fullscreen { max-width: none; width: 100%; height: 100%; }
.cb26-viewer.is-fullscreen .cb26-stage { height: auto; flex: 1 1 auto; }

/* libro e fogli */
.cb26-book {
  position: relative;
  perspective: calc(var(--cb26-pw, 500px) * 4.2);
  transition: transform .7s cubic-bezier(.32, .08, .24, 1);
  touch-action: pan-y;
  cursor: grab;
  opacity: 0;
}
.cb26-viewer.is-ready .cb26-book { opacity: 1; transition: transform .7s cubic-bezier(.32, .08, .24, 1), opacity .5s; }
.cb26-book:active { cursor: grabbing; }
.cb26-book.is-single { overflow: hidden; }

.cb26-sheet {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  transform-origin: 0 50%;
  transform-style: preserve-3d;
  will-change: transform;
}
.cb26-book.is-single .cb26-sheet { left: 0; width: 100%; }

.cb26-face {
  position: absolute;
  inset: 0;
  background: #fff;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .25);
}
.cb26-face--back { transform: rotateY(180deg); }
.cb26-face.is-blank { background: #ece9e3; }
.cb26-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  background: #f4f2ee;
}
/* ombra del dorso: pagina destra a sinistra, pagina sinistra a destra */
.cb26-face::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.cb26-book.is-double .cb26-face--front::before {
  background: linear-gradient(90deg, rgba(0, 0, 0, .22), rgba(0, 0, 0, .06) 3.5%, rgba(255, 255, 255, .05) 6%, transparent 12%);
}
.cb26-book.is-double .cb26-face--back::before {
  background: linear-gradient(270deg, rgba(0, 0, 0, .22), rgba(0, 0, 0, .06) 3.5%, rgba(255, 255, 255, .05) 6%, transparent 12%);
}
.cb26-book.is-single .cb26-face--front::before {
  background: linear-gradient(90deg, rgba(0, 0, 0, .12), transparent 4%);
}
/* luce e ombra mentre il foglio gira */
.cb26-face::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
}
.cb26-face--front::after { background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .35)); }
.cb26-face--back::after  { background: linear-gradient(270deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .35)); }
.cb26-sheet.is-turning .cb26-face::after { animation: cb26-shade var(--cb26-dur, .76s) ease-in-out; }
.cb26-sheet.is-dragging .cb26-face::after { opacity: calc(var(--cb26-s, 0) * .9); }
@keyframes cb26-shade { 0% { opacity: 0; } 50% { opacity: .9; } 100% { opacity: 0; } }

/* spessore dei fogli ai lati del libro aperto */
.cb26-edge {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 0;
  z-index: 0;
  background: repeating-linear-gradient(90deg, #f3f0ea 0 1px, #cfcac1 1px 2px);
  box-shadow: 0 10px 20px -12px rgba(0, 0, 0, .6);
  transition: width .5s;
}
.cb26-edge--l { right: 100%; border-radius: 2px 0 0 2px; }
.cb26-edge--r { left: 100%; border-radius: 0 2px 2px 0; }
.cb26-book.is-single .cb26-edge { display: none; }

/* frecce ai lati */
.cb26-side {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, opacity .2s;
}
.cb26-side:hover { background: var(--cb-acc); }
.cb26-side:disabled { opacity: 0; pointer-events: none; }
.cb26-side svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cb26-side--prev { left: 12px; }
.cb26-side--next { right: 12px; }

.cb26-hint {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 6;
  margin: 0;
  transform: translate(-50%, 6px);
  padding: 7px 14px;
  font-size: 12px;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s, transform .5s;
}
.cb26-hint.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ barra */
.cb26-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: #171614;
  color: #fff;
}
.cb26-bar__group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cb26-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #fff !important;
  font-family: var(--cb-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none !important;
  cursor: pointer;
  transition: background .2s, color .2s, opacity .2s;
}
.cb26-tool:hover { background: rgba(255, 255, 255, .1); }
.cb26-tool:disabled { opacity: .3; cursor: default; background: transparent; }
.cb26-tool:focus-visible, .cb26-side:focus-visible, .cb26-close:focus-visible, .cb26-thumb:focus-visible { outline: 2px solid var(--cb-acc); outline-offset: 2px; }
.cb26-tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.cb26-tool--acc { background: var(--cb-acc); }
.cb26-tool--acc:hover { background: var(--cb-acc-ink); }

.cb26-where { display: flex; align-items: center; gap: 10px; margin: 0 6px; }
.cb26-where__label { min-width: 150px; text-align: center; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: #fff; white-space: nowrap; }
.cb26-where__go input {
  width: 118px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 0;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-family: var(--cb-ui);
  font-size: 12px;
  -moz-appearance: textfield;
}
.cb26-where__go input::placeholder { color: rgba(255, 255, 255, .55); }
.cb26-where__go input::-webkit-outer-spin-button, .cb26-where__go input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cb26-where__go input:focus { outline: none; border-color: var(--cb-acc); }
.cb26-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ finestre (indice, ingrandimento) */
.cb26-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: rgba(23, 22, 20, .97);
  color: #fff;
}
.cb26-layer[hidden] { display: none; }
.cb26-viewer.has-layer .cb26-stage, .cb26-viewer.has-layer .cb26-bar { visibility: hidden; }
.cb26-layer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  font-size: 13px;
  letter-spacing: .04em;
}
.cb26-close {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.cb26-close:hover { color: var(--cb-acc); }

.cb26-index__grid {
  flex: 1 1 auto;
  overflow: auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 18px 14px;
  align-content: start;
}
.cb26-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .75);
  font-family: var(--cb-ui);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.cb26-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 595 / 842;
  object-fit: cover;
  background: #3a3733;
  outline: 2px solid transparent;
  transition: outline-color .2s, transform .2s;
}
.cb26-thumb:hover img { transform: translateY(-3px); }
.cb26-thumb:hover img, .cb26-thumb.is-current img { outline-color: var(--cb-acc); }
.cb26-thumb.is-current { color: var(--cb-acc); }

.cb26-zoom__tools { display: flex; align-items: center; gap: 4px; }
.cb26-zoom__scroll {
  flex: 1 1 auto;
  overflow: auto;
  cursor: grab;
  touch-action: pan-x pan-y pinch-zoom;
}
.cb26-zoom__scroll.is-panning { cursor: grabbing; }
.cb26-zoom__pages {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: max-content;
  min-width: 100%;
  padding: 16px;
  box-sizing: border-box;
}
.cb26-zoom__pages img {
  display: block;
  width: var(--cb26-zw, 500px);
  height: auto;
  background: #fff;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .8);
}

.cb26-noscript { max-width: 1320px; margin: 20px auto; padding: 0 24px; }

/* ------------------------------------------------------------ telefono */
@media (max-width: 760px) {
  .cb26 { padding: 22px 0 36px; }
  .cb26-head { padding: 0 16px; margin-bottom: 16px; }
  .cb26-btn { height: 42px; padding: 0 14px; font-size: 11px; }
  .cb26-stage { height: clamp(420px, calc(100svh - var(--fms-nav-total-h, 90px) - 120px), 900px); }
  .cb26-side { display: none; }
  .cb26-bar { justify-content: center; padding: 8px; }
  .cb26-tool--txt span { display: none; }
  .cb26-where__label { min-width: 0; font-size: 12px; }
  .cb26-where__go { display: none; }
  #cb26First, #cb26Last { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cb26-book, .cb26-edge, .cb26-hint { transition: none !important; }
}
