.catalog-page {
  --catalog-line: #e6d5df;
  --catalog-soft: #fff5f9;
  --catalog-muted: #73596b;
}
.catalog-page button, .catalog-page input, .catalog-page select { font: inherit; color: inherit; }
.catalog-page button { cursor: pointer; }
.catalog-page [hidden] { display: none !important; }
.catalog-page :focus-visible { outline: 2px solid #8653a1; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.catalog-page [aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.catalog-saved { display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 30px; background: transparent; padding: 4px 8px; }
.catalog-saved span:first-child { font-size: 19px; line-height: 1; }
.catalog-saved[aria-pressed=true] { background: #f9d9e9; border-color: #edb9d3; }

.catalog-intro { overflow: hidden; background: linear-gradient(#ffeef4, #fff8fc 65%, white); }
.catalog-intro > div { position: relative; isolation: isolate; padding-block: clamp(32px, 6vw, 84px) clamp(38px, 6vw, 88px); text-align: center; }
.catalog-intro h1 { margin: 13px 0 19px; font-weight: 600; font-size: clamp(42px, 6.4vw, 92px); line-height: .96; letter-spacing: -.047em; }
.catalog-intro p { width: min(100%, 410px); margin-inline: auto; font-size: clamp(14px, 1.48vw, 19px); font-weight: 700; }
.catalog-intro-photo {
  position: absolute; z-index: -1; width: clamp(85px, 14vw, 200px) !important; height: auto; aspect-ratio: 1;
  object-fit: cover; border: 5px solid white; border-radius: 12px; box-shadow: 0 7px 18px #3b0b2e1f;
}
.intro-left { left: 3%; top: 31%; transform: rotate(-12deg); }
.intro-right { right: 3%; bottom: 14%; transform: rotate(12deg); }

.catalog { padding-block: 8px 52px; scroll-margin-top: 18px; }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
.catalog-heading h2 { font-size: clamp(30px, 4vw, 58px); font-weight: 600; letter-spacing: -.035em; }
.catalog-heading > a { font-weight: 800; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.catalog-filters { display: grid; gap: 13px; padding: 18px; border: 1px solid var(--catalog-line); border-radius: 15px; background: var(--catalog-soft); }
.payment-tabs, .format-row { display: flex; flex-wrap: wrap; gap: 7px; }
.payment-tabs button, .format-row button, .text-button { border: 1px solid transparent; border-radius: 40px; padding: 7px 12px; font-size: 12px; font-weight: 800; }
.payment-tabs button { background: #fff; border-color: var(--catalog-line); min-height: 36px; }
.payment-tabs button:nth-child(2) { background: #ffd273; }
.payment-tabs button:nth-child(3) { background: #a3def5; }
.payment-tabs button:nth-child(4) { background: #ffc9e0; }
.payment-tabs button:nth-child(5) { background: #ebdcfb; }
.payment-tabs button[aria-pressed=true], .format-row button[aria-pressed=true] { background: var(--ink); color: white; border-color: var(--ink); }
.format-row button { background: transparent; }
.format-row button:hover, .text-button:hover { text-decoration: underline; }
.text-button { border: 0; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.catalog-controls { display: grid; grid-template-columns: minmax(170px, 1fr) auto auto; gap: 9px; }
.search-form { display: flex; min-width: 0; background: #fff; border: 1px solid var(--catalog-line); border-radius: 10px; }
.search-form input { flex: 1; min-width: 0; border: 0; padding: 9px 11px; background: transparent; }
.search-form button { align-self: center; margin-right: 5px; border: 0; background: var(--ink); color: white; border-radius: 50%; width: 30px; height: 30px; }
.catalog-controls select { width: 100%; min-height: 42px; padding: 8px 27px 8px 10px; border: 1px solid var(--catalog-line); border-radius: 10px; background: white; font-size: 13px; }
.catalog-results { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-block: 19px 13px; }
.catalog-results p { font-size: 13px; color: var(--catalog-muted); font-weight: 700; }

.offers-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2.6vw, 32px); align-items: stretch; }
.offer-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--catalog-line); border-radius: 12px; overflow: clip; background: white; }
.offer-art {
  position: relative; display: grid; place-items: center; min-height: 153px; aspect-ratio: 1.65; overflow: hidden;
  background: #4b7ed7;
}
.offer-card:nth-child(3n + 2) .offer-art { background: #f9be32; }
.offer-card:nth-child(3n + 3) .offer-art { background: #fe9fd9; }
.offer-art .offer-visual {
  width: 48%; height: 78%; object-fit: cover; border-radius: 8px;
  border: 4px solid #fff9; transform: rotate(-7deg); box-shadow: 0 4px 12px #3b0b2e30;
}
.offer-art.reviews .offer-visual { transform: rotate(7deg); }
.offer-kind, .bookmark { position: absolute; border: 0; background: white; border-radius: 40px; font-weight: 800; }
.offer-kind { left: 8px; top: 8px; font-size: 10px; padding: 5px 8px; }
.bookmark { right: 8px; top: 8px; width: 34px; height: 34px; font-size: 19px !important; line-height: 1; }
.bookmark.selected { color: #9a2b63; }
.offer-body { display: flex; flex: 1; flex-direction: column; padding: 15px 14px 12px; overflow-wrap: anywhere; }
.brand-name { font-size: 12px; font-weight: 800; color: var(--catalog-muted); }
.offer-body h3 { margin: 5px 0 8px; font: 700 clamp(19px, 2.1vw, 28px)/1.12 var(--headline); letter-spacing: -.025em; }
.offer-body h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-task { font-size: 13px; }
.card-reward { display: grid; align-content: start; gap: 4px; padding-block: 10px; margin-top: 10px; border-top: 1px solid var(--catalog-line); }
.card-reward strong { font-size: 15px; font-weight: 800; line-height: 1.3; }
.card-reward small { font-size: 11px; color: var(--catalog-muted); }
.card-facts { padding-left: 15px; margin: 0 0 14px; display: grid; gap: 4px; font-size: 12px; }
.card-facts li::marker { color: #a3588d; }
.card-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 9px; border-top: 1px solid var(--catalog-line); }
.checked { font-size: 10px; color: var(--catalog-muted); }
.card-bottom button { border: 1px solid #c6a3b9; background: white; border-radius: 30px; padding: 5px 9px; font-size: 12px; font-weight: 800; }
.card-bottom button:hover { background: var(--catalog-soft); }
.catalog-note { margin-top: 19px !important; color: var(--catalog-muted); font-size: 12px; }
.empty-state { background: var(--catalog-soft); border: 1px solid var(--catalog-line); border-radius: 13px; text-align: center; padding: 30px 14px; }
.empty-state > span { font-size: 24px; color: #bd568c; }
.empty-state h3 { margin: 5px 0 8px; font: 700 24px/1.1 var(--headline); }
.empty-state .mana-pill { margin-top: 14px; }
.catalog-footer { padding-block: 24px; background: var(--catalog-soft); border-top: 1px solid var(--catalog-line); }
.catalog-footer > div, .catalog-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.catalog-footer > div { justify-content: space-between; }
.catalog-footer nav a { font-weight: 800; font-size: 13px; }

#offer-dialog {
  width: min(750px, calc(100% - 26px)); max-height: calc(100dvh - 26px); overscroll-behavior: contain;
  padding: clamp(14px, 3.5vw, 36px); color: var(--ink); border: 1px solid var(--catalog-line); border-radius: 19px; background: #fffafd;
}
#offer-dialog::backdrop { background: #3b0b2e70; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 20px; }
.dialog-top > span { font-size: 12px; font-weight: 800; text-transform: uppercase; }
.dialog-top button { border: 1px solid var(--catalog-line); border-radius: 50%; width: 35px; height: 35px; background: white; font-size: 22px; line-height: 1; }
.detail-layout { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(0, 1.2fr); gap: 18px; }
.detail-picture { position: relative; align-self: start; min-width: 0; border-radius: 12px; overflow: hidden; }
.detail-picture img { height: auto; aspect-ratio: 1; object-fit: cover; }
.detail-picture span { position: absolute; left: 8px; bottom: 8px; border-radius: 30px; background: white; font-size: 10px; padding: 4px 8px; }
#offer-title { margin: 6px 0 11px; font-size: clamp(25px, 3.5vw, 39px); line-height: 1.08; overflow-wrap: anywhere; }
.detail-reward-label { font-size: 12px; color: var(--catalog-muted); }
.detail-reward { display: block; margin: 5px 0; font-size: 19px; font-weight: 800; line-height: 1.25; }
.detail-summary > p:not(.brand-name) { margin-top: 6px; font-size: 13px; }
.detail-summary .external-cta { --u: 1px; margin-top: 13px; color: white; background: var(--ink); }
.detail-summary .external-cta:hover { background: #641c4d; }
.detail-save, .detail-story > button { display: block; margin-top: 9px; border: 1px solid var(--catalog-line); border-radius: 30px; padding: 7px 12px; background: white; font-size: 12px; }
.detail-story { font-size: 14px; margin-top: 20px; }
.detail-story h3 { margin: 16px 0 7px; font: 700 20px/1.2 var(--headline); }
.detail-story dl { margin: 8px 0; }
.detail-story dl > div { display: grid; grid-template-columns: minmax(115px, 1fr) 2.5fr; gap: 7px; border-bottom: 1px solid var(--catalog-line); padding: 7px 0; }
.detail-story dt { font-weight: 800; }
.detail-story dd { margin: 0; }
.detail-story ul { padding-left: 18px; }
.detail-story li + li { margin-top: 5px; }
.source-details { padding: 9px 14px 13px; border-radius: 12px; background: #f8e9f2; }
.source-details a { display: inline-block; margin: 6px 0; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .offers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .catalog-intro-photo { display: none !important; }
  .catalog-controls { grid-template-columns: 1fr 1fr; }
  .search-form { grid-column: 1 / -1; }
  .catalog-heading { align-items: start; flex-direction: column; gap: 8px; }
  .catalog-filters { padding: 12px; }
}
@media (max-width: 520px) {
  .offers-grid, .detail-layout { grid-template-columns: 1fr; }
  .offer-art { max-height: 195px; }
  .offer-art .offer-visual { width: 37%; }
  .detail-picture img { max-height: 172px; }
}
@media (max-width: 370px) {
  .catalog-controls { grid-template-columns: 1fr; }
  .detail-story dl > div { grid-template-columns: 1fr; }
}
