/* ============================================================
   WordPress: CF7, ассистент (карточки), страницы темы, 404
   (после синхронизации со wordpress-static)
   ============================================================ */

.contact-form-box textarea,
.contact-form-wrap .wpcf7-form textarea { resize: vertical; min-height: 5rem; }

/* Contact Form 7 — разметка как у статики */
.contact-form-box .wpcf7-form,
.contact-form-wrap .wpcf7-form,
.order-cf7-wrap .wpcf7-form {
  margin: 0;
}
.contact-form-box .wpcf7-form > p,
.contact-form-wrap .wpcf7-form > p,
.order-cf7-wrap .wpcf7-form > p {
  margin: 0;
}
.contact-form-box .wpcf7-form-control-wrap,
.contact-form-wrap .wpcf7-form-control-wrap,
.order-cf7-wrap .wpcf7-form-control-wrap {
  display: block;
}
.contact-form-box .wpcf7-form input.form-control,
.contact-form-box .wpcf7-form textarea.form-control,
.contact-form-wrap .wpcf7-form input.form-control,
.contact-form-wrap .wpcf7-form textarea.form-control,
.order-cf7-wrap .wpcf7-form input.form-control,
.order-cf7-wrap .wpcf7-form textarea.form-control,
.order-cf7-wrap .wpcf7-form select.form-control {
  width: 100%;
  box-sizing: border-box;
}
.contact-layout .contact-form-box .wpcf7-form .wpcf7-submit,
.order-cf7-wrap .wpcf7-form .wpcf7-submit {
  width: 100%;
  margin-top: .25rem;
  height: 2.75rem;
  font-size: .9375rem;
}
.contact-form-wrap .wpcf7-form .wpcf7-submit {
  margin-top: 1rem;
  height: 2.75rem;
  padding-inline: 2rem;
  width: auto;
  font-size: .9375rem;
}
.contact-form-box .wpcf7-response-output,
.contact-form-wrap .wpcf7-response-output,
.order-cf7-wrap .wpcf7-response-output {
  margin: .75rem 0 0;
  padding: 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  line-height: 1.5;
}
.contact-form-box .wpcf7-mail-sent-ok,
.contact-form-wrap .wpcf7-mail-sent-ok,
.order-cf7-wrap .wpcf7-mail-sent-ok {
  background: var(--green-10);
  border: 1px solid var(--green-20);
  color: var(--green);
  text-align: center;
  font-weight: 500;
}
.order-cf7-wrap .wpcf7-form-control-wrap:has(input[type="hidden"]) {
  display: none;
}

.contact-form-box input[type="submit"].wpcf7-submit,
.contact-form-wrap input[type="submit"].wpcf7-submit,
.order-cf7-wrap input[type="submit"].wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 600;
  border-radius: .5rem;
  border: 1.5px solid var(--green);
  background: var(--green);
  color: #fff;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.contact-form-box input[type="submit"].wpcf7-submit:hover,
.contact-form-wrap input[type="submit"].wpcf7-submit:hover,
.order-cf7-wrap input[type="submit"].wpcf7-submit:hover {
  background: #005a35;
  border-color: #005a35;
}

#order-popup .order-cf7-wrap.contact-form-box {
  background: transparent;
  border: none;
  padding: 0;
  margin-top: 0;
  box-shadow: none;
}
#order-popup .order-cf7-wrap fieldset.hidden-fields-container {
  border: 0;
  padding: 0;
  margin: 0 0 .25rem;
  min-inline-size: 0;
}
#order-popup .order-cf7-wrap fieldset.hidden-fields-container legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
#order-popup .order-cf7-wrap .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .625rem;
  margin-bottom: .625rem;
}
#order-popup .order-cf7-wrap .form-row > div {
  min-width: 0;
}
@media (max-width: 479px) {
  #order-popup .order-cf7-wrap .form-row {
    grid-template-columns: 1fr;
  }
}
#order-popup .order-cf7-wrap .form-label {
  display: block;
  font-size: .8125rem;
  font-weight: 500;
  margin-bottom: .25rem;
  color: var(--fg);
}
#order-popup .order-cf7-wrap .form-label .req {
  color: #dc2626;
  margin-left: .15rem;
}
#order-popup .order-cf7-wrap .wpcf7-form > p {
  margin-bottom: .625rem;
}
#order-popup .order-cf7-wrap .order-disclaimer {
  font-size: .7rem;
  color: var(--muted);
  margin: .5rem 0 .75rem;
  line-height: 1.5;
}
#order-popup .order-cf7-wrap .order-actions {
  display: flex;
  gap: .625rem;
  align-items: stretch;
  margin-top: .75rem;
}
#order-popup .order-cf7-wrap .order-actions .wpcf7-submit {
  flex: 1;
  width: auto !important;
  margin-top: 0 !important;
}
#order-popup .order-cf7-wrap .order-actions .order-panel-close {
  flex: 1;
  min-height: 2.75rem;
  font-weight: 600;
  border-radius: .5rem;
  cursor: pointer;
}
#order-popup #order-model-row .order-field {
  margin-bottom: .75rem;
}
#order-popup #order-model-row .order-field label {
  display: block;
  font-size: .8125rem;
  font-weight: 500;
  margin-bottom: .25rem;
  color: var(--fg);
}
#order-popup #order-model-row select.form-control {
  width: 100%;
  padding: .5rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: .5rem;
  font-size: .875rem;
  font-family: inherit;
  background: #fff;
  box-sizing: border-box;
}

