*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--tg-font-body);
  color: var(--tg-color-ink);
  background-color: var(--tg-color-base);
  background-image: var(--tg-pattern);
  background-size: 180px;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--tg-color-green-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--tg-color-accent);
}

h1,
h2,
h3,
h4 {
  font-family: var(--tg-font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1rem;
}

.container {
  width: min(100% - 2rem, var(--tg-container));
  margin-inline: auto;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  width: auto;
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  background: var(--tg-color-base);
  padding: 0.75rem 1rem;
  border-radius: var(--tg-radius-pill);
  box-shadow: var(--tg-shadow);
}

/* Buttons */
.tg-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--tg-radius-pill);
  border: 2px solid var(--tg-color-green);
  background: var(--tg-color-green);
  color: var(--tg-color-base);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tg-button:hover {
  background: var(--tg-color-green-dark);
  border-color: var(--tg-color-green-dark);
  color: var(--tg-color-base);
}

.tg-button--ghost {
  background: transparent;
  color: var(--tg-color-green-dark);
}

.tg-button--ghost:hover {
  background: var(--tg-color-surface-green);
  color: var(--tg-color-ink);
}

.tg-button--accent {
  background: var(--tg-color-accent);
  border-color: var(--tg-color-accent);
}

.tg-button--accent:hover {
  background: #b00000;
  border-color: #b00000;
}

.tg-button--small {
  min-height: 2.25rem;
  padding: 0.4rem 1rem;
  font-size: 0.95rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: rgba(128, 147, 109, 0.25);
  box-shadow: 0 6px 20px rgba(40, 28, 9, 0.06);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  min-height: var(--tg-header-h);
  padding-block: 0.4rem;
}

.site-header__brand {
  min-width: 0;
}

.site-header__brand .custom-logo-link,
.site-header__brand .site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0;
  color: var(--tg-color-ink);
  text-decoration: none;
  min-width: 0;
}

.site-logo__mark,
.custom-logo {
  width: 46px;
  height: 46px;
  max-width: none;
  object-fit: contain;
  flex: 0 0 auto;
}

