/* =========================================================
   GreenMango integration layer for ThemeServiceListingV3.
   style.css is the untouched design; everything the dynamic
   markup (CMS content, business data, enquiry popup, inner
   CMS pages) needs on top of it lives here.
   ========================================================= */

/* ---------- Logo text fallback (when BusinessLogo.jpg is missing) ---------- */
.gm-logo-text {
  font-family: var(--ff-display);
  font-size: 1.35rem;
  line-height: 1.1;
  white-space: nowrap;
  color: var(--cream);
  transition: color .5s;
}
.site-header.is-scrolled .gm-logo-text { color: var(--ink); }
body.menu-open .gm-logo-text { color: var(--cream) !important; }
.footer-brand .gm-logo-text { font-size: 1.7rem; margin-bottom: 1.4rem; color: var(--cream); }
.footer-brand > a { display: inline-block; }

/* ---------- Hero: banner copy from GM_Assets ---------- */
.hero-slide__text p { margin: 0; }
.hero-slide__text p + p { margin-top: .6rem; }
.hero-ui.gm-single .hero-progress,
.hero-ui.gm-single .hero-count,
.hero-ui.gm-single .hero-nav { visibility: hidden; }

/* ---------- CMS content blocks (section heads) ----------
   Convention for admin rich text: h6 = eyebrow, h2 = display heading,
   em = brush-underlined word. main.js upgrades h6 into .eyebrow; the rules
   below keep things readable before/without JS. */
.gm-cms > *:last-child { margin-bottom: 0; }
.gm-cms h6 {
  font-family: var(--ff-body); font-size: .75rem; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--olive); margin: 0;
}
.gm-cms h2 { margin: 1.2rem 0 1.4rem; }
.gm-cms h2:first-child { margin-top: 0; }
.gm-cms .eyebrow + h2 { margin-top: 1.2rem; }
.gm-cms ul, .gm-cms ol { padding-left: 1.2rem; }
.gm-cms a:not(.btn-h) { text-decoration: underline; text-underline-offset: 3px; }

/* About */
.about__cms h2 { margin: 1.4rem 0 1.8rem; }
.about__cms p { color: var(--muted); max-width: 54ch; }
.gm-media, .gm-media p, .gm-media figure { height: 100%; margin: 0; }
.gm-media img { width: 100%; height: 115%; object-fit: cover; }
.gm-vision > *:first-child:not(p),
.gm-vision > p:first-child > strong:only-child {
  display: block; font-family: var(--ff-body); font-size: .72rem; letter-spacing: .2em;
  text-transform: uppercase; font-weight: 700; color: var(--olive); margin: 0;
}
.gm-vision p {
  font-family: var(--ff-display); font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.4;
  color: var(--ink); margin: .4rem 0 0;
}
.gm-vision > p:first-child { margin-top: 0; }
[data-gm-stats] p { margin: 0; }

/* Products head (CMS): heading block left, lead text right - same as the design */
.products__head.gm-head-split {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 2rem; align-items: end;
}
.products__head.gm-head-split > * { grid-column: 1; margin-bottom: 0; }
.products__head.gm-head-split > p {
  grid-column: 2; grid-row: 1 / span 3; align-self: end;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); max-width: 40ch;
}
.products__head.gm-head-split h2 { margin: 1rem 0 0; }
@media (min-width: 992px) {
  .products__head.gm-head-split { align-items: center; }
  .products__head.gm-head-split > p { align-self: center; font-size: clamp(.92rem, 1.1vw, 1.05rem); }
}
@media (max-width: 767px) {
  .products__head.gm-head-split { grid-template-columns: 1fr; row-gap: 1.2rem; }
  .products__head.gm-head-split > p { grid-column: 1; grid-row: auto; }
}
.p-card--intro .gm-cms h3 { margin: 0 0 1rem; }
.p-card--intro .gm-cms p { margin: 0; }

/* Why us */
.gm-why-head h2 { margin-top: 1rem; }
.gm-why-head p { color: rgba(241, 232, 206, .7); max-width: 40ch; margin-top: 1.5rem; }
.gm-why-head h6 { color: var(--cream-200); }
.gm-why-src h3, .gm-why-src h4 { font-size: clamp(1.45rem, 2.4vw, 2.1rem); margin: 2rem 0 .5rem; }
.gm-why-src p { color: rgba(241, 232, 206, .65); }

/* Testimonials */
.testimonials__head.gm-cms h2 { margin-top: 1.2rem; }
.t-card blockquote p { margin: 0; }
.t-card__avatar { position: relative; overflow: hidden; flex-shrink: 0; }
.t-card__avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* CTA */
.gm-cta-cms h6 { color: var(--cream-200); }
.gm-cta-cms h2 { max-width: 16ch; margin: 1.2rem auto 1.4rem; }
.gm-cta-cms p { max-width: 48ch; margin: 0 auto 2.6rem; color: rgba(241, 232, 206, .78); }

