/*
 * Product 360 Spin: the 360° gallery item, turned by dragging, and its "360°" thumbnail.
 * Themes can set --p360-accent (keyboard focus outline).
 */
.p360-stage { cursor: progress; position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.p360-stage.is-ready { cursor: grab; }
.p360-stage.is-dragging { cursor: grabbing; }
.p360-stage:focus { outline: none; }
.p360-stage:focus-visible { outline: 2px solid var(--p360-accent, #111); outline-offset: -2px; }
.p360-stage img { display: block; height: auto; opacity: 0; pointer-events: none; width: 100%; }
.p360-stage img ~ img { height: 100%; inset: 0; object-fit: cover; position: absolute; }
.p360-stage img.is-active { opacity: 1; }
.p360-hint { align-items: center; background: rgba(255, 255, 255, .92); border-radius: 999px; color: #111; display: flex; font-size: 13px; height: 40px; line-height: 1.2; margin: 0; padding: 0 14px 0 10px; pointer-events: none; position: absolute; right: 16px; top: 16px; z-index: 3; }
.p360-hint svg { flex: none; }
.p360-hint__label { font-weight: 700; letter-spacing: .04em; margin-left: 6px; }
.p360-hint__text { margin-left: 6px; max-width: 220px; overflow: hidden; transition: margin .4s ease, max-width .4s ease, opacity .3s ease; white-space: nowrap; }
.p360-hint.is-used .p360-hint__text { margin-left: 0; max-width: 0; opacity: 0; }
.flex-control-thumbs li.p360-thumb { position: relative; }
.flex-control-thumbs li.p360-thumb::after { align-items: center; background: rgba(17, 17, 17, .38); color: #fff; content: "360°"; display: flex; font-size: 12px; font-weight: 700; inset: 0; justify-content: center; letter-spacing: .06em; pointer-events: none; position: absolute; }
@media (max-width: 600px) { .p360-hint { right: 12px; top: 12px; } }
@media (prefers-reduced-motion: reduce) { .p360-hint__text { transition: none; } }

/* Quiet product card, with explicit controls for touch and keyboard users. */
.p360-slide { background: #f6f7f7; border-radius: 6px; overflow: hidden; }
.p360-stage { background: #fff; min-height: 180px; }
.p360-stage img { aspect-ratio: 1; object-fit: contain; }
.p360-stage img ~ img { object-fit: contain; }
.p360-hint { border: 1px solid #dcdcde; box-shadow: 0 2px 8px rgb(0 0 0 / 4%); }
.p360-stage:not(.is-ready) .p360-hint { display: none; }
.p360-load-status { position: absolute; z-index: 4; left: 12px; right: 12px; bottom: 12px; margin: 0; padding: 10px 12px; border: 1px solid #dcdcde; border-radius: 6px; background: rgb(255 255 255 / 95%); color: #646970; font-size: 12px; line-height: 1.5; text-align: center; }
.p360-load-status[hidden] { display: none; }
.p360-stage.has-error { cursor: default; }
.p360-stage.has-error .p360-load-status { color: #8a2424; background: #fcf0f1; }
.p360-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid #dcdcde; color: #646970; font-size: 12px; line-height: 1.4; }
.p360-toolbar__text { flex: 1; min-width: 0; }
.p360-toolbar button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; min-width: 40px; width: 40px; height: 40px; min-height: 40px; padding: 0; margin: 0; border: 1px solid #dcdcde; border-radius: 6px; background: #fff; color: #1d2327; font: 18px/1 system-ui, sans-serif; box-shadow: none; cursor: pointer; }
.p360-toolbar button:hover { border-color: var(--p360-accent, #2271b1); color: var(--p360-accent, #2271b1); background: #f6faff; }
.p360-toolbar button:focus-visible { outline: 2px solid var(--p360-accent, #2271b1); outline-offset: 2px; }
.p360-toolbar button:disabled { cursor: default; opacity: .45; }
.p360-angle { min-width: 32px; text-align: center; font-variant-numeric: tabular-nums; }
.flex-control-thumbs li.p360-thumb::after { inset: auto 4px 4px auto; border-radius: 4px; padding: 3px 6px; background: rgb(255 255 255 / 94%); color: #1d2327; border: 1px solid #dcdcde; font-size: 10px; }
@media (max-width: 380px) { .p360-toolbar { flex-wrap: wrap; justify-content: center; } .p360-toolbar__text { flex-basis: 100%; text-align: center; } .p360-hint__text { font-size: 11px; } }
