/* =========================
   БАЗА И ПЕРЕМЕННЫЕ
   ========================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@400;600;700;800&display=swap");

:root {
  --bg: #f5f7fb;
  --bg-soft: #ffffff;
  --text-main: #101827;
  --text-muted: #6b7280;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --green-dark: #15803d;
  --accent: #22c55e;
  --border-soft: #e5e7eb;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --transition-fast: 0.18s ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family:
    "Manrope",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  background: radial-gradient(circle at top right, #e0fbea 0, #f5f7fb 45%);
  color: var(--text-main);
  line-height: 1.5;
}

html[lang="kk"] body,
html[lang="kk"] button,
html[lang="kk"] input,
html[lang="kk"] textarea,
html[lang="kk"] select {
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  font-feature-settings:
    "kern" 1,
    "liga" 1,
    "calt" 1;
  text-rendering: optimizeLegibility;
}

html[lang="kk"] h1,
html[lang="kk"] h2,
html[lang="kk"] h3,
html[lang="kk"] h4,
html[lang="kk"] .hero-badge,
html[lang="kk"] .choice-title,
html[lang="kk"] .section-kicker,
html[lang="kk"] .cta-kicker,
html[lang="kk"] .btn,
html[lang="kk"] .choice-badge {
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

/* Убираем странный скролл по умолчанию */
body {
  -webkit-font-smoothing: antialiased;
}

/* =========================
   ОБЩИЙ LAYOUT
   ========================= */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 20px;
}

main.container {
  padding-block: 32px 60px;
}

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

h1,
h2,
h3,
h4 {
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 40px;
}

h2 {
  font-size: 26px;
}

h3 {
  font-size: 20px;
}

p {
  margin: 0 0 8px;
}

.muted {
  color: var(--text-muted);
}

.tiny {
  font-size: 13px;
}

/* Центровка */

.center {
  text-align: center;
}

/* =========================
   ШАПКА
   ========================= */

.header {
  position: static;
  top: auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px 14px;
  margin-bottom: 8px;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
  box-shadow: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex: 0 0 auto;
}

.logo {
  height: 34px;
  width: auto;
}

.brand-text {
  font-weight: 800;
  font-size: 18px;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  flex-wrap: nowrap;
  margin-inline: auto;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  text-decoration: none;
  color: #111827;
  font-weight: 600;
  padding-block: 4px;
  position: relative;
  transition: color var(--transition-fast);
}

.nav a.nav-custom {
  flex-shrink: 0;
}

.nav-custom-sub {
  margin-left: 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
  transform: scaleX(0);
  transform-origin: center;
}

.nav a:hover {
  color: var(--green-dark);
}

.nav a.active {
  color: var(--green-dark);
  font-weight: 700;
}

.nav a.active::after {
  background: var(--green);
  transform: scaleX(1);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}

.actions > .btn,
.actions > a.btn,
.actions > button.btn {
  white-space: nowrap;
  flex: 0 0 auto;
  min-height: 38px;
}

.lang-switch,
.mobile-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
}

.lang-btn {
  border: none;
  background: transparent;
  color: #475569;
  min-width: 36px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.lang-btn:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.05);
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--green), var(--accent));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.22);
}

.btn-register {
  padding-inline: 12px;
  font-weight: 700;
}

.btn-icon {
  gap: 4px;
  padding-inline: 6px;
}

.btn-icon-glyph {
  font-size: 15px;
  line-height: 1;
}

.btn-icon-text {
  font-weight: 600;
}

.btn-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-main);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.btn-favorites {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: var(--text-main);
  backdrop-filter: blur(8px);
}

.btn-favorites:hover {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.22);
}

.btn-cart-header {
  padding-inline: 8px;
  font-weight: 700;
}

.btn-cart-text {
  font-weight: 700;
}

.btn-cart-text {
  font-weight: 700;
}

/* =========================
   КНОПКИ
   ========================= */

