/* Продающая страница Клуба (/pricing/): компоненты поверх home.css и design-tokens.
   Размеры — из макета «A+»: телефон 360–1023 px, десктоп с 1024 px. */
.club {
    --club-forest: var(--home-forest);
    --club-on-dark: var(--home-on-dark);
    --club-on-dark-soft: rgb(243 237 228 / 0.82);
    --club-mint: var(--home-mint);
    --club-cream: var(--color-surface-muted);
    --club-pink: #FDF7F9;
    --club-control: #8F8372;
    color: var(--color-text-main);
}
/* Шапка закреплена (72 px, с md — 80): якорь срока не уезжает под неё. */
.club #plans { scroll-margin-top: 88px; }
@media (min-width: 768px) { .club #plans { scroll-margin-top: 96px; } }

/* --- Типографика ---------------------------------------------------------------- */
.club-display {
    font-family: var(--home-serif);
    font-weight: 500;
    font-size: clamp(2rem, 1.1rem + 2.6vw, 3.125rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-wrap: balance;
}
.club-h2 {
    font-family: var(--home-serif);
    font-weight: 500;
    font-size: 26px;
    line-height: 1.14;
    letter-spacing: -0.01em;
    text-wrap: balance;
}
.club-serif { font-family: var(--home-serif); font-weight: 500; text-wrap: balance; }
.club-lead { font-size: 16px; line-height: 1.6; color: var(--color-text-soft); text-wrap: pretty; }
.club-small { font-size: 14px; line-height: 1.5; color: var(--color-text-soft); }
.club-caps { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.club-dark { background: var(--club-forest); color: var(--club-on-dark); }
.club-dark .home-eyebrow { color: var(--club-mint); }

/* --- Ссылки и кнопки ------------------------------------------------------------- */
.club-link { display: inline-flex; align-items: center; min-height: 44px; }
.club-btn--soft { background: #fff; border-color: var(--color-border-medium); color: var(--color-text-main); font-weight: 700; }
.club-btn--soft:hover { border-color: var(--color-text-main); }
.club-btn--ghost { border-color: rgb(243 237 228 / 0.7); color: var(--club-on-dark); font-weight: 700; }
.club-btn--ghost:hover { background: rgb(255 255 255 / 0.08); }
.club-btn--52 { min-height: 52px; }
.club .home-btn:focus-visible, .club-link:focus-visible, .club a:focus-visible { outline: 3px solid var(--color-primary-green); outline-offset: 3px; }
.club-dark a:focus-visible, .club-dark .home-btn:focus-visible { outline-color: var(--club-mint); }

/* Галочки списков */
.club-ticks { display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; color: var(--color-text-soft); }
.club-ticks li { display: flex; gap: 8px; align-items: flex-start; }
.club-ticks svg { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--color-primary-green); stroke-width: 2.8; }
.club-ticks--ink { color: var(--color-text-main); }
@media (min-width: 1024px) { .club-ticks--row { flex-direction: row; flex-wrap: wrap; gap: 8px 22px; } }

/* Список «что откроется»: галочка 20 px, текст 15/17 px */
.club-offer { display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.5; }
.club-offer li { display: flex; gap: 12px; }
.club-offer svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--club-mint); stroke-width: 2.6; }
@media (min-width: 1024px) { .club-offer { gap: 12px; font-size: 17px; } }

/* Аватар Мари */
.club-avatar { flex: none; display: block; border-radius: 999px; overflow: hidden; object-fit: cover; object-position: 50% 30%; background: var(--color-primary-green-light); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--color-border-light); }

/* Бейдж «Клуб» на фото */
.club-badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; background: var(--color-accent-berry); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 2px rgb(0 0 0 / 0.15); }

