/* ===============================
   Card (Novicoins style with dividers + blur fade-in)
   =============================== */
.shop-card {
  background: #ffffff;
  border: 1px solid #ede9fe;              /* светло-фиолетовый бордер */
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(74, 60, 140, 0.08); /* мягкая тень */
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, box-shadow 0.3s;
  min-height: 424px;
}

/* ореол только для доступных карточек */
.shop-card.available {
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.25); /* лёгкий фиолетовый ореол */
}

.shop-card.available:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.35); /* чуть сильнее при ховере */
}

/* image */
.shop-img {
  position: relative;
  width: 100%;
  padding-top: 60%;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #ede9fe, #f5f3ff);
  margin-bottom: 14px;
  border-bottom: 1px dashed #e0d7ff;  /* пунктир под картинкой */
  padding-bottom: 14px;
}

/* эффект плавного проявления */
.shop-img img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(12px);
  opacity: 0.6;
  transform: scale(1.05);
  transition: filter 0.8s ease, opacity 0.8s ease, transform 0.8s ease;
}

/* когда картинка загрузилась */
.shop-img img.loaded {
  filter: blur(0);
  opacity: 1;
  transform: scale(1);
}

.shop-card:hover .shop-img img.loaded {
  transform: scale(1.05); /* лёгкий зум при ховере */
}

.shop-img a { display: block; }

.shop-placeholder {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #a78bfa;
  font-size: 20px;
}

/* info */
.card-body { 
  flex: 1 1 auto; 
  padding-bottom: 12px;
  border-bottom: 1px dashed #e0d7ff; /* пунктир между описанием и действиями */
}

.shop-info h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #4a3c8c;
  font-weight: 500;
}

.shop-info h3 a {
  color: inherit;
  text-decoration: none;
}

.shop-info h3 a:hover {
  text-decoration: underline;
}

.shop-info p {
  margin: 4px 0;
  font-size: 14px;
  color: #6b7280; /* нейтрально-серый */
  line-height: 1.5;
}

/* ограничение по строкам только там, где нужно */
.shop-info p.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* actions */
.shop-action { 
  margin-top: auto; 
  padding-top: 12px;
}

.shop-action .btn-link {
  background: linear-gradient(135deg, #6E2CA0, #A78BFA);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.shop-action .btn-link:hover {
  background: linear-gradient(135deg, #5b21b6, #7c3aed);
  transform: translateY(-2px);
}

.shop-action em {
  color: #9ca3af;
  font-size: 13px;
}
/* Бейджи (единый стиль с админкой) */
.tag-badge {
  display: inline-block;
  padding: 3px 7px;
  margin: 4px 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

/* 💰 Цена */
.tag-badge.price {
  background: #e7e0ff;  /* фиолетовый фон */
  color: #4a3c8c;       /* фиолетовый текст */
}

/* 📦 Сток */
.tag-badge.stock {
  background: #e0f2fe;  /* голубой фон */
  color: #075985;       /* тёмно-синий текст */
}

/* ♾ Unlimited */
.tag-badge.stock.unlimited {
  background: #e0f9e7;  /* зелёный фон */
  color: #2d8a4f;       /* зелёный текст */
}

/* ❌ Нет в наличии */
.tag-badge.stock.out {
  background: #fee2e2;  /* красный фон */
  color: #991b1b;       /* красный текст */
}

/* 🎟 Сертификаты */
.tag-badge.certs {
  background: #fff4d6;  /* жёлтый фон */
  color: #9c6b00;       /* тёмно-жёлтый текст */
}

.shop-img-slider {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 1 / 1;
  background: #f5f5f5;
}

.shop-img-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  transition: opacity 0.4s ease;
}

.shop-img-slider img.active {
  display: block;
}

.shop-img-slider .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: white;
  border: none;
  font-size: 22px;
  width: 36px;              /* 🔹 фиксируем ширину и высоту */
  height: 36px;
  border-radius: 50%;
  display: flex;            /* 🔹 выравнивание по центру */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease, transform 0.1s ease;
}

.shop-img-slider .nav:hover {
  background: rgba(0,0,0,0.7);
  transform: translateY(-50%) scale(1.1); /* лёгкий zoom при наведении */
}

.shop-img-slider .nav.prev { left: 10px; }
.shop-img-slider .nav.next { right: 10px; }

.shop-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block;
  background-color: #fff;
}
/* --- Fix: make slides fill the slider box --- */
.shop-img-slider {
  position: relative;
  aspect-ratio: 1 / 1;   /* уже есть, оставляем */
  overflow: hidden;
  border-radius: 12px;
  background: #f5f5f5;
}

/* КЛЮЧЕВОЕ: даём .slides явную высоту */
.shop-img-slider .slides {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Растягиваем кадр на всю площадь слайдера */
.shop-img-slider img {
  position: absolute;   /* чтобы img ориентировался на .slides */
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;    /* без полос, заполняет полностью */
  display: none;
  transition: opacity 0.4s ease;
}

.shop-img-slider img.active {
  display: block;
}
/* === Sticky user panel with NC highlight === */
.sticky-user {
  position: sticky;
  top: 70px;
  z-index: 999;
  background: linear-gradient(90deg, #f9f9ff 0%, #ffffff 100%);
  border: 1px solid #e0d7ff;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(110, 44, 160, 0.08);
  padding: 10px 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(8px);
}

.sticky-user .user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.user-greet a {
  color: #6E2CA0;
  font-weight: 600;
  text-decoration: none;
}

.user-greet a:hover {
  text-decoration: underline;
}

/* 💰 Highlight for coin balance */
.user-balance {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 700;
  color: #7a3cff;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.user-balance .nc-count {
  font-size: 22px;
  color: #f8c200;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.user-balance .nc-label {
  font-size: 14px;
  color: #6b7280;
}

/* плавное появление при скролле */
.sticky-user {
  animation: fadeSlide 0.4s ease;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}