/* Иконки в topbar (избранное, поделиться) */
/* Иконки в topbar (избранное, поделиться) — Kaspi style */
.icon-btn {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  /* ❌ убрали рамку */
  box-shadow: none;
  /* ❌ убрали тень */
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.icon-btn:active {
  transform: scale(0.95);
}

/* ===== ДОБАВЛЕНО: ссылки-иконки + бейдж корзины ===== */

.icon-link {
  text-decoration: none;
  color: inherit;
}

.cart-link {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  display: grid;
  place-items: center;
  line-height: 1;
}

/* ===== Общий heart-дизайн ===== */
.ap-heart-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.ap-heart-btn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.ap-heart-btn:active {
  transform: scale(0.97);
}

.ap-heart-btn--catalog {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
}

.ap-heart-btn--inline {
  flex: 0 0 auto;
}

.ap-heart-glyph {
  font-size: 20px;
  line-height: 1;
  color: #111827;
  transition:
    color 0.18s ease,
    transform 0.18s ease;
}

.ap-heart-btn.active .ap-heart-glyph,
.ap-heart-glyph.active {
  color: #ef4444;
  transform: scale(1.04);
}

/* ===== Общий toast ===== */
.ap-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(17, 24, 39, 0.94);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  z-index: 9999;
}

.ap-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
  .ap-toast {
    width: calc(100% - 24px);
    text-align: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #ffffff;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.btn:hover {
  background: #f3f4f6;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ===== Disabled buttons ===== */
.btn:disabled,
.btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

.btn-green {
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), var(--accent));
  color: #ffffff;
  box-shadow: 0 12px 32px rgba(22, 163, 74, 0.45);
}

.btn-green:hover {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
}

.btn-outline {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(15, 23, 42, 0.18);
  color: #0f172a;
  backdrop-filter: blur(6px);
}

.btn-outline:hover {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.35);
}

/* ===== LOGIN BUTTON: underline hover ===== */

.btn-login {
  position: relative;
  background: transparent;
}

.btn-login:hover {
  background: transparent; /* чтобы не “перекрашивалась” как .btn:hover */
}

.btn-login::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  background: var(--green);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.btn-login:hover::after {
  transform: scaleX(1);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* =========================
   БУРГЕР И МОБИЛЬНОЕ МЕНЮ
   ========================= */

.burger {
  display: none;
  border: none;
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

/* мобильное меню */

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px 18px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.mobile-nav a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 15px;
}

.mobile-lang-switch {
  display: flex;
  width: 100%;
  margin-bottom: 4px;
}

.mobile-lang-switch .lang-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 40px;
  justify-content: center;
}

/* Класс .open для показа меню (добавляется JS) */
.mobile-nav.open {
  display: flex;
}

/* =========================
   HERO
   ========================= */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(480px, 540px);
  align-items: start;
  gap: 64px;
  padding: 38px 0 20px;
}

.hero-text {
  max-width: 640px;
  padding-left: 18px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(34, 197, 94, 0.14);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.hero-text h1 {
  font-size: 48px;
  line-height: 1.04;
  margin-bottom: 20px;
  letter-spacing: -0.022em;
  max-width: 560px;
  font-weight: 650;
  text-rendering: optimizeLegibility;
  text-wrap: balance;
}

html[lang="kk"] .hero-text h1 {
  font-size: 46px;
  line-height: 1.03;
  letter-spacing: -0.015em;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  text-wrap: balance;
}

html[lang="kk"] .hero-text p {
  font-size: 17px;
  line-height: 1.68;
}

.hero-text p {
  max-width: 560px;
  font-size: 18px;
  line-height: 1.72;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-text .btn {
  min-height: 54px;
  padding-inline: 28px;
  font-size: 15px;
  font-weight: 700;
}

.hero-showcase {
  position: relative;
  min-height: 400px;
  width: 100%;
  max-width: 560px;
  margin: 24px 0 0 auto;
  isolation: isolate;
}

.hero-showcase-bg {
  position: absolute;
  inset: 34px 42px 52px 42px;
  border-radius: 999px;
  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0.56) 28%,
      rgba(240, 253, 244, 0.22) 52%,
      rgba(240, 253, 244, 0) 76%
    ),
    radial-gradient(
      circle at 72% 72%,
      rgba(187, 247, 208, 0.32) 0%,
      rgba(187, 247, 208, 0) 56%
    );
  border: none;
  box-shadow: none;
  filter: blur(2px);
}

.hero-card {
  position: absolute;
  overflow: hidden;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow:
    0 26px 60px rgba(15, 23, 42, 0.14),
    0 10px 24px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.hero-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  background: #f8fafc;
}

.hero-card-main {
  top: 6px;
  left: 49%;
  width: 278px;
  height: 368px;
  z-index: 3;
  transform: translateX(-50%);
}

.hero-card-mug {
  left: 52px;
  top: 238px;
  width: 148px;
  height: 148px;
  z-index: 4;
  border-radius: 28px;
}

.hero-card-side {
  right: 8px;
  top: 52px;
  width: 202px;
  height: 268px;
  z-index: 2;
  transform: rotate(7deg);
}

