/* =========================================================================
   MIMPI HEADSPA — page layout styles
   Powers the importable Elementor templates (Home, Treatments, Service intro,
   Header). Classes are namespaced `mh-` and consume the tokens from style.css.
   The Elementor templates carry lean markup with these classes, so the JSON
   stays small and imports reliably.
   ========================================================================= */

/* Neutralise Elementor's HTML-widget wrapper so our markup controls width. */
.mh-tpl .elementor-widget-html,
.elementor-widget-html.mh-full{ width:100%; }

/* Chrome heights, used to size the mobile hero to exactly one screen.
   Keep in sync with .mh-mhead padding and .mimpi-bnav padding. */
:root{
  --mh-mhead-h:59px;      /* sticky mobile header */
  /* Deliberately a few px SHORTER than the tab bar (~72px) so the hero always
     runs a little past the bar's top edge. Erring the other way leaves a sliver
     of footer peeking between the hero and the bar. On notched phones the bar
     grows via env(safe-area-inset-bottom), which only increases the overlap. */
  --mh-bnav-space:64px;
}

.mh-wrap{ max-width:1200px; margin:0 auto; padding-left:40px; padding-right:40px; }
.mh-band{ padding:60px 0; }
.mh-band--soft{ background:var(--mimpi-card); border-top:1px solid var(--mimpi-border); border-bottom:1px solid var(--mimpi-border); }
.mh-dot{ width:6px; height:6px; border-radius:50%; background:var(--mimpi-green); display:inline-block; }

/* Responsive visibility helpers — add as CSS classes on any Elementor element. */
@media (max-width:768px){ .mh-hide-mobile{ display:none !important; } }
@media (min-width:769px){ .mh-hide-desktop{ display:none !important; } }

/* ---- FULL-HEIGHT SECTION SCROLLING (desktop) -----------------------------
   Each home section fills the viewport and snaps into place, so one section is
   fully in view before the next appears.
   `proximity` rather than `mandatory` on purpose: if a section ever grows
   taller than the screen, mandatory snapping traps the user mid-section and
   they can't reach the overflow. Proximity snaps when close, but always lets
   normal scrolling win. */
@media (min-width:769px){
  html{
    scroll-snap-type:y proximity;
    scroll-padding-top:76px;      /* height of the sticky header */
    scroll-behavior:smooth;
  }
  .mh-hero,
  .mh-band{
    box-sizing:border-box;
    min-height:100vh;
    display:flex;
    align-items:center;
    scroll-snap-align:start;
    padding:96px 0 40px;          /* clears the sticky header */
  }
  .mh-hero > .mh-wrap,
  .mh-band > .mh-wrap{ width:100%; }
}

.mh-sechead{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:26px; }
.mh-sechead h2{ font-family:var(--mimpi-font-head); font-weight:400; font-size:34px; margin:0; }
.mh-sechead a{ font-size:14px; font-weight:700; color:var(--mimpi-green); }

/* ---- HERO ---------------------------------------------------------------- */
.mh-hero{ padding:56px 0 20px; }
.mh-hero__grid{ display:grid; grid-template-columns:1fr 1fr; gap:56px; align-items:center; }
.mh-hero__title{ font-family:var(--mimpi-font-head); font-weight:400; font-size:60px; line-height:1.04; margin:22px 0 20px; }
.mh-hero__lead{ font-size:17px; line-height:1.6; color:var(--mimpi-text-2); max-width:440px; margin:0 0 30px; }
.mh-hero__cta{ display:flex; gap:14px; flex-wrap:wrap; }
.mh-hero__media{
  height:520px; border-radius:32px; position:relative; overflow:hidden;
  background:var(--mimpi-grad-spa);
  /* Favour the upper part of the photo so faces aren't cropped at the chin. */
  background-size:cover; background-position:center 30%; background-repeat:no-repeat;
  box-shadow:0 40px 80px -40px rgba(38,64,51,.6);
}
.mh-hero__media::before{ content:""; position:absolute; right:-50px; top:-40px; width:260px; height:260px; border:1.5px solid rgba(240,235,224,.3); border-radius:50%; }
.mh-hero__media::after{ content:""; position:absolute; left:-60px; bottom:-60px; width:220px; height:220px; border:1.5px solid rgba(240,235,224,.25); border-radius:50%; }
/* Hero stat row (12k+ / 4.9 / 100%) is hidden — the figures were placeholder
   copy from the prototype, not real data. Delete the .mh-stats block from the
   hero HTML widget to remove it from the markup entirely. */
