/*
 * MFM CODEX BASELINE-0
 * Staging-derived visual foundation for the accepted Phase 3 catalog contract.
 * Scope is limited to catalog cards, Services, Price, virtual service detail,
 * and the Phase 3 booking fields. Business data remains server-owned.
 */

.mfm-catalog-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(219, 171, 98, .2);
  border-radius: 22px;
  background: linear-gradient(180deg, #17100d 0%, #090807 88%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}

.mfm-catalog-card .gx74-media {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3.7;
  overflow: hidden;
  background: #0d0a08;
}

.mfm-catalog-card .gx74-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.mfm-catalog-card:hover .gx74-media img {
  transform: scale(1.025);
}

.mfm-catalog-card .gx74-body {
  display: flex;
  min-height: 220px;
  flex: 1;
  flex-direction: column;
  padding: 20px 19px 18px;
  background: linear-gradient(180deg, #130d0b, #080706);
}

.mfm-catalog-card .gx74-body h3 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.15;
}

.mfm-catalog-card .gx74-body p {
  margin: 0 0 20px;
  color: #b8ada4;
  font-size: 13px;
  line-height: 1.65;
}

.mfm-catalog-card .gx74-bottom {
  margin-top: auto;
}

.mfm-catalog-card .gx74-price strong {
  font-size: 15px;
  line-height: 1.25;
}

.mfm-catalog-card .gx74-price span {
  display: block;
  margin-top: 4px;
  opacity: .68;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.home .mfm-home-services-unified .mfm-services-grid-live[data-mfm-catalog-count="5"],
.mfm-page-standard--services .mfm-services-grid-live[data-mfm-catalog-count="5"] {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

body.home .mfm-home-services-unified .mfm-services-grid-live[data-mfm-catalog-count="5"] > .mfm-catalog-card,
.mfm-page-standard--services .mfm-services-grid-live[data-mfm-catalog-count="5"] > .mfm-catalog-card {
  grid-column: span 3;
}

body.home .mfm-home-services-unified .mfm-services-grid-live[data-mfm-catalog-count="5"] > .mfm-catalog-card:nth-child(5),
.mfm-page-standard--services .mfm-services-grid-live[data-mfm-catalog-count="5"] > .mfm-catalog-card:nth-child(5) {
  grid-column: 5 / span 4;
}

.mfm-services-group-grid--phase3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mfm-services-group-card.is-therapist {
  background: linear-gradient(145deg, rgba(48, 34, 24, .9), rgba(14, 13, 12, .98));
}

.mfm-price-menu-luxury__shell--catalog {
  max-width: 1180px;
}

.mfm-price-menu-luxury__shell--catalog .mfm-price-group__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mfm-price-menu-luxury__shell--catalog .mfm-price-product {
  height: 100%;
}

.mfm-price-travel-note {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 22px;
  padding: 18px 22px;
  border: 1px solid rgba(214, 164, 82, .25);
  border-radius: 18px;
  background: rgba(36, 24, 18, .65);
}

.mfm-price-travel-note strong {
  margin-right: auto;
  color: #f3cf83;
}

.mfm-single-service--catalog {
  padding: clamp(58px, 7vw, 94px) 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(188, 118, 54, .11), transparent 32rem),
    #050505;
}

.mfm-single-service--catalog .mfm-single-service__layout {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
  gap: clamp(34px, 5vw, 70px);
  align-items: center;
}

.mfm-single-service--catalog .mfm-single-service__media,
.mfm-single-service--catalog .mfm-single-service__content {
  min-width: 0;
}

.mfm-single-service--catalog .mfm-single-service__main-image {
  overflow: hidden;
  border: 1px solid rgba(219, 171, 98, .2);
  border-radius: 28px;
  background: #0d0a08;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .42);
}

.mfm-single-service--catalog .mfm-single-service__main-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3.35;
  object-fit: cover;
}

.mfm-single-service--catalog .mfm-single-service__content {
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid rgba(219, 171, 98, .18);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(38, 25, 20, .92), rgba(12, 10, 9, .98));
  box-shadow: 0 28px 72px rgba(0, 0, 0, .3);
}

.mfm-single-service--catalog .mfm-single-service__content h1 {
  margin: 10px 0 16px;
  font-size: clamp(38px, 4.6vw, 62px);
  line-height: 1;
  letter-spacing: -.04em;
}

.mfm-single-service--catalog .mfm-single-service__summary {
  color: #c5bbb2;
  line-height: 1.75;
}

.mfm-single-service--catalog .mfm-single-service__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.mfm-single-service--catalog .mfm-single-service__facts > div {
  padding: 13px 14px;
  border: 1px solid rgba(214, 164, 82, .18);
  border-radius: 14px;
  background: rgba(26, 20, 17, .72);
}

