:root {
  --bg: #f9debf;
  --bg-soft: #f5d9b8;
  --surface: #faf3ec;
  --surface-input: #e8e4e0;
  --text: #333333;
  --text-muted: #5c5c5c;
  --accent: #333333;
  --logo: #8a8a8a;
  --border: rgba(51, 51, 51, 0.14);
  --shadow: 0 4px 24px rgba(51, 51, 51, 0.06);
  --radius: 16px;
  --radius-sm: 12px;
  --font-serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-sans: "Montserrat", system-ui, -apple-system, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, #f7d8b5 45%, #ebc894 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header / brand */
.header {
  padding: 28px 0 8px;
  text-align: center;
}

.header__inner {
  display: flex;
  justify-content: center;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
}

.brand__logo {
  display: block;
  width: min(220px, 72vw);
  height: auto;
}

/* Main */
.main {
  flex: 1;
  padding-top: 8px;
  padding-bottom: calc(32px + var(--safe-bottom));
}

.loading {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 0;
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

/* Page intro — главный заголовок */
.problems {
  width: 100%;
  margin-bottom: 32px;
}

.problems__title {
  width: 100%;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  letter-spacing: 0.01em;
  text-align: center;
}

.problems__line {
  display: block;
  width: 100%;
  text-wrap: balance;
}

.problems__line + .problems__line {
  margin-top: 0.35em;
}

/* Warranty — как лицевая сторона */
.warranty {
  text-align: center;
  margin-bottom: 32px;
  padding: 24px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.warranty__title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.3;
}

.warranty__body {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.warranty__emphasis {
  margin: 0 0 18px;
  font-size: 0.95rem;
  font-weight: 600;
}

.warranty__steps {
  margin: 0 auto;
  padding: 0;
  list-style: none;
  text-align: left;
  max-width: 300px;
  font-size: 0.88rem;
}

.warranty__steps li {
  margin-bottom: 6px;
  padding-left: 14px;
  position: relative;
}

.warranty__steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  background: var(--text);
  border-radius: 1px;
}

/* Product grid */
.section-title {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
}

/* Product grid */
.product-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 36px;
}

.product-card {
  display: block;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}

.product-card:hover {
  background: #fff;
  border-color: rgba(51, 51, 51, 0.22);
}

.product-card:active {
  transform: scale(0.99);
}

.product-card__name {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
}

.product-card__desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.product-grid.product-grid--categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 40px;
}

.product-grid--categories .product-card--category {
  padding: 28px 16px;
  min-height: 98px;
  border-radius: var(--radius);
  border-width: 1.5px;
  border-color: rgba(51, 51, 51, 0.2);
  background: #fff;
  box-shadow: 0 6px 28px rgba(51, 51, 51, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-grid--categories .product-card--category:hover {
  background: #fff;
  border-color: rgba(51, 51, 51, 0.32);
  box-shadow: 0 8px 32px rgba(51, 51, 51, 0.12);
}

.product-grid--categories .product-card--category .product-card__name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  hyphens: auto;
}

.product-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card--model {
  padding: 10px;
  background: #fff;
}

.product-card--model:hover {
  background: #fff;
}

.product-card__photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.product-card__photo--empty {
  aspect-ratio: 1;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.product-photo {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border-radius: var(--radius);
  background: #fff;
}

.product-card-wrap .wb-link--compact {
  margin: 0;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.product-card-wrap .wb-link--compact:hover {
  background: #fff;
  border-color: rgba(51, 51, 51, 0.28);
  color: var(--text);
  text-decoration: none;
}

.wb-link {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  padding-bottom: 2px;
}

.wb-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.wb-btn {
  display: block;
  max-width: 320px;
  margin: 16px auto 0;
  padding: 14px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}

.wb-btn:hover {
  background: #fff;
  border-color: rgba(51, 51, 51, 0.28);
}

.wb-btn__hint {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

.product-header__actions {
  margin-top: 4px;
}

/* Product page */
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.back-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.product-header {
  text-align: center;
  margin-bottom: 28px;
}

.product-header__title {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 600;
}

.product-header__desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.product-header__sku {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.section-title--spaced {
  margin-top: 28px;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.product-instruction {
  margin-bottom: 6px;
  padding: 10px;
  background: #fff;
  border: 1.5px solid rgba(139, 90, 60, 0.28);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(90, 55, 30, 0.1);
}

.product-instruction__image {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border-radius: 10px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item[open] {
  border-color: rgba(51, 51, 51, 0.25);
}

.faq-item__q {
  padding: 14px 36px 14px 16px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  user-select: none;
  text-align: left;
}

.faq-item__q::-webkit-details-marker {
  display: none;
}

.faq-item__q::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.faq-item[open] .faq-item__q::after {
  content: "−";
}

.faq-item__a {
  padding: 0 16px 14px;
  font-size: 0.88rem;
  color: var(--text-muted);
  white-space: pre-line;
  line-height: 1.6;
  text-align: left;
}

/* Contacts */
.contacts {
  text-align: center;
  padding-top: 8px;
}

.contacts__title {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
}

.contacts__intro {
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 340px;
  margin-inline: auto;
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  margin: 0 auto;
}

.contact-btn {
  display: block;
  padding: 14px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, filter 0.15s;
}

.contact-btn__hint {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  margin-top: 2px;
}

.contact-btn--telegram {
  background: #2aabee;
  border-color: #2aabee;
  color: #fff;
}

.contact-btn--telegram .contact-btn__hint {
  color: rgba(255, 255, 255, 0.88);
}

.contact-btn--telegram:hover {
  filter: brightness(0.94);
}

.contact-btn--max {
  background: #5b4cf0;
  border-color: #5b4cf0;
  color: #fff;
}

.contact-btn--max .contact-btn__hint {
  color: rgba(255, 255, 255, 0.88);
}

.contact-btn--max:hover {
  filter: brightness(0.94);
}

.contact-btn--vk {
  background: #0077ff;
  border-color: #0077ff;
  color: #fff;
}

.contact-btn--vk .contact-btn__hint {
  color: rgba(255, 255, 255, 0.88);
}

.contact-btn--vk:hover {
  filter: brightness(0.94);
}

.contact-btn--wb {
  background: #cb11ab;
  border-color: #cb11ab;
  color: #fff;
}

.contact-btn--wb .contact-btn__hint {
  color: rgba(255, 255, 255, 0.88);
}

.contact-btn--wb:hover {
  filter: brightness(0.94);
}

/* Footer */
.footer {
  padding: 20px 0 calc(20px + var(--safe-bottom));
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.footer p {
  margin: 0;
}

@media (min-width: 480px) {
  .warranty__title {
    font-size: 1.6rem;
  }

  .problems__title {
    font-size: 1.7rem;
    line-height: 1.4;
  }

  .product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .product-grid--categories {
    gap: 16px;
  }

  .product-grid--categories .product-card--category {
    padding: 32px 20px;
    min-height: 110px;
  }

  .product-grid--categories .product-card--category .product-card__name {
    font-size: 1.55rem;
  }
}
