/* Green Amanah Products v2.0 — Primo catalogue, quote-only (no prices) */

.gap-catalogue {
  --gap-green: #123420;
  --gap-mint: #e8f0ea;
  --gap-muted: #6b6b6b;
  --gap-line: #e6e6e6;
  --gap-ink: #1a1a1a;
  --gap-panel: #f3f3f3;
  font-family: var(--uicore-typography--p-f, "Inter"), sans-serif;
  color: var(--gap-ink);
}

.gap-catalogue h1,
.gap-catalogue h2,
.gap-catalogue h3,
.gap-catalogue .gap-card__name {
  font-family: var(--uicore-typography--h1-f, "Inter"), sans-serif;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Mobile top bar —— */
.gap-toolbar-mobile {
  display: none;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.gap-filters-open {
  flex: 0 0 auto;
}

.gap-field--sort-inline {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.gap-field--sort-inline select {
  width: 100%;
  border: 1px solid var(--gap-line);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  height: 40px;
}

.gap-filters-backdrop {
  display: none;
}

/* —— Compact toolbar —— */
.gap-toolbar {
  margin-bottom: 16px;
}

.gap-toolbar__drawer-head,
.gap-toolbar__drawer-foot {
  display: none;
}

.gap-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  justify-content: space-between;
  align-items: flex-end;
}

.gap-toolbar__left,
.gap-toolbar__right {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.gap-toolbar__right {
  margin-left: auto;
}

.gap-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.gap-field__label,
.gap-field > span:not(.screen-reader-text) {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gap-muted);
  line-height: 1;
  margin-left: 5px;
}

.gap-field--search {
  width: 100%;
  max-width: 320px;
  flex: 0 1 320px;
}

.gap-field--category {
  width: 180px;
  flex: 0 1 180px;
}

.gap-field--sort {
  width: 168px;
  flex: 0 1 168px;
}

.gap-field input,
.gap-field select {
  border: 1px solid var(--gap-line);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  width: 100%;
  height: 48px;
  box-sizing: border-box;
}

.gap-field input:focus,
.gap-field select:focus {
  outline: 2px solid rgba(18, 52, 32, 0.2);
  border-color: var(--gap-green);
}

.gap-btn {
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  height: 38px;
  white-space: nowrap;
}

.gap-btn--primary {
  background: var(--gap-green);
  color: #fff;
}

.gap-btn--ghost {
  background: var(--gap-mint);
  color: var(--gap-green);
}

.gap-btn--block {
  width: 100%;
}

.gap-count {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--gap-muted);
}

.gap-count strong {
  color: var(--gap-ink);
  font-family: var(--uicore-typography--h1-f, "Inter"), sans-serif;
}

/* —— Grid / cards —— */
.gap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.gap-card {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gap-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.gap-card__media {
  position: relative;
  aspect-ratio: 1.15 / 1;
  background: #efefef;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.gap-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gap-card__media .gap-placeholder {
  width: 46%;
  opacity: 0.85;
}

.gap-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gap-mint);
  color: #2f3d34;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  max-width: calc(100% - 24px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
}

.gap-card__body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.gap-card__name {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.5;
  text-transform: capitalize;
  margin: 0;
}

.gap-card__desc {
  font-size: 14px;
  color: var(--gap-muted);
  margin: 0;
}

.gap-card__specs {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  flex: 1;
}

.gap-card__specs li {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 13px;
  line-height: 1.35;
}

.gap-card__specs span {
  color: var(--gap-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 1px;
}

.gap-card__specs strong {
  font-weight: 600;
  color: var(--gap-ink);
}

.gap-card__btn {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(90deg, #2f9e44, #123420);
}

.gap-card__btn:hover {
  filter: brightness(1.05);
  color: #fff;
}

.gap-card__btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex: 0 0 auto;
}

.gap-empty {
  grid-column: 1 / -1;
  background: #fff;
  border: 1px dashed var(--gap-line);
  border-radius: 14px;
  padding: 48px 24px;
  text-align: center;
  color: var(--gap-muted);
}

.gap-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 24px 0 8px;
  flex-wrap: wrap;
}

.gap-pager button {
  min-width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--gap-line);
  background: #fff;
  color: var(--gap-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 12px;
}

.gap-pager button.is-active,
.gap-pager button:hover:not(:disabled) {
  background: var(--gap-green);
  border-color: var(--gap-green);
  color: #fff;
}

.gap-pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 1100px) {
  .gap-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .gap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gap-toolbar-mobile {
    display: flex;
  }

  .gap-filters-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
  }

  .gap-filters-backdrop[hidden] {
    display: none !important;
  }

  .gap-toolbar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 92vw);
    margin: 0;
    border-radius: 0;
    border: 0;
    z-index: 9999;
    padding: 0;
    display: flex;
    flex-direction: column;
    transform: translateX(105%);
    transition: transform 0.25s ease;
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.12);
    overflow: auto;
  }

  .gap-catalogue.is-filters-open .gap-toolbar {
    transform: translateX(0);
  }

  .gap-toolbar__drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--gap-line);
    font-family: var(--uicore-typography--h1-f, "Inter"), sans-serif;
    font-size: 16px;
  }

  .gap-drawer-close {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--gap-ink);
    padding: 0 4px;
  }

  .gap-toolbar__row {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 14px;
  }

  .gap-toolbar__left,
  .gap-toolbar__right {
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    width: 100%;
  }

  .gap-field--search,
  .gap-field--category,
  .gap-field--sort {
    max-width: none;
    width: 100%;
    flex: none;
  }

  .gap-toolbar__right .gap-field--sort {
    display: none; /* sort is in the mobile top bar */
  }

  .gap-toolbar__drawer-foot {
    display: block;
    margin-top: auto;
    padding: 12px 16px 20px;
    border-top: 1px solid var(--gap-line);
  }

  .gap-toolbar #gap-search {
    display: none; /* use Apply filters in drawer foot */
  }
}

@media (max-width: 520px) {
  .gap-grid {
    grid-template-columns: 1fr;
  }
}

body.gap-filters-lock {
  overflow: hidden;
}
