.tii-product-hotspot__panel {
    position: relative;
    width: 100%;
}

.tii-product-hotspot__image-wrap {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.05);
}

.tii-product-hotspot__image {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: tii-hotspot-float 5s ease-in-out infinite;
}

.tii-product-hotspot__image-wrap::after {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    bottom: 2%;
    width: 42%;
    height: 14px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 75%);
    transform: translateX(-50%) scale(1);
    animation: tii-hotspot-shadow 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes tii-hotspot-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes tii-hotspot-shadow {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.55; }
    50% { transform: translateX(-50%) scale(0.78); opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
    .tii-product-hotspot__image,
    .tii-product-hotspot__image-wrap::after {
        animation: none;
    }
}

.tii-product-hotspot__hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.tii-product-hotspot__hotspot[aria-expanded="true"] {
    z-index: 10;
}

.tii-product-hotspot__pin-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0;
    height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.tii-product-hotspot__pin-dot {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--color-brand-green, #6ad517);
    color: #000;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.55), 0 2px 10px rgba(0, 0, 0, 0.35);
    animation: tii-hotspot-pulse 2.2s ease-in-out infinite;
}

.tii-product-hotspot__hotspot[aria-expanded="true"] .tii-product-hotspot__pin-dot {
    animation: none;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85), 0 2px 10px rgba(0, 0, 0, 0.35);
}

@keyframes tii-hotspot-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.55), 0 2px 10px rgba(0, 0, 0, 0.35); }
    50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.25), 0 2px 10px rgba(0, 0, 0, 0.35); }
}

.tii-product-hotspot__tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 240px;
    padding: 12px 32px 12px 14px;
    border-radius: 12px;
    background: #fff;
    color: #000;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
}

.tii-product-hotspot__tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
}

.tii-product-hotspot__tooltip strong {
    display: block;
    margin-bottom: 2px;
    padding-right: 4px;
    font-size: 14px;
    font-weight: 800;
}

.tii-product-hotspot__tooltip-close {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(0, 0, 0, 0.45);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.tii-product-hotspot__tooltip-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #000;
}

/*
 * Collision fallback (set via script.js positionTooltip()): when the tooltip
 * would render underneath the sticky #site-header, flip it to open below the
 * pin instead of above, and flip the caret to point up at the pin.
 */
.tii-product-hotspot__hotspot.is-flipped .tii-product-hotspot__tooltip {
    bottom: auto;
    top: calc(100% + 12px);
}

.tii-product-hotspot__hotspot.is-flipped .tii-product-hotspot__tooltip::after {
    top: auto;
    bottom: 100%;
    border-top: none;
    border-bottom: 8px solid #fff;
}

.tii-product-hotspot__hotspot.is-right .tii-product-hotspot__tooltip {
    left: auto;
    right: 0;
    transform: none;
}

.tii-product-hotspot__hotspot.is-right .tii-product-hotspot__tooltip::after {
    left: auto;
    right: 16px;
    transform: none;
}

.tii-product-hotspot__hotspot[aria-expanded="true"] .tii-product-hotspot__tooltip {
    display: block;
}

.tii-product-hotspot__thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tii-product-hotspot__thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    padding: 0;
    border-radius: 12px;
    border: 2px solid transparent;
    overflow: hidden;
    background: #f2f2f2;
    cursor: pointer;
}

.tii-product-hotspot__thumb[aria-pressed="true"] {
    border-color: var(--color-brand-green, #6ad517);
}

.tii-product-hotspot__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tii-product-hotspot__empty {
    padding: 2rem;
    text-align: center;
    color: #666;
}

@media (max-width: 600px) {
    .tii-product-hotspot__tooltip {
        max-width: 200px;
        font-size: 12px;
    }
}
