.pr-p3d-slide {
    position: relative;
    overflow: hidden;
    cursor: grab;
    background: radial-gradient(120% 90% at 50% 20%, #ffffff 0%, #eef3fb 60%, #e2e9f5 100%);
}
.pr-p3d-slide:active { cursor: grabbing; }
.pr-p3d-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    transition: opacity .4s, filter .4s;
}
.pr-p3d-slide--live .pr-p3d-poster { opacity: .45; filter: blur(10px) saturate(.8); transform: scale(1.06); }
.pr-p3d-slide.is-ready .pr-p3d-poster { opacity: 0; }
.pr-p3d-slide.is-failed .pr-p3d-poster { opacity: 1; filter: none; transform: none; }
.pr-p3d-stage { position: absolute; inset: 0; }
.pr-p3d-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0EA5E9 0%, #4F46E5 100%);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    box-shadow: 0 2px 8px -2px rgba(79, 70, 229, .55);
    pointer-events: none;
}
.pr-p3d-load {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .12);
    pointer-events: none;
}
.pr-p3d-load i { color: #4F46E5; animation: pr-p3d-spin 1.6s linear infinite; }
.pr-p3d-slide.is-loading .pr-p3d-load { display: inline-flex; }
.pr-p3d-drag {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: none;
    align-items: center;
    gap: 10px;
    color: rgba(14, 21, 48, .45);
    font-size: 16px;
    pointer-events: none;
    transition: opacity .4s;
}
.pr-p3d-drag b {
    display: block;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 2px 6px rgba(14, 21, 48, .12);
    animation: pr-p3d-swing 2.4s ease-in-out infinite;
}
.pr-p3d-hint {
    position: absolute;
    left: 50%;
    bottom: 54px;
    transform: translateX(-50%);
    z-index: 3;
    display: none;
    align-items: center;
    gap: 7px;
    max-width: calc(100% - 24px);
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(14, 21, 48, .8);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    transition: opacity .4s;
}
.pr-p3d-slide.is-ready .pr-p3d-drag,
.pr-p3d-slide.is-ready .pr-p3d-hint { display: inline-flex; }
.pr-p3d-slide.is-touched .pr-p3d-drag,
.pr-p3d-slide.is-touched .pr-p3d-hint { opacity: 0; }
.pr-p3d-tools {
    position: absolute;
    top: 52px;
    right: 8px;
    z-index: 3;
    display: none;
    flex-direction: column;
    gap: 6px;
}
.pr-p3d-slide.is-ready .pr-p3d-tools { display: flex; }
.pr-p3d-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, .95);
    color: #1e293b;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
    transition: border-color .15s, color .15s, background .15s;
}
.pr-p3d-btn:hover { border-color: #4F46E5; color: #4F46E5; }
.pr-p3d-btn[aria-pressed="true"] { background: #4F46E5; border-color: #4F46E5; color: #fff; }
.pr-p3d-fail {
    position: absolute;
    left: 50%;
    bottom: 54px;
    transform: translateX(-50%);
    z-index: 3;
    display: none;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0EA5E9 0%, #4F46E5 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.pr-p3d-slide.is-failed .pr-p3d-fail { display: inline-flex; }
.pr-p3d-slide.is-failed { cursor: default; }
.pr-product-gallery-main.pr-p3d-on { cursor: default; }
.pr-product-gallery-main.pr-p3d-on .pr-3d-badge { display: none; }
.pr-product-gallery-main.pr-p3d-on .pr-gal-nav,
.pr-product-gallery-main.pr-p3d-on .pr-gal-dots { display: flex; opacity: 1; }
.pr-product-gallery-main.pr-p3d-on .pr-gal-nav { top: auto; bottom: 8px; transform: none; }
.pr-product-gallery-main.pr-p3d-on .pr-gal-nav:hover { transform: scale(1.08); }
.pr-product-thumb--3d img { filter: saturate(.7); }
.pr-thumb-3d {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(29, 58, 138, .58);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    pointer-events: none;
}
.pr-thumb-3d i { font-size: 12px; }
.pr-lightbox--3d .pr-lightbox-img { display: none; }
.pr-lightbox-3d {
    z-index: 1;
    flex: 0 0 auto;
    width: min(90vw, calc(85vh * var(--p3d-ar, .75)));
    aspect-ratio: var(--p3d-ar, .75);
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.pr-lightbox-3d .pr-p3d-tag { top: 14px; left: 14px; font-size: 13px; padding: 7px 14px; }
.pr-lightbox-3d .pr-p3d-tools { top: 14px; right: 14px; gap: 8px; }
.pr-lightbox-3d .pr-p3d-btn { width: 42px; height: 42px; font-size: 16px; border-radius: 12px; }
.pr-lightbox-3d .pr-p3d-hint { bottom: 20px; font-size: 14px; padding: 9px 15px; }
.pr-lightbox-3d .pr-p3d-fail { bottom: 20px; }
.pr-lightbox-3d .pr-p3d-drag { font-size: 20px; }
.pr-lightbox-3d .pr-p3d-drag b { width: 32px; height: 32px; }
@media (max-width: 768px) {
    .pr-lightbox-3d .pr-p3d-tag { top: 10px; left: 10px; font-size: 12px; padding: 6px 11px; }
    .pr-lightbox-3d .pr-p3d-tools { top: 10px; right: 10px; gap: 6px; }
    .pr-lightbox-3d .pr-p3d-btn { width: 38px; height: 38px; font-size: 15px; }
    .pr-lightbox-3d .pr-p3d-hint { bottom: 14px; font-size: 12px; }
    .pr-lightbox-3d .pr-p3d-fail { bottom: 14px; }
    .pr-lightbox--3d .pr-lightbox-prev,
    .pr-lightbox--3d .pr-lightbox-next { top: auto; bottom: 18px; transform: none; width: 42px; height: 42px; }
    .pr-lightbox--3d .pr-lightbox-prev { left: 12px; }
    .pr-lightbox--3d .pr-lightbox-next { right: 12px; }
    .pr-lightbox--3d .pr-lightbox-counter { bottom: 24px; }
}
@keyframes pr-p3d-swing {
    0%, 100% { transform: translateX(-16px); }
    50% { transform: translateX(16px); }
}
@keyframes pr-p3d-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .pr-p3d-drag b, .pr-p3d-load i { animation: none; }
}
@media (max-width: 768px) {
    .pr-p3d-hint { font-size: 12px; bottom: 52px; }
    .pr-p3d-tools { top: 50px; }
}
body.dark-theme .pr-p3d-slide { background: radial-gradient(120% 90% at 50% 20%, #1d2750 0%, #141c38 60%, #0b1024 100%); }
body.dark-theme .pr-p3d-load { background: rgba(20, 28, 56, .92); color: #e2e8f0; }
body.dark-theme .pr-p3d-drag { color: rgba(255, 255, 255, .45); }
body.dark-theme .pr-p3d-drag b { background: rgba(30, 41, 59, .92); border-color: #334155; }
body.dark-theme .pr-p3d-hint { background: rgba(0, 0, 0, .6); }
body.dark-theme .pr-p3d-btn { background: rgba(15, 23, 42, .9); border-color: #334155; color: #e2e8f0; }
body.dark-theme .pr-p3d-btn:hover { border-color: #818CF8; color: #A5B4FC; }
body.dark-theme .pr-p3d-btn[aria-pressed="true"] { background: #4F46E5; border-color: #4F46E5; color: #fff; }
