@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --green-main: #2c7a3f;
  --green-light: #e1f3e6;
  --green-dark: #1f5a2e;
  --accent-beige: #fff7e6;
  --text-main: #1f2933;
  --text-muted: #6b7280;
  --border-soft: #e5e7eb;
  --bg-main: #f3f4f6;
  --white: #ffffff;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.06);
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
}

.site-main {
  flex: 1 0 auto;
  padding: 24px 0 40px;
}

.site-footer {
  flex-shrink: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ——— Шапка ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(90deg, #1f5a2e, #2c7a3f);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  color: var(--green-main);
  font-weight: 700;
  font-size: 14px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.logo-title {
  font-weight: 700;
  font-size: 18px;
}

.logo-subtitle {
  font-size: 12px;
  opacity: 0.9;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: flex-end;
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.cart-link {
  position: relative;
}

.cart-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.25);
  font-size: 12px;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}

/* ——— Сообщения ——— */
.messages {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.msg {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  font-size: 14px;
}

.msg-success {
  border-left: 4px solid var(--green-main);
}

.msg-error,
.msg-danger {
  border-left: 4px solid #dc2626;
}

.msg-warning {
  border-left: 4px solid #d97706;
}

/* ——— Hero ——— */
.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-about .hero-text {
  background: radial-gradient(circle at top left, #e1f3e6, #ffffff);
}

.hero-catalog .hero-text,
.page-hero {
  background: radial-gradient(circle at top left, #e1f3e6, #ffffff);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 18px;
}

.page-hero h1 {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--green-dark);
}

.page-lead {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.hero-text {
  flex: 1 1 260px;
  background: radial-gradient(circle at top left, #e1f3e6, #ffffff);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-soft);
}

.hero-text h1 {
  margin: 0 0 10px;
  font-size: 24px;
  color: var(--green-dark);
}

.hero-text p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.hero-badge {
  flex: 0 1 260px;
  background: linear-gradient(135deg, var(--green-main), var(--green-dark));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.hero-badge h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.hero-badge ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* ——— О хозяйстве (главная) ——— */
.about-block {
  scroll-margin-top: 88px;
  margin-bottom: 28px;
}

.about-block-inner {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-soft);
}

.about-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-main);
}

.about-block-inner>.about-header h2 {
  margin: 0 0 10px;
  font-size: 22px;
  color: var(--green-dark);
}

.about-lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-main);
}

.about-columns {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
  margin: 20px 0 24px;
}

.about-story p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
}

.about-highlight {
  background: var(--green-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.about-highlight-quote {
  margin: 0 0 10px;
  font-style: italic;
  font-size: 14px;
  line-height: 1.55;
}

.about-highlight-note {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--green-dark);
}

.subsection-title {
  margin: 0 0 12px;
  font-size: 17px;
  color: var(--green-dark);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.value-card {
  background: var(--bg-main);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
}

.value-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--green-dark);
}

.value-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-main);
}

.steps-list {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.steps-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-main);
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
  border-radius: 50%;
}

.about-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 0;
}

.link-muted {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.link-muted:hover {
  border-bottom-color: var(--green-main);
}

.featured-section {
  margin-top: 8px;
}

.featured-section .section-title {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--green-dark);
}

.section-subtitle {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ——— Фильтры каталога ——— */
.filters {
  margin-bottom: 18px;
}

.filters-form {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.field,
.filter-field {
  display: flex;
  flex-direction: column;
  flex: 1 1 200px;
  gap: 6px;
}

.field label,
.field>span:first-child,
.filter-field span:first-child {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

input[type="text"],
input[type="search"],
input[type="number"],
input[type="email"],
input[type="tel"],
select,
textarea {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green-main);
  box-shadow: 0 0 0 1px rgba(44, 122, 63, 0.3);
}

.field-button {
  flex: 0 0 auto;
  padding-top: 22px;
}

/* ——— Кнопки ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease,
    box-shadow 0.15s ease;
  background-color: var(--green-main);
  color: var(--white);
  box-shadow: 0 8px 16px rgba(44, 122, 63, 0.25);
}

.btn:hover {
  background-color: var(--green-dark);
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--green-main);
  color: var(--white);
  box-shadow: 0 8px 16px rgba(44, 122, 63, 0.3);
}

.btn-primary:hover {
  background-color: var(--green-dark);
}

.btn-outline {
  background-color: var(--white);
  color: var(--green-main);
  border: 1px solid var(--green-main);
  box-shadow: none;
}

.btn-outline:hover {
  background-color: var(--green-light);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-danger {
  background: transparent;
  color: #b91c1c;
  border: 1px solid #f87171;
  box-shadow: none;
}

.btn-danger:hover {
  background: #fef2f2;
}

/* ——— Карточки товаров ——— */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.product-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.product-image {
  position: relative;
  padding-top: 60%;
  background-color: var(--accent-beige);
}

.product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image.placeholder,
.product-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  min-height: 140px;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--accent-beige);
}

.product-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-title {
  margin: 0;
  font-size: 16px;
  color: var(--text-main);
}

.product-description,
.product-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  font-size: 13px;
}

.product-price,
.price {
  font-weight: 600;
  color: var(--green-dark);
  font-size: 15px;
}

.product-availability {
  padding: 3px 8px;
  border-radius: 999px;
  background-color: var(--green-light);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 500;
}

.product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.product-actions .add-to-cart-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.add-to-cart-row {
  width: 100%;
}

.qty-input {
  width: 56px;
  flex-shrink: 0;
}

