.ag-all-categories {
  --ag-all-max: 1360px;
  --ag-all-border: #d9e1e7;
  --ag-all-surface: #fffdfa;
  --ag-all-muted: #6d7a89;
  background: var(--color-warm-white);
  color: var(--color-deep-navy);
}

.ag-all-categories__container {
  width: min(var(--ag-all-max), calc(100% - 56px));
  margin-inline: auto;
}

.ag-all-categories__hero {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border-bottom: 1px solid color-mix(in srgb, var(--color-stone) 55%, transparent);
  background: #fbf4e8;
}

.ag-all-categories__hero-media {
  position: absolute;
  inset: 0;
  background-color: #fbf4e8;
  background-image:
    linear-gradient(90deg, rgba(255,251,244,.99) 0%, rgba(255,247,235,.95) 34%, rgba(255,247,235,.76) 52%, rgba(255,247,235,.3) 68%, rgba(255,247,235,.08) 82%, rgba(255,247,235,0) 100%),
    url("../../images/home-header.webp");
  /* Keep the desktop artwork only moderately lower than center:
     this is half of the previous downward shift from the original centered crop. */
  background-position: left top, right 35%;
  background-size: 100% 100%, min(1600px, 100vw) auto;
  background-repeat: no-repeat, no-repeat;
}

.ag-all-categories__hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 300px;
  align-content: center;
  gap: 18px;
  padding-block: 34px 54px;
}

.ag-all-categories__breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #738092;
  font-size: 13px;
}

.ag-all-categories__breadcrumbs a {
  color: #1679ad;
  font-weight: 650;
  text-decoration: none;
}

.ag-all-categories__hero-copy {
  max-width: 700px;
}

.ag-all-categories__hero-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 72px);
  line-height: .98;
  letter-spacing: -.035em;
}

.ag-all-categories__hero-copy h1 span {
  color: var(--color-brand-gold);
}

.ag-all-categories__hero-copy p {
  max-width: 620px;
  margin: 18px 0 0;
  color: #637285;
  font-size: 17px;
  line-height: 1.55;
}

.ag-all-categories__main {
  padding: 0 0 54px;
}

.ag-all-categories__filters {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: -20px;
  padding: 10px;
  border: 1px solid rgba(221,226,230,.9);
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 30px rgba(16,35,59,.08);
}

.ag-all-categories__filter {
  min-width: 0;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #17304a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.ag-all-categories__filter:hover {
  background: #f8f4ed;
}

.ag-all-categories__filter.is-active {
  background: #fff8ed;
  color: var(--color-brand-gold);
  box-shadow: inset 0 -2px 0 var(--color-brand-gold);
}

.ag-all-categories__filter:focus-visible {
  outline: 0;
  box-shadow: var(--control-focus-ring);
}

.ag-all-categories__filter-image {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.ag-all-categories__filter-icon--grid {
  width: 22px;
  height: 22px;
  display: grid;
  grid-template-columns: repeat(2, 7px);
  grid-template-rows: repeat(2, 7px);
  gap: 3px;
  place-content: center;
}

.ag-all-categories__filter-icon--grid i {
  border: 2px solid currentColor;
  border-radius: 2px;
}

.ag-all-categories__section {
  margin-top: 30px;
}

.ag-all-categories__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ag-all-categories__card {
  min-width: 0;
  display: grid;
  grid-template-rows: 150px auto;
  overflow: hidden;
  border: 1px solid var(--ag-all-border);
  border-radius: 15px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(16,35,59,.035);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.ag-all-categories__card:hover {
  border-color: color-mix(in srgb, var(--color-brand-gold) 52%, var(--ag-all-border));
  box-shadow: 0 8px 22px rgba(16,35,59,.08);
  transform: translateY(-1px);
}

.ag-all-categories__card.is-disabled {
  opacity: .72;
  cursor: default;
}

.ag-all-categories__card.is-disabled:hover {
  border-color: var(--ag-all-border);
  box-shadow: 0 2px 10px rgba(16,35,59,.035);
  transform: none;
}

.ag-all-categories__card-media {
  overflow: hidden;
  background: #f2f1ed;
}

.ag-all-categories__card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .2s ease;
}

.ag-all-categories__card-image-fallback {
  width: 100%;
  height: 100%;
  display: block;
  background: #f2f1ed;
}

.ag-all-categories__card:not(.is-disabled):hover .ag-all-categories__card-media img {
  transform: scale(1.025);
}

.ag-all-categories__card-body {
  position: relative;
  min-height: 126px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 62px 16px 14px;
}

.ag-all-categories__card-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ag-service-badge-surface, #fff4e7);
}