.mh-stats{ display:none !important; }

/* ---- TREATMENT CARDS ----------------------------------------------------- */
.mh-tgrid{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.mh-tcard{ display:block; background:var(--mimpi-card); border:1px solid var(--mimpi-border); border-radius:24px; padding:16px; text-decoration:none; color:inherit; transition:transform .2s ease; }
.mh-tcard:hover{ transform:translateY(-4px); color:inherit; }
.mh-tcard__img{ height:220px; border-radius:18px; background:var(--mimpi-grad-card); position:relative; overflow:hidden; }
.mh-tcard__body{ padding:16px 8px 8px; }
.mh-tcard__body h3{ font-family:var(--mimpi-font-head); font-weight:400; font-size:21px; margin:0 0 8px; }
.mh-tcard__body p{ font-size:13.5px; line-height:1.55; color:var(--mimpi-muted); margin:0 0 14px; min-height:44px; }
.mh-tcard__foot{ display:flex; align-items:center; justify-content:space-between; }
.mh-dur{ position:absolute; left:14px; top:14px; background:rgba(19,30,24,.5); color:var(--mimpi-on-green); font-size:11px; font-weight:700; padding:5px 11px; border-radius:100px; }
.mh-tag{ position:absolute; right:14px; top:14px; background:var(--mimpi-accent-soft); color:var(--mimpi-green); font-size:11px; font-weight:700; padding:5px 11px; border-radius:100px; }
.mh-price{ font-size:22px; font-weight:800; color:var(--mimpi-green); }
.mh-stars{ display:inline-flex; align-items:center; gap:5px; font-size:13px; font-weight:700; }
.mh-stars svg{ width:15px; height:15px; }
.mh-stars em{ color:var(--mimpi-muted); font-weight:500; font-style:normal; }

/* Treatments page variant: card with a Book-now button */
.mh-tcard--book{ cursor:default; }
.mh-tcard--book:hover{ transform:none; }
.mh-tcard--book .mimpi-btn{ padding:12px 24px; font-size:14px; }

/* ---- PRODUCT CARDS (Home "Shop the ritual") ------------------------------ */
.mh-pgrid{ display:grid; grid-template-columns:repeat(4,1fr); gap:22px; }
.mh-pcard{ display:block; background:var(--mimpi-bg); border:1px solid var(--mimpi-border); border-radius:20px; padding:14px; text-decoration:none; color:inherit; transition:transform .2s ease; }
.mh-band--soft .mh-pcard{ background:var(--mimpi-bg); }
.mh-pcard:hover{ transform:translateY(-4px); color:inherit; }
.mh-pcard__img{ aspect-ratio:1; border-radius:15px; background:var(--mimpi-grad-prod); position:relative; display:flex; align-items:center; justify-content:center; }
.mh-pcard__cat{ font-size:11px; color:var(--mimpi-muted); font-weight:600; margin-top:12px; }
.mh-pcard__name{ font-size:15px; font-weight:700; margin-top:3px; }
.mh-pcard__foot{ display:flex; align-items:center; justify-content:space-between; margin-top:12px; }
.mh-pcard__price{ display:flex; align-items:baseline; gap:7px; }
.mh-pcard__price b{ font-size:17px; font-weight:800; color:var(--mimpi-green); }
.mh-pcard__price del{ font-size:13px; color:var(--mimpi-strike); }
.mh-plus{ width:36px; height:36px; border-radius:12px; border:none; background:var(--mimpi-green); color:var(--mimpi-on-green); font-size:20px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.mh-plus:hover{ background:var(--mimpi-green-dark); }
.mh-sale{ position:absolute; left:10px; top:10px; background:var(--mimpi-green); color:var(--mimpi-on-green); font-size:10px; font-weight:700; padding:4px 9px; border-radius:100px; }

/* ---- MEMBERSHIP BAND ----------------------------------------------------- */
.mh-membership{ background:var(--mimpi-green); border-radius:28px; padding:56px; position:relative; overflow:hidden; display:flex; align-items:center; gap:40px; }
.mh-membership__label{ font-size:12px; font-weight:700; color:var(--mimpi-gold-soft); letter-spacing:.5px; margin-bottom:12px; }
.mh-membership h2{ font-family:var(--mimpi-font-head); font-weight:400; font-size:36px; color:#f4efe6; margin:0 0 12px; }
.mh-membership p{ font-size:16px; color:var(--mimpi-on-green-2); line-height:1.6; max-width:460px; margin:0; }
.mh-membership .mimpi-btn{ background:#f1ece1; color:var(--mimpi-green); border-color:#f1ece1; flex:none; }
.mh-membership .mimpi-btn:hover{ background:#fff; color:var(--mimpi-green); border-color:#fff; }

/* ---- PAGE TITLES (Treatments / archive intros) --------------------------- */
.mh-pagehead{ padding:56px 0 0; }
.mh-pagehead h1{ font-family:var(--mimpi-font-head); font-weight:400; font-size:40px; margin:0 0 8px; }
.mh-pagehead p{ font-size:16px; color:var(--mimpi-muted); margin:0 0 36px; }

/* ---- SERVICE INTRO (left column of Service+booking) ---------------------- */
.mh-svc__img{ height:420px; border-radius:26px; background:var(--mimpi-grad-spa); }
.mh-svc h1{ font-family:var(--mimpi-font-head); font-weight:400; font-size:38px; margin:0 0 10px; }
.mh-svc__rating{ display:flex; align-items:center; gap:6px; font-size:14px; font-weight:700; margin-bottom:16px; }
.mh-svc__rating svg{ width:16px; height:16px; }
.mh-svc__rating span{ color:var(--mimpi-muted); font-weight:500; }
.mh-svc__desc{ font-size:16px; line-height:1.7; color:var(--mimpi-text-2); margin:0 0 28px; max-width:560px; }
.mh-svc h3{ font-family:var(--mimpi-font-head); font-weight:400; font-size:22px; margin:0 0 16px; }
.mh-incl{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.mh-incl > div{ display:flex; align-items:center; gap:12px; font-size:14.5px; color:#3a382f; }
.mh-incl .mh-check{ width:30px; height:30px; border-radius:50%; background:var(--mimpi-accent-soft); display:flex; align-items:center; justify-content:center; flex:none; }
.mh-incl .mh-check svg{ width:15px; height:15px; }

/* ---- DESKTOP HEADER ------------------------------------------------------ */
/* position:sticky here means the header stays pinned WITHOUT Elementor Pro's
   Motion Effects — works with free Elementor / the free Header Footer plugin. */
.mh-header{ position:sticky; top:0; z-index:50; background:rgba(241,236,225,.92); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); border-bottom:1px solid var(--mimpi-border-2); }
.mh-header__in{ max-width:1200px; margin:0 auto; padding:0 40px; height:76px; display:flex; align-items:center; gap:36px; }
.mh-brand{ display:flex; align-items:center; gap:11px; text-decoration:none; color:inherit; }
.mh-brand__logo{ width:42px; height:42px; border-radius:50%; overflow:hidden; background:var(--mimpi-green); flex:none; }
.mh-brand__logo img{ width:100%; height:100%; object-fit:cover; }
.mh-brand__name{ font-family:var(--mimpi-font-head); font-size:20px; }
.mh-menu{ display:flex; gap:30px; margin-left:14px; }
.mh-menu a{ font-size:14px; font-weight:600; color:var(--mimpi-text-2); text-decoration:none; position:relative; }
.mh-menu a.is-active{ color:var(--mimpi-green); font-weight:700; }
.mh-menu a.is-active::after{ content:""; position:absolute; left:0; right:0; bottom:-27px; height:2px; background:var(--mimpi-green); }
.mh-header__right{ margin-left:auto; display:flex; align-items:center; gap:14px; }

/* ---- MOBILE HEADER (logo + Book pill) ------------------------------------
   Hidden by default; revealed below 769px where .mh-header is hidden. */
.mh-mhead{ display:none; }
.mh-mhead__brand{ display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit; min-width:0; }
.mh-mhead__logo{ width:38px; height:38px; border-radius:50%; overflow:hidden; background:var(--mimpi-green); flex:none; }
.mh-mhead__logo img{ width:100%; height:100%; object-fit:cover; display:block; }
.mh-mhead__name{ font-family:var(--mimpi-font-head); font-size:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mh-mhead__btn{ padding:10px 18px; font-size:13px; gap:7px; flex:none; }
.mh-mhead__btn svg{ width:15px; height:15px; }
.mh-cart{ position:relative; width:44px; height:44px; border-radius:50%; border:1px solid var(--mimpi-border-2); background:var(--mimpi-card); cursor:pointer; display:flex; align-items:center; justify-content:center; }
.mh-cart .badge{ position:absolute; top:-4px; right:-4px; min-width:20px; height:20px; padding:0 5px; border-radius:10px; background:var(--mimpi-gold); color:#fff; font-size:11px; font-weight:800; display:flex; align-items:center; justify-content:center; }

/* ---- DESKTOP FOOTER (theme-rendered) ------------------------------------- */
.mh-footer{ background:var(--mimpi-green); }
.mh-footer__in{ max-width:1200px; margin:0 auto; padding:52px 40px; display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:40px; }
.mh-footer h4{ font-size:13px; font-weight:800; color:var(--mimpi-gold-soft); margin:0 0 14px; }
.mh-footer p, .mh-footer a, .mh-footer span{ color:var(--mimpi-on-green-2); font-size:14px; text-decoration:none; }
.mh-footer a:hover{ color:#fff; }
.mh-footer__col{ display:flex; flex-direction:column; gap:10px; }
.mh-footer__brand{ display:flex; align-items:center; gap:11px; margin-bottom:16px; }
.mh-footer__brand .mh-brand__name{ font-family:var(--mimpi-font-head); font-size:19px; }
.mh-footer__bar{ border-top:1px solid rgba(231,220,201,.15); }
.mh-footer__bar div{ max-width:1200px; margin:0 auto; padding:20px 40px; font-size:12.5px; color:#8f9a92; }

/* ---- RESPONSIVE ---------------------------------------------------------- */
@media (max-width:1024px){
  .mh-pgrid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:768px){
  .mh-wrap{ padding-left:20px; padding-right:20px; }

  /* Mobile hero order: chip -> image -> title -> lead -> buttons -> stats.
     `display:contents` promotes the copy block's children to flex items of the
     grid, so the media (a sibling) can be interleaved between them with order.
     Margins are zeroed because the flex `gap` now controls the rhythm. */
  /* align-items:stretch is REQUIRED here: the desktop rule sets
     align-items:center, which in a column flex controls the horizontal axis and
     collapses the empty .mh-hero__media div to zero width (invisible image). */
  .mh-hero__grid{ display:flex; flex-direction:column; align-items:stretch; gap:20px; }
  .mh-hero__copy{ display:contents; }
  .mh-hero__copy > .mimpi-chip{ order:1; align-self:flex-start; margin:0; }
  .mh-hero__media{ order:2; height:300px; width:100%; margin:0; }
  .mh-hero__title{ order:3; font-size:34px; margin:0; }
  .mh-hero__lead{ order:4; margin:0; }
  /* Hero CTAs are redundant on mobile: the sticky header has "Book" and the
     bottom tab bar has "Shop". Desktop keeps both buttons. */
  .mh-hero__cta{ display:none; }
  /* Tighten the gap between the sticky mobile header and the chip, and make the
     hero fill the screen exactly — from under the sticky header down to the tab
     bar — so the footer never peeks in at the bottom.
     dvh (dynamic viewport height) accounts for the phone browser's collapsing
     address bar; the vh line above it is the fallback for older browsers. */
  .mh-hero{
    box-sizing:border-box;
    padding:18px 0 20px;
    min-height:calc(100vh  - var(--mh-mhead-h) - var(--mh-bnav-space));
    min-height:calc(100dvh - var(--mh-mhead-h) - var(--mh-bnav-space));
    display:flex;
  }
  .mh-hero > .mh-wrap{ flex:1; }
  /* The image soaks up any leftover height instead of leaving a dead gap. */
  .mh-hero__media{ flex:1 1 auto; min-height:240px; }

  /* ---- APP-STYLE MOBILE -------------------------------------------------
     Mobile behaves like the app prototype: each bottom-nav tab is its own
     screen. The front page therefore shows ONLY the hero — the treatments,
     shop and membership bands live on their own pages, reachable from the tab
     bar. Desktop keeps the full single-page layout untouched.
     Add .mh-keep-mobile to any band you want to keep visible on phones. */
  body.home .mh-band:not(.mh-keep-mobile){ display:none; }
  .mh-tgrid{ grid-template-columns:1fr; }
  .mh-membership{ flex-direction:column; align-items:flex-start; padding:32px; }
  .mh-membership h2{ font-size:28px; }
  .mh-incl{ grid-template-columns:1fr; }
  .mh-svc__img{ height:300px; }
  /* Desktop header hides on mobile — the compact mobile header takes over
     at the top, and the bottom tab bar handles navigation. */
  .mh-header{ display:none; }
  .mh-mhead{
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    position:sticky; top:0; z-index:50;
    padding:10px 20px;
    background:rgba(241,236,225,.94);
    -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
    border-bottom:1px solid var(--mimpi-border-2);
  }
  .mh-footer__in{ grid-template-columns:1fr 1fr; gap:24px; }
}