/* =========================
   СЕКЦИИ / КАРТОЧКИ / СЕТКИ
   ========================= */

section.container {
  margin-bottom: 40px;
}

section.container h2 {
  margin-bottom: 18px;
}

/* сетка карточек */

.cards {
  display: grid;
  gap: 18px;
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* категория */

.card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #ffffff;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.card-foot {
  padding: 12px 14px 14px;
}

/* чип */

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 600;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.13);
}

/* товар */

.product,
.product-card {
  display: flex;
  flex-direction: column;
  padding: 10px 10px 14px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  transition:
    box-shadow var(--transition-fast),
    transform var(--transition-fast),
    translate var(--transition-fast);
}

.product img,
.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}

.p-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  max-height: calc(1.2em * 2);
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.p-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--green-dark);
}

/* hover по карточке товара */

.product:hover,
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
}

/* =========================
   ФИЛЬТРЫ КАТАЛОГА
   ========================= */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filters select {
  min-width: 170px;
}

/* =========================
   INPUT / SELECT / FORM
   ========================= */

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  font-size: 14px;
  font-family: inherit;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
  background: #f9fffb;
}

textarea {
  resize: vertical;
}

.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* =========================
   МОДАЛКА ВХОДА / РЕГИСТРАЦИИ
   ========================= */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.modal[aria-hidden="false"],
.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 22px 22px 20px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.3);
}

.modal-close {
  border: none;
  background: #fff;
  border: 1px solid var(--ap-border);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #111;
}

#authModal .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
}

/* табы */

/* =========================
   ТАБЫ (ФИКС: НЕ ПЛАВАЮТ)
   ========================= */

.tabs {
  display: flex;
  /* ❗ вместо inline-flex */
  width: 100%;
  /* ❗ фиксируем ширину */
  padding: 4px;
  border-radius: 999px;
  background: #f3f4f6;
  margin-bottom: 14px;
  position: relative;
  /* ❗ важно */
  z-index: 1;
}

/* мобильный фикс — гарантированно убирает "плавание" */
@media (max-width: 768px) {
  .tabs {
    position: static !important;
    transform: none !important;
    will-change: auto !important;
  }
}

.tab {
  position: relative;
  /* защита от залипания */
}

.tab {
  border: none;
  background: transparent;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-muted);
}