/* --- Выбор срока ------------------------------------------------------------------ */
.club-plan {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    min-height: 60px;
    padding: 12px 14px;
    border: 1.5px solid var(--color-border-light);
    border-radius: 18px;
    background: #fff;
    cursor: pointer;
}
@media (min-width: 1024px) { .club-plan { gap: 6px 14px; min-height: 64px; padding: 14px 16px; } }
/* Подсветка и радиокнопка — из home.css (.home-plan): выбранная строка бордовая без JS. */
.club-plan.home-plan:has(:checked) { background: var(--club-pink); }
.club-plan__name { font-size: 17px; font-weight: 700; color: var(--color-text-main); }
.club-plan__sub { font-size: 14px; line-height: 1.4; color: var(--color-text-soft); }
.club-plan__save { color: var(--color-primary-green-dark); font-weight: 700; white-space: nowrap; }
.club-plan__price { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.club-plan__per { font-size: 13px; color: var(--color-text-soft); white-space: nowrap; }
.club-plan__badge { position: absolute; top: -11px; right: 16px; display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--color-accent-berry); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }

/* Итог и кнопка видны только у выбранного срока: строки и панели идут в одном порядке.
   Без :has (старые браузеры) остаётся срок, отмеченный сервером. */
.club-pick__panel { display: none; flex-direction: column; gap: 12px; }
@media (min-width: 1024px) { .club-pick__panel { gap: 16px; } }
.club-pick:has(.club-plan:nth-of-type(1) input:checked) .club-pick__panel:nth-of-type(1),
.club-pick:has(.club-plan:nth-of-type(2) input:checked) .club-pick__panel:nth-of-type(2),
.club-pick:has(.club-plan:nth-of-type(3) input:checked) .club-pick__panel:nth-of-type(3),
.club-pick:has(.club-plan:nth-of-type(4) input:checked) .club-pick__panel:nth-of-type(4) { display: flex; }
@supports not selector(:has(*)) { .club-pick__panel[data-default] { display: flex; } }

/* То же для зеркал выбранного срока вне блока: кнопка финала и нижняя панель. */
.club-mirror > * { display: none; }
.club:has(.club-plan:nth-of-type(1) input:checked) .club-mirror > :nth-child(1),
.club:has(.club-plan:nth-of-type(2) input:checked) .club-mirror > :nth-child(2),
.club:has(.club-plan:nth-of-type(3) input:checked) .club-mirror > :nth-child(3),
.club:has(.club-plan:nth-of-type(4) input:checked) .club-mirror > :nth-child(4) { display: inherit; }
.club-mirror--flex > * { display: none; }
.club:has(.club-plan:nth-of-type(1) input:checked) .club-mirror--flex > :nth-child(1),
.club:has(.club-plan:nth-of-type(2) input:checked) .club-mirror--flex > :nth-child(2),
.club:has(.club-plan:nth-of-type(3) input:checked) .club-mirror--flex > :nth-child(3),
.club:has(.club-plan:nth-of-type(4) input:checked) .club-mirror--flex > :nth-child(4) { display: flex; }
@supports not selector(:has(*)) { .club-mirror > [data-default] { display: inherit; } .club-mirror--flex > [data-default] { display: flex; } }
/* «Начать с месяца» не дублирует кнопку, когда месяц уже выбран. */
.club:has(.club-plan[data-months="1"] input:checked) [data-club-month-alt] { display: none; }

.club-total__title { font-size: 15px; font-weight: 700; }
.club-total__sum { font-size: 22px; font-weight: 800; white-space: nowrap; }
.club-total__note { font-size: 13px; line-height: 1.45; color: var(--color-text-soft); }
@media (min-width: 1024px) {
    .club-total__title { font-size: 16px; }
    .club-total__sum { font-size: 24px; }
    .club-total__note { font-size: 14px; }
}

/* Шаги «что будет дальше» */
.club-steps { display: flex; flex-direction: column; gap: 12px; }
.club-steps li { display: flex; gap: 12px; align-items: center; font-size: 15px; line-height: 1.4; }
.club-steps__n { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--color-primary-green-light); color: var(--color-primary-green-dark); font-size: 15px; font-weight: 800; }
.club-dark .club-steps__n { background: rgb(255 255 255 / 0.12); color: var(--club-on-dark); }