/* ---------- Footer ---------- */
.footer-top .gm-cms p { color: rgba(241, 232, 206, .6); max-width: 34ch; font-size: .95rem; }
.footer-top .gm-cms ul { padding: 0; }
.footer-top .gm-cms a { text-decoration: none; }
.footer-bottom { align-items: center; }
.gm-footer-legal { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.gm-footer-legal a { color: inherit; }
.footer-bottom a { color: inherit; }
.to-top.gm-no-wa { bottom: 1.4rem; }

/* ---------- Inner CMS pages (privacy, terms...) ---------- */
.gm-page-hero {
  background: var(--olive-800); color: var(--cream);
  padding: clamp(8rem, 15vw, 11rem) 0 clamp(3rem, 6vw, 4.5rem);
}
.gm-page-hero h1 { margin: 1.2rem 0 1.2rem; }
.gm-crumbs { display: flex; gap: .7rem; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(241, 232, 206, .65); }
.gm-crumbs a { color: var(--cream); }
.gm-page-body { padding-block: clamp(3.5rem, 7vw, 6rem); }
.gm-cms-page { max-width: 860px; color: var(--ink); }
.gm-cms-page h1, .gm-cms-page h2, .gm-cms-page h3, .gm-cms-page h4 { margin: 2.2rem 0 1rem; }
.gm-cms-page h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.gm-cms-page h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
.gm-cms-page > *:first-child { margin-top: 0; }
.gm-cms-page p, .gm-cms-page li { color: var(--muted); }
.gm-cms-page img { border-radius: var(--radius-sm); margin: 1.5rem 0; height: auto; }
.gm-cms-page table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.gm-cms-page th, .gm-cms-page td { border: 1px solid var(--line); padding: .6rem .8rem; }
.gm-inner-cta .cta { padding-top: clamp(3rem, 6vw, 5rem); }

/* ---------- Enquiry popup (native <dialog>) ---------- */
html.gm-enquiry-open { overflow: hidden; }
.gm-enquiry {
  border: 0; padding: 0; background: transparent; color: var(--ink);
  width: min(680px, calc(100vw - 2rem)); max-width: none;
  max-height: calc(100dvh - 2rem); overflow: visible;
}
.gm-enquiry[open] { animation: gmEnqIn .55s var(--ease-out); }
.gm-enquiry::backdrop { background: rgba(26, 31, 16, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@keyframes gmEnqIn { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.gm-enquiry__panel {
  position: relative; overflow: hidden auto; max-height: calc(100dvh - 2rem);
  background: var(--cream-50); border-radius: calc(var(--radius) * 1.2);
  padding: clamp(1.8rem, 4vw, 3rem); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55);
}
.gm-enquiry__close {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--ink); display: grid; place-items: center;
  transition: background .4s, color .4s, transform .5s var(--ease-out);
}
.gm-enquiry__close:hover { background: var(--olive); color: var(--cream); border-color: var(--olive); transform: rotate(90deg); }
.gm-enquiry__flower {
  position: absolute; right: -40px; bottom: -40px; width: 200px; height: 200px;
  color: var(--olive); opacity: .07; pointer-events: none;
}
.gm-enquiry__head { position: relative; margin-bottom: 1.8rem; padding-right: 3rem; }
.gm-enquiry__head h3 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 1rem 0 .8rem; }
.gm-enquiry__head p { color: var(--muted); margin: 0; max-width: 46ch; }
.gm-enquiry__head .gm-cms h2, .gm-enquiry__head .gm-cms h3 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 1rem 0 .8rem; }
.gm-enquiry__form { position: relative; }
.gm-form-loading { color: var(--muted); font-size: .95rem; margin: 0; padding: 1.5rem 0; }

.gm-enq-form label {
  display: block; margin-bottom: .45rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--olive);
}
.gm-enq-form .form-control,
.gm-enq-form .form-select {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background-color: #fff;
  padding: .85rem 1rem; font-size: 1rem; color: var(--ink); box-shadow: none;
  transition: border-color .3s, box-shadow .3s;
}
.gm-enq-form .form-control::placeholder { color: rgba(109, 106, 88, .7); }
.gm-enq-form .form-control:focus,
.gm-enq-form .form-select:focus { border-color: var(--olive); box-shadow: 0 0 0 4px rgba(79, 93, 47, .14); }
.gm-enq-form .is-invalid { border-color: var(--clay) !important; box-shadow: 0 0 0 4px rgba(164, 73, 47, .12) !important; background-image: none; }
.gm-enq-form textarea { resize: vertical; min-height: 120px; }
.gm-enq-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; padding-top: .4rem; }
.gm-enq-form button[disabled] { opacity: .7; cursor: progress; }
.gm-form-status { margin: 0; font-size: .95rem; line-height: 1.5; }
.gm-form-status.is-ok { color: var(--olive); font-weight: 600; }
.gm-form-status.is-err { color: var(--clay); }

/* ---------- Product card: WhatsApp enquiry button ---------- */
.gm-p-attr { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--olive); }
.p-card__foot.gm-wa-foot { justify-content: flex-start; }
.p-card__foot .gm-wa-btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 1.15rem; border-radius: 999px;
  background: #25d366; color: #fff;
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  transition: background-color .35s, transform .35s var(--ease-out), box-shadow .35s;
}
.p-card__foot .gm-wa-btn svg { flex: 0 0 auto; color: #fff; }
.p-card:hover .gm-wa-btn { background: #1ebe5b; transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(37, 211, 102, .7); }
@media (min-width: 992px) and (max-height: 760px) {
  .p-card__foot .gm-wa-btn { padding: .55rem 1rem; }
}

/* ---------- Scrolling: Lenis owns smooth scroll ----------
   Bootstrap's reboot sets `scroll-behavior: smooth` on :root. That makes the
   instant scrolls ScrollTrigger does while measuring (and Lenis' own writes)
   animate, so pin positions were measured mid-scroll and the pinned products
   section broke after a reload or fast scroll. */
html { scroll-behavior: auto !important; }
