/* Gate-automation landing pages (tools/gate-pages/build.mjs).
   Same storefront look as the store (products.html): grey page, white panels, dark ink, brand-green CTAs,
   4px corners, soft shadows — the layout leading B2B marketplaces use (breadcrumb, gallery + buy box,
   spec table, product-card grids, sticky quote card). The site header comes from css/site-header.css. */
.gx {
  --bg0: #f1f1f2; --bg1: #fff; --bg2: #f5f5f5; --line: #e5e5e5;
  --ink: #282828; --muted: #75757a; --muted2: #a3a3a6;
  --brand: #8fc726; --brand-dark: #5e9a12; --brand-ink: #3f6b0b; --deal: #f68b1e; --deal-bg: #fef3e9;
  --wa: #25d366; --wa-ink: #0b5e2b;
  --radius: 4px; --shadow: 0 2px 5px rgba(0,0,0,.05); --shadow-hover: 0 2px 12px rgba(0,0,0,.18);
  background: var(--bg0); color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 14px; line-height: 1.55;
  padding: calc(var(--qh-h, 68px) + 14px) 0 40px; min-height: 100vh;
}
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.gx *, .gx *::before, .gx *::after { box-sizing: border-box; }
.gx a { color: inherit; }
.gx img { max-width: 100%; display: block; }
.gx__wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* breadcrumb */
.gx-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
.gx-crumbs a { text-decoration: none; color: var(--muted); }
.gx-crumbs a:hover { color: var(--brand-dark); text-decoration: underline; }
.gx-crumbs span[aria-hidden] { color: var(--muted2); }