.tab.active {
  background: #ffffff;
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

/* контент вкладок */

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* =========================
   КОРЗИНА / ИТОГИ
   ========================= */

.cart-summary {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.cart-summary p {
  margin: 4px 0;
}

.cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

/* =========================
   ТЕКСТОВЫЕ СТРАНИЦЫ / LIST
   ========================= */

ul {
  padding-left: 20px;
}

li {
  margin-bottom: 4px;
}

/* =========================
   FOOTER
   ========================= */

.footer {
  border-top: 1px solid #e5e7eb;
  margin-top: 20px;
  padding-block: 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.footer p {
  font-size: 13px;
  color: var(--text-muted);
}

/* =========================
   АДАПТИВ
   ========================= */

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 26px 32px;
  }

  .hero-img {
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .header .actions {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 {
    font-size: 32px;
  }

  section.container {
    margin-bottom: 32px;
  }

  main.container {
    padding-block: 22px 40px;
  }
}

/* Mobile: убираем дублирующие кнопки покупки в карточке */
.product-actions-top {
  display: none;
}

/* Mobile: уменьшаем вертикальные отступы карточки товара */
@media (max-width: 768px) {
  .card,
  .section,
  .ap-block,
  .product {
    margin-bottom: 12px;
    padding: 14px;
  }

  table td {
    padding: 8px 10px;
  }
}

@media (max-width: 520px) {
  .container {
    padding-inline: 16px;
  }

  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .product img {
    height: 210px;
    object-fit: cover;
  }
}

/* ======== ABSOLUTE MODAL FIX (WORKS 100%) ======== */

.modal {
  display: none !important;
}

.modal.show,
.modal.open,
.modal[aria-hidden="false"] {
  display: flex !important;
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: blur(4px);
}

.modal-card {
  background: #ffffff;
  z-index: 10;
}

/* ===== HERO HOME: финальная адаптация товарного hero ===== */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 24px;
  }

  .hero-text {
    max-width: none;
    padding-left: 0;
  }

  .hero-text h1 {
    font-size: 38px;
    line-height: 1.08;
    letter-spacing: -0.025em;
    max-width: 540px;
    font-weight: 700;
  }

  .hero-text p {
    max-width: none;
    font-size: 17px;
  }

  .hero-showcase {
    position: relative;
    min-height: 322px;
    margin: 18px 0 0;
  }

  .hero-showcase-bg {
    inset: 28px 30px 34px 30px;
    border-radius: 999px;
  }

  .hero-card-main {
    top: 10px;
    left: 49%;
    width: 208px;
    height: 270px;
    transform: translateX(-50%);
  }

  .hero-card-mug {
    left: 28px;
    top: 206px;
    width: 104px;
    height: 104px;
    border-radius: 22px;
  }

  .hero-card-side {
    right: 2px;
    top: 68px;
    width: 146px;
    height: 194px;
    transform: rotate(5deg);
  }
}

@media (max-width: 768px) {
  .hero {
    gap: 18px;
    padding: 18px 0 26px;
  }

  .hero-badge {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .hero-text h1 {
    font-size: 30px;
    line-height: 1.08;
    letter-spacing: -0.02em;
    font-weight: 700;
    max-width: 100%;
  }

  .hero-text p {
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 20px;
  }

  .hero-showcase {
    position: relative;
    min-height: 322px;
    margin: 12px 0 0;
  }

  .hero-showcase-bg {
    inset: 24px 20px 28px 20px;
    border-radius: 999px;
  }

  .hero-card-main {
    top: 10px;
    left: 49%;
    width: 198px;
    height: 258px;
    transform: translateX(-50%);
  }

  .hero-card-mug {
    left: 18px;
    top: 206px;
    width: 94px;
    height: 94px;
    border-radius: 20px;
  }

  .hero-card-side {
    right: 0;
    top: 78px;
    width: 132px;
    height: 176px;
    transform: rotate(5deg);
  }
}

/* =========================
   HOME: 2 БЛОКА + КАТЕГОРИИ + НОВЫЕ ПРИНТЫ
   ========================= */

.home-choices {
  margin-top: 12px;
  margin-bottom: 42px;
}

.choices-wrap {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 30px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98),
      rgba(255, 255, 255, 0.94)
    ),
    radial-gradient(
      circle at top left,
      rgba(34, 197, 94, 0.05),
      transparent 28%
    ),
    radial-gradient(
      circle at top right,
      rgba(59, 130, 246, 0.05),
      transparent 28%
    );
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 22px 60px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.choices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.choice-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: center;
  min-height: 280px;
  border-radius: 26px;
  text-decoration: none;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow:
    0 16px 36px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.choice-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 24px 52px rgba(15, 23, 42, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.choice-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 255, 255, 0.45),
      transparent 35%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 48%);
}

.choice-card-ready {
  background: linear-gradient(135deg, #eef8ff 0%, #f8fbff 55%, #ffffff 100%);
}

.choice-card-custom {
  background: linear-gradient(135deg, #fff5ee 0%, #fffaf7 55%, #ffffff 100%);
}

.choice-copy {
  position: relative;
  z-index: 2;
  padding: 28px 8px 28px 28px;
}

.choice-kicker {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.choice-title {
  margin: 0 0 14px;
  max-width: 340px;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
  text-transform: uppercase;
}

.choice-title {
  margin: 0 0 14px;
  max-width: 340px;
  font-size: 42px;
  line-height: 1.03;
  letter-spacing: -0.05em;
  font-weight: 800;
  text-transform: uppercase;
}

html[lang="kk"] .choice-title {
  font-size: 39px;
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 700;
  text-transform: none;
}

html[lang="kk"] .choice-kicker {
  font-weight: 700;
  letter-spacing: 0.08em;
}

.choice-sub {
  margin: 0 0 20px;
  max-width: 320px;
  color: #475569;
  font-size: 15px;
  line-height: 1.55;
}

.choice-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  width: fit-content;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.07);
  font-size: 14px;
  font-weight: 700;
}

.choice-card-ready .choice-cta {
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.22);
}

.choice-card-custom .choice-cta {
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.22);
}

.choice-cta b {
  font-size: 16px;
  line-height: 1;
}

.choice-visual {
  position: relative;
  height: 100%;
  min-height: 280px;
  z-index: 1;
}

.choice-visual-glow {
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 240px;
  height: 176px;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 1;
}

.choice-visual-ready .choice-visual-glow {
  background: radial-gradient(
    circle,
    rgba(191, 219, 254, 0.95) 0%,
    rgba(191, 219, 254, 0.26) 50%,
    rgba(191, 219, 254, 0) 74%
  );
}

