/* ==========================================================================
   DMGroup — reusable components
   Values taken from the Figma file (see figma-dmgroup/tree.mjs --props).
   ========================================================================== */

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: var(--r);
  font-size: var(--t-button-size);
  line-height: var(--t-button-lh);
  font-weight: var(--t-button-w);
  letter-spacing: var(--t-button-ls);
  border: 1px solid transparent;
  text-align: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--c-accent);
  color: var(--c-bg);
}
.btn--primary:hover { background: #f0a077; }

.btn--ghost {
  border-color: var(--c-rule-3);
  color: var(--c-text);
}
.btn--ghost:hover { border-color: var(--c-muted); }

.btn--block { width: 100%; }

.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* --- text link ---------------------------------------------------------- */

.link {
  color: var(--c-accent);
  font-size: var(--t-button-size);
  line-height: var(--t-button-lh);
  font-weight: var(--t-button-w);
}
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --- rules / labels ----------------------------------------------------- */

.rule { height: 1px; background: var(--c-rule); border: 0; }
.rule--strong { background: var(--c-rule-2); }

.label {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 14px;
  font-weight: 400;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--c-accent);
}
.label--dim { color: var(--c-dim); letter-spacing: 1.2px; }

/* --- header ------------------------------------------------------------- */

.site-header { border-bottom: 1px solid var(--c-rule); }
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding-block: 22px;
}
.brand { display: inline-flex; align-items: center; gap: 16px; }
.brand__name {
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--c-text);
}
.brand__city {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--c-accent);
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 14px; line-height: 18px; color: var(--c-muted); }
.nav a:hover { color: var(--c-text); }
.nav a.is-active, .nav .current-menu-item > a { color: var(--c-text); }

/* --- footer ------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--c-rule); }
.site-footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 18px;
  font-size: 14px;
  line-height: 18px;
  color: var(--c-muted);
}
.site-footer__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  color: var(--c-dim);
}
.site-footer a:hover { color: var(--c-text); }

/* --- catalog card -------------------------------------------------------
   Desktop anatomy, from the Каталог frame: well 140 high with 10px side
   padding, meta padded 10/12/12/12 with a 6px gap. The mobile frame uses a
   120-high well and a larger name — see the media query at the end.
   ------------------------------------------------------------------------ */

.card {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border-radius: var(--r);
  overflow: hidden;
  color: inherit;
  transition: background-color .15s ease;
}
.card:hover { background: #201d1a; }

.card__well {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-well);
  padding-inline: 10px;
  height: 140px;
  flex: 0 0 auto;
}
.card__well img { width: 100%; height: 100%; object-fit: contain; }
.card__well--empty::after {
  content: "";
  width: 40px; height: 1px; background: var(--c-rule-2);
}

.card__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 12px;
}
.card__name {
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: var(--c-text-alt);
}
.card__price {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--t-price-size);
  line-height: var(--t-price-lh);
  font-weight: var(--t-price-w);
  color: var(--c-text-alt);
}
.card__unit {
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
  letter-spacing: 1.2px;
  color: var(--c-label);
}
.card__note {
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
  letter-spacing: 1.2px;
  color: var(--c-label);
}

@media (max-width: 900px) {
  .card__well { height: 120px; padding-inline: 8px; }
  .card__meta { gap: 4px; padding: 8px 10px 10px; }
  .card__name { font-size: var(--t-price-size); line-height: var(--t-price-lh); font-weight: 600; }
}

/* --- spec / line rows --------------------------------------------------- */

.line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
  border-bottom: 1px solid var(--c-rule);
}
.line__value { color: var(--c-label); font-size: 14px; }

/* --- form controls ------------------------------------------------------ */

.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--c-accent);
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--c-well);
  border: 1px solid var(--c-rule-2);
  border-radius: var(--r);
  padding: 12px;
  color: var(--c-text);
  font-size: 15px;
  line-height: 20px;
}
.field input::placeholder, .field textarea::placeholder { color: var(--c-dim); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--c-accent);
}
.field textarea { resize: vertical; min-height: 96px; }
.field--invalid input, .field--invalid textarea, .field--invalid select { border-color: #d9534f; }

.form__note { font-size: 13px; line-height: 18px; color: var(--c-dim); }
.form__status { font-size: 14px; line-height: 20px; }
.form__status--ok { color: var(--c-accent); }
.form__status--err { color: #e08b7a; }
