/* ============================================================
   iStore homepage — theme.css
   Перенесено из экспорта Claude Design.
   Inline-стили + JS-палитра {{theme.xxx}} → CSS-переменные + классы.
   Тёмная тема: [data-theme="dark"] на <html>, переключатель в app.js.
   ============================================================ */

:root {
  --bg:         #fafaf8;
  --surface:    #ffffff;
  --surface-alt:#f5f5f7;
  --border:     #d2d2d7;
  --text:       #1d1d1f;
  --muted:      #6e6e73;
  --accent:     oklch(55% 0.19 255);
  --accent-text:#ffffff;
  --danger:     oklch(55% 0.19 25);
  --maxw: 1280px;
}

[data-theme="dark"] {
  --bg:         #000000;
  --surface:    #1d1d1f;
  --surface-alt:#2c2c2e;
  --border:     #3a3a3c;
  --text:       #f5f5f7;
  --muted:      #98989d;
  --accent:     oklch(72% 0.17 255);
  --accent-text:#ffffff;
  --danger:     oklch(72% 0.17 25);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body.site {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;   /* sticky footer: контент растягивается, футер прижат вниз */
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.wrap { max-width: var(--maxw); margin: 0 auto; }

/* ---------- promo bar ---------- */
.promo-bar {
  width: 100%;
  background: var(--accent);
  color: var(--accent-text);
  padding: 9px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
}

/* ---------- header ---------- */
.site-header {
  width: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
}
.brand__badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
}
.header-nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
  flex-wrap: wrap;
}
.header-nav a { color: inherit; text-decoration: none; }
.header-actions {
  flex: 1;
  min-width: 220px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.search-box {
  width: 180px;
  max-width: 100%;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
}
.header-icons { display: flex; gap: 8px; }
.icon-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

/* lang + theme pill switches */
.pill-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  font-size: 12px;
}
.pill-switch a,
.pill-switch button {
  padding: 5px 10px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  background: transparent;
  border: 0;
  text-decoration: none;
}
.pill-switch .is-active {
  background: var(--accent);
  color: var(--accent-text);
}

/* ---------- category nav ---------- */
.cat-nav {
  width: 100%;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}
.cat-nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}
.cat-chip {
  padding: 7px 16px;
  border-radius: 16px;
  font-size: 13px;
  white-space: nowrap;
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}

/* ---------- hero ---------- */
.hero {
  width: 100%;
  background: var(--surface-alt);
  overflow: hidden;
}
.hero__inner {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  min-height: 420px;
  position: relative;
}
.hero__content {
  flex: 1 1 380px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 48px 6vw;
}
.hero__eyebrow { font-size: 15px; font-weight: 600; color: var(--muted); }
.hero__title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.hero__price { font-size: 17px; color: var(--muted); }
.hero__cta {
  align-self: flex-start;
  padding: 12px 28px;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 24px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.hero__media {
  flex: 1 1 380px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
}
.hero__media img { width: 100%; height: 100%; object-fit: contain; }
.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: inherit;
}
.hero__arrow--prev { left: 24px; }
.hero__arrow--next { right: 24px; }
.hero-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 14px;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  display: inline-block;
  border: 0;
  padding: 0;
}
.hero-dot.is-active { background: var(--accent); }

/* ---------- section head ---------- */
.section-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 8px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.section-head__title { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.section-head__link {
  font-size: 14px;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

/* ---------- product grid + card ---------- */
.product-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.product-card__media-wrap { position: relative; }
.product-card__badges {
  position: absolute;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1;
}
.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.badge--new { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.badge--sale { background: #d70015; color: #fff; }
.product-card__media {
  height: 160px;
  border-radius: 10px;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card__media img { width: 100%; height: 100%; object-fit: contain; }
.product-card__name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.product-card__code { font-size: 12px; color: var(--muted); }
.product-card__prices { display: flex; flex-direction: column; gap: 3px; }
.product-card__old {
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
}
.product-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.product-card__price { font-size: 19px; font-weight: 700; }
.product-card__save { font-size: 12px; font-weight: 600; color: var(--danger); }
.product-card__installment {
  align-self: flex-start;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
}
.product-card__gift { font-size: 12px; color: var(--accent); font-weight: 500; }
.product-card__buy {
  margin-top: auto;
  padding: 11px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

/* ---------- about block ---------- */
.about {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 24px 56px;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.about__badge {
  width: 110px; height: 110px;
  border: 1px solid var(--border);
  border-radius: 12px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 8px;
  overflow: hidden;
}
.about__badge:has(img) { padding: 0; }
.about__badge img { width: 100%; height: 100%; object-fit: cover; }
.about__body { flex: 1; min-width: 260px; }
.about__title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.about__text { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ---------- featured spotlight (always dark) ---------- */
.featured {
  width: 100%;
  background: #000000;
  color: #f5f5f7;
  padding: 56px 24px;
}
.featured__inner { max-width: var(--maxw); margin: 0 auto; }
.featured__label {
  font-size: 13px;
  color: #98989d;
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: 0.06em;
}
.featured__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.feat-item { display: flex; flex-direction: column; gap: 10px; text-align: center; }
.feat-item__title { font-size: 16px; font-weight: 700; }
.feat-item__spec { font-size: 13px; color: #98989d; }
.feat-item__media {
  height: 160px;
  border-radius: 12px;
  background: #1d1d1f;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.feat-item__media img { width: 100%; height: 100%; object-fit: contain; }
.feat-item__ribbon {
  position: absolute;
  top: 8px; right: 8px;
  font-size: 12px;
  background: var(--danger);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  transform: rotate(-6deg);
}

/* ---------- footer ---------- */
.site-footer {
  width: 100%;
  background: #1d1d1f;
  color: #f5f5f7;
  padding: 48px 24px 24px;
}
.footer__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #3a3a3c;
  font-size: 13px;
}
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.footer-col a { color: inherit; text-decoration: none; }
.footer-col__brand { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.footer-col__title { font-weight: 600; margin-bottom: 2px; }
.footer-col .muted { color: #98989d; }
.pay-methods { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-chip { border: 1px solid #3a3a3c; padding: 3px 8px; border-radius: 4px; }
.socials { display: flex; gap: 10px; }
.social-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid #3a3a3c;
  display: inline-block;
}
.footer__copy {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 20px;
  font-size: 12px;
  color: #98989d;
  text-align: center;
}

/* ============================================================
   Кастомный скроллбар — на весь сайт (тонкий, в цвет темы)
   ============================================================ */
html { scrollbar-width: thin; scrollbar-color: var(--border) transparent; } /* Firefox */

*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--muted) 70%, transparent); }