.choice-visual-custom .choice-visual-glow {
  background: radial-gradient(
    circle,
    rgba(253, 230, 210, 0.95) 0%,
    rgba(253, 230, 210, 0.26) 50%,
    rgba(253, 230, 210, 0) 74%
  );
}

.choice-mockup {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  text-align: center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.choice-mockup img {
  display: block;
  width: 129%;
  height: 129%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 18px 28px rgba(15, 23, 42, 0.18));
}

.choice-mockup-front img {
  width: 193%;
  height: 193%;
  filter: drop-shadow(0 16px 24px rgba(15, 23, 42, 0.16));
}

.choice-mockup-back {
  right: 10px;
  bottom: 8px;
  width: 225px;
  height: 262px;
  padding: 0;
  border-radius: 0;
}

.choice-mockup-front {
  left: -2px;
  bottom: -4px;
  width: 143px;
  height: 143px;
  padding: 0;
  border-radius: 0;
}

.choice-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.choice-benefits {
  display: flex;
  gap: 12px 22px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 16px 4px 2px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.choice-benefits span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.choice-benefits i {
  font-style: normal;
  color: #16a34a;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .choice-card {
    grid-template-columns: minmax(0, 1fr) 220px;
    min-height: 270px;
  }

  .choice-title {
    font-size: 38px;
  }

  .choice-sub {
    max-width: 290px;
    font-size: 14px;
  }

  .choice-mockup-back {
    width: 136px;
    height: 166px;
    right: 18px;
    bottom: 22px;
  }

  .choice-mockup-front {
    width: 102px;
    height: 102px;
    left: 10px;
    bottom: 16px;
  }
}

@media (max-width: 980px) {
  .choices-grid {
    grid-template-columns: 1fr;
  }

  .choice-card {
    grid-template-columns: minmax(0, 1fr) 240px;
    min-height: 270px;
  }
}

@media (max-width: 640px) {
  .choices-wrap {
    padding: 12px;
    border-radius: 24px;
  }

  .choice-card {
    grid-template-columns: 1fr;
    min-height: auto;
    border-radius: 22px;
  }

  .choice-copy {
    padding: 22px 18px 6px;
  }

  .choice-kicker {
    margin-bottom: 12px;
    font-size: 10px;
  }

  .choice-title {
    font-size: 32px;
    line-height: 0.96;
  }

  .choice-sub {
    margin-bottom: 16px;
    max-width: none;
    font-size: 14px;
    line-height: 1.5;
  }

  .choice-cta {
    min-height: 46px;
    padding: 0 16px;
    font-size: 14px;
  }

  .choice-visual {
    min-height: 210px;
  }

  .choice-visual-glow {
    right: 50%;
    bottom: 4px;
    width: 210px;
    height: 138px;
    transform: translateX(50%);
  }

  .choice-mockup-back {
    right: 26px;
    bottom: 18px;
    width: 128px;
    height: 154px;
  }

  .choice-mockup-front {
    left: 18px;
    bottom: 18px;
    width: 96px;
    height: 96px;
  }

  .choice-badge {
    top: 14px;
    right: 14px;
    min-height: 30px;
    padding: 6px 10px;
    font-size: 11px;
  }

  .choice-benefits {
    gap: 10px;
    font-size: 13px;
  }
}

/* Категории + новые принты */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-kicker {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-dark);
}

html[lang="kk"] .section-kicker,
html[lang="kk"] .cta-kicker {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-decoration: none;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.section-link:hover {
  transform: translateY(-1px);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.categories {
  margin-top: 40px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
  border-radius: 28px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(255, 255, 255, 0.92)
  );
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  text-decoration: none;
  color: #111827;
  isolation: isolate;
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease;
}

.cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at top right,
      rgba(34, 197, 94, 0.08),
      transparent 42%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.08));
  pointer-events: none;
  z-index: 0;
}

.cat-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 28px 60px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  border-color: rgba(34, 197, 94, 0.18);
}

.cat-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.015em;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

.cat-card-media {
  position: relative;
  z-index: 1;
  padding: 14px 14px 0;
}

.cat-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 22px;
  background: linear-gradient(180deg, #eef2f7, #f8fafc);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
  transition: transform 0.28s ease;
}

.cat-card:hover img {
  transform: scale(1.03);
}

.cat-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 22px 24px;
}

.cat-card-kicker {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #15803d;
}

.cat-card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.cat-card p {
  margin: 0;
  max-width: 92%;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
}

.cat-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  opacity: 0.86;
  transition:
    transform 0.22s ease,
    opacity 0.22s ease,
    color 0.22s ease;
}

