/* shop.css */
/* ===============================
   ЭКРАН "МАГАЗИН"
   =============================== */

.shop-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 16px 72px; /* было 16px 16px 80px */
  box-sizing: border-box;
}

/* Шапка */

.shop-head {
  margin-bottom: 12px;
}

.page-title-shop {
  color: var(--pink);
}

/* HERO */

.shop-hero {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.shop-hero-img {
  display: block;
  max-width: 260px;
  width: 100%;
  height: auto;
}

/* Подзаголовки секций */

.shop-subhead {
  margin-top: 32px;
}

.shop-subtitle {
  margin: 0;
  font-family: var(--font-accent);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--sand);
  margin-bottom: 12px;
}

/* Ряды продуктов
   ВАЖНО: здесь убираем "карусели", делаем обычные строки на всю ширину
*/

.shop-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr);
  gap: 10px;
  margin-bottom: 14px;

  /* Никаких горизонтальных скроллов */
  overflow: visible;
}

.shop-carousel {
  /* Сохраняем класс, но убираем старое поведение карусели */
  width: 100%;
}

/* Карточки */

.shop-card {
  border-radius: var(--radius-m);
  background: var(--bg-elev);
  border: 1px solid rgba(255,255,255,.14);
  padding: 12px 12px 10px;
  box-shadow: var(--shadow-soft);
  box-sizing: border-box;
}

/* Розовые кнопки-заголовки продуктов */

.shop-btn-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  width: 100%;
  min-height: 64px;
  
  /* 🔥 NEW: разрешаем тексту переноситься */
  white-space: normal;
  padding: 10px;

  background: var(--pink);
  color: #000;
  border: 0;
  font-family: var(--font-accent);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: .02em;

  cursor: pointer;
  transition: transform .08s ease, box-shadow .16s ease, opacity .16s ease;
}

.shop-btn-title span {
  display: inline-block;
}

.shop-btn-title:active {
  transform: translateY(1px) scale(.98);
  box-shadow: none;
}

/* Описательная карточка справа/слева */

.shop-desc-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.shop-desc-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);

  /* 🔥 Новое: ограничиваем текст, чтобы не ломал сетку */
  display: -webkit-box;
  -webkit-line-clamp: 3;       /* максимум 3 строки */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Кнопка "Подробнее" */

.shop-more-wrap {
  display: flex;
  justify-content: flex-start;
}

.shop-btn-more {
  padding: 7px 12px;
  border-radius: 999px;
  border: 0;
  background: var(--sand);
  color: #000;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
  transition: transform .08s ease, box-shadow .16s ease, opacity .16s ease;
}

.shop-btn-more:active {
  transform: translateY(1px) scale(.98);
  box-shadow: none;
}

/* Баннер-разделитель */

.shop-banner {
  margin: 20px 0 16px;
  display: flex;
  justify-content: center;
}

.shop-banner-img {
  max-width: 220px;
  width: 100%;
  opacity: .85;
}

/* ===============================
   МОДАЛКИ (детали курса и подтверждение)
   =============================== */

.shop-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 env(safe-area-inset-bottom, 0);
}

.shop-modal.open {
  display: flex;
}

.shop-overlay {
  position: absolute;
  inset: 0;
  background: var(--modal-backdrop);
}

/* Нижний лист (bottom sheet) */

.shop-sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  border-radius: 18px 18px 0 0;
  background: #111111;
  box-shadow: 0 -18px 40px rgba(0,0,0,.7);
  padding: 10px 16px 16px;
  box-sizing: border-box;
}

.shop-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
  margin: 4px auto 10px;
}

/* Заголовки модалок */

.shop-modal-title {
  margin: 0 0 10px;
  font-family: var(--font-accent);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
}

/* Прокручиваемая часть внутри модалки */

.shop-modal-scroll {
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 4px;
  margin-right: -4px; /* чтобы скролл не съедал ширину текста */
}

.shop-modal-long {
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-line;
  color: rgba(255,255,255,.9);
}

.shop-price-line {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

.shop-price-line b {
  font-weight: 600;
}

/* Подвал модалки */

.shop-modal-footer {
  margin-top: 12px;
}

.shop-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Кнопки в модалках */

.shop-btn {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius-m);
  border: 0;
  padding: 11px 14px;
  font-family: var(--font-accent);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform .08s ease, box-shadow .16s ease, opacity .16s ease;
}

.shop-btn-primary {
  background: var(--pink);
  color: #000;
}

.shop-btn-muted {
  background: #222;
  color: #fff;
}

.shop-btn:active {
  transform: translateY(1px) scale(.98);
  box-shadow: none;
}

/* Текст подтверждения */

.shop-modal-text {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255,255,255,.9);
}