/*!
 * cav-demo-pdp.css — Demo „Erleben statt Ansehen" (2026-10-20), nur ?cav_demo=1.
 * 1. .cavlb  = Vollbild „Blick ins Buch"   2. .cav-try = Ausmalen zum Ausprobieren
 */

/* =====================================================================
   1. VOLLBILD „BLICK INS BUCH"
   ===================================================================== */
.cav-gallery__stage.is-track{ cursor: zoom-in; }
.cav-gallery__stage.is-track.is-dragging{ cursor: grabbing; }

.cavlb{ position: fixed; inset: 0; z-index: 100000; /* über der WP-Adminleiste (99999) */ display: none; touch-action: none; overscroll-behavior: contain; }
.cavlb.is-open{ display: block; }
.cavlb__bg{ position: absolute; inset: 0; background: #141c28; opacity: 0; }
.cavlb__viewport{ position: absolute; inset: 0; overflow: hidden; }
.cavlb__track{ display: flex; height: 100%; will-change: transform; }
.cavlb__slide{ flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cavlb__img{ max-width: calc(100% - 32px); max-height: calc(100% - 150px); object-fit: contain; border-radius: 6px; background: #fff;
  user-select: none; -webkit-user-drag: none; transform-origin: 50% 50%; will-change: transform; box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); }
.cavlb__fly{ position: fixed; z-index: 100001; object-fit: contain; border-radius: 6px; background: #fff; pointer-events: none; will-change: transform; transform-origin: 0 0; }

.cavlb__top{ position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 16px 10px; color: #fff; pointer-events: none; opacity: 0; transition: opacity .2s ease; }
.cavlb__count{ font: 700 14px/1 var(--cav-font-body, sans-serif); letter-spacing: .02em; opacity: .85; }
.cavlb__close{ pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff; display: flex; align-items: center; justify-content: center; }
.cavlb__close:active{ transform: scale(.92); }
.cavlb__hint{ position: absolute; left: 0; right: 0; bottom: 96px; text-align: center; color: rgba(255,255,255,.7);
  font: 600 13px/1.3 var(--cav-font-body, sans-serif); pointer-events: none; opacity: 0; transition: opacity .3s ease; }

.cavlb__bar{ position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 14px; justify-content: space-between;
  padding: 14px 16px max(14px, env(safe-area-inset-bottom)); background: #fff; border-radius: 20px 20px 0 0;
  transform: translateY(100%); transition: transform .32s cubic-bezier(.32,.72,0,1); }
.cavlb.is-shown .cavlb__bar{ transform: translateY(0); }
.cavlb.is-shown .cavlb__top, .cavlb.is-shown .cavlb__hint{ opacity: 1; }
.cavlb__info{ min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cavlb__info strong{ font: 600 15.5px/1.2 var(--cav-font-head, sans-serif); color: var(--cav-navy, #2A3A52); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cavlb__info span{ font-size: 13px; color: var(--cav-meta-text, #6E6A63); }
.cavlb__buy{ flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--cav-navy, #2A3A52); color: #fff; font: 700 15px/1 var(--cav-font-body, sans-serif); }
.cavlb__buy:active{ transform: scale(.97); }
.cavlb__buy[hidden]{ display: none; }
@media (min-width: 900px){
  .cavlb__bar{ left: 50%; right: auto; bottom: 20px; width: min(640px, calc(100% - 40px)); border-radius: 18px; transform: translate(-50%, calc(100% + 30px)); }
  .cavlb.is-shown .cavlb__bar{ transform: translate(-50%, 0); }
  .cavlb__img{ max-height: calc(100% - 170px); }
}

/* =====================================================================
   2. AUSMALEN ZUM AUSPROBIEREN
   ===================================================================== */
.cav-try{ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 36px; align-items: center; padding: 32px; margin-top: 40px; }
.cav-try__h{ font-size: var(--cav-fs-section, 32px); line-height: 1.1; margin: 8px 0 10px; }
.cav-try__p{ color: var(--cav-ink-2, #5C574F); font-size: 16.5px; line-height: 1.55; margin: 0 0 20px; max-width: 36em; }
.cav-try__palette{ display: flex; flex-wrap: wrap; gap: 10px; }
.cav-try__color{ width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: transform .15s cubic-bezier(.23,1,.32,1), box-shadow .15s ease; }
.cav-try__color:active{ transform: scale(.9); }
.cav-try__color.is-on{ box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--cav-navy, #2A3A52); transform: scale(1.06); }
.cav-try__tools{ display: flex; gap: 10px; margin-top: 16px; }
.cav-try__tool{ border: 1.5px solid var(--cav-card-border); background: #fff; color: var(--cav-navy, #2A3A52); border-radius: 999px;
  padding: 9px 16px; font: 700 13.5px/1 var(--cav-font-body, sans-serif); cursor: pointer; }
.cav-try__tool:disabled{ opacity: .4; cursor: default; }
.cav-try__cta{ margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--cav-card-border); }
.cav-try__ctatext{ margin: 0 0 14px; color: var(--cav-ink-2, #5C574F); font-size: 15.5px; }
.cav-try__ctatext strong{ color: var(--cav-navy, #2A3A52); }
.cav-try__cta .cav-btn{ min-height: 48px; }

.cav-try__stage{ position: relative; background: #fff; border: 1px solid var(--cav-card-border); border-radius: 16px; padding: 12px; }
.cav-try__canvas{ display: block; width: 100%; height: auto; border-radius: 8px; cursor: crosshair; touch-action: manipulation; background: #fff; }
.cav-try__hint{ position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); background: rgba(42,58,82,.88); color: #fff;
  font: 700 13px/1 var(--cav-font-body, sans-serif); padding: 9px 14px; border-radius: 999px; pointer-events: none; transition: opacity .3s ease; }
.cav-try.is-used .cav-try__hint{ opacity: 0; }
.cav-try__dot{ position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none;
  background: var(--c); opacity: .55; transform: scale(.4); animation: cav-try-dot .45s cubic-bezier(.23,1,.32,1) forwards; }
@keyframes cav-try-dot{ to{ transform: scale(1.4); opacity: 0; } }

@media (max-width: 860px){
  .cav-try{ grid-template-columns: 1fr; gap: 22px; padding: 20px 16px; }
  .cav-try__stage{ order: -1; padding: 8px; }
  .cav-try__color{ width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce){
  .cav-try__dot{ animation: none; opacity: 0; }
  .cavlb__bar, .cavlb__top, .cavlb__hint{ transition: none; }
}