.cat-card:hover .cat-card-link {
  transform: translateX(3px);
  opacity: 1;
  color: #15803d;
}

.cat-card-ussr::before {
  background:
    radial-gradient(
      circle at top right,
      rgba(239, 68, 68, 0.11),
      transparent 38%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(245, 158, 11, 0.1),
      transparent 34%
    );
}

.cat-card-names::before {
  background:
    radial-gradient(
      circle at top right,
      rgba(59, 130, 246, 0.1),
      transparent 38%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(34, 197, 94, 0.08),
      transparent 36%
    );
}

.cat-card-funny::before {
  background:
    radial-gradient(
      circle at top right,
      rgba(168, 85, 247, 0.1),
      transparent 38%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(236, 72, 153, 0.08),
      transparent 36%
    );
}

.cat-card-family::before {
  background:
    radial-gradient(
      circle at top right,
      rgba(34, 197, 94, 0.1),
      transparent 38%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(250, 204, 21, 0.09),
      transparent 36%
    );
}

.prints {
  margin-top: 40px;
}

.prints-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.print-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
  border-radius: 28px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(255, 255, 255, 0.94)
  );
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 18px 44px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  text-decoration: none;
  color: #111827;
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease;
}

.print-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at top right,
      rgba(34, 197, 94, 0.05),
      transparent 38%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.06));
  pointer-events: none;
}

.print-card:hover {
  transform: translateY(-7px);
  box-shadow:
    0 28px 58px rgba(15, 23, 42, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  border-color: rgba(34, 197, 94, 0.14);
}

.print-thumb {
  position: relative;
  padding: 14px 14px 0;
}

.print-thumb img {
  width: 100%;
  height: 232px;
  border-radius: 20px;
  object-fit: cover;
  object-position: center;
  display: block;
  background: linear-gradient(180deg, #eef2f7, #f8fafc);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease;
}

.print-card:hover .print-thumb img {
  transform: scale(1.02);
}

.print-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 12px 14px 12px;
}

.print-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.09);
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.print-card h4 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.18;
  font-weight: 800;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.18em * 2);
}

.print-desc {
  margin: 0 0 10px;
  color: #5b6472;
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.45em * 2);
}

.print-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.print-price {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  color: var(--green-dark);
  letter-spacing: -0.01em;
}

.print-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  font-size: 12px;
  font-weight: 800;
  color: #111827;
  opacity: 0.9;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.print-card:hover .print-more {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green-dark);
  transform: translateX(2px);
}

@media (max-width: 1024px) {
  .categories-grid,
  .prints-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 18px;
  }

  .categories-grid,
  .prints-grid {
    grid-template-columns: 1fr;
  }

  .cat-card img,
  .print-thumb img {
    height: 220px;
  }

  .cat-card-body {
    padding: 16px 16px 18px;
    gap: 8px;
  }

  .print-card-body {
    padding: 15px 15px 17px;
  }

  .cat-card h3,
  .print-card h4 {
    font-size: 21px;
  }

  .cat-card-kicker {
    font-size: 11px;
    letter-spacing: 0.07em;
  }

  .print-desc {
    min-height: auto;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .print-price {
    font-size: 21px;
  }

  .print-more {
    min-height: 40px;
    padding: 0 14px;
  }
}

/* Иконка "Поделиться" — тонкая, как в Kaspi / iOS */
.share-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--text-main);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================
   КОЛИЧЕСТВО ТОВАРА (PRODUCT)
   ========================= */

.qty-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 6px;
}

.qty-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.1s ease;
}

.qty-btn:hover {
  background: #f3f4f6;
}

.qty-btn:active {
  transform: scale(0.96);
}

#qtyInput {
  width: 64px;
  height: 42px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
}

/* ===============================
   FIX: ДУБЛИ КНОПОК ПОКУПКИ
   =============================== */

/* Мобильные — скрываем кнопки внутри карточки */
@media (max-width: 768px) {
  .info .actions {
    display: none !important;
  }
}

/* Десктоп — скрываем нижнюю фикс-панель */
@media (min-width: 769px) {
  .mobile-buy-bar {
    display: none !important;
  }
}

/* =========================
   CHECKOUT: текст согласия + mobile layout
   ========================= */

.checkout-page .checkout-legal {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.35;
}

.checkout-page .checkout-legal-link {
  text-decoration: underline;
}

/* Mobile */
@media (max-width: 768px) {
  .checkout-page .actions-row {
    flex-direction: column;
    gap: 10px;
  }

  .checkout-page .checkout-legal {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
  }
}