.empty-state,
.empty-catalog {
  padding: 22px 18px;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

/* ——— Корзина ——— */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
  margin-top: 8px;
}

.cart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-row {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.cart-row-main {
  flex: 1 1 200px;
  min-width: 0;
}

.cart-row-title {
  margin: 0 0 4px;
  font-size: 16px;
}

.cart-row-meta {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.cart-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cart-qty-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-row-sum {
  font-weight: 700;
  color: var(--green-dark);
  min-width: 72px;
  text-align: right;
}

.cart-aside {
  position: sticky;
  top: 88px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.cart-total-line {
  display: flex;
  justify-content: space-between;
  font-size: 17px;
  margin: 0 0 14px;
}

.cart-checkout-btn {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
}

.cart-back {
  display: block;
  text-align: center;
  font-size: 14px;
}

.empty-cart-block {
  text-align: center;
  padding: 48px 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.empty-cart-block h2 {
  margin: 0 0 10px;
  color: var(--green-dark);
}

/* ——— Оформление заказа ——— */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 340px);
  gap: 22px;
  align-items: start;
  margin-top: 8px;
}

.checkout-form-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-soft);
}

.checkout-form .form-row {
  margin-bottom: 16px;
}

.checkout-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.input-field {
  width: 100%;
}

.field-errors {
  margin: 6px 0 0;
  font-size: 12px;
  color: #dc2626;
  font-weight: 500;
}

.checkout-form .form-row-error label {
  color: #b91c1c;
}

.checkout-form .form-row-error input[type="text"],
.checkout-form .form-row-error input[type="email"],
.checkout-form .form-row-error input[type="tel"],
.checkout-form .form-row-error textarea {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.35);
}

.checkout-form .form-row-error input:focus,
.checkout-form .form-row-error textarea:focus {
  border-color: #b91c1c;
  box-shadow: 0 0 0 1px rgba(185, 28, 28, 0.45);
}

.checkout-submit {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  font-size: 15px;
}

.checkout-aside {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 88px;
}

.checkout-aside h2 {
  margin: 0 0 12px;
  font-size: 17px;
  color: var(--green-dark);
}

.checkout-lines {
  list-style: none;
  margin: 0 0 12px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--border-soft);
}

.checkout-lines li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 8px 0;
  font-size: 13px;
  border-top: 1px solid var(--border-soft);
}

.checkout-lines li:first-child {
  border-top: 0;
}

.checkout-name {
  grid-column: 1 / -1;
  font-weight: 600;
}

.checkout-detail {
  color: var(--text-muted);
}

.checkout-line-sum {
  font-weight: 600;
  color: var(--green-dark);
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  margin: 0;
  font-size: 17px;
}

/* ——— Успех заказа ——— */
.success-block {
  max-width: 520px;
  margin: 32px auto;
  padding: 36px 32px;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  line-height: 72px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 36px;
  font-weight: 700;
}

.success-lead {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.5;
}

.success-details {
  margin: 0 0 22px;
  text-align: left;
  background: var(--bg-main);
  padding: 16px 18px;
  border-radius: var(--radius-md);
}

.success-details .success-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.success-details .success-row:last-child {
  border-bottom: 0;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ——— Контакты ——— */
.contacts-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-soft);
}

.contact-card h2 {
  margin: 0 0 12px;
  font-size: 17px;
  color: var(--green-dark);
}

.contact-card p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
}

.contacts-map-card {
  display: flex;
  flex-direction: column;
  padding-bottom: 18px;
}

.contacts-map-card .map-wrap {
  flex: 1;
  min-height: 420px;
}

.map-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: #eef2ea;
}

.contacts-page-grid .map-wrap iframe {
  display: block;
  width: 100%;
  height: 420px;
  min-height: 420px;
  border: 0;
}

.phone-link {
  color: var(--green-main);
  font-weight: 600;
  text-decoration: none;
}

.phone-link:hover {
  text-decoration: underline;
}

.contacts-feedback-card {
  grid-column: 1 / -1;
}

.contacts-feedback-lead {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.feedback-body-display {
  margin: 0 0 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.55;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
}

.success-row-message {
  border-bottom: 0;
  padding-bottom: 4px;
}

.success-row-message+.feedback-body-display {
  margin-top: -4px;
}

/* ——— Футер ——— */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #111827;
  color: #e5e7eb;
  padding: 32px 0 0;
  margin-top: 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  padding-bottom: 24px;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
  color: #ffffff;
}

.footer-text {
  font-size: 14px;
  line-height: 1.6;
  color: #d1d5db;
}

.footer-link {
  color: #4ade80;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #22c55e;
  text-decoration: underline;
}

.footer-note {
  margin-top: 4px;
  color: #9ca3af;
  font-size: 13px;
  font-style: italic;
}

.map-container {
  margin-top: 8px;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 250px;
  border: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 0;
  background-color: #0f172a;
  text-align: center;
}

.footer-bottom .footer-text {
  font-size: 12px;
  color: #9ca3af;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    flex-direction: column;
  }

  .about-columns {
    grid-template-columns: 1fr;
  }

  .cart-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .cart-aside,
  .checkout-aside {
    position: static;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .contacts-page-grid {
    grid-template-columns: 1fr;
  }

  .contacts-map-card .map-wrap {
    min-height: 320px;
  }

  .contacts-page-grid .map-wrap iframe {
    height: 320px;
    min-height: 320px;
  }

  .map-container iframe {
    height: 200px;
  }
}