/* Shared styles loaded on every page. */

/* ───────────── Chat widget ───────────── */
.gb-chat {
  --gb-emerald: #0F3B2A;
  --gb-emerald-deep: #0A2C1F;
  --gb-gold: #C9A45C;
  --gb-gold-soft: #E7D3A6;
  --gb-cream: #FAF6EE;
  --gb-cream-2: #F3ECDD;
  --gb-ink: #1C2A23;
  --gb-muted: #6B7570;
  --gb-line: #E4D9C2;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147483000;
  font-family: 'Jost', system-ui, sans-serif;
  font-weight: 400;
  color: var(--gb-ink);
}
.gb-chat *, .gb-chat *::before, .gb-chat *::after { box-sizing: border-box; }

/* Launcher button */
.gb-chat__launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  height: 56px;
  padding: 0 22px 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: var(--gb-gold);
  color: var(--gb-emerald-deep);
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(10, 44, 31, 0.28);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.gb-chat__launcher:hover { background: #D6B36C; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(10, 44, 31, 0.4); }
.gb-chat__launcher:focus-visible { outline: 2px solid var(--gb-emerald); outline-offset: 3px; box-shadow: 0 0 0 5px var(--gb-gold-soft); }
.gb-chat__launcher svg { width: 22px; height: 22px; flex: none; color: var(--gb-emerald-deep); }
.gb-chat__launcher .gb-chat__icon-close { display: none; }
.gb-chat.is-open .gb-chat__launcher { width: 56px; padding: 0; justify-content: center; }
.gb-chat.is-open .gb-chat__launcher-label,
.gb-chat.is-open .gb-chat__icon-open { display: none; }
.gb-chat.is-open .gb-chat__icon-close { display: block; }

/* Window */
.gb-chat__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: 370px;
  height: min(560px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: var(--gb-cream);
  border: 1px solid var(--gb-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(10, 44, 31, 0.25);
  transform-origin: bottom right;
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.98);
}
.gb-chat.is-open .gb-chat__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .2s ease, transform .2s ease;
}

/* Header */
.gb-chat__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 16px 18px;
  background: var(--gb-emerald);
  color: #FBF3DF;
  border-bottom: 1px solid rgba(201, 164, 92, 0.3);
}
.gb-chat__avatar {
  position: relative;
  width: 42px; height: 42px; flex: none;
  border-radius: 50%;
  background: var(--gb-cream) center / 84% no-repeat;
  border: 1px solid var(--gb-gold);
}
.gb-chat__avatar::after {
  content: '';
  position: absolute; right: -1px; bottom: -1px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #4CC38A; border: 2px solid var(--gb-emerald);
}
.gb-chat__title { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: 22px; line-height: 1.1; color: #FBF3DF; }
.gb-chat__status { margin: 2px 0 0; font-size: 12px; color: var(--gb-gold-soft); font-weight: 300; }
.gb-chat__close {
  margin-left: auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--gb-gold-soft);
  cursor: pointer;
}
.gb-chat__close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.gb-chat__close:focus-visible { outline: 2px solid var(--gb-gold); }
.gb-chat__close svg { width: 18px; height: 18px; }