.site-logo__name {
  font-family: var(--tg-font-display);
  font-size: 1.15rem;
  line-height: 1.05;
  color: var(--tg-color-ink);
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.site-nav__list a {
  color: var(--tg-color-ink);
  text-decoration: none;
  font-weight: 500;
  padding: 0.35rem 0;
}

.site-nav__list a:hover,
.site-nav__list .current-menu-item > a {
  color: var(--tg-color-green-dark);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header__phone {
  font-weight: 700;
  color: var(--tg-color-ink);
  text-decoration: none;
  white-space: nowrap;
}

.site-header__toggle {
  display: none;
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 12px;
  background: var(--tg-color-surface-green);
  color: var(--tg-color-ink);
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.site-header__toggle-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

/* Hero */
.hero {
  padding: var(--tg-space-4) 0 var(--tg-space-3);
  background:
    linear-gradient(180deg, var(--tg-color-surface-green) 0%, var(--tg-color-base) 100%);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 80px;
  background-image: var(--tg-pattern);
  background-repeat: repeat-x;
  background-size: 160px;
  opacity: 0.55;
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--tg-space-4);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  color: var(--tg-color-green-dark);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: 0.35rem;
}

.hero__slogan {
  font-size: 1.35rem;
  color: var(--tg-color-green);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero__lead {
  max-width: 36rem;
  font-size: 1.05rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero__visual {
  display: flex;
  justify-content: center;
}

.hero__visual img {
  width: min(100%, 320px);
  filter: drop-shadow(0 18px 30px rgba(40, 28, 9, 0.12));
}

/* Sections */
.section {
  padding: var(--tg-space-3) 0;
}

.section__head {
  text-align: center;
  margin-bottom: var(--tg-space-3);
}

.section__head p {
  color: rgba(40, 28, 9, 0.72);
  max-width: 40rem;
  margin-inline: auto;
}

.section__more {
  text-align: center;
  margin-top: var(--tg-space-3);
}

.section--eco {
  padding: 0;
}

.eco-banner {
  margin: 0;
  text-align: center;
  background: var(--tg-color-green);
  color: var(--tg-color-base);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1rem 1.25rem;
  border-radius: var(--tg-radius);
}

.section--products {
  background: rgba(247, 245, 240, 0.92);
}

.section--terms {
  background:
    var(--tg-pattern),
    linear-gradient(180deg, var(--tg-color-base), var(--tg-color-surface-green));
  background-size: 180px, auto;
  background-blend-mode: multiply, normal;
}

.terms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.terms-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(128, 147, 109, 0.25);
  border-radius: var(--tg-radius);
  padding: 1.5rem;
  box-shadow: var(--tg-shadow);
}

.terms-card h2 {
  font-size: 1.25rem;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.product-card {
  background: var(--tg-color-base);
  border: 1px solid rgba(128, 147, 109, 0.2);
  border-radius: var(--tg-radius);
  overflow: hidden;
  box-shadow: var(--tg-shadow);
  display: flex;
  flex-direction: column;
}

.product-card__media {
  display: block;
  background: var(--tg-color-surface-green);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__image--placeholder {
  object-fit: contain;
  padding: 1.5rem;
}

.product-card__body {
  padding: 1.1rem 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.product-card__title {
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 0;
}

.product-card__title a {
  color: inherit;
  text-decoration: none;
}

.product-card__price {
  margin: 0;
  color: var(--tg-color-green-dark);
  font-weight: 600;
}

/* Content pages */
.site-main {
  min-height: 50vh;
}

.content-area {
  padding: var(--tg-space-4) 0;
}

.entry-header {
  margin-bottom: 1.5rem;
}

.entry-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

.archive-header {
  text-align: center;
  margin-bottom: var(--tg-space-3);
}

.archive-lead {
  color: rgba(40, 28, 9, 0.7);
}

.product-single {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: var(--tg-space-4);
  align-items: start;
}

.product-single__media {
  background: var(--tg-color-surface-green);
  border-radius: var(--tg-radius);
  padding: 1.5rem;
}

.product-single__image {
  margin-inline: auto;
  max-height: 420px;
  object-fit: contain;
}

.product-single__crumb {
  margin-bottom: 0.5rem;
}

.product-single__price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--tg-color-green-dark);
}

.product-single__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.about-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--tg-space-4);
  align-items: start;
}

.about-layout__visual {
  background: var(--tg-color-surface-green);
  border-radius: var(--tg-radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about-layout__visual img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  object-position: center;
}

.about-facts {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.about-facts li {
  padding: 0.9rem 1rem;
  background: var(--tg-color-surface);
  border-radius: 12px;
  border-left: 4px solid var(--tg-color-green);
}

/* Contacts */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--tg-space-4);
}

.contacts-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.contacts-list li {
  display: grid;
  gap: 0.25rem;
}

.contacts-list span {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tg-color-green-dark);
  font-weight: 600;
}

.contacts-map {
  min-height: 320px;
  border-radius: var(--tg-radius);
  overflow: hidden;
  background: var(--tg-color-surface-green);
  border: 1px solid rgba(128, 147, 109, 0.25);
}

.contacts-map iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

.contacts-map--fallback {
  display: grid;
  place-content: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
}

.tg-contact-form {
  display: grid;
  gap: 0.85rem;
  background: var(--tg-color-surface);
  border-radius: var(--tg-radius);
  padding: 1.25rem;
}

.tg-contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.tg-contact-form input[type="text"],
.tg-contact-form input[type="tel"],
.tg-contact-form input[type="email"],
.tg-contact-form textarea {
  width: 100%;
  border: 1px solid var(--tg-color-muted);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: var(--tg-color-base);
}

.tg-contact-form__consent label {
  font-weight: 400;
  grid-template-columns: auto 1fr;
  align-items: start;
}

.tg-notice {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.tg-notice--success {
  background: #e8f5e2;
  color: var(--tg-color-green-dark);
}

.tg-notice--error {
  background: #ffe5e5;
  color: #b00000;
}

.tg-form-unavailable {
  background: var(--tg-color-sand);
  padding: 1rem 1.15rem;
  border-radius: 12px;
}

/* Footer */
.site-footer {
  position: relative;
  background: var(--tg-color-green-dark);
  color: #f4f7f0;
  margin-top: var(--tg-space-4);
  overflow: hidden;
}

.site-footer a {
  color: #fff;
}

.site-footer a:hover {
  color: var(--tg-color-sand);
}

.site-footer__pattern {
  position: absolute;
  inset: 0;
  background-image: var(--tg-pattern);
  background-size: 160px;
  opacity: 0.12;
  pointer-events: none;
}

.site-footer__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: var(--tg-space-3);
  padding: var(--tg-space-4) 0 var(--tg-space-3);
}

.site-footer__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.site-footer__slogan {
  margin: 0;
  opacity: 0.85;
}

.site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.site-footer__list a {
  text-decoration: none;
}

.site-footer__contacts p {
  margin: 0 0 0.65rem;
}

.site-footer__legal {
  font-size: 0.92rem;
  opacity: 0.9;
}

.site-footer__bar {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.9rem 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Pagination */
.navigation.pagination {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.navigation.pagination .nav-links {
  display: flex;
  gap: 0.5rem;
}

.navigation.pagination a,
.navigation.pagination .current {
  display: inline-flex;
  min-width: 2.5rem;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(128, 147, 109, 0.35);
  text-decoration: none;
  color: var(--tg-color-ink);
  padding: 0 0.75rem;
}

.navigation.pagination .current {
  background: var(--tg-color-green);
  color: #fff;
  border-color: var(--tg-color-green);
}

/* Responsive */
@media (max-width: 960px) {
  .hero__inner,
  .product-single,
  .about-layout,
  .contacts-grid,
  .terms-grid,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-header__inner {
    display: flex;
  }

  .site-header__toggle {
    display: inline-flex;
    order: -1;
    flex: 0 0 2.75rem;
  }

  .site-header__brand {
    flex: 1 1 auto;
  }

  .site-header__actions {
    margin-left: auto;
    flex: 0 0 auto;
  }

  .site-header__phone {
    font-size: 0.95rem;
  }

  .site-logo__mark {
    display: none;
  }

  .site-logo__name {
    font-size: 1.05rem;
  }

  .about-layout__visual {
    max-width: 240px;
    margin-inline: auto;
  }

  .site-nav {
    position: fixed;
    inset: var(--tg-header-h) 0 auto;
    background: #fff;
    border-bottom: 1px solid rgba(128, 147, 109, 0.25);
    padding: 1rem 1.25rem 1.25rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: 99;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 480px) {
  .site-header__phone {
    display: none;
  }
}

@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: var(--tg-space-3);
  }

  .hero__visual img {
    width: min(100%, 240px);
  }
}
