:root {
  --flyer-blue: #123b68;
  --flyer-blue-soft: #edf5ff;
  --flyer-green: #1f6b49;
  --flyer-green-soft: #e5f5ec;
  --flyer-ink: #172033;
  --flyer-muted: #647084;
  --flyer-border: #d9e1ec;
}

.flyer-page {
  width: min(1120px, calc(100% - 36px));
}

.flyer-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 330px);
  gap: 24px;
  align-items: center;
  border-radius: 12px;
  background: linear-gradient(130deg, #0b2545, #1f6b49);
  color: #fff;
  padding: clamp(24px, 5vw, 44px);
  box-shadow: 0 16px 42px rgba(23, 32, 51, 0.12);
}

.flyer-heading h1 {
  margin-bottom: 10px;
  color: #fff;
}

.flyer-heading__lead {
  max-width: 620px;
  margin: 0;
  color: #e9f4ff;
  font-size: 18px;
  line-height: 1.5;
}

.flyer-heading__tip {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 16px;
  color: #e9f4ff;
  font-size: 13px;
  line-height: 1.45;
}

.flyer-heading__tip strong {
  color: #fff;
  font-size: 15px;
}

.flyer-week-nav {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.flyer-week-nav a {
  border: 1px solid var(--flyer-border);
  border-radius: 999px;
  background: #fff;
  padding: 8px 13px;
  color: var(--flyer-blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.flyer-week-nav a:hover,
.flyer-week-nav__link--active {
  border-color: var(--flyer-blue);
  background: var(--flyer-blue);
  color: #fff;
}

.flyer-search-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  border: 1px solid var(--flyer-border);
  border-top: 5px solid var(--flyer-green);
  border-radius: 10px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 16px 42px rgba(23, 32, 51, 0.08);
}

.flyer-search-panel h2 {
  margin-bottom: 0;
}

.flyer-search {
  display: grid;
  grid-template-columns: minmax(132px, 0.32fr) minmax(0, 1fr) auto auto;
  gap: 9px;
  align-items: center;
}

.flyer-search__location {
  display: grid;
  gap: 5px;
}

.flyer-search__location label {
  color: var(--flyer-muted);
  font-size: 12px;
  font-weight: 800;
}

.flyer-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--flyer-border);
  border-radius: 8px;
  color: var(--flyer-ink);
  padding: 10px 13px;
  font: inherit;
  font-size: 17px;
}

.flyer-search input:focus {
  border-color: var(--flyer-blue);
  box-shadow: 0 0 0 3px rgba(18, 59, 104, 0.15);
  outline: none;
}

.flyer-search button,
.flyer-search a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--flyer-blue);
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.flyer-search button {
  background: var(--flyer-blue);
  color: #fff;
  cursor: pointer;
}

.flyer-search a {
  background: var(--flyer-blue-soft);
  color: var(--flyer-blue);
}

.flyer-location {
  margin: -4px 0 0;
  color: var(--flyer-muted);
  font-size: 13px;
}

.flyer-location strong {
  color: var(--flyer-ink);
}

.flyer-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 18px 0 12px;
  color: var(--flyer-muted);
  font-size: 13px;
}

.flyer-status strong {
  color: var(--flyer-ink);
}

.flyer-archives {
  margin: 18px 0 12px;
  border: 1px solid var(--flyer-border);
  border-radius: 10px;
  background: #fff;
  padding: 18px;
}

.flyer-archives__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.flyer-archives__head h2,
.flyer-archives__head .eyebrow {
  margin-bottom: 0;
}

.flyer-archives__head a {
  color: var(--flyer-blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
}

.flyer-archives__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.flyer-archive {
  display: grid;
  gap: 5px;
  border: 1px solid var(--flyer-border);
  border-radius: 8px;
  padding: 11px 12px;
}

.flyer-archive:hover,
.flyer-archive--selected {
  border-color: var(--flyer-blue);
  background: var(--flyer-blue-soft);
}

.flyer-archive strong {
  color: var(--flyer-ink);
  font-size: 13px;
}

.flyer-archive span {
  color: var(--flyer-muted);
  font-size: 12px;
}

.flyer-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.flyer-card {
  display: grid;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--flyer-border);
  border-radius: 10px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(23, 32, 51, 0.06);
}