/* Аккаунт, к которому привяжется Клуб */
.club-account { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--color-primary-green-light); color: var(--color-primary-green-dark); font-size: 14px; line-height: 1.4; }
.club-account strong { overflow-wrap: anywhere; }
.club-oferta { font-size: 13px; line-height: 1.5; color: var(--color-text-soft); }
.club-oferta a { display: inline-block; padding: 12px 0; margin: -12px 0; color: var(--color-primary-green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Блок срока: тёмная колонка «что откроется» + выбор */
.club-plans { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--color-border-light); border-radius: 24px; box-shadow: 0 40px 80px -40px rgb(31 42 36 / 0.25); }
@media (min-width: 1024px) {
    .club-plans { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); border-radius: 28px; }
}

/* --- Примеры экранов: меню на неделю и пошаговый режим -------------------------- */
.club-frame { display: flex; flex: 1 1 auto; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--color-border-light); border-radius: 20px; background: var(--color-bg-main); }
.club-day { display: flex; flex: 1 1 0; min-width: 0; height: 52px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--color-border-light); font-size: 13px; font-weight: 700; }
.club-day::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.club-day--today { background: var(--club-forest); color: var(--club-on-dark); box-shadow: none; }
.club-day--locked { background: var(--color-accent-berry-light); color: var(--color-accent-berry-dark); box-shadow: none; }
.club-day--locked::after { display: none; }

/* --- Вопросы ---------------------------------------------------------------------- */
.club-faq { border-bottom: 1px solid var(--color-border-light); padding: 4px 0; }
.club-faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; cursor: pointer; font-size: 17px; font-weight: 700; line-height: 1.35; }
.club-faq summary::-webkit-details-marker { display: none; }
@media (min-width: 1024px) { .club-faq--lg summary { font-size: 18px; } }
.club-faq__icon { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--club-cream); }
.club-faq__v { transition: opacity 0.2s ease; }
.club-faq[open] .club-faq__v { opacity: 0; }
.club-faq summary:focus-visible { outline: 3px solid var(--color-primary-green); outline-offset: 3px; border-radius: 8px; }

/* --- Отзывы: кремовая рамка 2:3, как на главной ------------------------------------ */
.club-reviews { display: flex; gap: 14px; overflow-x: auto; padding: 0 20px; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: none; }
.club-reviews::-webkit-scrollbar { display: none; }
.club-reviews .review-card { flex: 0 0 232px; height: 348px; max-width: none; aspect-ratio: auto; padding: 10px; border: 0; border-radius: 22px; background: var(--club-cream); box-shadow: none; scroll-snap-align: start; }
.club-reviews .review-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; border-radius: 14px; }
@media (min-width: 1024px) {
    .club-reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; padding: 0; max-width: 1040px; }
    .club-reviews .review-card { height: auto; aspect-ratio: 2 / 3; }
}

/* --- Горизонтальная лента рецептов на телефоне ------------------------------------ */
.club-scroll { scrollbar-width: none; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; }
.club-scroll::-webkit-scrollbar { display: none; }
.club-scroll > * { scroll-snap-align: start; }

/* --- Нижняя панель на телефоне ------------------------------------------------------ */
.club-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 10px 18px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--color-border-light);
    box-shadow: 0 -8px 24px rgb(44 44 44 / 0.08);
    transform: translateY(110%);
    transition: transform 0.25s ease;
}
.club-bar:not([data-visible]) { visibility: hidden; transition: transform 0.25s ease, visibility 0s 0.25s; }
.club-bar[data-visible] { transform: none; }
@media (min-width: 1024px) { .club-bar { display: none; } }

@media (prefers-reduced-motion: reduce) {
    .club-bar, .club-faq__v { transition: none; }
}

/* home.css растягивает секции .home на 100% ширины — финалу на телефоне нужны поля по 16 px. */
.home.club > [data-club-final] { width: auto; }
@media (min-width: 1024px) { .home.club > [data-club-final] { width: 100%; } }

/* Планшет (640–1023): телефонная раскладка в колонке 720 px по центру, фоны секций — во всю ширину. */
@media (min-width: 640px) and (max-width: 1023.98px) {
    .club .max-w-container, .club .club-col { max-width: 720px; margin-inline: auto; }
    .club .club-col.club-scroll { padding-inline: 0; scroll-padding-inline: 0; }
    .home.club > [data-club-final] { width: calc(100% - 32px); }
}
