/* grlnd_solutions — "Готовые решения" (/gotovye-resheniya/).
   Runs inside .cart-v2, which supplies the design-system tokens and the fixes for the
   site-global overrides (Poppins on h1-h6, Lato on controls, #content gutter/row-gap).
   Everything here is scoped to .solutions-v2 / .solutions so it can never leak out.

   Fonts: Inter (UI) + IBM Plex Mono (meta) — both loaded in /gotovye-resheniya/index.php.
   The brand mark on buttons is the Green Land logo used as a CSS mask, so it inherits
   currentColor (white on the green button, accent-green in the modal). */

.solutions-v2 { --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

/* the site's global h1-h6 rule (Poppins !important, no Cyrillic subset) reaches h3s
   rendered by this template too — re-declare, same scoped-!important pattern as the cart */
.solutions-v2 .solutions h2,
.solutions-v2 .solutions h3,
.solutions-v2 .sol-modal h2,
.solutions-v2 .sol-modal h3 {
  font-family: var(--font) !important;
  color: var(--fg) !important;
  text-transform: none !important;
  text-align: left !important;
  letter-spacing: -0.01em !important;
  line-height: 1.3 !important;
  margin: 0 !important;
}

/* ── page head + note ─────────────────────────────── */
.solutions-v2 .sol-page-head { display: flex; flex-direction: column; gap: var(--space-sm); margin-bottom: var(--space-lg); }
.solutions-v2 .sol-page-title { font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
.solutions-v2 .sol-page-sub { margin: 0; color: var(--fg-muted); font-size: var(--fs-base); max-width: 62ch; }

.solutions-v2 .sol-note {
  border: var(--hairline-w) solid var(--hairline);
  border-left: 3px solid var(--accent);
  padding: var(--space-lg);
  display: flex; flex-direction: column; gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  max-width: 82ch;
}
.solutions-v2 .sol-note p { margin: 0; font-size: var(--fs-sm); line-height: 1.55; color: var(--fg-2); }
.solutions-v2 .sol-note p.strong { color: var(--fg); font-weight: 600; }
.solutions-v2 .sol-note-inc { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.solutions-v2 .sol-note-inc span { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--fg-2); }
/* 18px, not 16: the Iconify marks (flower-pot / plant / soil) carry more detail than the
   hand-drawn ones they replaced and go muddy below 18 */
.solutions-v2 .sol-note-inc svg { width: 18px; height: 18px; color: var(--accent); flex: none; }

/* ── brand mark (Green Land logo as a mask → takes currentColor) ── */
.solutions-v2 .gl-mark {
  width: 18px; height: 18px; flex: none; display: inline-block;
  background: currentColor;
  -webkit-mask: url(/local/templates/grland_main/images/gl-mark.png) center / contain no-repeat;
          mask: url(/local/templates/grland_main/images/gl-mark.png) center / contain no-repeat;
}
.solutions-v2 .gl-mark--green { color: var(--accent); }
.solutions-v2 .gl-mark--lg { width: 40px; height: 40px; }

/* ── toolbar / filters ────────────────────────────── */
.solutions-v2 .sol-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md); flex-wrap: wrap;
  padding-bottom: var(--space-md); margin-bottom: var(--space-lg);
  border-bottom: var(--hairline-w) solid var(--hairline);
}
.solutions-v2 .sol-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); min-width: 0; }
.solutions-v2 .sol-filter-label {
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--fg-muted); margin-right: var(--space-xs);
}
.solutions-v2 .sol-chip {
  min-height: 38px; padding: 0 14px; background: var(--bg);
  border: var(--hairline-w) solid var(--hairline-strong); color: var(--fg-2);
  font-size: var(--fs-sm); font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: border-color .15s ease, color .15s ease;
}
.solutions-v2 .sol-chip:hover { border-color: var(--fg); color: var(--fg); }
.solutions-v2 .sol-chip[aria-pressed="true"] { border-color: var(--fg); color: var(--fg); font-weight: 600; }
.solutions-v2 .sol-chip .c { font-size: var(--fs-xs); color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.solutions-v2 .sol-count { margin: 0; font-size: var(--fs-sm); color: var(--fg-muted); }

/* ── grid + card ──────────────────────────────────── */
.solutions-v2 .sol-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); }
.solutions-v2 .sol-card {
  display: flex; flex-direction: column; min-width: 0;
  border: var(--hairline-w) solid var(--hairline); background: var(--bg);
  transition: border-color .15s ease;
}
.solutions-v2 .sol-card:hover { border-color: var(--hairline-strong); }
.solutions-v2 .sol-card[hidden] { display: none; }

