/* Contacts page — isolated .fst-contacts-* */
body.fst-contacts-page .page-title {
  display: none;
}

/* Match .fs-hdr__inner: max-width 1300px + 20px side padding (border-box) */
body.fst-contacts-page .site-content.fixed,
body.fst-contacts-page .site-content {
  max-width: 1300px !important;
  width: 100% !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* Zero theme gutters on wrappers ONLY — NOT nested .fst-contacts-* cards
   (salon cards are also <article> and must keep premium inner padding). */
body.fst-contacts-page .site-content-inner,
body.fst-contacts-page .content-area,
body.fst-contacts-page #primary,
body.fst-contacts-page .site-main,
body.fst-contacts-page .entry-content,
body.fst-contacts-page .site-main > article,
body.fst-contacts-page article.type-page,
body.fst-contacts-page article.post {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

.fst-contacts {
  --fst-primary: #c41a5b;
  --fst-text: #1f2937;
  --fst-muted: #6b7280;
  --fst-card: #ffffff;
  --fst-border: #f1f1f5;
  --fst-border-soft: rgba(0, 0, 0, 0.06);
  --fst-badge-bg: #fdf2f6;
  --fst-radius: 16px;
  --fst-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);

  color: var(--fst-text);
  line-height: 1.6;
  font-family: inherit;
  max-width: none;
  width: 100%;
  margin: 0;
  /* Horizontal gutters live on .site-content to match header */
  padding: 8px 0 48px;
  box-sizing: border-box;
}

/* Force ≥24px inset on ALL content cards — beats any leftover page resets */
.fst-contacts-channel,
.fst-contacts-salon,
.fst-contacts-b2b__card,
.fst-contacts-form {
  padding: 24px !important;
  box-sizing: border-box !important;
}

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

.fst-contacts-hero {
  margin-bottom: 28px;
}

.fst-contacts-hero__title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--fst-text);
}

.fst-contacts-hero__lead {
  margin: 0 0 24px;
  max-width: 44rem;
  font-size: 1.05rem;
  color: var(--fst-muted);
}

.fst-contacts-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.fst-contacts-channel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--fst-card);
  border: 1px solid var(--fst-border);
  border-radius: var(--fst-radius);
  box-shadow: var(--fst-shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a.fst-contacts-channel:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
  border-color: rgba(196, 26, 91, 0.25);
}

.fst-contacts-channel__label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fst-primary);
}

.fst-contacts-channel__value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fst-text);
  line-height: 1.3;
}

.fst-contacts-channel__hint {
  font-size: 0.9rem;
  color: var(--fst-muted);
}

.fst-contacts-channel__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.fst-contacts-ms {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none !important;
  color: #fff !important;
  border: 0;
  transition: filter 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.fst-contacts-ms__icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.fst-contacts-ms:hover,
.fst-contacts-ms:focus,
.fst-contacts-ms:visited {
  color: #fff !important;
  filter: brightness(1.06);
}

.fst-contacts-ms--wa {
  background: #25d366;
}

.fst-contacts-ms--tg {
  background: #0088cc;
}

.fst-contacts-ms--max {
  background: linear-gradient(135deg, #6c4dff 0%, #9b4dff 45%, #ff7a3d 100%);
}

.fst-contacts-section {
  margin-top: 8px;
}

.fst-contacts-section + .fst-contacts-section {
  margin-top: 36px;
}

.fst-contacts-section__title {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 700;
  color: var(--fst-text);
}

.fst-contacts-section__lead {
  margin: 0 0 20px;
  color: var(--fst-muted);
  max-width: 40rem;
}

.fst-contacts-salons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: stretch;
}

.fst-contacts-salon {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
  align-items: stretch;
  height: 100%;
  background: var(--fst-card);
  border: 1px solid var(--fst-border);
  border-radius: var(--fst-radius);
  box-shadow: var(--fst-shadow);
  overflow: hidden;
}

.fst-contacts-salon__body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  height: 100%;
  align-self: stretch;
  text-align: left;
}

.fst-contacts-salon__title {
  margin: 0 0 14px;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: left;
}

.fst-contacts-salon__row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  justify-items: start;
  margin: 0 0 12px;
  line-height: 1.45;
  text-align: left;
}

