.apb-product-gallery{--apb-gap:14px;position:relative;margin:34px 0;padding:22px;border:1px solid #e5e7eb;border-radius:20px;background:#fff;box-shadow:0 10px 30px rgba(15,23,42,.08);overflow:hidden}
.apb-product-gallery h3{margin:0 0 16px;font-size:23px;line-height:1.2}
.apb-gallery-viewport{position:relative;overflow:hidden;padding:2px 52px 2px}
.apb-gallery-track{display:flex;align-items:center;gap:var(--apb-gap);overflow-x:auto;scroll-behavior:smooth;scrollbar-width:none;padding:4px 2px 12px;cursor:grab;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}
.apb-gallery-track::-webkit-scrollbar{display:none}
.apb-gallery-track.is-dragging{cursor:grabbing;scroll-behavior:auto}
.apb-gallery-item{flex:0 0 210px;align-self:center;margin:0;scroll-snap-align:start}
.apb-gallery-item button{display:block!important;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;cursor:zoom-in!important;text-align:left;appearance:none!important;-webkit-appearance:none!important}
.apb-gallery-item img{display:block;width:100%;height:178px;object-fit:contain;background:#f8fafc;border-radius:14px;transition:transform .2s ease,box-shadow .2s ease}
.apb-gallery-product-caption{margin:5px 2px 0;font-size:11px;line-height:1.35;color:#6b7280;text-align:center}.apb-gallery-product-caption span{display:inline}.apb-gallery-product-caption a{margin-left:5px;color:inherit;text-decoration:underline;font-weight:600}
.apb-gallery-item button:hover img{transform:translateY(-2px);box-shadow:0 9px 22px rgba(15,23,42,.16)}
.apb-gallery-arrow{position:absolute!important;top:50%!important;z-index:50!important;transform:translateY(-50%)!important;display:flex!important;align-items:center!important;justify-content:center!important;width:50px!important;height:50px!important;min-width:50px!important;min-height:50px!important;margin:0!important;padding:0!important;border:1px solid rgba(148,163,184,.35)!important;border-radius:50%!important;background:rgba(255,255,255,.96)!important;color:#1f2937!important;font-family:Arial,sans-serif!important;font-size:32px!important;font-weight:400!important;line-height:1!important;text-align:center!important;cursor:pointer!important;box-shadow:0 6px 18px rgba(15,23,42,.18)!important;appearance:none!important;-webkit-appearance:none!important;opacity:1!important}
.apb-gallery-arrow.prev{left:4px!important}
.apb-gallery-arrow.next{right:4px!important}
.apb-gallery-arrow:hover:not(:disabled){background:#fff!important;box-shadow:0 8px 22px rgba(15,23,42,.24)!important}
.apb-gallery-arrow:disabled{opacity:.32!important;cursor:default!important}
.apb-gallery-arrow.is-hidden{display:none!important}
.apb-gallery-meta{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:10px;font-size:12px;color:#6b7280}
.apb-gallery-dots{display:flex;gap:6px;justify-content:center;align-items:center;margin-top:9px;min-height:8px}
.apb-gallery-dot{display:block;width:7px;height:7px;border-radius:50%;background:#cbd5e1;transition:transform .2s ease,background .2s ease}
.apb-gallery-dot.is-active{background:#334155;transform:scale(1.25)}

.apb-gallery-lightbox{position:fixed!important;inset:0!important;z-index:2147483647!important;background:rgba(3,7,18,.94)!important;display:none!important;align-items:center!important;justify-content:center!important;padding:28px!important;box-sizing:border-box!important}
.apb-gallery-lightbox.is-open{display:flex!important;visibility:visible!important;opacity:1!important}
.apb-gallery-lightbox-inner{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-width:0;min-height:0}
.apb-gallery-lightbox-image-wrap{display:flex!important;align-items:center!important;justify-content:center!important;max-width:90vw!important;max-height:84vh!important}.apb-gallery-lightbox-image-link{display:block!important;line-height:0!important}.apb-gallery-lightbox img{display:block!important;max-width:90vw!important;max-height:84vh!important;width:auto!important;height:auto!important;object-fit:contain!important;box-shadow:0 18px 60px rgba(0,0,0,.5)!important;border-radius:10px!important;background:#fff!important}
.apb-gallery-lightbox-close,.apb-gallery-lightbox-prev,.apb-gallery-lightbox-next{position:absolute!important;z-index:5!important;display:flex!important;align-items:center!important;justify-content:center!important;width:50px!important;height:50px!important;min-width:50px!important;min-height:50px!important;margin:0!important;padding:0!important;border:1px solid rgba(255,255,255,.18)!important;border-radius:50%!important;color:#fff!important;background:rgba(0,0,0,.62)!important;font-family:Arial,sans-serif!important;font-size:34px!important;font-weight:400!important;line-height:1!important;text-align:center!important;cursor:pointer!important;appearance:none!important;-webkit-appearance:none!important}
.apb-gallery-lightbox-close{right:12px!important;top:10px!important}
.apb-gallery-lightbox-prev{left:12px!important;top:50%!important;transform:translateY(-50%)!important}
.apb-gallery-lightbox-next{right:12px!important;top:50%!important;transform:translateY(-50%)!important}
.apb-gallery-lightbox button:hover:not(:disabled){background:rgba(30,41,59,.92)!important}
.apb-gallery-lightbox button:disabled{opacity:.35!important;cursor:default!important}
.apb-gallery-amazon-cta{display:inline-block!important;margin-left:10px!important;padding:5px 10px!important;border-radius:6px!important;background:#ff9900!important;color:#111!important;text-decoration:none!important;font-weight:700!important}.apb-gallery-lightbox-caption{position:absolute!important;left:50%!important;bottom:12px!important;transform:translateX(-50%)!important;max-width:78vw!important;color:#fff!important;text-align:center!important;font-size:13px!important;line-height:1.4!important;padding:6px 12px!important;border-radius:8px!important;background:rgba(0,0,0,.42)!important}
body.apb-lightbox-open{overflow:hidden!important}

@media(max-width:700px){
  .apb-product-gallery{padding:14px}
  .apb-gallery-viewport{padding-left:44px;padding-right:44px}
  .apb-gallery-item{flex-basis:72vw}
  .apb-gallery-item img{height:190px}
  .apb-gallery-arrow{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;font-size:26px!important}
  .apb-gallery-arrow.prev{left:4px!important}.apb-gallery-arrow.next{right:4px!important}
  .apb-gallery-lightbox{padding:12px!important}
  .apb-gallery-lightbox img{max-width:94vw!important;max-height:82vh!important}
  .apb-gallery-lightbox-prev{left:5px!important}.apb-gallery-lightbox-next{right:5px!important}.apb-gallery-lightbox-close{right:5px!important;top:5px!important}
  .apb-gallery-lightbox-caption{bottom:5px!important;max-width:88vw!important}
}

.apb-gallery-lightbox{pointer-events:auto!important}.apb-gallery-lightbox-inner{pointer-events:auto!important}

/* 2.10.43.63 — compatibilita' temi/plugin: frecce sempre nelle fasce laterali
 * e click della miniatura sempre affidato al button della galleria. */
.apb-product-gallery .apb-gallery-viewport{
  padding-left:64px!important;
  padding-right:64px!important;
}
.apb-product-gallery .apb-gallery-track{
  position:relative!important;
  z-index:1!important;
}
.apb-product-gallery .apb-gallery-item{
  position:relative!important;
  z-index:2!important;
}
.apb-product-gallery .apb-gallery-item button{
  position:relative!important;
  z-index:3!important;
  pointer-events:auto!important;
}
.apb-product-gallery .apb-gallery-item img{
  pointer-events:none!important;
}
.apb-product-gallery .apb-gallery-arrow{
  z-index:20!important;
  pointer-events:auto!important;
}
.apb-product-gallery .apb-gallery-arrow.prev{left:8px!important}
.apb-product-gallery .apb-gallery-arrow.next{right:8px!important}

.apb-gallery-lightbox .apb-gallery-lightbox-inner,
.apb-gallery-lightbox .apb-gallery-lightbox-image-wrap,
.apb-gallery-lightbox .apb-gallery-lightbox-image-link{
  pointer-events:auto!important;
}
.apb-gallery-lightbox.is-open{
  visibility:visible!important;
  opacity:1!important;
}

/* 3.0.48 — stile definitivo CTA prodotto: tutto il trafiletto piccolo e in grassetto;
 * "Scopri di più" sempre giallo e grassetto. Gli !important servono anche quando
 * il tema WordPress applica regole proprie a figure/figcaption/a. */
.apb-product-inline-caption,.apb-gallery-product-caption{font-size:11px!important;line-height:1.35!important;font-weight:700!important;color:#6b7280!important}
.apb-product-inline-caption *,.apb-gallery-product-caption *{font-size:11px!important;font-weight:700!important}
.apb-product-inline-caption .apb-amazon-cta,.apb-gallery-product-caption .apb-amazon-cta{font-size:11px!important;font-weight:700!important;color:#ff9900!important;text-decoration:underline!important;margin-left:5px!important;background:transparent!important;padding:0!important;border:0!important;border-radius:0!important}
.apb-product-inline-caption .apb-amazon-cta:visited,.apb-product-inline-caption .apb-amazon-cta:hover,.apb-product-inline-caption .apb-amazon-cta:focus,.apb-gallery-product-caption .apb-amazon-cta:visited,.apb-gallery-product-caption .apb-amazon-cta:hover,.apb-gallery-product-caption .apb-amazon-cta:focus{color:#ff9900!important;font-weight:700!important}

/* 3.0.48 — il nome del prodotto nel trafiletto deve avere esattamente la stessa
 * dimensione del link CTA ed essere sempre grassetto, indipendentemente dal tema. */
.apb-product-inline-caption > span,.apb-gallery-product-caption > span{font-size:11px!important;font-weight:700!important;line-height:1.35!important;}

/* 3.0.116 — fallback testuali Amazon: stessa scala tipografica dei trafiletti prodotto.
 * Il blocco viene posizionato subito dopo la cover APB e non deve dominare l'introduzione. */
.apb-amazon-fallback-links,.apb-amazon-fallback-links *{font-size:11px!important;line-height:1.35!important;font-weight:700!important}
.apb-amazon-fallback-links{color:#6b7280!important;margin:6px 0 14px!important}
.apb-amazon-fallback-link{display:block!important;margin:2px 0!important}
.apb-amazon-fallback-link a,.apb-amazon-fallback-link a:visited,.apb-amazon-fallback-link a:hover,.apb-amazon-fallback-link a:focus{font-size:11px!important;line-height:1.35!important;font-weight:700!important;color:#ff9900!important;text-decoration:underline!important;background:transparent!important;padding:0!important;border:0!important}
