/* ---- Make the parent gallery a positioning context ---- */
.product.media { position: relative; }

/* ---- 360° Trigger Button — overlay on top of product gallery ---- */
#aries-360-trigger {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 24px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

#aries-360-trigger:hover,
#aries-360-trigger:focus {
    background: #f6921e;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    transform: scale(1.04);
    outline: none;
}

.aries-360-icon {
    font-size: 18px;
    line-height: 1;
    display: inline-block;
    animation: aries-spin 6s linear infinite;
}

#aries-360-trigger:hover .aries-360-icon {
    animation: aries-spin 1.2s linear infinite;
}

@keyframes aries-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ---- Overlay ---- */
#aries-360-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.82);
    align-items: center;
    justify-content: center;
}

/* ---- Viewer container ---- */
.aries-360-viewer {
    position: relative;
    background: #fff;
    border-radius: 8px;
    width: 90vw;
    max-width: 600px;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.aries-360-viewer img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
}

.aries-360-viewer.dragging { cursor: grabbing; }

/* ---- Close button ---- */
.aries-360-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 10001;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.aries-360-close:hover {
    background: rgba(0,0,0,0.8);
}

/* ---- Loading spinner ---- */
.aries-360-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.85);
    z-index: 5;
}

.aries-360-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #ddd;
    border-top-color: #555;
    border-radius: 50%;
    animation: aries-rotate 0.8s linear infinite;
}

@keyframes aries-rotate {
    to { transform: rotate(360deg); }
}

/* ---- Drag hint ---- */
.aries-360-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    pointer-events: none;
    transition: opacity 0.6s;
    white-space: nowrap;
}
