/* =========================================================
   GreenMango integration layer for ThemeServiceListingV2.
   style.css is the untouched design; everything the dynamic
   markup needs on top of it lives here.
   ========================================================= */

/* ---------- Logo text fallback (when BusinessLogo.jpg is missing) ---------- */
.gm-logo-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
}

/* ---------- Hero ---------- */
/* {%herobackground%} may hold an <img>/<video> without the scrub class: cover the stage. */
.hero-scrub__stage > img,
.hero-scrub__stage > picture img,
.hero-scrub__stage > video:not(.hero-scrub__video) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
/* Banner Description is rich text (often wrapped in <p>). */
div.hero-text p {
  margin: 0 0 0.5rem;
}
div.hero-text p:last-child {
  margin-bottom: 0;
}

/* Tablet and below: centre the intro line and sit it just above the car. */
@media (max-width: 991.98px) {
  .hero-scrub__intro {
    text-align: center;
  }
  .hero-scrub__intro .hero-scrub__lead {
    max-width: 22ch;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-scrub__intro .eyebrow {
    justify-content: center;
  }
}
/* All screen sizes, while the scroll animation runs: no headline/CTA reveal at
   the end; the video finishes and main.js carries the page straight on to the
   About section. The h1 stays in the DOM (visually hidden) for SEO/screen readers.
   Without the animation (reduced motion) the headline still shows normally. */
@media all {
  .hero-scrub.is-scrubbing .hero-scrub__content > :not(.hero-title) {
    display: none;
  }
  .hero-scrub.is-scrubbing .hero-scrub__content > .hero-title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  .hero-scrub.is-scrubbing .hero-scrub__shade::after {
    opacity: 0;
  }
}
/* Portrait screens: style.css centres the video band at top:47%, so anchor the
   text to that band's top edge (half the band height = width% x 9/16 / 2). */
@media (max-width: 991.98px) and (max-aspect-ratio: 4/5) {
  .hero-scrub__intro {
    --gm-band-half: 42.19vw; /* video width 150% */
    top: auto;
    bottom: calc(53% + var(--gm-band-half) - 2.5rem);
  }
}
@media (max-width: 767.98px) and (max-aspect-ratio: 4/5) {
  .hero-scrub__intro {
    --gm-band-half: 36vw; /* video width 128% on phones */
  }
}

/* ---------- Product cards ---------- */
.product-card__media img {
  background: #1f1f1f;
}

/* Category chips are links (server-side filter), not buttons. */
a.filter-chip {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1.2;
}
a.filter-chip:hover {
  color: var(--ame-ink);
}
a.filter-chip.is-active,
a.filter-chip.is-active:hover {
  color: #fff;
}

/* Related products: the design shows four across on desktop. */
@media (min-width: 992px) {
  [data-gm-related] > [data-gm-col] {
    flex: 0 0 auto;
    width: 25%;
  }
}

/* ---------- Pagination (the design had a client-side list, no pager) ---------- */
.gm-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}
.gm-pager a,
.gm-pager span {
  min-width: 44px;
  height: 44px;
  padding: 0 0.75rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d6d6d6;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ame-ink);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.gm-pager a:hover {
  border-color: var(--ame-ink);
}
.gm-pager .is-current {
  background: var(--ame-black);
  border-color: var(--ame-black);
  color: #fff;
}

/* ---------- Product detail ---------- */
.detail-body > :last-child {
  margin-bottom: 0;
}
.detail-body img {
  max-width: 100%;
  height: auto;
}
.detail-body table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.detail-body th,
.detail-body td {
  border: 1px solid #e6e6e6;
  padding: 0.55rem 0.75rem;
  text-align: left;
}
.detail-note > span > :last-child {
  margin-bottom: 0;
}

/* ---------- Contact ---------- */
.gm-title-sm {
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem);
}
.gm-map-wide {
  min-height: 420px;
}
.gm-form-loading {
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}
.contact-list a {
  word-break: break-word;
}
/* Phone validation is custom (any country), so show the design's red state for it too. */
.was-validated .form-control:invalid ~ .invalid-feedback {
  display: block;
}

/* ---------- Footer ---------- */
.gm-footer-about {
  margin-top: 1rem;
}
.gm-footer-about > :last-child {
  margin-bottom: 0;
}
.gm-footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}
.gm-footer-legal a {
  color: inherit;
  text-decoration: none;
}
.gm-footer-legal a:hover {
  color: #fff;
}

/* ---------- CMS page content (PageView) ---------- */
.gm-cms {
  max-width: 900px;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--ame-ink);
}
.gm-cms h2,
.gm-cms h3,
.gm-cms h4 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.75rem;
}
.gm-cms h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.gm-cms h3 { font-size: 1.3rem; }
.gm-cms h4 { font-size: 1.1rem; }
.gm-cms > :first-child { margin-top: 0; }
.gm-cms ul,
.gm-cms ol { padding-left: 1.25rem; }
.gm-cms li { margin-bottom: 0.4rem; }
.gm-cms img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.gm-cms a {
  color: var(--ame-orange);
}
.gm-cms table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
}
.gm-cms th,
.gm-cms td {
  border: 1px solid #e3e3e3;
  padding: 0.6rem 0.8rem;
}