.ag-all-categories__card-icon img {
  width: 21px;
  height: 21px;
  object-fit: contain;
}

.ag-all-categories__card-copy h3,
.ag-all-categories__card-copy p {
  margin: 0;
}

.ag-all-categories__card-copy h3 {
  padding-top: 2px;
  font-size: 17px;
  line-height: 1.2;
}

.ag-all-categories__card-copy p {
  margin-top: 7px;
  color: var(--ag-all-muted);
  font-size: 13px;
  line-height: 1.4;
}

.ag-all-categories__arrow,
.ag-all-categories__service-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  align-self: center;
  border: 1px solid #e0e5e9;
  border-radius: 50%;
  background: #fff;
  color: #17304a;
}

.ag-all-categories__arrow,
.ag-all-categories__service-arrow {
  position: relative;
}

.ag-all-categories__arrow::before,
.ag-all-categories__arrow::after,
.ag-all-categories__service-arrow::before,
.ag-all-categories__service-arrow::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  display: block;
  background: currentColor;
  content: "";
  -webkit-mask: url("../../icons/partner-ui/chevron-right.svg") center / contain no-repeat;
  mask: url("../../icons/partner-ui/chevron-right.svg") center / contain no-repeat;
}

.ag-all-categories__arrow::before,
.ag-all-categories__service-arrow::before {
  transform: translate(-72%, -50%);
}

.ag-all-categories__arrow::after,
.ag-all-categories__service-arrow::after {
  transform: translate(-28%, -50%);
}

/* Keep category-card arrows on one visual axis regardless of description wrapping. */
.ag-all-categories__arrow {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
}

.ag-all-categories__section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.ag-all-categories__section-heading h2,
.ag-all-categories__section-heading p {
  margin: 0;
}

.ag-all-categories__section-heading h2 {
  font-size: 28px;
}

.ag-all-categories__section-heading p {
  margin-top: 5px;
  color: var(--ag-all-muted);
  font-size: 13px;
  line-height: 1.45;
}

.ag-all-categories__popular-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ag-all-categories__offer {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--ag-all-border);
  border-radius: 15px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(16,35,59,.035);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.ag-all-categories__offer:hover {
  border-color: color-mix(in srgb, var(--color-brand-gold) 52%, var(--ag-all-border));
  box-shadow: 0 9px 24px rgba(16,35,59,.08);
  transform: translateY(-1px);
}

.ag-all-categories__offer-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f2f1ed;
}

.ag-all-categories__offer-image,
.ag-all-categories__offer-fallback {
  width: 100%;
  height: 100%;
  display: block;
}

.ag-all-categories__offer-image {
  object-fit: cover;
  transition: transform .2s ease;
}

.ag-all-categories__offer:hover .ag-all-categories__offer-image {
  transform: scale(1.025);
}

.ag-all-categories__offer-fallback {
  background:
    linear-gradient(135deg, rgba(198,126,37,.12), rgba(17,43,68,.08)),
    #f5f1e9;
}

.ag-all-categories__offer-kind {
  position: absolute;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #17304a;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(16,35,59,.08);
  backdrop-filter: blur(5px);
}

.ag-all-categories__offer-body {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  padding: 13px 14px 12px;
}

.ag-all-categories__offer-body h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.ag-all-categories__offer-meta {
  margin: 6px 0 0;
  color: var(--ag-all-muted);
  font-size: 12px;
  line-height: 1.4;
}

.ag-all-categories__offer-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
}

.ag-all-categories__offer-price {
  min-height: 27px;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: #17304a;
}

.ag-all-categories__offer-price strong {
  font-size: 17px;
  line-height: 1;
}

.ag-all-categories__offer-price small {
  color: var(--ag-all-muted);
  font-size: 11px;
}

.ag-all-categories__offer-price--empty {
  visibility: hidden;
}

.ag-all-categories__offer-footer .ag-all-categories__service-arrow {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  font-size: 20px;
}

.ag-all-categories__popular-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed #d8dfe5;
  border-radius: 14px;
  background: rgba(255,255,255,.58);
  color: var(--ag-all-muted);
  font-size: 13px;
}

.ag-all-categories__trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.ag-all-categories__trust article {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 16px;
  border: 1px solid #e4e2dc;
  border-radius: 13px;
  background: #fffefa;
}

.ag-all-categories__trust img {
  width: 24px;
  height: 24px;
}

.ag-all-categories__trust strong,
.ag-all-categories__trust span {
  display: block;
}

.ag-all-categories__trust strong {
  font-size: 14px;
}

.ag-all-categories__trust span {
  margin-top: 4px;
  color: var(--ag-all-muted);
  font-size: 12px;
  line-height: 1.4;
}