.fst-contacts-salon__ico {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0;
  border-radius: 50%;
  background: var(--fst-badge-bg);
  color: var(--fst-primary);
  box-shadow: inset 0 0 0 1px rgba(196, 26, 91, 0.08);
}

.fst-contacts-salon__svg {
  display: block;
}

.fst-contacts-salon__row-text {
  grid-column: 2;
  min-width: 0;
  width: 100%;
  margin: 0;
  text-align: left;
}

.fst-contacts-salon__address {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fst-text);
}

.fst-contacts-salon__hours,
.fst-contacts-salon__features {
  color: var(--fst-muted);
}

.fst-contacts-salon__features .fst-contacts-salon__ico {
  margin-top: 1px;
}

.fst-contacts-salon__landmark {
  margin: -4px 0 12px;
  padding-left: calc(34px + 12px);
  color: var(--fst-muted);
  font-size: 0.95rem;
  text-align: left;
}

.fst-contacts-salon__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.fst-contacts-salon__media {
  position: relative;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  /* Fill full card row height (ratio lock caused uneven top gaps) */
  min-height: 0;
  height: 100%;
  align-self: stretch;
}

.fst-contacts-salon__zoom {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  color: inherit;
}

.fst-contacts-salon__zoom:focus-visible {
  outline: 2px solid var(--fst-primary, #c41a5b);
  outline-offset: -2px;
}

.fst-contacts-salon__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.35s ease;
}

/* Ново-Савиновский / Чистопольская 79 — show «Festival цветы» signage */
#fst-salon-novo .fst-contacts-salon__img {
  object-position: 18% 16%;
}

/* Приволжский — keep existing crop untouched */
#fst-salon-priv .fst-contacts-salon__img {
  object-position: center 28%;
}

.fst-contacts-salon__zoom:hover .fst-contacts-salon__img,
.fst-contacts-salon__zoom:focus-visible .fst-contacts-salon__img {
  transform: scale(1.03);
}

.fst-contacts-salon__zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.fst-contacts-salon__zoom:hover .fst-contacts-salon__zoom-hint,
.fst-contacts-salon__zoom:focus-visible .fst-contacts-salon__zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

.fst-contacts-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fst-contacts-lightbox[hidden] {
  display: none !important;
}

.fst-contacts-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.78);
  cursor: zoom-out;
}

.fst-contacts-lightbox__dialog {
  position: relative;
  z-index: 1;
  max-width: min(1120px, 100%);
  max-height: min(92vh, 100%);
  margin: 0;
}

.fst-contacts-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: min(88vh, 920px);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  background: #111;
  object-fit: contain;
}

.fst-contacts-lightbox__close {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.fst-contacts-lightbox__close:hover,
.fst-contacts-lightbox__close:focus-visible {
  background: var(--fst-primary, #c41a5b);
  color: #fff;
  outline: none;
}

body.fst-contacts-lightbox-open {
  overflow: hidden;
}

.fst-contacts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--fst-border-soft);
  background: #fff;
  color: var(--fst-text) !important;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.fst-contacts-btn:hover {
  border-color: rgba(196, 26, 91, 0.35);
  color: var(--fst-primary) !important;
}

/* Beat theme .entry-content a color — white text on magenta CTAs */
.fst-contacts-btn--primary,
.fst-contacts-btn--primary:link,
.fst-contacts-btn--primary:visited,
.fst-contacts a.fst-contacts-btn--primary,
.fst-contacts a.fst-contacts-btn--primary:link,
.fst-contacts a.fst-contacts-btn--primary:visited,
.entry-content .fst-contacts a.fst-contacts-btn--primary,
.entry-content .fst-contacts a.fst-contacts-btn--primary:visited {
  background: var(--fst-primary);
  border-color: var(--fst-primary);
  color: #ffffff !important;
}

.fst-contacts-btn--primary:hover,
.fst-contacts-btn--primary:focus,
.fst-contacts a.fst-contacts-btn--primary:hover,
.entry-content .fst-contacts a.fst-contacts-btn--primary:hover {
  background: #a8164c;
  border-color: #a8164c;
  color: #ffffff !important;
}

.fst-contacts-map {
  border-radius: var(--fst-radius);
  overflow: hidden;
  border: 1px solid var(--fst-border);
  box-shadow: var(--fst-shadow);
  min-height: 480px;
  background: #f8f8fa;
}

.fst-contacts-map ymaps,
.fst-contacts-map iframe,
.fst-contacts-map > ymaps {
  display: block !important;
  width: 100% !important;
}

/* B2B + form: side-by-side on desktop, equal card height */
.fst-contacts-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.fst-contacts-b2b__card,
.fst-contacts-form {
  background: var(--fst-card);
  border: 1px solid var(--fst-border);
  border-radius: var(--fst-radius);
  box-shadow: var(--fst-shadow);
  max-width: none;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  /* padding: 24px !important set above for all content cards */
}

.fst-contacts-b2b__card .fst-contacts-section__title,
.fst-contacts-form .fst-contacts-section__title {
  margin: 0 0 12px;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
}

.fst-contacts-form .fst-contacts-section__lead {
  margin: 0 0 16px;
}

.fst-contacts-b2b__name {
  margin: 0 0 14px;
  font-size: 1.15rem;
  font-weight: 700;
}

.fst-contacts-b2b__list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.fst-contacts-b2b__list li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--fst-border);
}

