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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f8fafc;
}

h1 { font-weight: 700; line-height: 1.25; letter-spacing: -0.025em; }
h2 { font-weight: 700; line-height: 1.375; }
h3 { font-weight: 600; }

a { transition: color 0.2s; }

/* ─── Accordion ───────────────────────────────── */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.accordion-item.active .accordion-content {
  max-height: none;
}
.accordion-item.active .accordion-chevron {
  transform: rotate(180deg);
}
.accordion-chevron {
  transition: transform 0.3s ease;
  display: inline-block;
}

/* ─── Char accordion ──────────────────────────── */
.char-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.char-accordion-item.active .char-accordion-content {
  max-height: 600px;
}
.char-accordion-item.active .char-chevron {
  transform: rotate(180deg);
}
.char-chevron {
  transition: transform 0.3s ease;
  display: inline-block;
}

/* ─── Instruction nav: многострочное меню ─────── */
.instruction-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.5rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  border: 1px solid #f1f5f9;
}

.instruction-nav a {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ─── Stars gold ──────────────────────────────── */
.star-gold { color: #f59e0b; }

/* ─── Cookie consent ──────────────────────────── */
#cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: none;
}

/* ─── Instruction prose ───────────────────────── */
.instruction-prose h3 {
  color: #0d1f3c;
  font-weight: 700;
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.instruction-prose p {
  color: #334155;
  line-height: 1.625;
  margin-bottom: 0.75rem;
}
.instruction-prose ul {
  list-style-type: disc;
  padding-left: 1.25rem;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}
.instruction-prose ul li {
  color: #334155;
  margin-bottom: 0.375rem;
}
.instruction-prose strong { color: #1e293b; }
.instruction-prose a { color: #0d7a7e; }
.instruction-prose a:hover { text-decoration: underline; }

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* Keep the header actions inside narrow phone screens. */
@media (max-width: 639px) {
  .site-header > div { padding-inline: 12px; }
  .site-header > div > div { gap: 8px; }
  .site-header > div > div > div { gap: 4px; flex-shrink: 0; }
  .site-header > div > div > div > a {
    width: 44px; height: 44px; padding: 0; flex-shrink: 0;
    justify-content: center;
  }
  .product-hero { padding-block: 28px; }
  .product-hero .gallery-thumb { width: 52px; height: 52px; }
}
@media (max-width: 359px) {
  .site-header > div > div > a { gap: 4px; }
  .site-header > div > div > a > span:first-child { width: 28px; height: 28px; }
  .site-header > div > div > a > span:last-child { font-size: 14px; }
}

/* The checkout stays above the cookie notice and fits the visible viewport. */
#checkout-modal > div {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overscroll-behavior: contain;
}
@media (max-width: 639px) {
  #checkout-modal > div { padding: 20px; }
  #checkout-modal input, #checkout-modal select, #checkout-modal textarea {
    font-size: 16px;
  }
}