.ag-all-categories__cta {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding: 22px 26px;
  border-radius: 15px;
  background:
    linear-gradient(90deg, rgba(13,31,50,.97), rgba(13,31,50,.76)),
    url("../../images/footer-img.png") center / cover no-repeat;
  color: #fff;
}

.ag-all-categories__cta h2,
.ag-all-categories__cta p {
  margin: 0;
}

.ag-all-categories__cta h2 {
  font-size: 23px;
}

.ag-all-categories__cta p {
  margin-top: 4px;
  color: rgba(255,255,255,.82);
  font-size: 13px;
}

.ag-all-categories [data-ag-filter-item][hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .ag-all-categories__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ag-all-categories__popular-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .ag-all-categories__container {
    width: min(var(--ag-all-max), calc(100% - 28px));
  }

  .ag-all-categories__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ag-all-categories__popular-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ag-all-categories__trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ag-all-categories__container {
    width: min(var(--ag-all-max), calc(100% - 20px));
  }

  .ag-all-categories__hero {
    min-height: 250px;
  }

  .ag-all-categories__hero-media {
    background:
      linear-gradient(90deg, rgba(255,251,244,.96) 0%, rgba(255,247,235,.82) 58%, rgba(255,247,235,.2) 100%),
      url("../../images/home-header-mobile.webp") center 32% / cover no-repeat;
  }

  .ag-all-categories__hero-inner {
    min-height: 250px;
    align-content: start;
    padding-top: 18px;
    padding-bottom: 44px;
  }

  .ag-all-categories__hero-copy h1 {
    max-width: 250px;
    font-size: 38px;
  }

  .ag-all-categories__hero-copy p {
    max-width: 300px;
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.45;
  }

  .ag-all-categories__filters {
    grid-template-columns: minmax(0, 1.45fr) repeat(2, 58px);
    gap: 5px;
    margin-top: -16px;
    padding: 7px;
    border-radius: 15px;
  }

  .ag-all-categories__filter {
    min-height: 48px;
    gap: 8px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .ag-all-categories__filter[data-ag-category-filter="travel"] span,
  .ag-all-categories__filter[data-ag-category-filter="life"] span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    clip-path: inset(50%);
  }

  .ag-all-categories__grid,
  .ag-all-categories__popular-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .ag-all-categories__card {
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-rows: auto;
    min-height: 104px;
  }

  .ag-all-categories__card-media {
    min-height: 102px;
  }

  .ag-all-categories__card-body {
    min-height: 102px;
    padding: 12px 42px 12px 11px;
  }

  .ag-all-categories__card-icon {
    width: 32px;
    height: 32px;
  }

  .ag-all-categories__card-icon img {
    width: 18px;
    height: 18px;
  }

  .ag-all-categories__card-copy h3 {
    font-size: 14px;
  }

  .ag-all-categories__card-copy p {
    margin-top: 4px;
    font-size: 11px;
  }

  .ag-all-categories__arrow {
    position: absolute;
    right: 9px;
    top: 50%;
    width: 28px;
    height: 28px;
    transform: translateY(-50%);
  }

  .ag-all-categories__section-heading h2 {
    font-size: 22px;
  }

  .ag-all-categories__section-heading p {
    font-size: 12px;
  }

  .ag-all-categories__offer {
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-rows: auto;
    min-height: 110px;
  }

  .ag-all-categories__offer-media {
    min-height: 110px;
    aspect-ratio: auto;
  }

  .ag-all-categories__offer-kind {
    top: 8px;
    left: 8px;
    max-width: calc(100% - 16px);
    padding: 4px 6px;
    font-size: 10px;
  }

  .ag-all-categories__offer-body {
    min-height: 110px;
    padding: 11px 12px 10px;
  }

  .ag-all-categories__offer-body h3 {
    font-size: 14px;
  }

  .ag-all-categories__offer-meta {
    margin-top: 4px;
    font-size: 11px;
  }

  .ag-all-categories__offer-footer {
    padding-top: 8px;
  }

  .ag-all-categories__offer-price strong {
    font-size: 15px;
  }

  .ag-all-categories__offer-footer .ag-all-categories__service-arrow {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
  }

  .ag-all-categories__trust {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 24px;
  }

  .ag-all-categories__cta {
    min-height: 90px;
    gap: 12px;
    padding: 14px;
  }

  .ag-all-categories__cta h2 {
    font-size: 17px;
  }

  .ag-all-categories__cta p {
    display: none;
  }

  .ag-all-categories__cta .ag-button {
    min-height: 42px;
    padding-inline: 14px;
    font-size: 12px;
    white-space: nowrap;
  }
}
