.banner-hotspot-surface {
    position: relative;
}

.banner-hotspot-surface:has(.banner-hotspot.is-open) { overflow: visible !important; }

/* پنل نباید توسط viewport اسلایدر بریده شود. این حالت فقط هنگام بازبودن پنل فعال است. */
.swiper:has(.banner-hotspot.is-open),
.swiper-wrapper:has(.banner-hotspot.is-open),
.flickity-viewport:has(.banner-hotspot.is-open) { overflow: visible !important; }
.swiper-slide:has(.banner-hotspot.is-open),
.carousel-cell:has(.banner-hotspot.is-open) { z-index: 30; }

.banner-hotspot {
    --hotspot-accent: var(--color-primary, #ff5e14);
    position: absolute;
    top: var(--hotspot-y);
    left: var(--hotspot-x);
    z-index: 25;
    width: 0;
    height: 0;
    direction: rtl;
}

.banner-hotspot__marker {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--hotspot-accent);
    box-shadow: 0 3px 14px rgba(0, 0, 0, .28);
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.banner-hotspot__marker span {
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    background: #fff;
}

.banner-hotspot--wave .banner-hotspot__marker::before,
.banner-hotspot--wave .banner-hotspot__marker::after {
    position: absolute;
    inset: -3px;
    border: 2px solid var(--hotspot-accent);
    border-radius: 50%;
    content: "";
    animation: banner-hotspot-wave 2s ease-out infinite;
}

.banner-hotspot--wave .banner-hotspot__marker::after { animation-delay: 1s; }
.banner-hotspot--blink .banner-hotspot__marker { animation: banner-hotspot-blink 1.15s ease-in-out infinite; }

@keyframes banner-hotspot-wave {
    0% { opacity: .85; transform: scale(.8); }
    100% { opacity: 0; transform: scale(2.6); }
}

@keyframes banner-hotspot-blink {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 94, 20, .5), 0 3px 14px rgba(0, 0, 0, .28); }
    50% { box-shadow: 0 0 0 10px transparent, 0 3px 18px rgba(0, 0, 0, .36); transform: translate(-50%, -50%) scale(1.14); }
}

.banner-hotspot__panel {
    --hotspot-panel-shift: 0px;
    position: absolute;
    top: 22px;
    inset-inline-start: 18px;
    z-index: 50;
    width: min(440px, calc(100vw - 32px));
    padding: 12px;
    border: 1px solid rgba(20, 20, 20, .08);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(20, 24, 33, .22);
    color: #171f2b;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(var(--hotspot-panel-shift)) translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.banner-hotspot.is-open .banner-hotspot__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(var(--hotspot-panel-shift));
}

.banner-hotspot__header,
.banner-hotspot__navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.banner-hotspot__header { margin-bottom: 10px; }
.banner-hotspot__header strong { font-size: .9rem; }
.banner-hotspot__close,
.banner-hotspot__navigation button {
    display: inline-grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f2f3f5;
    color: #323842;
}

.banner-hotspot__carousel { overflow: hidden; }
.banner-hotspot__track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.banner-hotspot__track::-webkit-scrollbar { display: none; }

.banner-hotspot__category-card {
    display: flex;
    flex: 0 0 calc(100% - 2px);
    min-height: 112px;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    background: #f6f7f9;
    scroll-snap-align: start;
}

.banner-hotspot__category-image {
    display: grid;
    flex: 0 0 92px;
    width: 92px;
    height: 92px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    color: var(--hotspot-accent);
}

.banner-hotspot__category-image img,
.banner-hotspot__product-image img { width: 100%; height: 100%; object-fit: cover; }
.banner-hotspot__category-image i { font-size: 1.8rem; }
.banner-hotspot__category-content {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}
.banner-hotspot__category-content > span { color: #858b94; font-size: .74rem; }
.banner-hotspot__item-title {
    display: -webkit-box;
    overflow: hidden;
    color: #202631;
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.banner-hotspot__more { color: var(--hotspot-accent); font-size: .74rem; font-weight: 600; text-decoration: none; }

.banner-hotspot__product-card {
    display: flex;
    flex: 0 0 156px;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
    padding: 9px;
    border: 1px solid #eceef1;
    border-radius: 12px;
    background: #fff;
    scroll-snap-align: start;
}
.banner-hotspot__product-image {
    display: grid;
    width: 100%;
    aspect-ratio: 1;
    place-items: center;
    overflow: hidden;
    border-radius: 9px;
    background: #f4f5f7;
    color: var(--hotspot-accent);
}
.banner-hotspot__product-image i { font-size: 2rem; }
.banner-hotspot__price { color: #171f2b; font-size: .82rem; font-weight: 800; }
.banner-hotspot__price small { color: #777; font-size: .65rem; font-weight: 500; }
.banner-hotspot__navigation { justify-content: center; margin-top: 10px; }
.banner-hotspot__navigation span { color: #8b9098; font-size: .7rem; }
.banner-hotspot__navigation button:hover { background: var(--hotspot-accent); color: #fff; }
.banner-hotspot__empty { padding: 22px 12px; border-radius: 10px; background: #f6f7f9; color: #777; font-size: .8rem; text-align: center; }

@media (max-width: 767.98px) {
    [data-banner-hotspot-root].has-open-hotspot { z-index: 1100 !important; }
    .banner-hotspot__marker { width: 29px; height: 29px; }
    .banner-hotspot__panel {
        position: fixed;
        inset: auto 12px calc(80px + env(safe-area-inset-bottom, 0px)) 12px;
        z-index: 1101;
        width: auto;
        max-width: none;
        max-height: min(70dvh, 560px, calc(100dvh - 104px));
        overflow-y: auto;
        box-sizing: border-box;
        transform: translateY(18px);
    }
    .banner-hotspot.is-open .banner-hotspot__panel { transform: translateY(0); }
    .banner-hotspot__category-card { min-height: 104px; }
    .banner-hotspot__category-image { flex-basis: 82px; width: 82px; height: 82px; }
    .banner-hotspot__product-card { flex-basis: min(150px, 46vw); }
}

@media (prefers-reduced-motion: reduce) {
    .banner-hotspot__marker,
    .banner-hotspot__marker::before,
    .banner-hotspot__marker::after { animation: none !important; }
    .banner-hotspot__panel,
    .banner-hotspot__track { transition: none; scroll-behavior: auto; }
}