.mfm-single-service--catalog .mfm-single-service__facts span {
  display: block;
  margin-bottom: 5px;
  opacity: .65;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.mfm-single-service--catalog .mfm-single-service__facts strong {
  display: block;
  font-size: 14px;
}

.mfm-single-service--catalog .mfm-single-service__pricing {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 14px;
  background: rgba(0, 0, 0, .18);
}

.mfm-single-service--catalog .mfm-single-service__price-row {
  padding: 12px 14px;
}

.mfm-single-service__travel-note {
  margin: 15px 0 20px;
  padding: 14px 16px;
  border-left: 3px solid #d5a552;
  border-radius: 8px;
  background: rgba(213, 165, 82, .08);
}

.mfm-bk2--catalog .mfm-bk2__location-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.mfm-bk2--catalog .mfm-bk2__location-choice label {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
  cursor: pointer;
}

.mfm-bk2--catalog .mfm-bk2__location-choice input {
  width: auto;
  margin: 0;
}

.mfm-bk2--catalog .mfm-bk2__field-note {
  margin: 0;
  color: rgba(255, 255, 255, .66);
  font-size: 13px;
}

.mfm-bk2--catalog .mfm-bk2__home-location {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(214, 164, 82, .18);
  border-radius: 14px;
  background: rgba(214, 164, 82, .045);
}

.mfm-bk2--catalog .mfm-bk2__home-location[hidden] {
  display: none !important;
}

.mfm-bk2--catalog .mfm-bk2__item-row--catalog {
  grid-template-columns: 1.15fr .8fr 1fr;
  align-items: end;
}

.mfm-bk2--catalog .mfm-bk2__therapist-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.mfm-bk2--catalog .mfm-bk2__therapist-label {
  font-size: 12px;
  font-weight: 700;
}

.mfm-bk2--catalog .mfm-bk2__therapist-fixed {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  font-size: 12px;
  line-height: 1.35;
}

.mfm-bk2--catalog [data-bk2-summary-location] {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  body.home .mfm-home-services-unified .mfm-services-grid-live[data-mfm-catalog-count="5"],
  .mfm-page-standard--services .mfm-services-grid-live[data-mfm-catalog-count="5"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.home .mfm-home-services-unified .mfm-services-grid-live[data-mfm-catalog-count="5"] > .mfm-catalog-card,
  .mfm-page-standard--services .mfm-services-grid-live[data-mfm-catalog-count="5"] > .mfm-catalog-card {
    grid-column: auto;
  }

  body.home .mfm-home-services-unified .mfm-services-grid-live[data-mfm-catalog-count="5"] > .mfm-catalog-card:nth-child(5),
  .mfm-page-standard--services .mfm-services-grid-live[data-mfm-catalog-count="5"] > .mfm-catalog-card:nth-child(5) {
    grid-column: 1 / -1;
    width: min(100%, 460px);
    margin-inline: auto;
  }

  .mfm-single-service--catalog .mfm-single-service__layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.home .mfm-home-services-unified .mfm-services-grid-live[data-mfm-catalog-count="5"] {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 0 16px 10px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  body.home .mfm-home-services-unified .mfm-services-grid-live[data-mfm-catalog-count="5"]::-webkit-scrollbar {
    display: none;
  }

  body.home .mfm-home-services-unified .mfm-services-grid-live[data-mfm-catalog-count="5"] > .mfm-catalog-card,
  body.home .mfm-home-services-unified .mfm-services-grid-live[data-mfm-catalog-count="5"] > .mfm-catalog-card:nth-child(5) {
    flex: 0 0 min(82vw, 310px);
    width: auto;
    margin: 0;
    scroll-snap-align: start;
  }

  .mfm-page-standard--services .mfm-services-grid-live[data-mfm-catalog-count="5"],
  .mfm-services-group-grid--phase3,
  .mfm-price-menu-luxury__shell--catalog .mfm-price-group__list {
    grid-template-columns: 1fr;
  }

  .mfm-page-standard--services .mfm-services-grid-live[data-mfm-catalog-count="5"] > .mfm-catalog-card,
  .mfm-page-standard--services .mfm-services-grid-live[data-mfm-catalog-count="5"] > .mfm-catalog-card:nth-child(5) {
    grid-column: auto;
    width: 100%;
    margin: 0;
  }

  .mfm-catalog-card .gx74-media {
    aspect-ratio: 16 / 11;
  }

  .mfm-catalog-card .gx74-body {
    min-height: 0;
  }

  .mfm-single-service--catalog {
    padding: 34px 0 58px;
  }

  .mfm-single-service--catalog .mfm-single-service__layout {
    width: calc(100% - 28px);
    gap: 20px;
  }

  .mfm-single-service--catalog .mfm-single-service__main-image,
  .mfm-single-service--catalog .mfm-single-service__content {
    border-radius: 20px;
  }

  .mfm-single-service--catalog .mfm-single-service__content {
    padding: 20px 17px;
  }

  .mfm-single-service--catalog .mfm-single-service__facts {
    grid-template-columns: 1fr;
  }

  .mfm-bk2--catalog .mfm-bk2__location-choice,
  .mfm-bk2--catalog .mfm-bk2__item-row--catalog {
    grid-template-columns: 1fr;
  }

  .mfm-price-travel-note {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mfm-catalog-card .gx74-media img {
    transition: none;
  }
}


/* BASELINE-0 direct fix: override the legacy two-column !important rule on narrow service pages. */
@media (max-width: 760px) {
  body .mfm-page-standard.mfm-page-standard--services .mfm-services-grid-live[data-mfm-catalog-count="5"] {
    grid-template-columns: 1fr !important;
  }
}