/* panels */
.gx-panel { background: var(--bg1); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 12px; }
.gx-panel > h2, .gx-h2 { font-size: 18px; font-weight: 700; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); letter-spacing: -.2px; }
.gx-panel p { margin: 0 0 10px; color: #3a3a3d; }
.gx-panel ul, .gx-panel ol { margin: 0 0 10px; padding-left: 20px; color: #3a3a3d; }
.gx-panel li { margin: 4px 0; }
.gx-panel a:not(.gx-btn):not(.gx-card):not(.gx-rel) { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 2px; }
.gx-panel table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.gx-panel th, .gx-panel td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.gx-panel th { background: var(--bg2); font-weight: 600; }
.gx-scroll { overflow-x: auto; }

/* product hero: gallery | info | buy box */
.gx-prod { display: grid; grid-template-columns: 340px 1fr 300px; gap: 20px; align-items: start; }
.gx-gallery { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 16px; }
.gx-gallery img { width: 100%; height: 100%; object-fit: contain; }
.gx-brand { display: inline-block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.gx-brand a { color: var(--brand-ink); font-weight: 600; text-decoration: none; }
.gx h1 { font-size: 22px; line-height: 1.3; font-weight: 700; margin: 0 0 8px; letter-spacing: -.3px; color: var(--ink); }
.gx-lead { color: #3a3a3d; font-size: 14px; margin: 8px 0 12px; }
.gx-chips, .gx-panel .gx-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 10px 0; }
.gx-chips li { background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: #3a3a3d; }
.gx-stock { color: #16a34a; font-weight: 600; font-size: 13px; }

.gx-buy { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; position: sticky; top: calc(var(--qh-h, 68px) + 12px); }
.gx-price { font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin: 0; color: var(--ink); }
.gx-price-note { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.gx-option { border: 2px solid var(--brand); border-radius: var(--radius); background: #f6fbee; padding: 10px 12px; margin: 0 0 12px; }
.gx-option__label { font-size: 12px; font-weight: 700; color: var(--brand-ink); text-transform: uppercase; letter-spacing: .4px; }
.gx-option__price { font-size: 20px; font-weight: 800; margin: 2px 0; }
.gx-option__note { font-size: 12px; color: #3a3a3d; margin: 0; }
.gx-trust, .gx-panel .gx-trust { list-style: none; padding: 0; margin: 12px 0 0; border-top: 1px solid var(--line); }
.gx-trust li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: #3a3a3d; padding: 8px 0; border-bottom: 1px solid var(--line); }
.gx-trust li:last-child { border-bottom: 0; }
.gx-trust svg { width: 16px; height: 16px; flex: none; color: var(--brand-dark); margin-top: 1px; }

/* buttons */
.gx-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--radius);
  font-weight: 700; font-size: 14px; text-decoration: none; text-transform: uppercase; letter-spacing: .3px; border: 0; cursor: pointer; margin-bottom: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,.08); transition: background .2s, box-shadow .2s; font-family: inherit; }
.gx .gx-btn--buy, .gx-mbar .gx-btn--buy { background: var(--brand-dark); color: #fff; }
.gx .gx-btn--buy:hover, .gx-mbar .gx-btn--buy:hover { background: var(--brand-ink); box-shadow: var(--shadow-hover); }
.gx .gx-btn--install, .gx-mbar .gx-btn--install { background: var(--brand); color: #1a2124; }
.gx .gx-btn--install:hover, .gx-mbar .gx-btn--install:hover { background: #a2d63d; }
.gx .gx-btn--wa, .gx-mbar .gx-btn--wa { background: var(--wa); color: #fff; }
.gx .gx-btn--wa:hover, .gx-mbar .gx-btn--wa:hover { background: #1fb959; }
.gx .gx-btn--ghost, .gx-mbar .gx-btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.gx .gx-btn--ghost:hover, .gx-mbar .gx-btn--ghost:hover { border-color: var(--brand-dark); color: var(--brand-ink); }
.gx-btn svg { width: 18px; height: 18px; }
.gx-btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.gx-btn-row .gx-btn { width: auto; margin: 0; }

/* list-page head */
.gx-head { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.gx-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 14px; }
.gx-stat { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; min-width: 120px; }
.gx-stat b { display: block; font-size: 16px; }
.gx-stat span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }

/* body: main column + sticky sidebar */
.gx-body { display: grid; grid-template-columns: 1fr 300px; gap: 12px; align-items: start; }
.gx-side { position: sticky; top: calc(var(--qh-h, 68px) + 12px); }
.gx-side .gx-panel h3 { font-size: 15px; margin: 0 0 6px; }
.gx-side .gx-panel p { font-size: 13px; }
.gx-side-links, .gx-panel .gx-side-links { list-style: none; padding: 0; margin: 0; }
.gx-side-links li { border-bottom: 1px solid var(--line); margin: 0; }
.gx-side-links li:last-child { border-bottom: 0; }
.gx-side-links a { display: block; padding: 8px 0; font-size: 13px; text-decoration: none !important; color: var(--ink) !important; }
.gx-side-links a:hover { color: var(--brand-ink) !important; }

/* product-card grid (store look) */
.gx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 12px 0 6px; }
.gx-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  transition: box-shadow .2s, transform .2s; overflow: hidden; }
.gx-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.gx-card__img { aspect-ratio: 1; background: #fff; padding: 10px; display: flex; align-items: center; justify-content: center; }
.gx-card__img img { width: 100%; height: 100%; object-fit: contain; }
.gx-card__body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.gx-card__name { font-size: 13px; line-height: 1.35; height: 2.7em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gx-card__price { font-size: 16px; font-weight: 700; }
.gx-card__tag { align-self: flex-start; font-size: 10.5px; font-weight: 700; color: var(--brand-ink); background: #eef7df; border-radius: 2px; padding: 1px 6px; text-transform: uppercase; letter-spacing: .3px; }
.gx-card__quote { margin-top: auto; font-size: 12px; font-weight: 600; color: var(--brand-ink); text-decoration: none; padding-top: 6px; border-top: 1px solid var(--line); }
.gx-card__quote:hover { text-decoration: underline; }
.gx-caption { font-size: 12px; color: var(--muted); margin: 4px 0 0; }

/* specs */
.gx-specs th { width: 38%; }

/* FAQ */
.gx-faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.gx-faq details:last-child { border-bottom: 0; }
.gx-faq summary { cursor: pointer; font-weight: 600; font-size: 14.5px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.gx-faq summary::-webkit-details-marker { display: none; }
.gx-faq summary::after { content: '+'; font-weight: 700; color: var(--brand-dark); font-size: 18px; line-height: 1; }
.gx-faq details[open] summary::after { content: '–'; }
.gx-faq p { margin: 8px 0 0; color: #3a3a3d; }

/* related */
.gx-rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gx-rel { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; font-weight: 600; font-size: 13.5px; text-decoration: none; color: var(--ink); }
.gx-rel:hover { border-color: var(--brand-dark); color: var(--brand-ink); }
.gx-rel::after { content: '›'; font-size: 18px; color: var(--brand-dark); }

/* footer (charcoal, as the site theme) */
.gx-foot { background: #1A2124; color: #c9ced0; padding: 28px 0 18px; font-family: 'Inter', system-ui, sans-serif; font-size: 13.5px; }
.gx-foot__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 24px; }
.gx-foot h4 { color: #fff; font-size: 14px; margin: 0 0 10px; }
.gx-foot a { color: #c9ced0; text-decoration: none; display: block; padding: 3px 0; }
.gx-foot a:hover { color: #7AB23A; }
.gx-foot__bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 18px; padding-top: 14px; font-size: 12px; color: #8e9699; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* WhatsApp float */
.gx-wa { position: fixed; right: 16px; bottom: 16px; z-index: 900; width: 56px; height: 56px; border-radius: 50%; background: var(--wa, #25d366); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.gx-wa svg { width: 28px; height: 28px; fill: #fff; }

/* mobile sticky buy bar (product pages) */
.gx-mbar { display: none; }

@media (max-width: 1024px) {
  .gx-prod { grid-template-columns: 280px 1fr; }
  .gx-buy { grid-column: 1 / -1; position: static; }
  .gx-body { grid-template-columns: 1fr; }
  .gx-side { position: static; }
}
@media (max-width: 680px) {
  .gx { padding-bottom: 80px; }
  .gx-prod { grid-template-columns: 1fr; }
  .gx-gallery { max-width: 320px; margin: 0 auto; }
  .gx h1 { font-size: 19px; }
  .gx-head { grid-template-columns: 1fr; }
  .gx-panel { padding: 14px; }
  .gx-grid { grid-template-columns: repeat(2, 1fr); }
  .gx-foot__grid { grid-template-columns: 1fr; }
  .gx-mbar { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 950; background: #fff; border-top: 1px solid #e5e5e5;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 12px rgba(0,0,0,.08); }
  .gx-mbar .gx-btn { margin: 0; font-size: 13px; min-height: 42px; }
  .gx-wa { bottom: 76px; }
}

/* proof strip, how-it-works steps, real installs (build.mjs proofBar / howItWorks / installs) */
.gx-proofbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin: 0 0 12px; }
.gx-proofbar > * { background: var(--bg1); padding: 12px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.gx-proofbar a:hover { background: #fafcf6; }
.gx-proofbar b { font-size: 14px; color: var(--ink); }
.gx-proofbar span { font-size: 12.5px; color: var(--muted); }
.gx-proofbar a span { color: var(--brand-ink); }
.gx-star { color: #f5a623 !important; letter-spacing: 1px; font-size: 13px !important; }
.gx-steps, .gx-panel .gx-steps { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: gxstep; }
.gx-steps li { margin: 0; background: var(--bg2); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.gx-steps li::before { counter-increment: gxstep; content: counter(gxstep); width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #1a2124; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.gx-steps b { font-size: 14.5px; }
.gx-steps span { font-size: 13px; color: #3a3a3d; }
.gx-installs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gx-install { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: #1a2124; text-decoration: none; }
.gx-install img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gx-install:hover img { transform: scale(1.04); }
.gx-install > span { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 12px; color: #fff; font-weight: 600; font-size: 13px; line-height: 1.35; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.82)); }
.gx-install em { display: block; font-style: normal; color: #b6e36b; font-size: 12px; margin-top: 2px; }
.gx-install--more { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1a2124, #2b363b); }
.gx-install--more > span { position: static; background: none; text-align: center; padding: 16px; }
.gx-install--more b { display: block; font-size: 15px; margin-bottom: 4px; }
@media (max-width: 860px) {
  .gx-proofbar { grid-template-columns: repeat(2, 1fr); }
  .gx-steps, .gx-panel .gx-steps { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .gx-installs { grid-template-columns: repeat(2, 1fr); }
  .gx-install--more { grid-column: 1 / -1; aspect-ratio: auto; min-height: 90px; }
}
