/* Services page. Logical properties only; tokens from tokens.css. */

/* ---------- service cards ---------- */
/* 300px floor keeps the mockup's 3 columns inside the 1200px container. */
.svc-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.svc-grid__item {
  display: flex;
  /* Home tiles link to /services#<category id>: keep the card clear of the sticky header. */
  scroll-margin-top: calc(var(--header-h) + var(--sp-4));
}
.svc-grid__item > .service-card { flex: 1; }
.svc-grid__item:target > .service-card { box-shadow: 0 0 0 3px var(--gold-500), var(--sh-md); }

.svc-services__cta {
  display: flex;
  justify-content: center;
  margin-block-start: var(--sp-7);
}

/* ---------- delivery zones ---------- */
.svc-zones {
  position: relative;
  background: var(--surface);
  padding-block: var(--section-y) 0;
  overflow: hidden;
}
.svc-zones__inner { position: relative; z-index: 2; }
.svc-zones__text .section-heading { margin-block-end: var(--sp-5); }

.svc-zones__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.svc-zones__zone {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--sh-sm);
  justify-self: start;
}
.svc-zones__pin { color: var(--gold-display); flex: none; }
.svc-zones__name { font-family: var(--font-display); font-weight: 700; }
.svc-zones__badge {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--gold-text);
  background: var(--gold-tint);
  border-radius: var(--r-pill);
  padding: 2px var(--sp-3);
}
.svc-zones__note { margin-block: var(--sp-4) 0; color: var(--text-2); font-size: var(--fs-small); }

.svc-zones__map-wrap {
  position: relative;
  margin-block-start: var(--sp-6);
  margin-inline: var(--gutter);
  padding-block-end: var(--section-y);
}
.svc-zones__map {
  /* Own stacking context: Leaflet panes use z-index up to 1000 and must stay under the sticky header. */
  position: relative;
  z-index: 0;
  isolation: isolate;
  height: 340px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.svc-zones__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: 100%;
  margin: 0;
  padding: var(--sp-5);
  text-align: center;
  color: var(--text-2);
}
.svc-zones__fallback svg { color: var(--gold-display); flex: none; }

/* Leaflet bits (inside the map; Leaflet's own CSS loads lazily). */
.svc-zones__map .svc-zones__marker { background: none; border: 0; }
.svc-zones__map .svc-zones__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--gold-500);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-sm);
  padding: 2px 10px;
}
.svc-zones__map .svc-zones__label::before { display: none; }
.svc-zones__map .leaflet-control-attribution { font-size: 11px; }

@media (min-width: 1024px) {
  .svc-zones { min-height: 500px; padding-block: var(--sp-9); }
  .svc-zones__text { max-width: 40%; }
  .svc-zones__map-wrap {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 58%;
    margin: 0;
    padding: 0;
  }
  .svc-zones__map { height: 100%; border-radius: 0; border: 0; }
  /* Fade from the text side into the map, as in the mockup. */
  .svc-zones__map-wrap::before {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 16%;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to right, var(--surface), rgba(255, 255, 255, 0));
  }
  [dir='rtl'] .svc-zones__map-wrap::before {
    background: linear-gradient(to left, var(--surface), rgba(255, 255, 255, 0));
  }
}
