/* =========================================================
   Дом деревьев — domderevyev.ru
   Минимальный статический каркас. Мобайл-фёрст.
   ========================================================= */

/* ---------- База ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #26332a;
  background: #ffffff;
}

h1, h2, h3 {
  line-height: 1.25;
  margin: 0 0 0.5em;
  color: #1e2b22;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }

p {
  margin: 0 0 0.8em;
}

a {
  color: #2e6b3e;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style-position: inside;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Контейнер ---------- */
.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
}

.container-narrow {
  max-width: 560px;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  color: #ffffff;
  background: #2e6b3e;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  background: #265c35;
  text-decoration: none;
}

.btn-big {
  padding: 16px 28px;
  font-size: 1.1rem;
}

/* ---------- Кнопка MAX ---------- */
.btn-max {
  background: #7b3fe4;
}

.btn-max:hover {
  background: #682fd0;
}

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  border-bottom: 1px solid #e2e8e4;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.15rem;
  font-weight: bold;
  color: #1e2b22;
  margin-right: auto;
}

.header-phone {
  font-size: 0.95rem;
  white-space: nowrap;
}

.btn-header {
  padding: 10px 16px;
  font-size: 0.95rem;
}

.btn-share {
  color: #2e6b3e;
  background: #ffffff;
  border: 1px solid #2e6b3e;
}

.btn-share:hover {
  background: #eef4ee;
}

.share-icon {
  vertical-align: -2px;
  margin-right: 6px;
}

/* ---------- Раздел «Уход и болезни туй» ---------- */
.care-figure {
  max-width: 360px;
  margin: 16px 0 28px;
}

.care-figure svg {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #e2e8e4;
  border-radius: 10px;
}

.care-figure figcaption {
  margin-top: 6px;
  font-size: 0.9rem;
  color: #5f7366;
}

.care-cta {
  margin-top: 28px;
}

/* ---------- Первый экран ---------- */
.hero {
  padding: 36px 0 44px;
  background: #eef4ee;
  border-bottom: 1px solid #dce7dd;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-brand {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a6b53;
}

.hero h1 {
  font-size: 1.9rem;
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 1.05rem;
  max-width: 520px;
  margin-bottom: 16px;
}

.hero-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.hero-chips li {
  padding: 6px 12px;
  font-size: 0.85rem;
  background: #ffffff;
  border: 1px solid #d3e0d5;
  border-radius: 999px;
  color: #33523c;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.hero-phone {
  font-size: 0.95rem;
  font-weight: bold;
}

.hero-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 220px;
  object-fit: contain;
  border-radius: 16px;
}

/* ---------- Визуальные заглушки под фото/карту ---------- */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e6ece7;
  border: 1px dashed #9db3a3;
  border-radius: 10px;
  color: #5f7366;
  font-size: 0.9rem;
  text-align: center;
  padding: 12px;
}

/* ---------- Секции ---------- */
.section {
  padding: 40px 0;
}

.section-alt {
  background: #f6f9f6;
}

.section-sub {
  color: #5a6a5f;
}

/* ---------- Каталог ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8e4;
  border-radius: 12px;
  padding: 18px;
}

.card-photo {
  min-height: 160px;
  margin-bottom: 14px;
}

.card-latin {
  font-style: italic;
  color: #6b7c70;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.card-specs {
  list-style: none;
  margin-bottom: 12px;
}

.card-specs li {
  padding: 2px 0;
}

.card-price {
  font-weight: bold;
  color: #1e2b22;
}

/* ---------- Раскрывающийся блок «Характеристики и уход» ---------- */
.card-details {
  margin-bottom: 14px;
  border: 1px solid #e2e8e4;
  border-radius: 10px;
}

.card-details summary {
  padding: 12px 14px;
  font-weight: bold;
  color: #2e6b3e;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.card-details summary:hover {
  color: #265c35;
}

.card-details[open] summary {
  border-bottom: 1px solid #e2e8e4;
}

.card-details-body {
  padding: 14px;
  font-size: 0.95rem;
}

.card-details-body h4 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: #1e2b22;
}

.card-details-body p {
  margin: 0 0 12px;
}

.card-details-body p:last-child {
  margin-bottom: 0;
}

.card-warn {
  color: #8a5a00;
}

.catalog-soon {
  margin-top: 20px;
  color: #5a6a5f;
}

/* ---------- Почему у нас ---------- */
.features {
  list-style: none;
}

.features li {
  margin-bottom: 18px;
}

/* ---------- Как заказать ---------- */
.steps li {
  margin-bottom: 18px;
}

/* ---------- Галерея ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.gallery-item {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}

/* ---------- Доставка ---------- */
.delivery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.delivery-block {
  background: #ffffff;
  border: 1px solid #e2e8e4;
  border-radius: 12px;
  padding: 18px;
}

/* ---------- Форма ---------- */
.order-form label {
  display: block;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.order-form input[type="text"],
.order-form input[type="tel"],
.order-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: #26332a;
  background: #ffffff;
  border: 1px solid #c5d2c8;
  border-radius: 8px;
}

.order-form input:focus,
.order-form textarea:focus {
  outline: 2px solid #2e6b3e;
  outline-offset: -1px;
}

.order-form .agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.order-form .agree input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.order-form button {
  width: 100%;
}

.form-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #8a5a00;
}

/* ---------- Подвал ---------- */
.site-footer {
  background: #1e2b22;
  color: #cfe0d3;
  padding: 28px 0;
}

.footer-contacts {
  margin: 12px 0 16px;
}

/* ---------- Закреплённая панель MAX (только телефон) ---------- */
.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #ffffff;
  border-top: 1px solid #e2e8e4;
}

.mobile-bar-btn {
  display: block;
  width: 100%;
}

/* На телефоне добавляем отступ снизу, чтобы панель не перекрывала подвал */
@media (max-width: 639px) {
  body {
    padding-bottom: 76px;
  }
}

/* На планшете и десктопе панель не нужна */
@media (min-width: 640px) {
  .mobile-bar {
    display: none;
  }
}

.site-footer p {
  margin-bottom: 6px;
}

.footer-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: #ffffff;
}

.footer-copy {
  margin-top: 14px;
  font-size: 0.85rem;
  color: #9db3a3;
}

/* ---------- Планшет и десктоп ---------- */
@media (min-width: 640px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .delivery-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Первый экран: текст слева, фото справа */
  .hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 40px;
  }

  .hero h1 {
    font-size: 2.4rem;
  }
}

@media (min-width: 960px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .features li,
  .steps li {
    margin-bottom: 0;
  }
}

@media (min-width: 1200px) {
  .features {
    grid-template-columns: repeat(4, 1fr);
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Лайтбокс ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close {
  top: 16px;
  right: 16px;
}

.lightbox-prev {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  opacity: 0.8;
}

img.card-photo,
img.gallery-item {
  cursor: zoom-in;
}