.solutions-v2 .sol-thumb {
  aspect-ratio: 1 / 1; background: var(--bg);
  border-bottom: var(--hairline-w) solid var(--hairline); overflow: hidden;
}
.solutions-v2 .sol-thumb img {
  width: 100%; height: 100%; display: block;
  object-fit: contain;             /* server-side resize is PROPORTIONAL — never cover, or it double-crops */
  transition: transform .35s ease;
}
.solutions-v2 .sol-card:hover .sol-thumb img { transform: scale(1.03); }
.solutions-v2 .sol-body { flex: 1; padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-md); }
/* the card's eyebrow IS its h3, so it has to out-specify the heading normalisation above
   (.solutions-v2 .solutions h3 = 0,2,1) — hence the element+class selector (0,3,1) */
.solutions-v2 .solutions h3.sol-eyebrow {
  font-family: var(--font-mono) !important; font-size: var(--fs-xs) !important;
  font-weight: 400 !important; letter-spacing: 0.06em !important; color: #a0a0a0 !important;
}
.solutions-v2 .sol-specs { margin: 0; display: flex; flex-direction: column; gap: var(--space-sm); }
.solutions-v2 .sol-srow { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: var(--space-md); align-items: baseline; }
.solutions-v2 .sol-srow dt { font-size: var(--fs-xs); color: var(--fg-muted); }
.solutions-v2 .sol-srow dd { margin: 0; font-size: var(--fs-sm); font-weight: 500; color: var(--fg); line-height: 1.4; }

.solutions-v2 .sol-foot {
  border-top: var(--hairline-w) solid var(--hairline); padding: var(--space-md);
  display: flex; flex-direction: column; gap: var(--space-md);
}
.solutions-v2 .sol-price { display: flex; flex-direction: column; gap: 3px; }
.solutions-v2 .sol-price .plabel { font-size: var(--fs-xs); color: var(--fg-muted); }
.solutions-v2 .sol-price .pnow { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.solutions-v2 .sol-btn {
  width: 100%; min-height: var(--touch); border: 0; background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s ease;
}
.solutions-v2 .sol-btn:hover { background: var(--accent-hover); }

/* ── modal ────────────────────────────────────────── */
.solutions-v2 .sol-modal-back {
  position: fixed; inset: 0; background: rgba(17, 17, 17, .55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: var(--space-lg); overflow-y: auto; z-index: 1000;
}
.solutions-v2 .sol-modal-back[hidden] { display: none; }
.solutions-v2 .sol-modal {
  background: var(--bg); border: var(--hairline-w) solid var(--hairline-strong);
  width: 100%; max-width: 460px; margin: auto;
}
.solutions-v2 .sol-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-md);
  padding: var(--space-lg); border-bottom: var(--hairline-w) solid var(--hairline);
}
.solutions-v2 .sol-modal-eyebrow {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-hover);
}
.solutions-v2 .sol-modal-title { font-size: var(--fs-xl); font-weight: 600; }
.solutions-v2 .sol-modal-close {
  flex: none; width: 32px; height: 32px; line-height: 1; font-size: 20px;
  border: var(--hairline-w) solid var(--hairline); background: var(--bg); color: var(--fg-2);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s ease, color .15s ease;
}
.solutions-v2 .sol-modal-close:hover { border-color: var(--fg); color: var(--fg); }

.solutions-v2 .sol-modal-body,
.solutions-v2 .sol-done { padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md); }
.solutions-v2 .sol-modal-body[hidden],
.solutions-v2 .sol-done[hidden] { display: none; }
.solutions-v2 .sol-done { align-items: center; text-align: center; padding: var(--space-xl) var(--space-lg); }
.solutions-v2 .sol-done p { margin: 0; font-size: var(--fs-sm); color: var(--fg-muted); }

.solutions-v2 .sol-sum { background: var(--surface-sub); padding: var(--space-md); display: flex; flex-direction: column; gap: 4px; }
.solutions-v2 .sol-sum .s1 { font-size: var(--fs-sm); color: var(--fg-2); }
.solutions-v2 .sol-sum .s2 { font-size: var(--fs-lg); font-weight: 600; }