/* Messages */
.gb-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overscroll-behavior: contain;
}
.gb-chat__msg {
  max-width: 82%;
  padding: 10px 14px;
  font-size: 14.5px;
  line-height: 1.5;
  border-radius: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: gb-chat-in .2s ease;
}
.gb-chat__msg--them { align-self: flex-start; background: #fff; border: 1px solid var(--gb-line); border-bottom-left-radius: 4px; }
.gb-chat__msg--me { align-self: flex-end; background: var(--gb-emerald); color: #FBF3DF; border-bottom-right-radius: 4px; }
.gb-chat__time { align-self: center; font-size: 11px; color: var(--gb-muted); letter-spacing: .06em; margin: 2px 0; }

.gb-chat__typing { align-self: flex-start; display: flex; gap: 4px; padding: 14px 16px; background: #fff; border: 1px solid var(--gb-line); border-radius: 16px; border-bottom-left-radius: 4px; }
.gb-chat__typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--gb-gold); animation: gb-chat-dot 1.2s infinite ease-in-out; }
.gb-chat__typing span:nth-child(2) { animation-delay: .15s; }
.gb-chat__typing span:nth-child(3) { animation-delay: .3s; }

/* Quick replies */
.gb-chat__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 10px; }
.gb-chat__chips:empty { display: none; }
.gb-chat__chip {
  padding: 7px 12px;
  border: 1px solid var(--gb-gold);
  border-radius: 999px;
  background: transparent;
  color: #8A6420;
  font: inherit; font-size: 13px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.gb-chat__chip:hover { background: var(--gb-gold); color: #fff; }
.gb-chat__chip:focus-visible { outline: 2px solid var(--gb-emerald); outline-offset: 2px; }

/* Composer */
.gb-chat__form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--gb-line);
  background: #fff;
}
.gb-chat__input {
  flex: 1;
  min-height: 42px;
  max-height: 120px;
  padding: 10px 14px;
  border: 1px solid var(--gb-line);
  border-radius: 21px;
  background: var(--gb-cream);
  color: var(--gb-ink);
  font: inherit; font-size: 15px; line-height: 1.4;
  resize: none;
}
.gb-chat__input::placeholder { color: #9A9F9B; }
.gb-chat__input:focus { outline: none; border-color: var(--gb-gold); background: #fff; }
.gb-chat__send {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--gb-emerald); color: var(--gb-gold-soft);
  cursor: pointer;
  transition: background .15s ease, opacity .15s ease;
}
.gb-chat__send:hover { background: var(--gb-emerald-deep); }
.gb-chat__send:disabled { opacity: .4; cursor: default; }
.gb-chat__send:focus-visible { outline: 2px solid var(--gb-gold); outline-offset: 2px; }
.gb-chat__send svg { width: 18px; height: 18px; }
/* "Continue on…" buttons */
.gb-chat__options { display: flex; flex-direction: column; gap: 8px; width: 82%; animation: gb-chat-in .2s ease; }
.gb-chat__option {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--gb-line);
  border-radius: 12px;
  background: #fff;
  color: var(--gb-ink);
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.gb-chat__option:hover { border-color: var(--gb-gold); color: var(--gb-ink); transform: translateY(-1px); }
.gb-chat__option:focus-visible { outline: 2px solid var(--gb-gold); outline-offset: 2px; }
.gb-chat__option svg { width: 20px; height: 20px; flex: none; color: #8A6420; }
.gb-chat__option--wa { background: #1F8F55; border-color: #1F8F55; color: #fff; }
.gb-chat__option--wa:hover { background: #1A7A48; border-color: #1A7A48; color: #fff; }
.gb-chat__option--wa svg { color: #fff; }

/* Footer: direct links */
.gb-chat__footer {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 12px 10px;
  background: #fff;
  font-size: 11.5px; color: var(--gb-muted);
}
.gb-chat__footer span { margin-right: 4px; letter-spacing: .02em; }
.gb-chat__social {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #8A6420;
  transition: background .15s ease, color .15s ease;
}
.gb-chat__social:hover { background: var(--gb-cream-2); color: var(--gb-emerald); }
.gb-chat__social:focus-visible { outline: 2px solid var(--gb-gold); }
.gb-chat__social svg { width: 18px; height: 18px; }

@keyframes gb-chat-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes gb-chat-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }

/* Phones: launcher becomes a round icon, window fills the screen */
@media (max-width: 520px) {
  .gb-chat { right: 16px; bottom: 16px; }
  .gb-chat__launcher { width: 56px; padding: 0; justify-content: center; }
  .gb-chat__launcher-label { display: none; }
  .gb-chat__panel {
    position: fixed;
    inset: 0;
    width: auto;
    height: auto;
    border-radius: 0;
    border: 0;
  }
  .gb-chat.is-open .gb-chat__launcher { display: none; }
  .gb-chat__input { font-size: 16px; } /* stops iPhone zooming in */
}

@media (prefers-reduced-motion: reduce) {
  .gb-chat__launcher, .gb-chat__panel, .gb-chat__msg { transition: none; animation: none; }
  .gb-chat__typing span { animation: none; opacity: .7; }
}

/* "WhatsApp didn't open?" note shown after trying the WhatsApp desktop app */
.gb-wa-tip {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 2147483001; display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px); box-sizing: border-box;
  padding: 10px 10px 10px 18px; background: #0A2C1F; color: #FAF6EE;
  border: 1px solid #C9A45C; box-shadow: 0 10px 30px rgba(10,44,31,0.25);
  font: 14px/1.4 inherit; font-family: inherit;
}
.gb-wa-tip a { color: #E7D3A6; border-bottom: 1px solid #C9A45C; text-decoration: none; white-space: nowrap; }
.gb-wa-tip button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; background: none; color: #E7D3A6; cursor: pointer; }
.gb-wa-tip button svg { width: 16px; height: 16px; }

/* Customer reviews (public/js/reviews.js): an auto-scrolling row on the home page and product pages */
.gb-reviews { color: #1C2A23; overflow: hidden; }
.gb-reviews__inner { padding: 104px 0 96px; box-sizing: border-box; }
.gb-reviews__eyebrow { margin: 0 0 12px; padding: 0 16px; font-size: 14px; letter-spacing: 0.24em; text-transform: uppercase; color: #8A6420; font-weight: 600; text-align: center; }
.gb-reviews__title { margin: 0 0 48px; padding: 0 16px; font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 52px; line-height: 1.05; text-align: center; }
/* No CSS mask here: Safari draws a masked, very wide animated row as a black/blank box
   until refresh. The soft edges are plain gradient overlays in the section's own colour
   (--gb-reviews-bg is set by reviews.js). */
.gb-reviews__row { position: relative; overflow: hidden; }
.gb-reviews__row::before,
.gb-reviews__row::after { content: ''; position: absolute; top: 0; bottom: 0; width: 6%; z-index: 1; pointer-events: none; }
.gb-reviews__row::before { left: 0; background: linear-gradient(to right, var(--gb-reviews-bg, #FAF6EE), var(--gb-reviews-bg0, rgba(250,246,238,0))); }
.gb-reviews__row::after { right: 0; background: linear-gradient(to left, var(--gb-reviews-bg, #FAF6EE), var(--gb-reviews-bg0, rgba(250,246,238,0))); }
/* Moved by reviews.js (a small recycling carousel), not a CSS animation */
.gb-reviews__track { display: flex; align-items: flex-start; gap: 24px; width: max-content; padding: 4px 0; will-change: transform; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.gb-review { flex: 0 0 360px; box-sizing: border-box; margin: 0; padding: 32px 32px 28px; background: rgba(255,253,247,0.9); border: 1px solid rgba(201,164,92,0.45); display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
/* Every review box is the same size: text is always 5 lines tall, longer reviews end in "…" */
.gb-review__text { margin: 0; font-family: 'Cormorant Garamond', serif; font-size: 22px; line-height: 1.4; color: #1C2A23; height: 7em; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; }
.gb-review__by { display: flex; flex-direction: column; gap: 2px; padding-top: 16px; border-top: 1px solid rgba(201,164,92,0.35); }
.gb-review__name { font-size: 15px; font-weight: 500; color: #1C2A23; }
.gb-review__label { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: #8A6420; }
.gb-reviews__pause { display: block; margin: 28px auto 0; padding: 10px 20px; background: none; border: 1px solid rgba(28,42,35,0.4); color: #1C2A23; font: inherit; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; }
.gb-reviews__pause:hover { border-color: #1C2A23; }
@media (max-width: 640px) {
  .gb-reviews__inner { padding: 72px 0 72px; }
  .gb-reviews__title { font-size: 40px; margin-bottom: 32px; }
  .gb-review { flex-basis: 280px; padding: 24px 22px 22px; }
  .gb-review__text { font-size: 20px; }
}
/* Visitors who ask for less motion get a row they can swipe instead */
@media (prefers-reduced-motion: reduce) {
  .gb-reviews__row { overflow-x: auto; padding: 0 16px; scroll-snap-type: x mandatory; }
  .gb-reviews__row::before, .gb-reviews__row::after { display: none; }
  .gb-reviews__track { transform: none !important; }
  .gb-review { scroll-snap-align: start; }
  .gb-reviews__pause { display: none; }
}