.contact-form-wrap { background: var(--bg-gray); border-radius: var(--radius); border: 1px solid var(--border); padding: 2rem; }
.contact-form-wrap h2 { margin-bottom: 1.5rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }

/* Assistant: ответ с сеткой карточек товаров (REST) */
.msg-ai.assistant-msg-products {
  max-width: 100%;
  width: 100%;
  align-self: stretch;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: .5rem .625rem;
  background: #f3f4f6;
  overflow-x: hidden;
  overflow-y: visible;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.assistant-reply-text {
  font-size: .8125rem;
  line-height: 1.45;
  white-space: pre-wrap;
  margin-bottom: .5rem;
  word-break: break-word;
}
.assistant-results-line {
  font-size: .75rem;
  color: var(--text, #111827);
  margin: 0 0 .45rem;
  line-height: 1.4;
}
.assistant-results-line strong { font-weight: 700; }
.assistant-results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem;
  width: 100%;
  min-width: 0;
}
@media (max-width: 520px) {
  .assistant-results-grid { grid-template-columns: 1fr; }
}
.popup-panel .assistant-results-grid {
  grid-template-columns: 1fr;
  gap: .3rem;
}
.assistant-res-card {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: .375rem;
  padding: .4rem .5rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 0;
}
.assistant-res-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .35rem;
}
.assistant-res-title {
  font-weight: 600;
  font-size: .6875rem;
  line-height: 1.25;
  flex: 1;
  min-width: 0;
  color: var(--text, #111827);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.assistant-res-badge {
  font-size: .5rem;
  padding: .1rem .35rem;
  border-radius: 9999px;
  border: 1px solid var(--border, #e5e7eb);
  color: var(--muted, #6b7280);
  flex-shrink: 0;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.assistant-res-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .25rem;
  flex-wrap: wrap;
  margin-top: 0;
}
.assistant-res-features-btn {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-size: .5625rem;
  color: var(--muted, #6b7280);
  transition: color .12s;
  max-width: 55%;
}
.assistant-res-features-btn:hover { color: var(--text, #111827); }
.assistant-res-features-btn svg {
  width: .625rem;
  height: .625rem;
  stroke: currentColor;
  flex-shrink: 0;
}
.assistant-res-more {
  display: inline-flex;
  align-items: center;
  height: 1.35rem;
  padding: 0 .4rem;
  border-radius: .3rem;
  border: 1px solid var(--border, #e5e7eb);
  background: #fff;
  font-size: .5625rem;
  color: var(--text, #111827);
  text-decoration: none;
  white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.assistant-res-more:hover {
  background: var(--bg-gray, #f3f4f6);
  border-color: #d1d5db;
}
.assistant-res-features-body {
  display: none;
  flex-direction: column;
  gap: .2rem;
  font-size: .5625rem;
  color: var(--muted, #6b7280);
  line-height: 1.4;
  padding-top: .2rem;
  border-top: 1px dashed var(--border, #e5e7eb);
}
.assistant-res-features-body.is-open { display: flex; }
.assistant-res-features-body p {
  margin: 0;
  padding-left: .45rem;
  position: relative;
}
.assistant-res-features-body p::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--muted, #9ca3af);
}

/* ---------- WP: «О компании» (template-about) ---------- */
.page-template-template-about .page-hero { padding: 1.25rem 0; }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2.5rem; }
.about-stats-card { text-align: center; padding: 1.5rem 1rem; background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border); }
.about-stats-label { font-size: .875rem; color: var(--muted); margin-bottom: .25rem; }
.about-stats-val { font-size: 1.75rem; font-weight: 700; color: var(--green); line-height: 1.2; }
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; margin-bottom: 2.5rem; }
.about-layout--single { grid-template-columns: 1fr; }
.about-video { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.about-video iframe { width: 100%; aspect-ratio: 16/9; border: none; display: block; }
.about-body p,
.about-text .about-editor p { color: var(--muted); line-height: 1.7; margin-bottom: 1rem; }
.about-page .about-text .about-page__cta-row { margin-top: 1.5rem; }
.about-body p:last-child { margin-bottom: 0; }
@media (max-width: 767px) {
  .about-stats { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .about-stats-val { font-size: 1.25rem; }
  .about-stats-label { font-size: .75rem; }
  .about-layout { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 479px) { .about-stats { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.not-found-wrap {
  min-height: calc(100vh - 4.5rem - 280px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem 4rem;
}
.not-found-inner {
  text-align: center;
  max-width: 700px;
  width: 100%;
}
.cnc-scene {
  width: 100%;
  max-width: 680px;
  margin: 0 auto 1.75rem;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,.18));
}
@keyframes sl-a { 0%{transform:translate(0,0) scaleX(1);opacity:1} 100%{transform:translate(-22px,-26px) scaleX(.1);opacity:0} }
@keyframes sl-b { 0%{transform:translate(0,0) scaleX(1);opacity:1} 100%{transform:translate(16px,-32px) scaleX(.1);opacity:0} }
@keyframes sl-c { 0%{transform:translate(0,0) scaleX(1);opacity:1} 100%{transform:translate(30px,-12px) scaleX(.1);opacity:0} }
@keyframes sl-d { 0%{transform:translate(0,0) scaleX(1);opacity:1} 100%{transform:translate(28px, 12px) scaleX(.1);opacity:0} }
@keyframes sl-e { 0%{transform:translate(0,0) scaleX(1);opacity:1} 100%{transform:translate(-6px,-34px) scaleX(.1);opacity:0} }
@keyframes sl-f { 0%{transform:translate(0,0) scaleX(1);opacity:1} 100%{transform:translate(-32px, 6px) scaleX(.1);opacity:0} }
@keyframes sl-g { 0%{transform:translate(0,0) scaleX(1);opacity:1} 100%{transform:translate(10px,-30px) scaleX(.1);opacity:0} }
@keyframes sl-h { 0%{transform:translate(0,0) scaleX(1);opacity:1} 100%{transform:translate(-16px, 18px) scaleX(.1);opacity:0} }
@keyframes sl-i { 0%{transform:translate(0,0) scaleX(1);opacity:.9} 100%{transform:translate(20px, 22px) scaleX(.1);opacity:0} }
@keyframes sl-j { 0%{transform:translate(0,0) scaleX(1);opacity:1} 100%{transform:translate(-26px,-14px) scaleX(.1);opacity:0} }
.spark { transform-origin: 0 0; }
.sl-a { animation: sl-a .50s ease-out infinite; animation-delay:.00s }
.sl-b { animation: sl-b .65s ease-out infinite; animation-delay:.08s }
.sl-c { animation: sl-c .48s ease-out infinite; animation-delay:.17s }
.sl-d { animation: sl-d .70s ease-out infinite; animation-delay:.04s }
.sl-e { animation: sl-e .55s ease-out infinite; animation-delay:.25s }
.sl-f { animation: sl-f .72s ease-out infinite; animation-delay:.33s }
.sl-g { animation: sl-g .45s ease-out infinite; animation-delay:.12s }
.sl-h { animation: sl-h .68s ease-out infinite; animation-delay:.40s }
.sl-i { animation: sl-i .60s ease-out infinite; animation-delay:.20s }
.sl-j { animation: sl-j .53s ease-out infinite; animation-delay:.36s }
@keyframes tip-pulse {
  0%,100%{ opacity:.75; r:5 }
  50%    { opacity:1;   r:7 }
}
.tip-glow { animation: tip-pulse .3s ease-in-out infinite; }
@keyframes smoke-up {
  0%  { transform:translate(0,0) scale(.4); opacity:.4 }
  100%{ transform:translate(-6px,-28px) scale(1.6); opacity:0 }
}
.sm-a { animation: smoke-up 1.1s ease-out infinite; animation-delay:.0s }
.sm-b { animation: smoke-up 1.3s ease-out infinite; animation-delay:.45s }
.sm-c { animation: smoke-up  .95s ease-out infinite; animation-delay:.8s }
@keyframes arm-shake {
  0%,100%{ transform:translateX(0) }
  30%    { transform:translateX(.8px) }
  70%    { transform:translateX(-.8px) }
}
.cnc-head { animation: arm-shake .09s linear infinite }
@keyframes led-blink {
  0%,48%{ opacity:1 } 50%,98%{ opacity:.25 } 100%{ opacity:1 }
}
.led-blink { animation: led-blink 1.2s ease-in-out infinite }
.nf-eyebrow {
  font-size:.72rem; font-weight:700; text-transform:uppercase;
  letter-spacing:.16em; color:var(--green); margin-bottom:.4rem;
}
.nf-title {
  font-size:clamp(1.4rem,4vw,1.9rem); font-weight:700;
  color:var(--text); margin:0 0 .55rem;
}
.nf-desc {
  font-size:.975rem; color:var(--muted); line-height:1.65;
  margin:0 0 1.6rem;
}
.nf-actions {
  display:flex; gap:.7rem; justify-content:center;
  flex-wrap:wrap; margin-bottom:1.75rem;
}
.nf-links {
  padding-top:1.4rem; border-top:1px solid var(--border);
  display:flex; flex-wrap:wrap; gap:.35rem 1.2rem; justify-content:center;
}
.nf-links-label {
  width:100%; font-size:.68rem; text-transform:uppercase;
  letter-spacing:.12em; color:rgba(17,24,39,.28); font-weight:700;
  margin-bottom:.15rem;
}
.nf-links a {
  font-size:.85rem; color:var(--muted); text-decoration:none;
  display:inline-flex; align-items:center; gap:.28rem; transition:color .14s;
}
.nf-links a:hover { color:var(--green) }
