/* =============================================================================
   Color Swatch → Main Image Corner Preview (Desktop only)
   
   When hovering an image-square swatch, a small card with the swatch image
   appears at the right-center of the main product image area.
   
   - Desktop only: touch devices have no hover, card is hidden via media query
   - Corner position: product photo stays mostly visible
   - Single DOM element reused: performant with 100+ swatches
   ============================================================================= */

/* --- tooltip-container is now handled by product-sticky-accordion.css --- */
/* Removed: display:none !important was blocking the per-li hover tooltip */

/* --- Corner card on main product image area (desktop only) --- */

/* The picture container needs relative positioning for overlay */
.gallery .picture {
    position: relative;
}

/* Card: right-center, portrait swatch at original ratio */
.swatch-overlay-card {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    max-width: 220px;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
    pointer-events: none;
}

.swatch-overlay-card.active {
    opacity: 1;
}

.swatch-overlay-card img {
    max-width: 200px;
    max-height: 381px;
    object-fit: contain;
    display: block;
    border-radius: 3px;
}

.swatch-overlay-card .swatch-overlay-name {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    text-align: center;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

/* --- Responsive: hide card on touch/mobile, scale on small desktops --- */

/* Tablet landscape & small laptop: slightly smaller card */
@media (max-width: 1200px) and (min-width: 769px) {
    .swatch-overlay-card img {
        max-width: 160px;
        max-height: 305px;
    }
}

/* Tablet portrait & below: hide card entirely (no hover on touch) */
@media (max-width: 768px) {
    .swatch-overlay-card {
        display: none !important;
    }
}