/* ===== FLOATING WHATSAPP ===== */
.wa-header {
  display: none !important;
}

.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.12),
    0 2px 8px rgba(15, 23, 42, 0.05);
  text-decoration: none;
  color: #111827;
  backdrop-filter: blur(12px);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.wa-float:hover {
  transform: translateY(-2px);
  background: #ffffff;
  border-color: rgba(34, 197, 94, 0.18);
  box-shadow:
    0 18px 36px rgba(15, 23, 42, 0.15),
    0 4px 10px rgba(15, 23, 42, 0.06);
}

.wa-float img {
  width: 30px;
  height: 30px;
  display: block;
  flex: 0 0 auto;
}

.wa-float span {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

@media (max-width: 768px) {
  .wa-float {
    right: 12px;
    bottom: 12px;
    padding: 8px 10px 8px 8px;
    gap: 6px;
  }

  .wa-float img {
    width: 28px;
    height: 28px;
  }

  .wa-float span {
    font-size: 10px;
  }
}

/* Бонусы */
.bonus-awarded {
  color: #16a34a;
  /* зелёный */
  font-weight: 600;
}

.bonus-pending {
  color: #6b7280;
  /* серый */
}

.bonus-awarded {
  color: #16a34a;
  font-weight: 700;
}

.bonus-pending {
  color: #6b7280;
}

/* =========================
   HOME: ADVANTAGES + CTA (восстановление сетки)
   ========================= */

.advantages {
  position: relative;
  margin-top: 10px;
  padding-block: 22px 8px;
}

.advantages-shell {
  position: relative;
  padding: 34px 30px 30px;
  border-radius: 34px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.82) 0%,
      rgba(255, 255, 255, 0.96) 100%
    ),
    radial-gradient(
      circle at top left,
      rgba(187, 247, 208, 0.2) 0%,
      rgba(187, 247, 208, 0) 42%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(191, 219, 254, 0.18) 0%,
      rgba(191, 219, 254, 0) 40%
    );
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 26px 70px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.advantages-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.26) 0%,
    rgba(255, 255, 255, 0.08) 42%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

.advantages-head {
  align-items: flex-start;
  justify-content: flex-start;
  margin-bottom: 24px;
}

.advantages h2 {
  margin: 0 0 10px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

html[lang="kk"] .advantages h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.advantages-lead {
  max-width: 720px;
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.72;
}

.adv-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.adv-card {
  position: relative;
  min-height: 100%;
  padding: 24px 20px 22px;
  border-radius: 24px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(248, 250, 252, 0.96) 100%
  );
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow:
    0 16px 34px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  text-align: left;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

.adv-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.05) 0%,
    rgba(255, 255, 255, 0) 46%
  );
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.adv-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 197, 94, 0.16);
  box-shadow:
    0 24px 46px rgba(15, 23, 42, 0.11),
    0 8px 18px rgba(34, 197, 94, 0.08);
}

.adv-card:hover::after {
  opacity: 1;
}

.adv-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(240, 253, 244, 0.95) 0%,
    rgba(220, 252, 231, 0.9) 100%
  );
  border: 1px solid rgba(34, 197, 94, 0.12);
  box-shadow:
    0 14px 26px rgba(34, 197, 94, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.adv-icon {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.adv-card h4 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.24;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #0f172a;
}

.adv-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.72;
}

.cta {
  position: relative;
  margin-top: 26px;
  margin-bottom: 60px;
  padding: 56px 20px 54px;
  text-align: center;
  border-radius: 30px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.94) 100%
  );
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 24px 56px rgba(2, 6, 23, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  overflow: hidden;
  isolation: isolate;
}

html[lang="kk"] .cta h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 18% 28%,
      rgba(187, 247, 208, 0.28) 0%,
      rgba(187, 247, 208, 0) 34%
    ),
    radial-gradient(
      circle at 82% 76%,
      rgba(191, 219, 254, 0.24) 0%,
      rgba(191, 219, 254, 0) 34%
    );
  pointer-events: none;
  z-index: 0;
}

.cta > * {
  position: relative;
  z-index: 1;
}

.cta-decor {
  width: 84px;
  height: 6px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(34, 197, 94, 0.95) 0%,
    rgba(59, 130, 246, 0.9) 100%
  );
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.18);
}

.cta-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(34, 197, 94, 0.12);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.cta h2 {
  max-width: 820px;
  margin: 0 auto 14px;
  font-size: 42px;
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 900;
  color: var(--text-main);
}

