/* ============================================================================
   Pillar pop-ups (Our Product) and their enquiry forms.
   Native <dialog> elements; brand palette: cyan #20969E, off-white #F4F5F2,
   orange #F28C28 (accents only). Behaviour: assets/pillars/pillar-modals.js
   ============================================================================ */

dialog.pm {
  width: min(1100px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: #FFFFFF;
  color: #1B2628;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 40px 90px -30px rgba(15, 28, 30, 0.55), 0 0 0 1px rgba(32, 150, 158, 0.12);
}
dialog.pm::backdrop {
  background: rgba(15, 28, 30, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
dialog.pm[open] { animation: pm-in 240ms cubic-bezier(0.23, 1, 0.32, 1); }
dialog.pm[open]::backdrop { animation: pm-fade 240ms ease; }
@keyframes pm-in { from { opacity: 0; transform: translateY(12px) scale(0.985); } }
@keyframes pm-fade { from { opacity: 0; } }

@media (max-width: 639px) {
  dialog.pm {
    width: 100vw;
    max-height: 100dvh;
    height: calc(100dvh - 12px);
    margin: 12px 0 0;
    border-radius: 22px 22px 0 0;
  }
  @keyframes pm-in { from { opacity: 0; transform: translateY(24px); } }
}

.pm-shell { min-height: 100%; }

/* Header: sticky, frosted white, separated from the content by a hairline */
.pm-head {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 26px clamp(20px, 4vw, 40px) 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(15, 28, 30, 0.07);
}
.pm-eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-variant-numeric: tabular-nums; color: #8A9798; margin: 0 0 6px; }
.pm-title { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
.pm-close {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  border: 0; background: #F0F2F0; color: #1B2628; cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.pm-close:hover { background: #E0F0F0; color: #0F5F64; }
.pm-close:focus-visible { outline: 3px solid #F28C28; outline-offset: 2px; }

/* Pillar 1: logo icon with the wordmark directly below it */
.pm-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 12px; }
.pm-brand-logo { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; border: 1px solid #DCE3E2; background: #FFFFFF; box-shadow: 0 2px 6px -2px rgba(15, 28, 30, 0.18); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.pm-brand-logo img { width: 44px; height: 44px; object-fit: contain; }
.pm-brand-logo:hover { border-color: #F28C28; box-shadow: 0 0 0 3px rgba(242, 140, 40, 0.25); }
.pm-brand-logo:focus-visible { outline: 3px solid #F28C28; outline-offset: 3px; }
.pm-wordmark { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }

.pm-body { padding: clamp(20px, 4vw, 40px); display: grid; gap: 28px; }
.pm-lead { font-size: 1.02rem; line-height: 1.65; color: #2C393B; max-width: 52rem; margin: 0; }
.pm-points { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.pm-points li { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; font-size: 0.95rem; }
.pm-points .lucide, .pm-points svg { color: #20969E; flex: none; margin-top: 3px; }
.pm-fine { font-size: 0.8rem; line-height: 1.5; color: #526063; margin: 10px 0 0; }
.pm-fine a { color: #17747A; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* Calibration steps and accreditation note */
.pm-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.pm-step { display: flex; gap: 10px; padding: 16px; border: 0; border-radius: 18px; background: #F4F5F2; }
.pm-step > span { font-weight: 600; font-size: 0.8rem; font-variant-numeric: tabular-nums; color: #8A9798; padding-top: 2px; }
.pm-step h4 { font-size: 0.92rem; font-weight: 700; margin: 0 0 2px; }
.pm-step p { font-size: 0.82rem; line-height: 1.45; color: #526063; margin: 0; }
.pm-note { display: flex; gap: 12px; padding: 16px 18px; border-radius: 16px; background: #F0F8F8; border: 1px solid #A9D6D9; }
.pm-note svg, .pm-note .lucide { flex: none; color: #17747A; margin-top: 2px; }
.pm-note p { margin: 0; font-size: 0.88rem; line-height: 1.55; color: #2C393B; }

/* ---------------------------------------------------------------- Forms */
.pm-form { display: grid; gap: 22px; padding: clamp(18px, 3vw, 28px); border-radius: 22px; background: #F4F5F2; border: 1px solid #DCE3E2; }
#ak-enquiry { margin-top: 8px; scroll-margin-top: 120px; }
.pm-form-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; margin: 0; }
.pm-form-lead { margin: -14px 0 0; font-size: 0.9rem; color: #526063; }
.f-set { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; min-width: 0; }
.f-set > legend { padding: 0; margin-bottom: 12px; font-weight: 700; font-size: 1rem; color: #1B2628; }
.f-set > legend.pm-form-title { font-size: 1.25rem; }
.f-req { color: #B23A2A; }
.f-opt { font-weight: 500; font-size: 0.82em; color: #526063; }
.f-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.f-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.f-field > label { font-size: 0.86rem; font-weight: 600; }
.f-field input[type="text"], .f-field input[type="email"], .f-field input[type="tel"], .f-field input[type="number"],
.f-field input[type="date"], .f-field select, .f-field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid #C3CFCE; background: #FFFFFF;
  font: inherit; font-size: 0.95rem; color: #1B2628; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.f-field textarea { min-height: 88px; resize: vertical; }
.f-field input:focus, .f-field select:focus, .f-field textarea:focus { outline: none; border-color: #20969E; box-shadow: 0 0 0 3px rgba(32, 150, 158, 0.25); }
.f-field input:disabled { background: #ECEFEB; color: #8A9798; }
.f-field [aria-invalid="true"] { border-color: #B23A2A; box-shadow: 0 0 0 3px rgba(178, 58, 42, 0.12); }
.f-hint { margin: 0; font-size: 0.78rem; color: #526063; }
.f-error { margin: 0; font-size: 0.8rem; font-weight: 600; color: #B23A2A; }
.f-error[hidden], .f-summary-error[hidden] { display: none; }
.f-check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 500; cursor: pointer; min-height: 32px; }
.f-check input { width: 18px; height: 18px; accent-color: #17747A; }
.f-radios { display: flex; flex-wrap: wrap; gap: 6px 22px; }
[data-budget-custom][hidden] { display: none; }

/* Multi-select chips; each selected item reveals its quantity and details */
.opt-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.opt { display: grid; gap: 8px; align-content: start; }
.chip {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px;
  border-radius: 14px; border: 1px solid #C3CFCE; background: #FFFFFF; font-size: 0.92rem; font-weight: 600; cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.2s ease;
}
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-box { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid #C3CFCE; color: transparent; background: #FFFFFF; transition: background-color 0.16s ease, border-color 0.16s ease; }
.chip:hover { border-color: #20969E; }
.chip:has(input:focus-visible) { outline: 3px solid #F28C28; outline-offset: 2px; }
.opt:has(> .chip input:checked) .chip { border-color: #20969E; background: #F0F8F8; box-shadow: 0 0 0 1px #20969E; }
.opt:has(> .chip input:checked) .chip-box { background: #17747A; border-color: #17747A; color: #FFFFFF; }
.opt-extra { display: none; gap: 8px; padding: 12px; border-radius: 14px; background: #FFFFFF; border: 1px dashed #A9D6D9; }
.opt:has(input[name="item"]:checked) > .opt-extra { display: grid; }
.opt-extra .f-field > label { font-size: 0.8rem; }
.f-qty input { max-width: 160px; }
[data-items][aria-invalid="true"] .chip, [data-items][aria-invalid="true"] .gp-card { border-color: #E3A69C; }

/* Selectable product cards (Pillar 4) */
.gp-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.gp-card {
  position: relative; display: flex; flex-direction: column; height: 100%; border-radius: 20px; border: 1px solid #DCE3E2;
  background: #FFFFFF; overflow: hidden; cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.28s ease, transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}
.gp-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gp-card:hover { border-color: rgba(32, 150, 158, 0.55); transform: translateY(-2px); box-shadow: 0 16px 30px -22px rgba(32, 150, 158, 0.8); }
.gp-card:has(input:focus-visible) { outline: 3px solid #F28C28; outline-offset: 3px; }
.gp-card:has(input:checked) { border-color: #20969E; box-shadow: 0 0 0 2px #20969E, 0 18px 36px -24px rgba(32, 150, 158, 0.9); }
.gp-img { position: relative; display: block; aspect-ratio: 1 / 1; background: #F4F5F2; border-bottom: 1px solid #DCE3E2; }
.gp-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 18px; background: #FFFFFF; }
.gp-img img[hidden] { display: none; }
.gp-ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: #20969E; font-size: 0.78rem; font-weight: 600; background: radial-gradient(circle at 50% 40%, #E0F0F0, #F4F5F2 70%); }
.gp-badge { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 3px 9px; border-radius: 999px; background: #FDEEDD; color: #8A4A07; font-size: 0.7rem; font-weight: 700; }
.gp-tick { position: absolute; right: 10px; top: 10px; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: #17747A; color: #FFFFFF; opacity: 0; transform: scale(0.8); transition: opacity 0.18s ease, transform 0.18s ease; }
.gp-card:has(input:checked) .gp-tick { opacity: 1; transform: none; }
.gp-text { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.gp-cat { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #17747A; }
.gp-name { font-size: 1rem; font-weight: 700; line-height: 1.3; }
.gp-desc { font-size: 0.84rem; line-height: 1.5; color: #526063; }
.gp-select { margin-top: auto; padding-top: 8px; font-size: 0.85rem; font-weight: 700; color: #17747A; }
.gp-on { display: none; }
.gp-card:has(input:checked) .gp-on { display: inline; }
.gp-card:has(input:checked) .gp-off { display: none; }
.gp > .opt-extra { margin-top: -2px; }

/* Actions */
.pm-actions { display: grid; gap: 10px; padding-top: 4px; }
.pm-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.pm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent; font: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer;
  transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1), background-color 180ms ease, box-shadow 320ms ease, border-color 180ms ease;
}
.pm-btn:active { transform: scale(0.97); }
.pm-btn:focus-visible { outline: 3px solid #F28C28; outline-offset: 3px; }
.pm-btn-wa { background: #17747A; color: #FFFFFF; }
.pm-btn-wa:hover { background: #0F5F64; box-shadow: 0 12px 28px -12px rgba(32, 150, 158, 0.9), 0 0 0 4px rgba(32, 150, 158, 0.14); }
.pm-btn-mail { background: #F28C28; color: #1B2628; }
.pm-btn-mail:hover { background: #E27A14; box-shadow: 0 12px 28px -12px rgba(242, 140, 40, 0.95), 0 0 0 4px rgba(242, 140, 40, 0.16); }
.pm-btn-copy { background: #FFFFFF; color: #1B2628; border-color: #C3CFCE; }
.pm-btn-copy:hover { border-color: #20969E; }
.f-summary-error { margin: 0; padding: 10px 14px; border-radius: 12px; background: #F9E4E0; color: #8E2A1E; font-size: 0.88rem; font-weight: 600; }
.pm-status { margin: 0; font-size: 0.88rem; color: #0F5F64; font-weight: 600; }
.pm-status:empty { display: none; }
@media (max-width: 479px) { .pm-btn { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  dialog.pm[open], dialog.pm[open]::backdrop { animation: none; }
  .gp-card, .gp-card:hover, .pm-btn:active { transform: none; transition: none; }
}

/* ---------------------------------------------------------------- Product showcases (Pillars 3 & 4) */
.pm-showcase { display: grid; gap: 16px; }
.sc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-chip { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid #C3CFCE; background: #FFFFFF; font: inherit; font-size: 0.85rem; font-weight: 600; color: #2C393B; cursor: pointer; transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease; }
.sc-chip:hover { border-color: #20969E; }
.sc-chip[aria-pressed="true"] { background: #17747A; border-color: #17747A; color: #FFFFFF; }
.sc-chip:focus-visible { outline: 3px solid #F28C28; outline-offset: 2px; }
.sc-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.sc-card { display: flex; flex-direction: column; border-radius: 22px; border: 0; background: #FFFFFF; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 28, 30, 0.04), 0 8px 24px -16px rgba(15, 28, 30, 0.2);
  transition: border-color 0.18s ease, box-shadow 0.28s ease, transform 0.2s cubic-bezier(0.23, 1, 0.32, 1); }
.sc-card[hidden] { display: none; }
.sc-card:hover, .sc-card:focus-within { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15, 28, 30, 0.04), 0 18px 36px -22px rgba(15, 95, 100, 0.38); }
.sc-img { position: relative; aspect-ratio: 4 / 3; margin: 8px 8px 0; border-radius: 16px; overflow: hidden; background: #F4F5F2; }
.sc-img img { position: absolute; inset: 0; width: 100%; height: 100%; background: #FFFFFF; }
.sc-img img.sc-contain { object-fit: contain; padding: 14px; }
.sc-img img.sc-cover { object-fit: cover; }
.sc-img img[hidden] { display: none; }
#gas-grid .sc-img { aspect-ratio: 1 / 1; }
.sc-ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: #20969E; font-size: 0.78rem; font-weight: 600; background: radial-gradient(circle at 50% 40%, #E0F0F0, #F4F5F2 70%); }
.sc-badge { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 3px 9px; border-radius: 999px; background: #FDEEDD; color: #8A4A07; font-size: 0.7rem; font-weight: 700; }
.sc-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.sc-cat { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #17747A; }
.sc-name { font-size: 1rem; font-weight: 700; line-height: 1.3; margin: 0; }
.sc-desc { font-size: 0.84rem; line-height: 1.5; color: #526063; margin: 0; }
.sc-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: auto; padding-top: 10px; font-size: 0.85rem; font-weight: 700; }
.sc-links a { display: inline-flex; align-items: center; gap: 5px; color: #17747A; text-decoration: none; }
.sc-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sc-links a.sc-wa { color: #158A40; }
.sc-links a:focus-visible { outline: 3px solid #F28C28; outline-offset: 2px; border-radius: 4px; }
/* Existing PPE catalogue inside Pillar 2 */
.pm-catalogue { padding-top: 0; }
@media (prefers-reduced-motion: reduce) { .sc-card, .sc-card:hover { transform: none; transition: none; } }
.pm-intro-block { display: grid; gap: 8px; }

/* Showcase grids sit on a soft off-white field so the borderless cards read clearly */
.pm-showcase .sc-grid { padding: 4px 0; }
dialog.pm .pm-body { background: linear-gradient(#FFFFFF, #FFFFFF) padding-box; }
dialog.pm .pm-showcase { background: #F7F8F6; margin: 0 calc(-1 * clamp(20px, 4vw, 40px)); padding: 24px clamp(20px, 4vw, 40px); }

/* Pillar 4 product cards: manufacturer, model, category, description, key specifications */
.sc-grid-products { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.sc-maker { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #8A9798; }
.sc-product .sc-name { font-size: 1.15rem; letter-spacing: -0.01em; }
.sc-product .sc-cat { margin-top: -2px; }
.sc-specs { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 0; font-size: 0.8rem; }
.sc-specs li { display: grid; grid-template-columns: 7.2rem 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(15, 28, 30, 0.06); }
.sc-specs li span:first-child { color: #8A9798; font-weight: 600; }
.sc-specs li span:last-child { color: #2C393B; }
.sc-more { font-size: 0.82rem; border-top: 1px solid rgba(15, 28, 30, 0.06); padding-top: 8px; }
.sc-more summary { cursor: pointer; font-weight: 600; color: #17747A; }
.sc-more summary:focus-visible { outline: 3px solid #F28C28; outline-offset: 2px; border-radius: 4px; }
.sc-more p { margin: 6px 0 0; color: #526063; line-height: 1.55; }
.sc-app { margin: 4px 0 0; font-size: 0.82rem; line-height: 1.5; color: #526063; }
.sc-app strong { color: #2C393B; font-weight: 600; }