.flyer-card h2 {
  margin: 7px 0 10px;
  font-size: 19px;
  overflow-wrap: anywhere;
}

.flyer-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--flyer-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.flyer-card__page {
  border-radius: 999px;
  background: var(--flyer-blue-soft);
  color: var(--flyer-blue);
  padding: 4px 8px;
}

.flyer-card__validity {
  flex-basis: 100%;
  color: var(--flyer-muted);
  font-size: 11px;
  text-transform: none;
}

.flyer-card__offers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.flyer-card__offer-tag {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  border-radius: 999px;
  background: var(--flyer-blue-soft);
  padding: 5px 8px;
  color: var(--flyer-blue);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.flyer-card__offer-tag strong {
  font-size: 11px;
}

.flyer-card__offer-tag--app-exclusive {
  background: #fbe7ee;
  color: #9b2938;
}

.flyer-card__offer-tag--points,
.flyer-card__offer-tag--free {
  background: var(--flyer-green-soft);
  color: var(--flyer-green);
}

.flyer-card__offer-tag--price-drop {
  background: #fff1d9;
  color: #8a4f00;
}

.flyer-card__offer-tag--hot-deal {
  background: #ffe4dc;
  color: #a33b1d;
}

.flyer-card__price {
  margin: 0;
  color: var(--flyer-green);
  font-size: 24px;
  font-weight: 800;
}

.flyer-card__price--unlisted {
  color: var(--flyer-muted);
  font-size: 14px;
}

.flyer-card__brand {
  margin: -5px 0 8px;
  color: var(--flyer-muted);
  font-size: 13px;
  font-weight: 700;
}

.flyer-card__member-pricing {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  border-radius: 8px;
  background: var(--flyer-blue-soft);
  padding: 10px;
}

.flyer-card__member-pricing p {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--flyer-muted);
  font-size: 12px;
  font-weight: 700;
}

.flyer-card__member-pricing strong {
  color: var(--flyer-blue);
  font-size: 16px;
}

.flyer-card__points {
  display: grid;
  gap: 3px;
  margin: 10px 0 0;
  border-left: 4px solid var(--flyer-green);
  background: var(--flyer-green-soft);
  padding: 9px 10px;
  color: var(--flyer-ink);
  font-size: 13px;
  line-height: 1.35;
}

.flyer-card__points strong {
  color: var(--flyer-green);
}

.flyer-card__offer {
  margin: 7px 0 0;
  color: var(--flyer-ink);
  line-height: 1.45;
}

.flyer-card__link {
  margin-top: 14px;
  color: var(--flyer-blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
}

.flyer-empty,
.flyer-error {
  border-radius: 8px;
  padding: 14px 16px;
}

.flyer-empty {
  background: #f5f7fa;
  color: var(--flyer-muted);
}

.flyer-error {
  margin: 0;
  background: #ffe8eb;
  color: #9b2938;
  font-weight: 700;
}

.flyer-source {
  margin: 20px 0 0;
  color: var(--flyer-muted);
  font-size: 12px;
}

.flyer-source a {
  color: var(--flyer-blue);
  font-weight: 700;
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 860px) {
  .flyer-heading {
    grid-template-columns: 1fr;
  }

  .flyer-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flyer-archives__list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .flyer-page {
    width: min(100% - 24px, 1120px);
    padding-top: 18px;
  }

  .flyer-heading,
  .flyer-search-panel {
    padding: 18px;
  }

  .flyer-search {
    grid-template-columns: 1fr auto;
  }

  .flyer-search__location {
    grid-column: 1 / -1;
  }

  .flyer-search button {
    grid-column: 2;
    grid-row: 2;
  }

  .flyer-search a {
    grid-column: 1 / -1;
  }

  .flyer-results {
    grid-template-columns: 1fr;
  }
}
