/* =============================================
   Instagram Float Button — два магазина
   ============================================= */

.insta-float {
  position: fixed;
  bottom: 28px;
  right: 20px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* ── Главная кнопка ── */
.insta-float__btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: radial-gradient(circle at 30% 107%,
    #fdf497 0%, #fdf497 5%,
    #fd5949 45%,
    #d6249f 60%,
    #285AEB 90%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(214, 36, 159, 0.45);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.3s ease;
  position: relative;
  flex-shrink: 0;
  touch-action: manipulation;
}
.insta-float__btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(214, 36, 159, 0.6);
}
.insta-float--open .insta-float__btn {
  transform: scale(0.9) rotate(0deg);
}

/* Иконки — переключение */
.insta-float__icon {
  position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.insta-float__icon--insta {
  opacity: 1;
  transform: scale(1);
}
.insta-float__icon--close {
  opacity: 0;
  transform: scale(0.5) rotate(-90deg);
}
.insta-float--open .insta-float__icon--insta {
  opacity: 0;
  transform: scale(0.5) rotate(90deg);
}
.insta-float--open .insta-float__icon--close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* ── Карточки магазинов ── */
.insta-stores {
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  width: 280px;

  /* Скрыто по умолчанию */
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.34,1.56,0.64,1),
              transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  transform-origin: bottom right;
}
.insta-float--open .insta-stores {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.insta-store {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.insta-store:hover {
  background: rgba(255,255,255,0.05);
}
.insta-store:hover .insta-store__arrow {
  transform: translateX(3px);
  color: #d6249f;
}

/* Аватарки */
.insta-store__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid transparent;
  background: radial-gradient(circle at 30% 107%, #fdf497, #fd5949, #d6249f, #285AEB) border-box;
  box-shadow: 0 0 0 2px radial-gradient(circle, #d6249f, #285AEB);
  position: relative;
}
/* Instagram-style ring */
.insta-store__avatar::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(45deg, #fdf497, #fd5949, #d6249f, #285AEB);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 1;
}
.insta-store__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Текст */
.insta-store__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.insta-store__name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  font-family: 'Jost', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.insta-store__city {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-family: 'Jost', sans-serif;
  letter-spacing: 0.05em;
}
.insta-store__handle {
  font-size: 11px;
  color: #d6249f;
  font-family: 'Jost', sans-serif;
}

.insta-store__arrow {
  color: rgba(255,255,255,0.25);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

/* Разделитель */
.insta-stores__divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 0 16px;
}

/* Mobile */
@media (max-width: 400px) {
  .insta-stores { width: calc(100vw - 40px); }
  .insta-float  { right: 16px; bottom: 20px; }
}

/* ── FIX #1: контейнер не перехватывает клики в закрытом состоянии ── */
/* Невидимая область .insta-stores растягивала контейнер и блокировала
   кнопки Hero под ней. Решение: сам контейнер прозрачен для кликов,
   кликабельны только реальные дочерние элементы (кнопка + открытая панель). */
#instaFloat {
  pointer-events: none;
}
#instaFloat .insta-float__btn {
  pointer-events: auto;
}
.insta-float--open .insta-stores {
  pointer-events: auto;
}
