/* Shared rate presentation: qualifiers and previous rates stay separate. */
:root { --cashback-blue: #2563eb; --cashback-hover: #1d4ed8; --cashback-highlight: #dbeafe; --cashback-soft: #eff6ff; }
.cashback-display { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; }
.cashback-current { color: var(--cashback-blue); font-weight: 800; line-height: 1.3; }
.cashback-current .rate-prefix { display: inline; color: inherit; font: inherit; }
.cashback-context { font-size: .72em; font-weight: 700; letter-spacing: 0; }
.cashback-was { color: #667085; font-size: 12px; font-weight: 400; line-height: 1.4; letter-spacing: 0; }
.cashback-unavailable { color: #667085; font-size: 12px; font-weight: 500; letter-spacing: 0; }
body[data-page="home"] { --accent: #2563eb; --accent-hover: #1d4ed8; --soft: #eff6ff; }
.discovery-rates .cashback-current { font: 800 clamp(23px, 2.1vw, 30px)/1.35 'Manrope', sans-serif; letter-spacing: -.8px; }
.discovery-rates .cashback-current .cashback-context { font-size: .68em; }
.discovery-rates .cashback-number { font-size: 1em; }
.is-compact .discovery-rates .cashback-current { font-size: 20px; }
.home-browse .store-row-rate .cashback-display { flex-direction: column; align-items: flex-end; gap: 3px; }
.home-browse .store-row-rate .cashback-current { font-size: 19px; }
.home-browse .store-row-rate .cashback-was { font-size: 10px; }
.related-cashback { margin-left: auto; text-align: right; }
.related-cashback .cashback-display { flex-direction: column; align-items: flex-end; }
.related-cashback .cashback-current { font-size: 19px; }
.cashback-card .cashback-card-rate { display: block; margin: 0; padding: 0; font: inherit; letter-spacing: 0; }
.cashback-card .cashback-display { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 133px; text-align: center; }
.cashback-card .cashback-current { display: grid; grid-template-columns: 1fr; grid-template-rows: 17px auto 20px; justify-items: center; }
.cashback-card .cashback-current .rate-prefix { position: static; grid-row: 1; font: 600 13px/17px 'DM Sans',sans-serif; width: auto; }
.cashback-card .cashback-number { grid-row: 2; font: 800 clamp(36px, 4vw, 52px)/1.15 'Manrope',sans-serif; letter-spacing: -1.5px; }
.cashback-card .cashback-context { grid-row: 3; font-size: 12px; }
.cashback-card .cashback-was { font-size: 12px; }

body[data-page] .header-search.smart-search { position: relative; display: block; flex: 1 1 540px; width: auto; min-width: 230px; max-width: 760px; padding: 0; border: 0; border-radius: 14px; background: transparent; box-shadow: none; z-index: 50; }
body[data-page] .header-search.smart-search:focus-within { border: 0; box-shadow: none; }
.search-field { display: flex; align-items: center; min-width: 0; min-height: 46px; padding: 0 8px 0 15px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.search-field:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px #dbeafe; }
body[data-page] .smart-search input { min-width: 0; width: 100%; min-height: 42px; padding: 0; font-size: 14px; color: #101828; }
body[data-page] .smart-search input::placeholder { color: #667085; }
.search-submit { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 38px; padding: 0; border-radius: 8px; color: #667085; background: transparent; }
body[data-page] .search-submit svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.search-submit:hover { color: #1d4ed8; background: #eff6ff; }
.search-panel { position: absolute; top: calc(100% + 9px); left: 0; right: 0; max-height: min(680px, var(--search-space, 70vh)); min-height: 150px; padding: 20px; overflow-y: auto; overscroll-behavior: contain; background: #fff; color: #101828; border: 1px solid #e5e7eb; border-radius: 14px; box-shadow: 0 15px 40px #1018281c; scrollbar-width: thin; }
.search-section + .search-section { border-top: 1px solid #edf0f4; margin-top: 18px; padding-top: 18px; }
.search-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.search-section-heading h2 { display: flex; align-items: center; gap: 8px; color: #101828; font: 800 14px/1.4 'Manrope',sans-serif; letter-spacing: 0; }
body[data-page] .search-section-heading h2 svg { width: 18px; height: 18px; stroke: #2563eb; fill: none; stroke-width: 1.8; }
.search-section-heading > a, .search-section-heading > button { padding: 4px 0; background: transparent; font-size: 12px; color: #2563eb; white-space: nowrap; }
.search-section-heading > a:hover, .search-section-heading > button:hover { color: #1d4ed8; text-decoration: underline; }
.search-recents { display: flex; flex-wrap: wrap; gap: 8px; }
.recent-chip { display: inline-flex; align-items: center; border: 1px solid #e5e7eb; border-radius: 20px; background: #f8fafc; font-size: 12px; }
.recent-chip a { padding: 6px 4px 6px 12px; }
.recent-chip button { display: grid; place-items: center; width: 30px; height: 32px; background: transparent; color: #667085; border-radius: 50%; font-size: 18px; }
.recent-chip a:hover, .recent-chip button:hover { color: #1d4ed8; background: #eff6ff; }
.search-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 10px; }
.search-result { display: grid; grid-template-columns: 44px minmax(0,1fr); align-items: center; column-gap: 9px; row-gap: 3px; min-width: 0; padding: 10px; border: 1px solid transparent; border-radius: 10px; }
.search-result:hover { background: #eff6ff; }
.search-result[aria-selected="true"], .search-result:focus-visible { background: #dbeafe; border-color: #93b4f7; outline-offset: 0; }
.search-result .store-logo { width: 44px; height: 44px; border-radius: 8px; grid-row: 1 / 3; box-shadow: none; }
.search-result-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.search-result-name > strong { font-size: 13px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.search-result-name > span { color: #667085; font-size: 10px; line-height: 1.4; }
.search-result-rate { grid-column: 2; }
.search-result-rate .cashback-display { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.search-result-rate .cashback-current { font-size: 16px; letter-spacing: -.3px; }
.search-result-rate .cashback-context { font-size: 11px; }
.search-result-rate .cashback-was { font-size: 11px; }
.search-category-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.search-category-grid a { display: flex; align-items: center; gap: 9px; min-height: 45px; min-width: 0; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 9px; background: #f8fafc; color: #101828; font-size: 12px; line-height: 1.4; }
.search-category-grid a:hover { background: #eff6ff; border-color: #b4cafa; color: #1d4ed8; }
.search-category-grid .category-icon { width: 17px; height: 17px; }
.search-message { padding: 12px 0; min-height: 56px; font-size: 13px; line-height: 1.6; color: #667085; overflow-wrap: anywhere; }
.search-retry { min-height: 36px; padding: 7px 12px; background: #eff6ff; border-radius: 8px; color: #2563eb; font-size: 13px; }
.search-view-all { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 0; margin-top: 8px; border-top: 1px solid #edf0f4; color: #2563eb; font-size: 12px; }
@media (min-width: 1300px) {
  .search-result { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .search-result-rate { grid-column: 3; grid-row: 1 / 3; max-width: 140px; text-align: right; }
  .search-result-rate .cashback-display { align-items: flex-end; }
}
@media (max-width: 1000px) and (min-width: 701px) {
  body[data-page] .header-inner { flex-wrap: wrap; gap: 15px; }
  body[data-page] .header-search.smart-search { flex-basis: 100%; max-width: none; margin: 0; }
}
@media (max-width: 700px) {
  body[data-page] .header-search.smart-search { grid-column: 1 / -1; max-width: none; min-width: 0; width: 100%; margin: 0; flex-basis: auto; }
  body[data-page] .smart-search input { font-size: 16px; }
  body.search-modal-open { overflow: hidden; }
  body[data-page] .header-search.smart-search.is-search-open { position: fixed; inset: var(--search-top,0) 0 auto; width: 100%; max-width: none; height: var(--search-height,100dvh); z-index: 200; margin: 0; padding: max(14px,env(safe-area-inset-top)) 14px max(14px,env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0,1fr) 44px; grid-template-rows: 48px minmax(0,1fr); gap: 12px 8px; background: #fff; border-radius: 0; box-shadow: none; }
  .is-search-open .search-field { grid-column: 1; grid-row: 1; }
  .search-close { grid-column: 2; grid-row: 1; display: grid; place-items: center; width: 44px; height: 46px; color: #101828; background: #f1f5f9; border-radius: 10px; font-size: 28px; }
  .search-panel { position: static; grid-row: 2; grid-column: 1 / -1; min-height: 0; height: 100%; max-height: none; padding: 10px 2px 20px; border: 0; border-radius: 0; box-shadow: none; }
  .search-result-grid { grid-template-columns: 1fr; gap: 4px; }
  .search-result { grid-template-columns: 46px minmax(0,1fr) auto; min-height: 75px; padding: 10px 7px; gap: 4px 9px; }
  .search-result .store-logo { width: 46px; height: 46px; }
  .search-result-name > strong { font-size: 14px; }
  .search-result-name > span { font-size: 11px; }
  .search-result-rate { grid-column: 3; grid-row: 1 / 3; max-width: 135px; text-align: right; }
  .search-result-rate .cashback-display { align-items: flex-end; }
  .search-result-rate .cashback-current { font-size: 16px; }
  .recent-chip a { padding-top: 10px; padding-bottom: 10px; }
  .recent-chip button { height: 40px; width: 36px; }
  .search-section-heading > a, .search-section-heading > button { min-height: 36px; display: inline-flex; align-items: center; }
  .search-category-grid a { min-height: 48px; }
  .cashback-card .cashback-display { min-height: 107px; }
  .cashback-card .cashback-number { font-size: clamp(24px,6.6vw,38px); letter-spacing: -1px; }
  .cashback-card .cashback-context, .cashback-card .cashback-was { font-size: 10px; }
  .cashback-card .cashback-current .rate-prefix { font-size: 10px; }
  .home-browse .store-row-rate .cashback-current { font-size: 17px; }
}
@media (max-width: 370px) {
  .search-result { grid-template-columns: 40px minmax(0,1fr) auto; gap: 4px 7px; }
  .search-result .store-logo { width: 40px; height: 40px; }
  .search-result-rate { max-width: 114px; }
  .search-result-rate .cashback-current { font-size: 14px; }
  .search-result-name > strong { font-size: 12px; }
  .search-category-grid a { font-size: 11px; padding: 8px; }
  .discovery-rates .cashback-current { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .search-field { transition: none; } }