.solutions-v2 .sol-field { display: flex; flex-direction: column; gap: 6px; }
.solutions-v2 .sol-field label { font-size: var(--fs-sm); font-weight: 500; color: var(--fg-2); }
.solutions-v2 .sol-field label .opt { color: var(--fg-muted); font-weight: 400; }
.solutions-v2 .sol-field input,
.solutions-v2 .sol-field textarea {
  width: 100%; height: var(--touch); padding: 0 14px;
  border: var(--hairline-w) solid var(--hairline-strong); background: var(--bg);
  font-size: var(--fs-base); color: var(--fg); box-sizing: border-box;
}
.solutions-v2 .sol-field textarea { height: auto; min-height: 76px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.solutions-v2 .sol-field input:focus,
.solutions-v2 .sol-field textarea:focus { outline: 0; border-color: var(--accent); }
.solutions-v2 .sol-field.err input,
.solutions-v2 .sol-field.err textarea { border-color: var(--danger); }

.solutions-v2 .sol-consent { display: flex; align-items: flex-start; gap: var(--space-sm); cursor: pointer; }
.solutions-v2 .sol-consent input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.solutions-v2 .sol-consent span { font-size: var(--fs-xs); color: var(--fg-muted); line-height: 1.45; }
.solutions-v2 .sol-consent a { color: var(--accent-hover); }

.solutions-v2 .sol-error { margin: 0; font-size: var(--fs-sm); color: var(--danger); }
.solutions-v2 .sol-error[hidden] { display: none; }
.solutions-v2 .sol-hint { margin: 0; font-size: var(--fs-xs); color: var(--fg-muted); line-height: 1.45; }
.solutions-v2 .sol-submit {
  width: 100%; min-height: 52px; border: 0; background: var(--accent); color: #fff;
  font-size: var(--fs-base); font-weight: 600; cursor: pointer; transition: background .15s ease;
}
.solutions-v2 .sol-submit:hover:not(:disabled) { background: var(--accent-hover); }
.solutions-v2 .sol-submit:disabled { opacity: .6; cursor: default; }

/* honeypot — off-screen, never focusable by sighted users */
.solutions-v2 .sol-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── tablet ───────────────────────────────────────── */
@media (max-width: 1100px) {
  .solutions-v2 .sol-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── mobile ───────────────────────────────────────── */
@media (max-width: 700px) {
  .solutions-v2 .sol-page-title { font-size: 26px; }
  .solutions-v2 .sol-page-sub { font-size: var(--fs-sm); }
  .solutions-v2 .sol-note { padding: var(--space-md); margin-bottom: var(--space-lg); }
  .solutions-v2 .sol-note-inc { gap: var(--space-sm) var(--space-md); }

  /* Chips scroll sideways instead of wrapping into three rows.
     The toolbar goes back to block layout here: as a column flex container it sized the
     chip strip to its max-content (404px on a 360px screen) instead of clipping it, so
     the strip pushed past the viewport instead of scrolling inside itself. */
  .solutions-v2 .sol-toolbar { display: block; }
  .solutions-v2 .sol-filters {
    width: 100%; max-width: 100%;
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px; margin-bottom: var(--space-sm);
  }
  .solutions-v2 .sol-count { width: 100%; max-width: 100%; }
  .solutions-v2 .sol-filters::-webkit-scrollbar { display: none; }
  .solutions-v2 .sol-filter-label { display: none; }
  .solutions-v2 .sol-chip { min-height: var(--touch); }
  .solutions-v2 .sol-count { font-size: var(--fs-xs); }

  .solutions-v2 .sol-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
  /* The renders are square, so a 4:3 thumb (tried first, for a shorter card) letterboxed them:
     the pot shrank to the box height and left ~40px of dead space on each side. Square box =
     the image uses the full card width. */
  .solutions-v2 .sol-thumb { aspect-ratio: 1 / 1; }
  .solutions-v2 .sol-price .pnow { font-size: 20px; }
}

@media (max-width: 480px) {
  /* label above value: 118px of label column eats the line at 360px wide */
  .solutions-v2 .sol-srow { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .solutions-v2 .sol-srow dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
}

/* modal → bottom sheet on phones */
@media (max-width: 640px) {
  .solutions-v2 .sol-modal-back { padding: 0; align-items: flex-end; }
  .solutions-v2 .sol-modal { max-width: none; margin: 0; max-height: 94vh; overflow-y: auto; border: 0; border-top: 3px solid var(--accent); }
  .solutions-v2 .sol-modal-head { position: sticky; top: 0; background: var(--bg); z-index: 1; }
  .solutions-v2 .sol-modal-close { width: var(--touch); height: var(--touch); }
  /* 16px keeps iOS Safari from zooming the viewport on focus */
  .solutions-v2 .sol-field input,
  .solutions-v2 .sol-field textarea { font-size: 16px !important; }
  .solutions-v2 .sol-submit { min-height: var(--touch); }
}

@media (prefers-reduced-motion: reduce) {
  .solutions-v2 .sol-thumb img,
  .solutions-v2 .sol-card,
  .solutions-v2 .sol-btn,
  .solutions-v2 .sol-submit { transition: none; }
}