.cta p {
  max-width: 720px;
  margin: 0 auto 24px;
  color: #5b6678;
  font-size: 17px;
  line-height: 1.72;
}

.cta-btn {
  min-height: 54px;
  padding-inline: 28px;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(22, 163, 74, 0.32);
}

@media (max-width: 980px) {
  .advantages-shell {
    padding: 28px 22px 24px;
    border-radius: 28px;
  }

  .adv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .advantages h2 {
    font-size: 31px;
  }
}

@media (max-width: 560px) {
  .advantages {
    padding-block: 18px 4px;
  }

  .advantages-shell {
    padding: 22px 16px 18px;
    border-radius: 24px;
  }

  .advantages-head {
    margin-bottom: 18px;
  }

  .advantages h2 {
    font-size: 26px;
  }

  .advantages-lead {
    font-size: 14px;
    line-height: 1.65;
  }

  .adv-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .adv-card {
    padding: 18px 16px 16px;
    border-radius: 20px;
  }

  .adv-icon-wrap {
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
    border-radius: 16px;
  }

  .adv-card h4 {
    font-size: 17px;
  }

  .adv-card p {
    font-size: 13px;
    line-height: 1.62;
  }

  .cta {
    margin-top: 20px;
    padding: 36px 16px 34px;
    border-radius: 24px;
  }

  .cta-decor {
    width: 68px;
    margin-bottom: 14px;
  }

  .cta-kicker {
    margin-bottom: 12px;
    padding: 8px 14px;
    font-size: 12px;
  }

  .cta h2 {
    font-size: 28px;
    line-height: 1.08;
  }

  .cta p {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.65;
  }

  .cta-btn {
    min-height: 50px;
    width: 100%;
    max-width: 280px;
  }
}

/* ===== MOBILE NAV: "Индивидуальный / принт" в две строки ===== */
@media (max-width: 900px) {
  .mobile-nav a.nav-custom-mobile {
    display: flex;
    flex-direction: column;
    align-items: center; /* центрируем по горизонтали */
    justify-content: center;
    text-align: center;
    line-height: 1.2;
  }

  .mobile-nav a.nav-custom-mobile .nav-main,
  .mobile-nav a.nav-custom-mobile .nav-sub {
    font-size: inherit;
    font-weight: inherit;
  }
}

/* ===== SUBHEADER (вторая линия меню) ===== */
.subheader {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.subheader-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;

  display: flex;
  align-items: center;
  gap: 16px;
}

/* базовый вид ссылок (убираем фиолетовый/подчёркивание браузера) */
.subheader-inner a,
.subheader-inner a:visited {
  color: #111827;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

/* разделитель между ссылками */
.subheader-inner a:not(:last-child)::after {
  content: "·";
  display: inline-block;
  margin-left: 16px;
  color: #9ca3af;
}

/* hover */
.subheader-inner a:hover {
  text-decoration: underline;
}

/* на мобилке эту линию лучше скрыть (всё есть в burger) */
@media (max-width: 900px) {
  .subheader {
    display: none;
  }
}

/* =========================
   РЕФЕРАЛКА (ЭТАП 7)
   ========================= */

.ref-input {
  min-width: 240px;
  flex: 1;
}

.ref-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 900px) {
  .ref-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ref-step {
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 12px 12px 10px;
  background: #ffffff;
}

.ref-step.done {
  border-color: rgba(34, 197, 94, 0.55);
  background: #f0fdf4;
}

.ref-step.active {
  border-color: rgba(59, 130, 246, 0.55);
  background: #eff6ff;
}

.ref-progressbar {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  margin-top: 10px;
}

.ref-progressbar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
  border-radius: 999px;
  transition: width 240ms ease;
}

.ref-code-hint {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff7ed;
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: #9a3412;
  font-size: 13px;
}

.ref-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.ref-step-n {
  font-weight: 700;
  font-size: 13px;
  color: #111827;
}

.ref-step-bonus {
  font-weight: 800;
  font-size: 13px;
  color: #16a34a;
}

.ref-step-status {
  font-size: 12px;
  color: #64748b;
}

.ref-step.done .ref-step-status {
  color: #0f766e;
  font-weight: 600;
}

/* ===== Product rating (Kaspi-like) ===== */
.p-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 4px 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: #111;
}

.p-rating-star {
  color: #ef4444;
  font-weight: 900;
}

.p-rating-count {
  color: #6b7280;
  font-weight: 800;
}

.p-rating-empty {
  color: #9ca3af;
}