.fst-contacts-b2b__list li span {
  min-width: 72px;
  color: var(--fst-muted);
  font-size: 0.9rem;
}

.fst-contacts-b2b__list a {
  color: var(--fst-primary);
  text-decoration: none;
}

.fst-contacts-b2b__note {
  margin: 16px 0 0;
  color: var(--fst-muted);
  font-size: 0.95rem;
  margin-top: auto;
  padding-top: 16px;
}

.fst-contacts-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 16px;
}

.fst-contacts-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fst-muted);
}

.fst-contacts-field--full {
  grid-column: 1 / -1;
}

.fst-contacts-field--message {
  min-height: 0;
}

.fst-contacts-field--message textarea {
  flex: 1 1 auto;
  min-height: 110px;
  height: 100%;
  resize: vertical;
}

.fst-contacts-field input,
.fst-contacts-field select,
.fst-contacts-field textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 400;
  color: var(--fst-text);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fst-contacts-field input:focus,
.fst-contacts-field select:focus,
.fst-contacts-field textarea:focus {
  outline: none;
  border-color: rgba(196, 26, 91, 0.45);
  box-shadow: 0 0 0 3px rgba(196, 26, 91, 0.12);
}

.fst-contacts-form__footer {
  margin-top: auto;
}

.fst-contacts-form__submit {
  min-width: 200px;
}

.fst-contacts-form__msg {
  margin: 12px 0 0;
  font-weight: 600;
}

.fst-contacts-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  z-index: 99999;
  background: #1f2937;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.fst-contacts-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 900px) {
  .fst-contacts-channels,
  .fst-contacts-salons {
    grid-template-columns: 1fr;
  }

  .fst-contacts-salon {
    grid-template-columns: 1fr;
    gap: 14px;
    height: auto;
  }

  .fst-contacts-salon__body {
    height: auto;
  }

  .fst-contacts-salon__media {
    order: -1;
    height: auto;
    aspect-ratio: 16 / 10;
    max-height: 280px;
  }
}

@media (max-width: 991px) {
  .fst-contacts-duo {
    grid-template-columns: 1fr;
  }

  .fst-contacts-form__grid {
    grid-template-rows: none;
  }

  .fst-contacts-field--message textarea {
    height: auto;
    min-height: 120px;
  }
}

@media (max-width: 767px) {
  .fst-contacts {
    padding: 8px 16px 40px; /* mobile side gutter, match header */
  }
}

@media (max-width: 640px) {
  .fst-contacts-form__grid {
    grid-template-columns: 1fr;
  }

  .fst-contacts-salon__actions {
    flex-direction: column;
  }

  .fst-contacts-btn {
    width: 100%;
  }

  .fst-contacts-salon__zoom-hint {
    opacity: 1;
    transform: none;
  }

  .fst-contacts-lightbox {
    padding: 16px;
  }

  .fst-contacts-lightbox__close {
    top: 8px;
    right: 8px;
  }
}
