/* ===========================================================
   SONOFF product description styles (sonoff.ru)
   Used for the "Описание" (source code) block of product pages.

   Usage in the description HTML:
     <div class="sonoff-desc">            ...for a blue accent (e.g. Bridge-M)
     <div class="sonoff-desc theme-orange"> ...for an orange accent (e.g. EWPB)

   Everything is scoped under .sonoff-desc so this file is safe
   to load site-wide without affecting other page elements.
=========================================================== */

.sonoff-desc {
  --accent: #2b6cb0;
  --note-bg: #eaf2fb;
  --note-border: #2b6cb0;

  font-family: Arial, Helvetica, sans-serif;
  color: #222;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  line-height: 1.55;
}

.sonoff-desc.theme-orange {
  --accent: #d9480f;
  --note-bg: #fff4e6;
  --note-border: #f76707;
}

.sonoff-desc h1 {
  font-size: 26px;
  margin-bottom: 4px;
}

.sonoff-desc h2 {
  font-size: 20px;
  margin-top: 40px;
  border-bottom: 2px solid #eee;
  padding-bottom: 6px;
}

.sonoff-desc .subtitle {
  color: #666;
  font-size: 16px;
  margin-top: 0;
}

.sonoff-desc .hero-img {
  width: 100%;
  max-width: 700px;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
}

.sonoff-desc .gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.sonoff-desc .gallery img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #eee;
}

.sonoff-desc .features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.sonoff-desc .feature-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
}

.sonoff-desc .feature-card h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: var(--accent);
}

.sonoff-desc .feature-card p {
  margin: 0;
  font-size: 14px;
  color: #444;
}

.sonoff-desc table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.sonoff-desc table th,
.sonoff-desc table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
}

.sonoff-desc table th {
  background: #f1f3f5;
  width: 40%;
}

.sonoff-desc .compat-list {
  columns: 2;
  margin: 16px 0;
  padding-left: 20px;
}

.sonoff-desc .compat-list li {
  margin-bottom: 6px;
}

.sonoff-desc .faq-item {
  margin-bottom: 18px;
}

.sonoff-desc .faq-item h4 {
  margin: 0 0 6px 0;
  font-size: 15px;
}

.sonoff-desc .faq-item p {
  margin: 0;
  font-size: 14px;
  color: #444;
}

.sonoff-desc .note {
  background: var(--note-bg);
  border-left: 4px solid var(--note-border);
  padding: 10px 14px;
  font-size: 14px;
  margin: 16px 0;
}

.sonoff-desc .caption {
  text-align: center;
  font-size: 13px;
  color: #888;
  margin-top: -10px;
  margin-bottom: 20px;
}

.sonoff-desc a.link {
  color: var(--accent);
}

@media (max-width: 640px) {
  .sonoff-desc .gallery {
    grid-template-columns: 1fr 1fr;
  }
  .sonoff-desc .features {
    grid-template-columns: 1fr;
  }
  .sonoff-desc .compat-list {
    columns: 1;
  }
}
