/**
 * Zenith widget styles.
 *
 * Reads the theme's design tokens, with fallbacks so a widget still looks
 * right if it is ever previewed outside the Zenith theme.
 */

/* ---- Trust bar ------------------------------------------------------ */

.zen-trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zen-space-5, 1.5rem) var(--zen-space-7, 3rem);
  align-items: center;
  justify-content: space-around;
  margin: 0;
  padding: var(--zen-space-5, 1.5rem) var(--zen-space-4, 1rem);
  list-style: none;
  background: var(--zen-blue-050, #f4f8fd);
  border-block: 1px solid var(--zen-line, #dde3e9);
}

.zen-trust__item {
  display: flex;
  align-items: center;
  gap: var(--zen-space-3, 0.75rem);
  margin: 0;
}

.zen-trust__icon {
  display: inline-flex;
  color: var(--zen-blue-600, #1560bd);
  font-size: 1.75rem;
  line-height: 1;
}

.zen-trust__icon svg { width: 1.75rem; height: 1.75rem; fill: currentColor; }

.zen-trust__text { display: flex; flex-direction: column; line-height: 1.25; }

.zen-trust__value {
  color: var(--zen-blue-900, #0b2545);
  font-size: var(--zen-step-1, 1.25rem);
  font-weight: 800;
}

.zen-trust__label {
  color: var(--zen-ink-3, #6b7885);
  font-size: var(--zen-step--1, 0.875rem);
}

/* ---- Product grid --------------------------------------------------- */

.zen-products { display: flex; flex-direction: column; gap: var(--zen-space-5, 1.5rem); }

.zen-products__filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zen-space-2, 0.5rem);
}

.zen-chip {
  padding: 0.55em 1.3em;
  border: 1px solid var(--zen-blue-600, #1560bd);
  border-radius: var(--zen-radius, 8px);
  background: var(--zen-surface, #fff);
  color: var(--zen-blue-600, #1560bd);
  font: inherit;
  font-weight: 700;
  font-size: var(--zen-step--1, 0.9rem);
  cursor: pointer;
  transition: background-color 200ms, color 200ms;
}

.zen-chip:hover { background: var(--zen-blue-050, #f4f8fd); }

.zen-chip.is-active {
  background: var(--zen-blue-600, #1560bd);
  color: #fff;
}

/* Card ---------------------------------------------------------------- */

.zen-product {
  display: flex;
  flex-direction: column;
  background: var(--zen-surface, #fff);
  border: 1px solid var(--zen-line, #dde3e9);
  border-radius: var(--zen-radius-lg, 14px);
  overflow: hidden;
  transition: box-shadow 200ms, border-color 200ms;
}

.zen-product:hover {
  border-color: transparent;
  box-shadow: var(--zen-shadow, 0 2px 4px rgba(11,37,69,.06), 0 6px 16px rgba(11,37,69,.1));
}

.zen-product[hidden] { display: none; }

.zen-product__media {
  display: grid;
  place-items: center;
  padding: var(--zen-space-5, 1.5rem);
  background: var(--zen-sunk, #f5f7fa);
  /* Fixed ratio stops the grid reflowing as images load (CLS). */
  aspect-ratio: 4 / 3;
}

.zen-product__img { width: auto; max-height: 100%; object-fit: contain; }

.zen-product__body {
  display: flex;
  flex-direction: column;
  gap: var(--zen-space-3, 0.75rem);
  padding: var(--zen-space-5, 1.5rem);
  flex: 1;
}

.zen-product__title {
  margin: 0;
  font-size: var(--zen-step-1, 1.25rem);
  line-height: 1.25;
}

.zen-product__title a { color: inherit; text-decoration: none; }
.zen-product__title a:hover { text-decoration: underline; }

.zen-product__spec {
  margin: 0;
  color: var(--zen-ink-3, #6b7885);
  font-size: var(--zen-step--1, 0.9rem);
  font-weight: 600;
}

.zen-product__features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--zen-space-2, 0.5rem);
  font-size: var(--zen-step--1, 0.9rem);
}

.zen-product__features li {
  position: relative;
  margin: 0;
  padding-inline-start: 1.6em;
}

/* Tick drawn in CSS — no icon font request for a decorative bullet. */
.zen-product__features li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.35em;
  width: 0.5em;
  height: 0.85em;
  border: solid var(--zen-blue-600, #1560bd);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.zen-product__finance,
.zen-product__warranty {
  margin: 0;
  font-size: var(--zen-step--1, 0.85rem);
}

.zen-product__warranty {
  align-self: flex-start;
  padding: 0.4em 0.9em;
  border-radius: var(--zen-radius-pill, 999px);
  background: var(--zen-ok-100, #e3f3ee);
  color: var(--zen-ok, #17795e);
  font-weight: 700;
}

.zen-product__finance { color: var(--zen-ink-3, #6b7885); }

.zen-product__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--zen-space-3, 0.75rem);
  margin-top: auto;
  padding-top: var(--zen-space-4, 1rem);
  border-top: 1px solid var(--zen-line, #dde3e9);
}

.zen-product__compare {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--zen-step--1, 0.9rem);
  cursor: pointer;
}

.zen-product__compare input { width: 1.05rem; height: 1.05rem; }

.zen-product__compare input:disabled + span { opacity: 0.5; }

/* Compare tray -------------------------------------------------------- */

.zen-compare {
  position: sticky;
  bottom: var(--zen-space-4, 1rem);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--zen-space-4, 1rem);
  padding: var(--zen-space-4, 1rem) var(--zen-space-5, 1.5rem);
  background: var(--zen-blue-050, #f4f8fd);
  border: 1px solid var(--zen-blue-600, #1560bd);
  border-radius: var(--zen-radius-lg, 14px);
  box-shadow: var(--zen-shadow-lg, 0 8px 24px rgba(11,37,69,.12));
}

.zen-compare[hidden] { display: none; }

.zen-compare__info { display: flex; flex-direction: column; }
.zen-compare__count { color: var(--zen-ink-3, #6b7885); font-size: var(--zen-step--1, 0.9rem); }
.zen-compare__actions { display: flex; gap: var(--zen-space-3, 0.75rem); }
.zen-compare__panel[hidden] { display: none; }
.zen-compare__panel { margin-top: var(--zen-space-5, 1.5rem); }
.zen-compare__panel ul { margin: 0; padding-inline-start: 1.1rem; }

@media (max-width: 640px) {
  .zen-compare { flex-direction: column; align-items: stretch; }
  .zen-compare__actions { flex-direction: column; }
}

/* Editor-only helper --------------------------------------------------- */

.zen-notice {
  padding: var(--zen-space-4, 1rem);
  border: 1px dashed var(--zen-line-2, #c6d0da);
  border-radius: var(--zen-radius, 8px);
  color: var(--zen-ink-3, #6b7885);
  text-align: center;
}

/* ---- Service cards --------------------------------------------------- */

.zen-services { --zen-col: 280px; }

.zen-service {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--zen-space-3, 0.75rem);
  padding: var(--zen-space-5, 1.5rem);
  background: var(--zen-surface, #fff);
  border: 1px solid var(--zen-line, #dde3e9);
  border-radius: var(--zen-radius-lg, 14px);
  transition: box-shadow 200ms, transform 200ms;
}

.zen-service:hover {
  box-shadow: var(--zen-shadow, 0 2px 4px rgba(11,37,69,.06), 0 6px 16px rgba(11,37,69,.1));
  transform: translateY(-2px);
}

.zen-service__icon {
  display: inline-flex;
  color: var(--zen-blue-600, #1560bd);
  font-size: 2rem;
  line-height: 1;
}

.zen-service__icon svg { width: 2rem; height: 2rem; fill: currentColor; }

.zen-service__badge {
  position: absolute;
  inset-block-start: var(--zen-space-4, 1rem);
  inset-inline-end: var(--zen-space-4, 1rem);
  padding: 0.3em 0.8em;
  border-radius: var(--zen-radius-pill, 999px);
  background: var(--zen-red-600, #d7263d);
  color: #fff;
  font-size: var(--zen-step--1, 0.8rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.zen-service__title { margin: 0; font-size: var(--zen-step-1, 1.25rem); line-height: 1.25; }
.zen-service__text { margin: 0; color: var(--zen-ink-2, #48555f); }

.zen-service__link {
  margin-top: auto;
  font-weight: 700;
  text-decoration: none;
}

.zen-service__link::after { content: ' \2192'; }
.zen-service__link:hover { text-decoration: underline; }

/* The whole card is clickable, but the <a> stays the real link so it is
   announced, focusable and shows its destination in the status bar. */
.zen-service__link::before { content: ''; position: absolute; inset: 0; }

/* ---- Service areas ---------------------------------------------------- */

.zen-areas__intro { margin: 0 0 var(--zen-space-4, 1rem); }

.zen-areas__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zen-space-2, 0.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.zen-areas--chips .zen-areas__item {
  padding: 0.4em 0.95em;
  border: 1px solid var(--zen-line, #dde3e9);
  border-radius: var(--zen-radius-pill, 999px);
  background: var(--zen-surface, #fff);
  font-size: var(--zen-step--1, 0.9rem);
}

.zen-areas--columns .zen-areas__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: var(--zen-space-2, 0.5rem) var(--zen-space-4, 1rem);
}

.zen-areas__item a { color: inherit; }

.zen-areas__postal {
  margin: var(--zen-space-4, 1rem) 0 0;
  color: var(--zen-ink-3, #6b7885);
  font-size: var(--zen-step--1, 0.85rem);
}

/* ---- Form ------------------------------------------------------------- */

.zen-form {
  padding: var(--zen-space-6, 2rem);
  background: var(--zen-surface, #fff);
  border: 1px solid var(--zen-line, #dde3e9);
  border-radius: var(--zen-radius-lg, 14px);
  box-shadow: var(--zen-shadow, 0 2px 4px rgba(11,37,69,.06), 0 6px 16px rgba(11,37,69,.1));
}

.zen-form__title { margin: 0 0 var(--zen-space-2, 0.5rem); font-size: var(--zen-step-2, 1.5rem); }
.zen-form__subtitle { margin: 0 0 var(--zen-space-5, 1.5rem); color: var(--zen-ink-2, #48555f); }

.zen-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--zen-space-4, 1rem);
}

.zen-field { display: flex; flex-direction: column; gap: 0.35rem; margin: 0; }
.zen-field--wide { grid-column: 1 / -1; }

.zen-field__label { font-size: var(--zen-step--1, 0.9rem); font-weight: 700; }
.zen-field__req { color: var(--zen-red-600, #d7263d); }

.zen-field__control {
  width: 100%;
  padding: 0.7em 0.85em;
  border: 1px solid var(--zen-line-2, #c6d0da);
  border-radius: var(--zen-radius, 8px);
  background: var(--zen-surface, #fff);
  color: inherit;
  /* 16px minimum stops iOS Safari zooming the page on focus. */
  font: inherit;
  font-size: max(1rem, 16px);
}

.zen-field__control:focus-visible {
  outline: var(--zen-focus-width, 3px) solid var(--zen-focus, #1560bd);
  outline-offset: 2px;
}

.zen-field__control.is-invalid { border-color: var(--zen-red-600, #d7263d); }

.zen-field__error:empty { display: none; }

.zen-field__error {
  color: var(--zen-red-600, #d7263d);
  font-size: var(--zen-step--1, 0.85rem);
}

.zen-form__notice {
  margin: 0 0 var(--zen-space-4, 1rem);
  padding: var(--zen-space-3, 0.75rem) var(--zen-space-4, 1rem);
  border-radius: var(--zen-radius, 8px);
}

.zen-form__notice[hidden] { display: none; }

.zen-form__notice--error {
  background: var(--zen-red-050, #fdecef);
  color: var(--zen-red-700, #a91b2e);
}

.zen-form__submit { width: 100%; margin-top: var(--zen-space-5, 1.5rem); }

.zen-form__footnote {
  margin: var(--zen-space-3, 0.75rem) 0 0;
  color: var(--zen-ink-3, #6b7885);
  font-size: var(--zen-step--1, 0.85rem);
  text-align: center;
}

.zen-form--done { text-align: center; }
.zen-form--done:focus { outline: none; }
