/*
Theme Name: Своя грядка
Author: Garden Community
Description: Адаптивная тема для тематического сообщества садоводов и магазина.
Version: 1.1.8
Text Domain: svoya-gryadka
*/

:root {
  --ink: #203126;
  --muted: #69756d;
  --cream: #f6f2e8;
  --paper: #fffdf8;
  --green: #2e6842;
  --green-dark: #19472c;
  --lime: #dce9a4;
  --orange: #e58a43;
  --line: #dfe5dc;
  --shadow: 0 18px 50px rgba(32, 49, 38, .10);
  --radius: 24px;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; }
.wrap { width: min(calc(100% - 32px), var(--wrap)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(46, 104, 66, .12);
  background: rgba(246, 242, 232, .92);
  backdrop-filter: blur(14px);
}
.header-inner { height: 76px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 850; font-size: 20px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 50%;
  display: block; overflow: hidden; flex: 0 0 38px;
  background: var(--green);
  box-shadow: 0 6px 18px rgba(25, 71, 44, .16);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.main-nav { display: flex; gap: 24px; margin-left: auto; font-weight: 650; }
.main-nav a:hover { color: var(--green); }
.header-actions { display: flex; gap: 10px; }
.button, button, input[type="submit"] {
  appearance: none; border: 0; border-radius: 999px; cursor: pointer;
  padding: 12px 20px; font-weight: 750; color: #fff; background: var(--green);
  transition: transform .2s, background .2s;
}
.button:hover, button:hover, input[type="submit"]:hover { transform: translateY(-1px); background: var(--green-dark); }
.button-ghost { color: var(--green-dark); background: #e6ecdf; }
.button-light { color: var(--green-dark); background: #fff; }
.menu-toggle { display: none; padding: 9px 12px; }

.hero { padding: 52px 0 34px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; }
.hero-copy {
  min-height: 470px; border-radius: 34px; padding: 58px;
  color: #fff; background:
    radial-gradient(circle at 85% 15%, rgba(220,233,164,.5), transparent 26%),
    linear-gradient(140deg, var(--green-dark), var(--green));
  position: relative; overflow: hidden;
}
.hero-copy > * { position: relative; z-index: 1; }
.hero-copy::after {
  content: ""; position: absolute; width: 330px; height: 330px; right: -95px; bottom: -130px;
  border-radius: 50%; border: 48px solid rgba(255,255,255,.08);
  pointer-events: none; z-index: 0;
}
.eyebrow { margin: 0 0 14px; color: var(--orange); font-size: 13px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.hero-copy .eyebrow { color: var(--lime); }
h1, h2, h3 { margin-top: 0; line-height: 1.08; letter-spacing: -.035em; }
h1 { max-width: 720px; margin-bottom: 20px; font-size: clamp(42px, 6vw, 72px); }
h2 { font-size: clamp(30px, 4vw, 46px); }
h3 { font-size: 22px; }
.hero-copy p { max-width: 600px; color: rgba(255,255,255,.8); font-size: 18px; }
.hero-buttons { display: flex; gap: 10px; margin-top: 30px; }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 24px; }
.hero-card {
  border-radius: 30px; padding: 30px; background: var(--paper);
  box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: space-between;
}
.hero-stat { color: var(--green); font-size: 54px; font-weight: 900; line-height: 1; }
.hero-card.accent { background: var(--lime); box-shadow: none; }

.section { padding: 54px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.section-head h2, .section-head p { margin-bottom: 0; }
.section-head p { max-width: 500px; color: var(--muted); }
.editorial-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 20px; }
.article-card {
  overflow: hidden; border-radius: var(--radius); background: var(--paper);
  box-shadow: 0 10px 35px rgba(32,49,38,.07);
}
.article-card img, .article-placeholder { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: linear-gradient(135deg, #b7cf99, #5f8f69); }
.article-card:first-child img, .article-card:first-child .article-placeholder { aspect-ratio: 16/9; }
.article-body { padding: 22px; }
.article-meta { margin-bottom: 10px; color: var(--orange); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.article-body h3 { margin-bottom: 10px; }
.article-body p { margin: 0; color: var(--muted); }

.community-zone { background: #e9eee4; }
.community-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.community-feed { display: grid; gap: 16px; }
.community-post { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--paper); }
.sidebar-card + .community-post,
.community-post + .community-post { margin-top: 18px; }
.post-author { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.avatar, .post-author img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--lime); }
.avatar-placeholder {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  color: var(--green-dark); font-weight: 900; line-height: 1;
}
.post-author strong, .post-author small { display: block; }
.post-author small { color: var(--muted); }
.author-avatar, .author-name { display: inline-flex; color: inherit; }
.author-name:hover, .community-post h3 a:hover, .post-actions a:hover { color: var(--green); }
.community-post h3 { margin-bottom: 8px; }
.community-post-image-link {
  position: relative; display: block; margin: 16px 0; border-radius: 18px; overflow: hidden;
}
.community-post-image-link span {
  position: absolute; right: 12px; bottom: 12px; border-radius: 999px; padding: 8px 12px;
  color: #fff; background: rgba(23, 42, 30, .82); font-size: 13px; font-weight: 800;
}
.community-post-image { margin: 0; max-height: 440px; object-fit: cover; width: 100%; }
.single-post-image-link { margin-bottom: 24px; }
.post-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; color: var(--muted); font-size: 14px; }
.like-button { padding: 8px 13px; color: var(--green-dark); background: #edf2e9; }
.sidebar-card { position: sticky; top: 100px; border-radius: var(--radius); padding: 26px; background: var(--green-dark); color: #fff; }
.sidebar-card p { color: rgba(255,255,255,.7); }
.sidebar-card .button { width: 100%; text-align: center; background: var(--lime); color: var(--green-dark); }

.shop-grid, .products { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 0 !important; }
.product-card, .woocommerce ul.products li.product {
  width: auto !important; margin: 0 !important; border-radius: var(--radius); padding: 16px !important;
  background: var(--paper); box-shadow: 0 10px 35px rgba(32,49,38,.07); list-style: none;
}
.product-card .product-image { border-radius: 16px; aspect-ratio: 1; background: linear-gradient(145deg, #eef1d5, #b7cf99); display: grid; place-items: center; font-size: 58px; }
.product-card h3 { margin: 18px 0 8px; }
.price { color: var(--green); font-size: 20px; font-weight: 850; }

.content-card { margin: 46px auto; border-radius: var(--radius); padding: clamp(24px, 5vw, 56px); background: var(--paper); box-shadow: var(--shadow); }
.content-card input, .content-card textarea, .community-form input, .community-form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; color: var(--ink); background: #fff;
}
.community-form { display: grid; gap: 14px; }
.community-form label { display: grid; gap: 7px; font-weight: 750; }
.community-form small { color: var(--muted); font-weight: 500; }
.notice { border-radius: 14px; padding: 13px 16px; background: #e3efd9; }
.notice.error { background: #f7dfd7; }
.account-page h1 { margin-bottom: 18px; font-size: clamp(34px, 7vw, 54px); }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.account-form {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff;
}
.account-form h2, .account-form p { margin-bottom: 0; }
.account-profile { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.account-profile h2 { margin-bottom: 6px; font-size: clamp(28px, 8vw, 44px); }
.account-profile p { margin: 0; color: var(--muted); }
.account-avatar { width: 76px; height: 76px; flex: 0 0 76px; border-radius: 50%; overflow: hidden; }
.account-avatar img,
.account-avatar .avatar-placeholder { display: grid; width: 100% !important; height: 100% !important; max-width: none; border-radius: 50%; object-fit: cover; background: var(--lime); font-size: 28px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.checkbox-line { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.checkbox-line input { width: auto; }
.comments-area { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.comments-area h2 { margin-bottom: 18px; }
.comment-list { display: grid; gap: 14px; margin: 0 0 28px; padding: 0; list-style: none; }
.comment-list .children { display: grid; gap: 12px; margin: 14px 0 0 28px; padding: 0; list-style: none; }
.comment-card {
  border: 1px solid var(--line); border-radius: 20px; padding: 16px; background: #fff;
}
.comment-author-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.comment-author-row strong,
.comment-author-row a { color: var(--green-dark); }
.comment-date { display: block; margin-top: 3px; color: var(--muted) !important; font-size: 14px; font-weight: 500; }
.comment-text { color: var(--ink); }
.comment-text p { margin: 0 0 10px; }
.comment-text p:last-child { margin-bottom: 0; }
.comment-actions { margin-top: 12px; font-weight: 750; }
.comment-actions a { color: var(--green); }
.comments-empty { color: var(--muted); }
.comment-form-card { margin-top: 30px; border-radius: var(--radius); padding: 22px; background: #f7f8f2; }
.comment-form-card h3 { margin-bottom: 16px; }
.comment-form .logged-in-as,
.comment-form .comment-notes { margin: 0 0 12px; color: var(--muted); }
.comment-form .form-submit { margin: 0; }
.author-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.author-hero img { width: 74px; height: 74px; border-radius: 50%; }
.author-hero .avatar-placeholder { width: 74px; height: 74px; font-size: 28px; }
.author-hero h1, .author-hero p { margin-bottom: 0; }
.garden-lightbox-open { overflow: hidden; }
.garden-lightbox {
  position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center;
  padding: 18px; background: rgba(10, 18, 13, .88);
}
.garden-lightbox.is-open { display: flex; }
.garden-lightbox figure { width: min(100%, 1080px); margin: 0; }
.garden-lightbox img { max-height: 82vh; width: 100%; object-fit: contain; border-radius: 18px; background: #111; }
.garden-lightbox figcaption { margin-top: 10px; color: #fff; text-align: center; font-weight: 750; }
.garden-lightbox-close {
  position: fixed; top: 14px; right: 14px; padding: 10px 16px; color: var(--green-dark); background: #fff;
}

.site-footer { padding: 48px 0 24px; color: rgba(255,255,255,.72); background: #172a1e; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(2, .7fr); gap: 28px; }
.site-footer .brand { color: #fff; }
.footer-links { display: grid; gap: 8px; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; }

@media (max-width: 900px) {
  .main-nav, .header-actions { display: none; }
  .main-nav.is-open { position: absolute; z-index: 30; inset: 76px 16px auto; display: grid; padding: 22px; border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
  .menu-toggle { display: block; margin-left: auto; }
  .hero-grid, .community-layout { grid-template-columns: 1fr; }
  .hero-copy { min-height: 410px; padding: 38px; }
  .hero-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .editorial-grid { grid-template-columns: 1fr 1fr; }
  .editorial-grid .article-card:first-child { grid-column: 1 / -1; }
  .shop-grid, .products { grid-template-columns: repeat(2, 1fr); }
  .sidebar-card { position: static; margin-bottom: 18px; }
}

@media (max-width: 600px) {
  .wrap { width: min(calc(100% - 22px), var(--wrap)); }
  .hero { padding-top: 20px; }
  .hero-copy { min-height: 440px; padding: 28px 22px; border-radius: 24px; }
  h1 { font-size: 43px; }
  .account-page h1 { font-size: 38px; }
  .hero-buttons, .section-head { align-items: stretch; flex-direction: column; }
  .hero-buttons .button { text-align: center; }
  .hero-side, .editorial-grid, .shop-grid, .products, .footer-grid { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .account-form { padding: 16px; }
  .account-profile { align-items: center; }
  .account-actions .button { width: 100%; text-align: center; }
  .editorial-grid .article-card:first-child { grid-column: auto; }
  .section { padding: 38px 0; }
  .community-post { padding: 16px; }
  .comment-form-card { padding: 16px; }
  .comment-list .children { margin-left: 14px; }
  .post-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .post-actions a, .post-actions button { width: 100%; justify-content: center; text-align: center; }
  .community-post-image-link span { right: 10px; bottom: 10px; }
  .garden-lightbox { padding: 10px; }
  .garden-lightbox img { max-height: 78vh; border-radius: 14px; }
}
