:root {
  color-scheme: light;
  --bg: #ededed;
  --surface: #fff;
  --text: #111;
  --muted: #666;
  --line: #e5e5e5;
  --yellow: #fff159;
  --blue: #3483fa;
  --green: #00a650;
  --green-soft: #e5f6ed;
  --shadow: 0 1px 2px rgba(0,0,0,.1);
}

@font-face {
  font-family: "Proxima Nova";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("https://http2.mlstatic.com/ui/webfonts/v3.0.0/proxima-nova/proximanova-light.woff2") format("woff2"),
       url("https://http2.mlstatic.com/ui/webfonts/v3.0.0/proxima-nova/proximanova-light.woff") format("woff");
}

@font-face {
  font-family: "Proxima Nova";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://http2.mlstatic.com/ui/webfonts/v3.0.0/proxima-nova/proximanova-regular.woff2") format("woff2"),
       url("https://http2.mlstatic.com/ui/webfonts/v3.0.0/proxima-nova/proximanova-regular.woff") format("woff");
}

@font-face {
  font-family: "Proxima Nova";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("https://http2.mlstatic.com/ui/webfonts/v3.0.0/proxima-nova/proximanova-semibold.woff2") format("woff2"),
       url("https://http2.mlstatic.com/ui/webfonts/v3.0.0/proxima-nova/proximanova-semibold.woff") format("woff");
}

body.dark {
  color-scheme: dark;
  --bg: #171717;
  --surface: #242424;
  --text: #f1f1f1;
  --muted: #bbb;
  --line: #383838;
  --yellow: #2e2a10;
  --blue: #6aa6ff;
  --green: #19c37d;
  --green-soft: #143827;
  --shadow: 0 1px 4px rgba(0,0,0,.38);
}

body.dark aside,
body.dark .status,
body.dark .switch,
body.dark .price-buckets button,
body.dark .discount-buckets button,
body.dark .category-list button,
body.dark .promo-filter button,
body.dark .active-filters button {
  color: var(--text);
}

body.dark .seller,
body.dark .seller-tail {
  color: rgba(255,255,255,.6);
}

body.dark .seller-main {
  color: var(--text);
}

body.dark .sort-control > span,
body.dark #sort-button,
body.dark .sort-menu button,
body.dark .switch-copy {
  color: var(--text);
}

body.dark .switch-copy small {
  color: rgba(255,255,255,.68);
}

body.dark .search-results,
body.dark .search-result,
body.dark .search-empty {
  background: var(--surface);
  color: var(--text);
}

body.dark .search-result + .search-result {
  border-top-color: var(--line);
}

body.dark .search-result:hover {
  background: rgba(255,255,255,.08);
}

body.dark .search-meta {
  color: rgba(255,255,255,.6);
}

body.dark .highlighted-filter {
  border-color: rgba(255,255,255,.42);
  background: #1f1f1f;
}

body.dark .active-filters button {
  border: 1px solid rgba(255,255,255,.12);
  background: #2a2a2a;
  color: rgba(255,255,255,.82);
  box-shadow: none;
}

body.dark .active-filters span {
  color: rgba(255,255,255,.45);
}

body.dark .coupon-pill {
  background: rgba(65,137,230,.28);
}

body.dark .scan-debug {
  background: rgba(255,255,255,.06);
}

body.dark .favorites-section,
body.dark .favorite-card {
  background: var(--surface);
}

body.dark .watch-button {
  background: rgba(36,36,36,.92);
}

body.dark .score {
  background: rgba(255,255,255,.08);
}

body.dark .score--hot {
  background: rgba(255,224,0,.22);
  color: #ffe781;
}

body.dark .favorite-delta span,
body.dark .favorite-meta,
body.dark .favorite-tags span {
  color: rgba(255,255,255,.58);
}

body.dark .highlighted-filter--coupon .switch-copy {
  color: #8db8ff;
}

body.dark .highlighted-filter--coupon .switch-copy span::before {
  background: rgba(106,166,255,.18);
  color: #8db8ff;
}

body.dark .pagination button {
  background: #242424;
  color: var(--text);
}

body.dark .pagination button.active {
  background: var(--blue);
  color: #07111f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--andes-font-family-primary, "Proxima Nova", -apple-system, "Roboto", Arial, sans-serif);
  font-size: 14px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0 20px;
  background:
    linear-gradient(115deg, rgba(255,255,255,.18) 0 18%, transparent 18% 100%),
    linear-gradient(90deg, #102a43 0%, #1d4ed8 46%, #08a88a 100%);
  border-bottom: 1px solid rgba(0,0,0,.12);
}

.topbar-main {
  display: grid;
  grid-template-columns: 160px minmax(360px, 590px) auto;
  align-items: center;
  gap: 24px;
  height: 56px;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-weight: 800;
  line-height: .82;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 50%;
  background: #fff;
  color: #12315f;
  font-size: 18px;
  font-weight: 800;
}

.brand-text {
  font-size: 18px;
}

.search-area {
  position: relative;
}

.searchbox {
  display: grid;
  grid-template-columns: 1fr 44px;
  min-height: 39px;
  border: 1px solid rgba(0,0,0,.16);
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}

.searchbox input {
  width: 100%;
  min-height: 37px;
  border: 0;
  border-radius: 2px 0 0 2px;
  color: #333;
  font-size: 16px;
}

.searchbox input:focus {
  outline: none;
}

.search-icon {
  position: relative;
  display: block;
  border-left: 1px solid #eee;
}

.search-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid #777;
  border-radius: 50%;
  transform: translate(-58%, -58%);
}

.search-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 2px;
  background: #777;
  transform: translate(4px, 5px) rotate(45deg);
}

.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: 45px;
  z-index: 30;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: min(70vh, 640px);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}

.search-result {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 82px;
  padding: 8px 10px;
  color: rgba(0,0,0,.9);
  text-decoration: none;
}

.search-result + .search-result {
  border-top: 1px solid #eee;
}

.search-result:hover {
  background: #f5f8ff;
}

.search-thumb {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 4px;
  background: #f5f5f5;
}

.search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.search-info {
  display: grid;
  align-content: center;
  min-width: 0;
}

.search-title,
.search-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-title {
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
}

.search-meta {
  margin-top: 1px;
  color: rgba(0,0,0,.55);
  font-size: 13px;
  line-height: 17px;
}

.search-price-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 17px;
  margin-top: 1px;
}

.search-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 22px;
}

.search-price span {
  font-size: 13px;
  font-weight: 400;
}

.search-installments {
  color: rgba(0,0,0,.9);
}

.search-installments-benefit {
  color: var(--green);
}

.search-coupon {
  margin-top: 3px;
}

.search-promo {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-width: 96px;
  padding-top: 2px;
}

.search-discount {
  font-size: 12px;
  line-height: 15px;
}

.search-previous {
  line-height: 15px;
}

.promo-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 1px 5px;
  border-radius: 2px;
  background: #2968c8;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}

.promo-chip::before {
  content: "%";
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  border: 1.4px solid currentColor;
  border-radius: 50%;
  font-size: 8px;
  line-height: 1;
}

.promo-chip--day {
  background: #3483fa;
}

.promo-chip--day::before {
  content: none;
  display: none;
}

.promo-chip--lightning {
  background: #ffe000;
  color: #111;
}

.promo-chip--lightning::before {
  content: "";
  border: 0;
  border-radius: 0;
  background: currentColor;
  clip-path: polygon(45% 0, 100% 0, 66% 43%, 100% 43%, 35% 100%, 50% 55%, 14% 55%);
}

.promo-chip--coupon {
  background: rgba(65,137,230,.2);
  color: var(--blue);
}

.promo-chip--coupon::before {
  content: "$";
  border-color: currentColor;
}

.promo-chip--best-seller {
  background: #f56b2a;
  color: #fff;
}

.promo-chip--best-seller::before {
  content: none;
  display: none;
}

.search-empty {
  padding: 13px 14px;
  color: rgba(0,0,0,.55);
  font-size: 14px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.icon-action {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-weight: 700;
}

.icon-action:hover {
  background: rgba(255,255,255,.18);
}

.theme-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset 5px -4px 0 0 currentColor;
  transition: box-shadow .18s ease, transform .18s ease;
}

body.dark .theme-icon {
  box-shadow: inset 0 0 0 3px currentColor;
  transform: rotate(90deg);
}

.offers-head {
  min-height: 78px;
  padding: 17px max(18px, calc((100vw - 1200px) / 2)) 13px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.offers-copy h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.12;
}

.offers-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 18px;
}

input,
select,
button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

button {
  border: 0;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 20px;
  width: min(1200px, calc(100vw - 28px));
  margin: 12px auto 36px;
}

.results-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  min-height: 38px;
  margin: -2px 0 10px;
  font-size: 14px;
}

.favorites-section {
  margin: 0 8px 14px;
  padding: 12px;
  border-radius: 6px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

.favorites-section[hidden] {
  display: none;
}

.favorites-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.favorites-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 21px;
}

.favorites-head p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 17px;
}

.favorites-controls {
  display: inline-flex;
  gap: 6px;
}

.favorites-controls button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  font-size: 20px;
  line-height: 1;
}

.favorites-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 270px);
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.favorite-card {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  min-width: 220px;
  max-width: 280px;
  padding: 8px 30px 8px 8px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  scroll-snap-align: start;
}

.favorite-thumb {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border-radius: 4px;
  background: #f5f5f5;
}

.favorite-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.favorite-info {
  min-width: 0;
}

.favorite-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 17px;
}

.favorite-meta {
  overflow: hidden;
  margin-top: 1px;
  color: rgba(0,0,0,.55);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 15px;
}

.favorite-price {
  margin-top: 3px;
  font-size: 18px;
  font-weight: 600;
  line-height: 22px;
}

.favorite-delta {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.favorite-delta.down { color: var(--green); font-weight: 600; }
.favorite-delta.up { color: #d1242f; font-weight: 600; }

.favorite-delta span {
  color: rgba(0,0,0,.48);
  font-weight: 400;
}

.favorite-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.favorite-tags span {
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(52,131,250,.1);
  color: var(--blue);
  font-size: 11px;
  line-height: 15px;
}

.favorite-tags .seen {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
}

.favorite-remove {
  position: absolute;
  right: 5px;
  top: 5px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}

.sort-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sort-control > span {
  color: #333;
  font-size: 14px;
  font-weight: 600;
  line-height: 23.8px;
}

#sort-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(0,0,0,.9);
  font-size: 14px;
  font-weight: 400;
  line-height: 14px;
}

.chevron {
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(45deg);
}

.sort-menu {
  position: absolute;
  top: 26px;
  right: 0;
  z-index: 9999;
  overflow: hidden;
  width: 135px;
  border: 0;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 2px 0 rgba(0,0,0,.12);
}

.sort-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 41px;
  padding: 0 13px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: #1a1a1a;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.sort-menu button.active {
  background: var(--surface);
  color: var(--blue);
  font-weight: 600;
}

.view-control {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 6px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

body.dark .view-control {
  background: rgba(255,255,255,.08);
}

.view-control button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #666;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.view-control button.active {
  background: var(--blue);
  color: #fff;
}

aside {
  align-self: start;
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding-right: 4px;
  color: #333;
  font-weight: 300;
  scrollbar-width: thin;
}

aside h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 20.7px;
}

aside h3 {
  margin: 32px 0 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
}

.status {
  color: #333;
  font-size: 14px;
  font-weight: 400;
  line-height: 15.96px;
}

.loading-line {
  display: none;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  color: var(--muted);
}

body.scanning .loading-line {
  display: flex;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #cfcfcf;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress {
  overflow: hidden;
  height: 8px;
  margin: 8px 0 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.12);
}

.progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--blue);
  box-shadow: 0 0 12px rgba(52,131,250,.58);
  transition: width .2s ease;
}

.scan-debug,
.scan-report {
  margin: 10px 0 12px;
  padding: 9px 10px;
  border-radius: 6px;
  background: rgba(0,0,0,.04);
  color: var(--muted);
  font-size: 12px;
  line-height: 15px;
}

.scan-debug[hidden],
.scan-report[hidden] {
  display: none;
}

.scan-debug summary,
.scan-report summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  list-style: none;
}

.scan-debug summary::-webkit-details-marker,
.scan-report summary::-webkit-details-marker {
  display: none;
}

.scan-debug summary::after,
.scan-report summary::after {
  content: "";
  float: right;
  width: 7px;
  height: 7px;
  margin-top: 3px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(45deg);
}

.scan-debug[open] summary::after,
.scan-report[open] summary::after {
  margin-top: 6px;
  transform: rotate(225deg);
}

.scan-debug-body,
.scan-report-body {
  display: grid;
  gap: 3px;
  margin-top: 8px;
}

.scan-debug-body div,
.scan-report-body div,
.report-best {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.scan-debug-body strong,
.scan-report-body strong {
  color: var(--text);
  font-weight: 600;
}

.scan-debug-body span,
.scan-report-body span {
  text-align: right;
}

.report-best {
  flex-direction: column;
  margin-top: 6px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: var(--blue);
  text-decoration: none;
}

.report-best span,
.report-best small {
  text-align: left;
}

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  margin: 4px 0;
  padding: 11px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: none;
  color: #333;
  font-size: 16px;
  font-weight: 300;
  line-height: 21.6px;
}

.switch input {
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #d9d9d9;
  cursor: pointer;
  transition: background .16s ease;
}

.switch input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.24);
  transition: transform .16s ease;
}

.switch input:checked {
  background: var(--blue);
}

.switch input:checked::after {
  transform: translateX(14px);
}

.highlighted-filter {
  width: 242px;
}

.highlighted-filter--international .switch-copy {
  color: #b4232c;
}

.highlighted-filter--coupon .switch-copy {
  color: #1b65d8;
}

.highlighted-filter--coupon .switch-copy span::before {
  content: "%";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 50%;
  background: rgba(52,131,250,.12);
  color: #1b65d8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.international-filter-label {
  display: inline-flex;
  align-items: center;
  color: #b4232c;
  font-style: italic;
  font-weight: 700;
}

.international-filter-label::before {
  content: "✈";
  margin-right: 3px;
  color: currentColor;
  font-size: 12px;
  font-style: normal;
  line-height: 1;
  transform: translateY(-1px) rotate(-12deg);
}

.switch-copy {
  display: block;
  min-width: 0;
  margin: 2px 10px 0 0;
  color: rgba(0,0,0,.8);
  font-size: 14px;
  font-weight: 600;
  line-height: 15px;
}

.switch-copy small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 400;
  line-height: 15px;
}

.full-mini {
  display: inline-block;
  margin-right: 4px;
  color: var(--green);
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0;
}

.full-mini::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 11px;
  margin-right: 1px;
  background: currentColor;
  clip-path: polygon(45% 0, 100% 0, 66% 43%, 100% 43%, 35% 100%, 50% 55%, 14% 55%);
  vertical-align: -1px;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 7px;
  min-height: 34px;
  margin: 8px 0 12px;
}

.active-filters.is-empty {
  pointer-events: none;
}

.active-filters button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 8px;
  border: 0;
  border-radius: 2px;
  background: #fff;
  color: rgba(0,0,0,.7);
  font: inherit;
  font-size: 13px;
  line-height: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
  cursor: pointer;
}

.active-filters span {
  color: rgba(0,0,0,.38);
  font-size: 15px;
  line-height: 1;
}

.active-filters .chip-full {
  color: var(--green);
  font-weight: 800;
  font-style: italic;
}

.active-filters .chip-full::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 12px;
  margin-right: 2px;
  background: currentColor;
  clip-path: polygon(45% 0, 100% 0, 66% 43%, 100% 43%, 35% 100%, 50% 55%, 14% 55%);
  vertical-align: -1px;
}

.active-filters .chip-coupon {
  color: var(--blue);
  font-weight: 700;
}

.active-filters .chip-coupon::before {
  content: "%";
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 5px;
  border-radius: 50%;
  background: rgba(52,131,250,.12);
  font-size: 11px;
}

.active-filters .chip-international {
  color: #b4232c;
  font-weight: 700;
  font-style: italic;
}

.active-filters .chip-international::before {
  content: "✈";
  display: inline-block;
  margin-right: 5px;
  transform: rotate(-12deg);
}

.price-buckets button,
.discount-buckets button {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0 0 13px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #333;
  text-align: left;
  font-size: 14px;
  font-weight: 300;
  line-height: 13px;
}

.category-list button,
.promo-filter button {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0 0 13px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #333;
  text-align: left;
  font-size: 14px;
  font-weight: 300;
  line-height: 13px;
}

.category-list button.active,
.promo-filter button.active,
.discount-buckets button.active {
  color: var(--blue);
  font-weight: 600;
}

.category-list span,
.promo-filter span,
.discount-buckets span {
  color: #8c8c8c;
  font-size: 14px;
  font-weight: 300;
}

.price-buckets button.active {
  color: var(--blue);
  font-weight: 600;
}

.price-buckets span {
  color: #8c8c8c;
  font-size: 14px;
  font-weight: 300;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 284px));
  justify-content: start;
  gap: 0;
}

.grid--wide {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  max-width: 920px;
}

.grid--wide .card {
  grid-template-areas: "portada content";
  grid-template-rows: auto;
  align-items: stretch;
  max-width: none;
  min-height: 0;
  margin: 0 8px 10px;
}

.grid--wide .card {
  grid-template-columns: 214px minmax(0, 1fr);
}

.grid--wide .media {
  height: 214px;
}

.grid--wide .body {
  padding: 16px 18px;
}

.grid--wide .title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.grid--wide .title {
  -webkit-line-clamp: 3;
  max-width: 520px;
}

.pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 8px 32px;
}

.pagination[hidden] {
  display: none;
}

.pagination-summary {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 14px;
  line-height: 18px;
}

.pagination button {
  min-width: 34px;
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: rgba(0,0,0,.85);
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  font-weight: 400;
}

.pagination button.active {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}

.pagination button:disabled {
  opacity: .45;
  cursor: default;
}

.pagination-gap {
  color: var(--muted);
  padding: 0 2px;
}

.card {
  position: relative;
  display: grid;
  grid-template-areas: "portada" "content";
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: stretch;
  justify-content: space-between;
  min-width: 160px;
  max-width: 284px;
  min-height: var(--max-card-height, auto);
  overflow: hidden;
  margin: 0 8px 16px;
  border: none;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 2px 0 rgba(0,0,0,.12);
  transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease;
}

.card[hidden] {
  display: none !important;
}

.card.card--new:not([hidden]) {
  animation: card-filter-in .24s ease both;
}

.watch-button {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #777;
  box-shadow: 0 1px 4px rgba(0,0,0,.14);
  font-size: 20px;
  line-height: 1;
}

.watch-button:hover,
.watch-button.active {
  color: #d1242f;
}

.watch-button.active {
  background: #fff3f5;
}

@keyframes card-filter-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.media {
  grid-area: portada;
  position: relative;
  display: grid;
  place-items: center;
  height: 284px;
  background: #f5f5f5;
  text-decoration: none;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 22px;
  padding: 2px 4px;
  border-radius: 2px;
  background: #2968c8;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

.badge::before {
  content: "%";
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1.6px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
}

.badge--lightning {
  background: #ffe000;
  color: #111;
  gap: 2px;
  min-height: 24px;
  padding: 2px 4px;
}

.badge--lightning::before {
  content: "";
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: currentColor;
  clip-path: polygon(45% 0, 100% 0, 66% 43%, 100% 43%, 35% 100%, 50% 55%, 14% 55%);
}

.countdown-block {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 14px;
  padding: 1px 2px;
  border-radius: 2px;
  background: #fff1cb;
  color: #000;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.countdown-block--roll {
  animation: countdown-roll-up .22s ease;
}

@keyframes countdown-roll-up {
  0% {
    opacity: .15;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.countdown-separator {
  color: #000;
  font-size: 10px;
  font-weight: 600;
  line-height: 12px;
}

.badge--day {
  background: #3483fa;
  color: #fff;
}

.badge--day::before {
  content: none;
  display: none;
}

.badge--best-seller {
  background: #f56b2a;
  color: #fff;
}

.badge--best-seller::before {
  content: none;
  display: none;
}

.badge--coupon {
  background: rgba(65,137,230,.9);
  color: #fff;
}

.badge--coupon::before {
  content: "$";
}

.body {
  grid-area: content;
  padding: 16px 16px 16px;
}

.title {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  text-decoration: none;
}

.seller {
  margin-top: 2px;
  color: rgba(0,0,0,.55);
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
}

.seller-main {
  color: #191919;
  font-weight: 600;
}

.seller-tail {
  color: rgba(0,0,0,.55);
  font-weight: 400;
}

.official {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 3px;
  border-radius: 50%;
  background: var(--blue);
  vertical-align: -0.1px;
  position: relative;
}

.official::after {
  content: "";
  position: absolute;
  left: 2.5px;
  top: 2.5px;
  width: 4px;
  height: 2px;
  border-left: 1.6px solid #fff;
  border-bottom: 1.6px solid #fff;
  transform: rotate(-45deg);
}

.review {
  min-height: 18px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 18px;
}

.star { color: var(--blue); }

.score-row {
  min-height: 18px;
  margin-top: 4px;
}

.score {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

.score--good {
  background: rgba(0,166,80,.12);
  color: var(--green);
}

.score--hot {
  background: #fff3bf;
  color: #8a5a00;
}

.price-line {
  min-height: 18px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 16px;
}

.discount {
  padding: 1px 4px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.discount--lightning {
  padding: 0 2px;
  border-radius: 2px;
  background: #ffe781;
  color: #000;
  font-weight: 600;
  line-height: 15px;
}

.previous {
  color: #777;
  font-size: 12px;
  text-decoration: line-through;
}

.price {
  margin-top: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 30px;
}

.installments {
  margin-top: 2px;
  color: var(--text);
  font-size: 14px;
  line-height: 18px;
}

.installments-benefit {
  color: var(--green);
}

.coupon-pill {
  display: inline-block;
  width: fit-content;
  margin-top: 6px;
  padding: 0 4px;
  border-radius: 2px;
  background: rgba(65,137,230,.2);
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
}

.shipping-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 14px;
  line-height: 18px;
}

.international-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  font-size: 14px;
  line-height: 18px;
}

.international-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #d1242f;
  font-style: italic;
  font-weight: 700;
}

.international-badge::before {
  content: "✈";
  margin-right: 2px;
  color: currentColor;
  font-size: 12px;
  font-style: normal;
  line-height: 1;
  transform: translateY(-1px) rotate(-12deg);
}

.shipped-from-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 14px;
  line-height: 18px;
}

.shipped-from {
  color: var(--muted);
}

.shipping-pill {
  padding: 0 4px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
}

.shipping-free {
  padding: 0;
  background: transparent;
  color: var(--green);
  font-weight: 600;
}

.variation-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 18px;
}

.full {
  color: var(--green);
  font-style: italic;
  font-weight: 800;
}

.full::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 11px;
  margin-right: 2px;
  background: currentColor;
  clip-path: polygon(45% 0, 100% 0, 66% 43%, 100% 43%, 35% 100%, 50% 55%, 14% 55%);
  vertical-align: -1px;
}

@media (max-width: 900px) {
  .toolbar,
  .shell,
  .offers-head,
  .topbar-main { grid-template-columns: 1fr; }
  .topbar-main { height: auto; padding: 8px 0; }
  aside { position: static; }
}

.catalog-tabs {
  display: flex;
  align-items: flex-end;
  gap: 34px;
  margin-top: 12px;
  min-height: 32px;
}

.catalog-tabs button {
  position: relative;
  min-height: 32px;
  padding: 0 0 10px;
  border-radius: 0;
  background: transparent;
  color: rgba(0,0,0,.72);
  font-size: 14px;
  font-weight: 600;
}

.catalog-tabs button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: transparent;
}

.catalog-tabs button.active {
  color: rgba(0,0,0,.9);
}

.catalog-tabs button.active::after {
  background: var(--blue);
}

body.dark .catalog-tabs button {
  color: rgba(255,255,255,.72);
}

body.dark .catalog-tabs button.active {
  color: #fff;
}

body.history-mode .results-toolbar,
body.history-mode #motd-section,
body.history-mode #favorites-section,
body.history-mode #grid,
body.history-mode #pagination {
  display: none !important;
}

body.history-mode .shell {
  grid-template-columns: minmax(0, 1fr);
}

body.history-mode aside {
  display: none;
}

.motd-section {
  display: grid;
  gap: 12px;
  margin: 0 8px 16px;
}

.motd-section[hidden] {
  display: none;
}

.top-rail {
  padding: 12px;
  border-radius: 6px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

.top-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.top-rail-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
}

.top-rail-head button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(52,131,250,.12);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.top-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.top-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 9px;
  min-width: 190px;
  padding: 8px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}

.top-thumb {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 4px;
  background: #f5f5f5;
}

.top-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.top-info {
  display: grid;
  align-content: start;
  min-width: 0;
}

.top-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 16px;
}

.top-price-line {
  min-height: 17px;
  margin-top: 2px;
}

.top-price {
  font-size: 17px;
  font-weight: 600;
  line-height: 20px;
}

.watch-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.4;
}

.watch-button.active svg {
  filter: drop-shadow(0 1px 2px rgba(209,36,47,.28));
}

.card-score {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 3;
}

.score {
  background: #fff0b8;
  color: #8a5a00;
}

.score--warm {
  background: #ffd166;
  color: #774300;
}

.score--hot {
  background: #ff8a3d;
  color: #fff;
}

.score--fire {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ff3b30, #ff8a00 55%, #ffd166);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.2), 0 0 12px rgba(255,91,0,.45);
  animation: score-fire-glow 1.35s ease-in-out infinite;
}

.score--fire::after {
  content: "";
  position: absolute;
  inset: -12px -8px auto auto;
  width: 24px;
  height: 28px;
  border-radius: 45% 45% 55% 55%;
  background: radial-gradient(circle at 50% 75%, rgba(255,255,255,.75), rgba(255,255,255,0) 55%);
  transform: rotate(18deg);
  opacity: .55;
}

@keyframes score-fire-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,.2), 0 0 10px rgba(255,91,0,.42); }
  50% { box-shadow: 0 0 0 1px rgba(255,255,255,.24), 0 0 18px rgba(255,91,0,.72); }
}

.favorite-card {
  grid-template-columns: 78px minmax(0, 1fr);
  grid-template-areas:
    "banners banners"
    "thumb info";
  min-width: 270px;
  max-width: 320px;
  padding: 8px 30px 10px 8px;
}

.favorite-banners {
  grid-area: banners;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 20px;
}

.favorite-banner {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
}

.favorite-banner--seen,
.favorite-banner--down {
  background: var(--green-soft);
  color: var(--green);
}

.favorite-banner--up {
  background: #ffe8e8;
  color: #d1242f;
}

.favorite-banner--time,
.favorite-banner--local,
.favorite-banner--stable {
  background: rgba(52,131,250,.1);
  color: var(--blue);
}

.favorite-thumb {
  grid-area: thumb;
}

.favorite-info {
  grid-area: info;
}

.favorite-price-line {
  min-height: 16px;
  margin-top: 3px;
}

.favorite-installments {
  margin-top: 1px;
  font-size: 12px;
  line-height: 15px;
}

.favorite-coupon {
  margin-top: 3px;
  width: fit-content;
}

.favorite-tags .score {
  height: 17px;
  background: #fff0b8;
  color: #8a5a00;
  font-size: 11px;
}

.favorite-tags .score--warm {
  background: #ffd166;
  color: #774300;
}

.favorite-tags .score--hot {
  background: #ff8a3d;
  color: #fff;
}

.favorite-tags .score--fire {
  background: linear-gradient(135deg, #ff3b30, #ff8a00 55%, #ffd166);
  color: #fff;
}

.favorite-tags span.seen {
  border-radius: 2px;
}

.history-view {
  margin: 0 8px 36px;
}

.history-view[hidden] {
  display: none;
}

.history-head {
  margin: 0 0 14px;
}

.history-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
}

.history-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 150px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}

.history-thumb {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border-radius: 4px;
  background: #f5f5f5;
}

.history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.history-title {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  line-height: 18px;
}

.history-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.history-price {
  font-size: 22px;
  font-weight: 600;
  line-height: 26px;
}

.history-delta {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(52,131,250,.1);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.history-delta.down {
  background: var(--green-soft);
  color: var(--green);
}

.history-delta.up {
  background: #ffe8e8;
  color: #d1242f;
}

.history-chart {
  justify-self: end;
}

.sparkline {
  display: block;
  width: 130px;
  height: 46px;
}

.sparkline polyline {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline--empty {
  display: inline-flex;
  align-items: center;
  height: 24px;
  color: var(--muted);
  font-size: 12px;
}

.history-empty {
  padding: 22px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}

body.dark .top-rail,
body.dark .history-card,
body.dark .history-empty {
  background: var(--surface);
}

body.dark .score {
  background: rgba(255,209,102,.18);
  color: #ffd166;
}

body.dark .score--warm {
  background: rgba(255,180,76,.25);
  color: #ffcb7d;
}

body.dark .score--hot {
  background: rgba(255,105,49,.32);
  color: #ffb18b;
}

body.dark .score--fire {
  color: #fff;
}

@media (max-width: 820px) {
  .catalog-tabs {
    gap: 22px;
  }

  .history-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .history-chart {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .sparkline {
    width: 100%;
  }
}

main {
  min-width: 0;
  max-width: 916px;
}

.motd-section,
.favorites-section,
.results-toolbar,
.grid,
.pagination {
  width: 100%;
  max-width: 916px;
  box-sizing: border-box;
}

.motd-section,
.favorites-section {
  margin-left: 8px;
  margin-right: 8px;
  width: calc(100% - 16px);
}

.score-badge {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.card-score {
  left: 12px;
  top: 12px;
}

.top-rail {
  overflow: hidden;
}

.top-rail-head {
  align-items: flex-start;
  margin-bottom: 12px;
}

.top-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.top-tabs button {
  min-height: 26px;
  padding: 0 10px;
  border-radius: 4px;
  background: rgba(0,0,0,.055);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.top-tabs button.active {
  background: rgba(52,131,250,.12);
  color: var(--blue);
  box-shadow: inset 0 -2px 0 var(--blue);
}

.top-tabs button:disabled {
  opacity: .42;
  cursor: default;
}

.top-strip {
  grid-auto-flow: initial;
  grid-auto-columns: initial;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  animation: top-strip-in .2s ease both;
}

@keyframes top-strip-in {
  from {
    opacity: .2;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.top-card {
  position: relative;
  grid-template-columns: 64px minmax(0, 1fr);
  min-width: 0;
  min-height: 132px;
  overflow: hidden;
}

.top-thumb {
  position: relative;
  align-self: start;
}

.top-score {
  position: absolute;
  left: 4px;
  top: 4px;
  z-index: 2;
}

.top-thumb .badge {
  left: 4px;
  bottom: 4px;
  max-width: calc(100% - 8px);
  min-height: 17px;
  padding: 1px 3px;
  gap: 2px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 9px;
  line-height: 13px;
  text-overflow: clip;
}

.top-thumb .badge::before {
  width: 10px;
  height: 10px;
  font-size: 7px;
}

.top-meta {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 15px;
}

.top-installments {
  margin-top: 1px;
  font-size: 12px;
  line-height: 15px;
}

.top-coupon {
  width: fit-content;
  max-width: 100%;
  margin-top: 3px;
}

.top-card .shipping-row {
  margin-top: 3px;
  font-size: 12px;
}

.favorites-section {
  overflow: hidden;
}

.favorites-strip {
  grid-auto-columns: 286px;
}

.favorite-card {
  grid-template-columns: 78px minmax(0, 1fr);
  min-width: 286px;
  max-width: 286px;
  height: 178px;
  overflow: hidden;
}

.favorite-banners {
  flex-wrap: nowrap;
  overflow: hidden;
}

.favorite-banner {
  flex: 0 0 auto;
  border-radius: 4px;
  min-height: 22px;
  padding: 2px 8px;
  font-size: 11px;
}

.favorite-banner--promo {
  background: #3483fa;
  color: #fff;
}

.favorite-thumb {
  position: relative;
  align-self: start;
}

.favorite-score {
  position: absolute;
  left: 4px;
  top: 4px;
  z-index: 2;
}

.favorite-title {
  -webkit-line-clamp: 2;
}

.favorite-tags {
  min-height: 18px;
}

.favorite-tags:empty {
  display: none;
}

.favorite-tags .score {
  display: none;
}

.favorite-remove {
  z-index: 4;
}

body.dark .top-tabs button {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.68);
}

body.dark .top-tabs button.active {
  background: rgba(106,166,255,.18);
  color: var(--blue);
}

@media (max-width: 980px) {
  .top-strip {
    grid-template-columns: repeat(5, 176px);
    overflow-x: auto;
  }
}

.score-badge {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.score-badge::after {
  display: none;
}

.score-badge.score--fire {
  background: radial-gradient(circle at 35% 28%, #ffe7a3 0 20%, #ff8a00 45%, #ff3b30 78%);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,.22);
  box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 0 16px rgba(255,91,0,.72);
}

.card > .card-score {
  position: absolute !important;
  left: 12px !important;
  top: 12px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 4;
}

.watch-button {
  transition: color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.watch-button:hover {
  color: #d1242f;
  transform: scale(1.06);
  box-shadow: 0 2px 10px rgba(209,36,47,.2);
}

.watch-button:active svg {
  animation: heart-beat .34s ease;
}

.watch-button.active {
  transform: none;
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.22); }
}

.favorite-burst {
  position: fixed;
  z-index: 2147483647;
  pointer-events: none;
  width: 0;
  height: 0;
}

.favorite-burst span {
  position: absolute;
  left: -5px;
  top: -5px;
  color: #d1242f;
  font-size: 13px;
  font-weight: 800;
  animation: favorite-pop .78s ease-out forwards;
  transform: rotate(calc((var(--i) - 2) * 18deg));
}

.favorite-burst--off span {
  color: #777;
}

.favorite-burst span:nth-child(1) { --dx: -25px; --dy: -30px; }
.favorite-burst span:nth-child(2) { --dx: -10px; --dy: -42px; }
.favorite-burst span:nth-child(3) { --dx: 9px; --dy: -39px; }
.favorite-burst span:nth-child(4) { --dx: 23px; --dy: -24px; }
.favorite-burst span:nth-child(5) { --dx: 0; --dy: -52px; }

@keyframes favorite-pop {
  from {
    opacity: 1;
    transform: translate(0, 0) scale(.8);
  }
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(1.16);
  }
}

.top-rail {
  padding: 14px;
}

.top-rail-head {
  position: relative;
  display: block;
  margin-bottom: 14px;
  text-align: center;
}

.top-rail-head h2 {
  text-align: center;
}

.top-rail-head > button {
  position: absolute;
  right: 0;
  top: 0;
  min-height: 30px;
  border-radius: 999px;
}

.top-tabs {
  justify-content: center;
}

.top-tabs button {
  min-height: 28px;
  border-radius: 999px;
  background: #f2f2f2;
}

.top-tabs button.active {
  background: #e9f1ff;
  box-shadow: inset 0 -2px 0 var(--blue), 0 1px 2px rgba(52,131,250,.12);
}

.top-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  overflow: hidden;
  animation: none !important;
}

.top-card {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 142px auto;
  gap: 0;
  min-height: 318px;
  padding: 0;
  overflow: hidden;
}

.top-thumb {
  width: 100%;
  height: 142px;
  border-radius: 6px 6px 0 0;
}

.top-thumb .badge {
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  min-height: 19px;
  font-size: 10px;
  line-height: 15px;
}

.top-score {
  left: 8px;
  top: 8px;
}

.top-info {
  padding: 10px 10px 12px;
}

.top-title {
  min-height: 34px;
  -webkit-line-clamp: 2;
}

.top-meta {
  margin-top: 2px;
}

.top-price-line {
  margin-top: 5px;
}

.top-card .coupon-pill,
.top-card .shipping-free,
.top-card .shipping-pill {
  max-width: 100%;
}

.top-card .shipping-row {
  flex-wrap: wrap;
}

.favorite-card {
  grid-template-areas:
    "banners banners"
    "thumb info"
    "footer footer";
  height: 212px;
  padding: 9px 30px 0 9px;
  border: 1px solid rgba(0,0,0,.04);
}

.favorite-card--stable {
  background: linear-gradient(135deg, rgba(232,241,255,.62), #fff 34%, #fff);
}

.favorite-card--down {
  background: linear-gradient(135deg, rgba(229,246,237,.88), #fff 36%, #fff);
}

.favorite-card--up {
  background: linear-gradient(135deg, rgba(255,232,232,.88), #fff 36%, #fff);
}

.favorite-banners {
  gap: 6px;
  min-height: 28px;
  padding-right: 14px;
}

.favorite-banner {
  min-height: 24px;
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-banner--stable,
.favorite-banner--down,
.favorite-banner--up {
  font-weight: 800;
}

.favorite-thumb {
  width: 78px;
  height: 78px;
}

.favorite-score {
  left: 4px;
  top: 4px;
}

.favorite-footer {
  grid-area: footer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  margin: 8px -30px 0 -9px;
  padding: 0 12px;
  color: rgba(0,0,0,.72);
  font-size: 11px;
  line-height: 14px;
}

.favorite-footer--seen {
  background: linear-gradient(90deg, rgba(0,166,80,.14), rgba(0,166,80,.05));
  color: var(--green);
}

.favorite-footer--local {
  background: linear-gradient(90deg, rgba(52,131,250,.13), rgba(52,131,250,.04));
  color: var(--blue);
}

.favorite-footer strong {
  font-size: 11px;
  white-space: nowrap;
}

body.dark .favorite-card--stable,
body.dark .favorite-card--down,
body.dark .favorite-card--up {
  background: linear-gradient(135deg, rgba(255,255,255,.07), var(--surface) 36%, var(--surface));
}

@media (max-width: 980px) {
  .top-strip {
    grid-template-columns: repeat(5, 168px);
    overflow-x: auto;
  }
}

/* Final polish: deal score, top strips and watched products. */
.top-rail-head h2,
.top-tabs button {
  text-transform: uppercase;
}

.top-tabs button {
  letter-spacing: 0;
}

.top-strip {
  animation: none !important;
}

.top-strip[data-mode] {
  animation: top-strip-switch .24s ease both !important;
}

@keyframes top-strip-switch {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.score-badge {
  position: relative;
  isolation: isolate;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  color: #7a4b00;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.14), 0 0 0 2px rgba(255,255,255,.92);
}

.score-badge::before,
.score-badge::after {
  pointer-events: none;
}

.score-badge.score--fire {
  overflow: visible;
  background: linear-gradient(145deg, #ff5a1f 0%, #f0271d 52%, #9f0600 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
  box-shadow: 0 0 0 2px rgba(255,255,255,.95), 0 2px 10px rgba(0,0,0,.2), 0 0 18px rgba(255,61,0,.72);
  animation: score-fire-pulse 1.2s ease-in-out infinite;
}

.score-badge.score--fire::before {
  content: "";
  position: absolute;
  left: 7px;
  top: -12px;
  z-index: -1;
  width: 18px;
  height: 25px;
  border-radius: 13px 13px 13px 3px;
  background:
    radial-gradient(circle at 52% 76%, #ffe184 0 18%, transparent 19%),
    linear-gradient(150deg, #ffed69 0%, #ff9f0a 42%, #ff2d1f 72%, transparent 73%);
  clip-path: polygon(50% 0, 77% 26%, 70% 52%, 96% 76%, 64% 100%, 34% 94%, 8% 72%, 30% 49%, 22% 25%);
  filter: drop-shadow(0 0 7px rgba(255,87,0,.7));
  transform-origin: 50% 100%;
  animation: flame-flicker .78s ease-in-out infinite alternate;
}

.score-badge.score--fire::after {
  content: "";
  display: block;
  position: absolute;
  inset: 5px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, rgba(255,239,163,.55), rgba(255,239,163,0) 46%);
}

@keyframes score-fire-pulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(255,255,255,.95), 0 2px 10px rgba(0,0,0,.2), 0 0 14px rgba(255,61,0,.58);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(255,255,255,.95), 0 2px 10px rgba(0,0,0,.2), 0 0 23px rgba(255,119,0,.88);
  }
}

@keyframes flame-flicker {
  from {
    transform: rotate(-7deg) scaleY(.92);
    opacity: .82;
  }
  to {
    transform: rotate(8deg) scaleY(1.08);
    opacity: 1;
  }
}

.card > .score-badge.card-score {
  position: absolute !important;
  left: 12px !important;
  top: 12px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 5;
}

.favorites-strip {
  grid-auto-columns: 176px;
  align-items: stretch;
  gap: 10px;
}

.favorite-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 31px 104px minmax(0, 1fr) 30px;
  grid-template-areas:
    "banners"
    "thumb"
    "info"
    "footer";
  min-width: 176px;
  max-width: 176px;
  height: 326px;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}

.favorite-card--stable {
  background: linear-gradient(180deg, #edf5ff 0, #fff 36%, #fff 100%);
  box-shadow: inset 0 0 0 1px rgba(52,131,250,.12), 0 1px 2px rgba(0,0,0,.12);
}

.favorite-card--down {
  background: linear-gradient(180deg, #e7f8ef 0, #fff 36%, #fff 100%);
  box-shadow: inset 0 0 0 1px rgba(0,166,80,.16), 0 1px 2px rgba(0,0,0,.12);
}

.favorite-card--up {
  background: linear-gradient(180deg, #fff0f0 0, #fff 36%, #fff 100%);
  box-shadow: inset 0 0 0 1px rgba(209,36,47,.18), 0 1px 2px rgba(0,0,0,.12);
}

.favorite-banners {
  grid-area: banners;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-height: 31px;
  padding: 7px 28px 4px 7px;
  overflow: hidden;
}

.favorite-banner {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  min-height: 20px;
  padding: 2px 7px;
  overflow: hidden;
  border-radius: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
}

.favorite-banner--promo {
  flex: 0 0 auto;
  background: #3483fa;
  color: #fff;
}

.favorite-banner--stable {
  background: #dcebff;
  color: var(--blue);
}

.favorite-banner--down {
  background: #dff7ea;
  color: var(--green);
}

.favorite-banner--up {
  background: #ffe0e2;
  color: #c61824;
}

.favorite-thumb {
  grid-area: thumb;
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 104px;
  border-radius: 0;
  background: #f5f5f5;
}

.favorite-score {
  position: absolute;
  left: 7px;
  top: 7px;
  z-index: 3;
}

.favorite-info {
  grid-area: info;
  min-width: 0;
  padding: 9px 9px 6px;
  overflow: hidden;
}

.favorite-title {
  min-height: 34px;
  font-size: 13px;
  line-height: 17px;
  -webkit-line-clamp: 2;
}

.favorite-meta {
  margin-top: 1px;
}

.favorite-price-line {
  min-height: 15px;
  margin-top: 4px;
}

.favorite-price {
  margin-top: 1px;
  font-size: 19px;
  line-height: 22px;
}

.favorite-installments {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 2px;
  font-size: 12px;
  line-height: 15px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.favorite-coupon {
  width: fit-content;
  max-width: 100%;
  margin-top: 3px;
}

.favorite-tags {
  gap: 4px;
  min-height: 0;
  margin-top: 4px;
}

.favorite-tags span {
  border-radius: 2px;
}

.favorite-tags .score {
  display: none;
}

.favorite-footer {
  grid-area: footer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 30px;
  margin: 0;
  padding: 0 9px;
  border-top: 1px solid rgba(0,0,0,.035);
  font-size: 10px;
  font-weight: 700;
  line-height: 13px;
}

.favorite-footer--seen {
  background: linear-gradient(90deg, #dff7ea, #effbf4);
  color: var(--green);
}

.favorite-footer--local {
  background: linear-gradient(90deg, #e7f0ff, #f3f7ff);
  color: var(--blue);
}

.favorite-card--up .favorite-footer {
  background: linear-gradient(90deg, #ffe2e4, #fff1f2);
  color: #c61824;
}

.favorite-card--down .favorite-footer {
  background: linear-gradient(90deg, #d7f5e5, #eefbf4);
}

.favorite-footer span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-footer strong {
  flex: 0 0 auto;
  font-size: 10px;
  white-space: nowrap;
}

.favorite-remove {
  right: 5px;
  top: 5px;
  z-index: 6;
}

body.dark .favorite-card--stable {
  background: linear-gradient(180deg, rgba(52,131,250,.22), var(--surface) 38%, var(--surface));
}

body.dark .favorite-card--down {
  background: linear-gradient(180deg, rgba(0,166,80,.2), var(--surface) 38%, var(--surface));
}

body.dark .favorite-card--up {
  background: linear-gradient(180deg, rgba(209,36,47,.24), var(--surface) 38%, var(--surface));
}

body.dark .favorite-footer--seen,
body.dark .favorite-footer--local,
body.dark .favorite-card--up .favorite-footer {
  border-top-color: rgba(255,255,255,.08);
}

/* Final tuning after visual QA. */
.score-badge.score--fire {
  overflow: hidden;
  background: linear-gradient(145deg, #ff3636 0%, #d90916 58%, #8f0008 100%) !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
  box-shadow: 0 0 0 2px rgba(255,255,255,.95), 0 2px 10px rgba(0,0,0,.18), 0 0 16px rgba(217,9,22,.5) !important;
  animation: score-red-pulse 1.45s ease-in-out infinite;
}

.score-badge.score--fire::before,
.score-badge.score--fire::after {
  display: none !important;
}

@keyframes score-red-pulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(255,255,255,.95), 0 2px 10px rgba(0,0,0,.18), 0 0 12px rgba(217,9,22,.42);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(255,255,255,.95), 0 2px 10px rgba(0,0,0,.18), 0 0 22px rgba(217,9,22,.72);
  }
}

.top-thumb > .score-badge.top-score {
  position: absolute !important;
  left: 8px !important;
  top: 8px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 6 !important;
  display: inline-grid !important;
  opacity: 1 !important;
}

.favorites-strip {
  grid-auto-columns: 196px;
  gap: 12px;
}

.favorite-card {
  grid-template-rows: 32px 132px minmax(0, 1fr) 34px;
  min-width: 196px;
  max-width: 196px;
  height: 374px;
}

.favorite-card--stable {
  background: linear-gradient(180deg, #e8f2ff 0, #fff 42%, #f8fbff 100%);
  box-shadow: inset 0 0 0 1px rgba(52,131,250,.22), 0 1px 2px rgba(0,0,0,.12);
}

.favorite-card--down {
  background: linear-gradient(180deg, #dcf8e9 0, #fff 42%, #f4fff8 100%);
  box-shadow: inset 0 0 0 1px rgba(0,166,80,.24), 0 1px 2px rgba(0,0,0,.12);
}

.favorite-card--up {
  background: linear-gradient(180deg, #ffe1e4 0, #fff 42%, #fff6f6 100%);
  box-shadow: inset 0 0 0 1px rgba(209,36,47,.28), 0 1px 2px rgba(0,0,0,.12);
}

.favorite-banners {
  min-height: 32px;
  padding: 7px 27px 4px 7px;
}

.favorite-banner {
  min-height: 21px;
  font-size: 10px;
}

.favorite-banner--stable {
  background: #d9e9ff;
  color: #0b63d8;
}

.favorite-banner--up {
  background: #ffd6da;
  color: #b70f1b;
}

.favorite-banner--down {
  background: #d0f4df;
  color: #007f3d;
}

.favorite-thumb {
  height: 132px;
  overflow: hidden;
  background: #f5f5f5;
}

.favorite-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.favorite-info {
  padding: 9px 10px 6px;
}

.favorite-title {
  min-height: 34px;
}

.favorite-installments {
  -webkit-line-clamp: 2;
}

.favorite-footer {
  min-height: 34px;
  padding: 0 10px;
  font-size: 10px;
  line-height: 13px;
}

.favorite-footer--stable {
  background: linear-gradient(90deg, #d9e9ff, #f0f6ff);
  color: #0b63d8;
}

.favorite-footer--up {
  background: linear-gradient(90deg, #ffd6da, #fff0f1);
  color: #b70f1b;
}

.favorite-footer--down {
  background: linear-gradient(90deg, #d0f4df, #effbf4);
  color: #007f3d;
}

body.dark .favorite-footer--stable {
  background: linear-gradient(90deg, rgba(52,131,250,.24), rgba(52,131,250,.08));
}

body.dark .favorite-footer--up {
  background: linear-gradient(90deg, rgba(209,36,47,.28), rgba(209,36,47,.1));
}

body.dark .favorite-footer--down {
  background: linear-gradient(90deg, rgba(0,166,80,.24), rgba(0,166,80,.08));
}

.favorites-strip {
  grid-auto-columns: 210px;
}

.favorite-card {
  grid-template-rows: 31px 124px minmax(0, 1fr) 34px;
  min-width: 210px;
  max-width: 210px;
  height: 414px;
}

.favorite-banners {
  justify-content: flex-start;
  padding-right: 28px;
}

.favorite-banner--promo {
  max-width: calc(100% - 2px);
}

.favorite-thumb {
  height: 124px;
}

.favorite-info {
  padding: 10px 10px 7px;
}

.favorite-title {
  min-height: 36px;
  line-height: 18px;
}

.favorite-meta {
  font-size: 12px;
  line-height: 15px;
}

.favorite-coupon {
  display: -webkit-box;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  white-space: normal;
  font-size: 12px;
  line-height: 16px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.favorite-tags {
  align-items: flex-start;
}

.favorite-footer {
  font-size: 10px;
}

/* Stronger watched-price states: make price movement readable at a glance. */
.favorite-card--stable {
  background:
    linear-gradient(180deg, rgba(215,232,255,.98) 0, rgba(255,255,255,.98) 43%, rgba(236,245,255,.98) 100%),
    var(--surface);
  border-color: rgba(52,131,250,.32);
  box-shadow: inset 0 0 0 1px rgba(52,131,250,.28), 0 2px 6px rgba(52,131,250,.14), 0 1px 2px rgba(0,0,0,.12);
}

.favorite-card--down {
  background:
    linear-gradient(180deg, rgba(202,246,222,.98) 0, rgba(255,255,255,.98) 43%, rgba(230,253,240,.98) 100%),
    var(--surface);
  border-color: rgba(0,166,80,.38);
  box-shadow: inset 0 0 0 1px rgba(0,166,80,.32), 0 2px 7px rgba(0,166,80,.16), 0 1px 2px rgba(0,0,0,.12);
}

.favorite-card--up {
  background:
    linear-gradient(180deg, rgba(255,204,210,.98) 0, rgba(255,255,255,.98) 43%, rgba(255,237,239,.98) 100%),
    var(--surface);
  border-color: rgba(209,36,47,.42);
  box-shadow: inset 0 0 0 1px rgba(209,36,47,.36), 0 2px 8px rgba(209,36,47,.18), 0 1px 2px rgba(0,0,0,.12);
}

.favorite-footer--stable {
  background: linear-gradient(90deg, #bcd9ff, #e0efff);
  color: #064ea8;
}

.favorite-footer--down {
  background: linear-gradient(90deg, #aef0cb, #dcfae9);
  color: #006b32;
}

.favorite-footer--up {
  background: linear-gradient(90deg, #ffb8c0, #ffe1e5);
  color: #9f0b15;
}

.favorite-footer--stable span,
.favorite-footer--stable strong,
.favorite-footer--down span,
.favorite-footer--down strong,
.favorite-footer--up span,
.favorite-footer--up strong {
  font-weight: 900;
}

body.dark .favorite-card--stable {
  background: linear-gradient(180deg, rgba(52,131,250,.34), var(--surface) 44%, rgba(52,131,250,.12));
  border-color: rgba(106,166,255,.38);
}

body.dark .favorite-card--down {
  background: linear-gradient(180deg, rgba(0,166,80,.34), var(--surface) 44%, rgba(0,166,80,.13));
  border-color: rgba(0,166,80,.42);
}

body.dark .favorite-card--up {
  background: linear-gradient(180deg, rgba(209,36,47,.4), var(--surface) 44%, rgba(209,36,47,.15));
  border-color: rgba(255,92,104,.44);
}

/* Rich local history. */
.history-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}

.history-stat {
  padding: 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(52,131,250,.12), rgba(52,131,250,.04));
}

.history-stat strong {
  display: block;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  line-height: 28px;
}

.history-stat span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 15px;
}

.history-drops {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 2px;
}

.history-drops h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
}

.history-drops a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(0,166,80,.14), rgba(0,166,80,.05));
  color: var(--text);
  text-decoration: none;
}

.history-drops a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.history-drops a strong {
  color: var(--green);
  font-size: 12px;
}

.history-card {
  grid-template-columns: 104px minmax(0, 1fr) 230px;
  align-items: stretch;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,.04);
}

.history-card--stable {
  background: linear-gradient(90deg, rgba(52,131,250,.07), var(--surface) 20%);
}

.history-card--down {
  background: linear-gradient(90deg, rgba(0,166,80,.12), var(--surface) 22%);
  border-color: rgba(0,166,80,.22);
}

.history-card--up {
  background: linear-gradient(90deg, rgba(209,36,47,.12), var(--surface) 22%);
  border-color: rgba(209,36,47,.24);
}

.history-thumb {
  width: 104px;
  height: 104px;
  align-self: start;
}

.history-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-promos,
.history-deltas,
.history-metrics,
.history-events {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.history-promos {
  margin-top: 6px;
}

.history-promos span,
.history-event {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(52,131,250,.13);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  line-height: 15px;
}

.history-promos .history-promo-badge {
  position: static;
  left: auto;
  bottom: auto;
  width: fit-content;
  max-width: 100%;
  padding: 2px 4px;
  border-radius: 2px;
  background: #2968c8;
  color: #fff;
  box-shadow: none;
  font-size: 11px;
  line-height: 16px;
}

.history-promos .badge--day {
  background: #3483fa;
}

.history-promos .badge--lightning {
  background: #ffe000;
  color: #111;
}

.history-promos .badge--best-seller {
  background: #f56b2a;
  color: #fff;
}

.history-promos .badge--best-seller::before,
.history-promos .badge--day::before {
  content: none;
  display: none;
}

.history-deltas {
  margin-top: 5px;
}

.history-delta {
  border-radius: 4px;
  font-weight: 800;
}

.history-delta.stable {
  background: #d9e9ff;
  color: #0b63d8;
}

.history-delta.down {
  background: #c6f2d8;
  color: #006b32;
}

.history-delta.up {
  background: #ffd1d6;
  color: #9f0b15;
}

.history-metrics {
  margin-top: 8px;
}

.history-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(0,0,0,.045);
  color: var(--muted);
  font-size: 11px;
  line-height: 14px;
}

.history-metrics strong {
  color: rgba(0,0,0,.72);
  font-weight: 800;
}

.history-events {
  margin-top: 8px;
}

.history-event {
  background: rgba(0,0,0,.055);
  color: rgba(0,0,0,.68);
}

.history-event strong {
  color: var(--text);
}

.history-chart {
  display: grid;
  align-content: center;
  justify-self: stretch;
}

.history-chart-box {
  display: grid;
  gap: 4px;
  min-width: 210px;
  padding: 8px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(52,131,250,.08), rgba(52,131,250,.03));
}

.history-chart-box--empty {
  min-height: 92px;
  place-content: center;
  color: var(--muted);
  text-align: center;
}

.history-chart-box--empty.history-chart-box--large {
  min-height: 188px;
}

.history-chart-box--single {
  min-height: 68px;
}

.history-chart-box--empty span {
  color: var(--text);
  font-weight: 800;
}

.history-chart-box--empty small {
  color: var(--muted);
}

.history-chart-scale,
.history-chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 12px;
}

.sparkline {
  width: 100%;
  height: 70px;
}

.sparkline polygon {
  fill: rgba(52,131,250,.13);
}

.sparkline polyline {
  stroke: var(--blue);
  stroke-width: 3;
}

.sparkline circle {
  fill: var(--blue);
  stroke: #fff;
  stroke-width: 1.6;
}

body.dark .history-summary,
body.dark .history-card {
  background-color: var(--surface);
}

body.dark .history-metrics span,
body.dark .history-event {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.72);
}

body.dark .history-metrics strong,
body.dark .history-event strong {
  color: rgba(255,255,255,.9);
}

@media (max-width: 980px) {
  .history-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-drops {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .history-thumb {
    width: 88px;
    height: 88px;
  }

  .history-chart {
    grid-column: 1 / -1;
  }
}

/* History compact rows with expandable analytics. */
.history-card {
  display: block;
  padding: 0;
  overflow: hidden;
}

.history-card summary {
  list-style: none;
}

.history-card summary::-webkit-details-marker {
  display: none;
}

.history-card-main {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 170px 210px auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
}

.history-card-main:hover {
  background: rgba(52,131,250,.035);
}

.history-card[open] .history-card-main {
  border-bottom: 1px solid rgba(0,0,0,.06);
  background: rgba(52,131,250,.045);
}

.history-thumb {
  position: relative;
  width: 86px;
  height: 86px;
}

.history-watch {
  position: absolute;
  right: -7px;
  top: -7px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff0f2;
  color: #d1242f;
  box-shadow: 0 2px 8px rgba(209,36,47,.22), 0 0 0 2px #fff;
}

.history-watch svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.history-info {
  min-width: 0;
}

.history-info .history-title,
.history-title {
  color: var(--text);
  text-decoration: none;
}

.history-price-block {
  display: grid;
  align-content: center;
  min-width: 0;
}

.history-price-block .history-price-line {
  margin: 0 0 1px;
}

.history-price-block .history-price {
  font-size: 21px;
  line-height: 25px;
}

.history-price-block .history-delta {
  margin-top: 4px;
  white-space: nowrap;
}

.history-mini-chart {
  display: block;
  min-width: 0;
}

.history-mini-chart .history-chart-box {
  min-width: 0;
  padding: 6px;
}

.history-mini-chart .history-chart-scale {
  display: none;
}

.history-mini-chart .sparkline {
  height: 44px;
}

.history-mini-chart .history-chart-axis {
  font-size: 9px;
}

.history-expand {
  justify-self: end;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(52,131,250,.12);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.history-card[open] .history-expand {
  background: var(--blue);
  color: #fff;
}

.history-expand-open {
  display: none;
}

.history-card[open] .history-expand-closed {
  display: none;
}

.history-card[open] .history-expand-open {
  display: inline;
}

.history-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 440px);
  gap: 14px;
  padding: 12px;
}

.history-detail-head {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.history-open-product,
.history-promo-flow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 16px;
}

.history-open-product {
  background: var(--blue);
  color: #fff;
  text-decoration: none;
}

.history-promo-flow {
  background: rgba(52,131,250,.12);
  color: var(--blue);
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 8px;
}

.history-details .history-metrics {
  grid-column: 1;
  grid-row: 2;
  align-content: start;
  margin-top: 0;
}

.history-chart--expanded {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.history-chart--expanded .history-chart-box {
  min-width: 0;
  height: 100%;
  padding: 10px;
}

.history-chart--expanded .sparkline {
  height: 190px;
}

.history-chart--expanded .history-chart-scale,
.history-chart--expanded .history-chart-axis {
  display: none;
}

.sparkline {
  overflow: visible;
}

.sparkline-point-group {
  pointer-events: all;
}

.sparkline-axis {
  stroke: rgba(52,131,250,.46);
  stroke-width: 1.2;
}

.sparkline-grid {
  stroke: rgba(52,131,250,.25);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.sparkline-guide {
  opacity: 0;
  stroke: rgba(52,131,250,.42);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  transition: opacity .14s ease;
}

.sparkline-point {
  transition: r .14s ease, filter .14s ease;
}

.sparkline-hit {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}

.sparkline-point-group:hover .sparkline-point,
.sparkline-point:hover {
  filter: drop-shadow(0 0 5px rgba(52,131,250,.55));
}

.sparkline text {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.sparkline-x-label--end {
  text-anchor: end;
}

.sparkline-x-label--middle {
  text-anchor: middle;
}

.sparkline-point-group:hover .sparkline-guide {
  opacity: .68;
}

.history-events--timeline {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: 8px;
  align-items: stretch;
  margin-top: 0;
  padding: 4px 0 0 18px;
}

.history-events--timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  height: auto;
  background: linear-gradient(90deg, rgba(52,131,250,.25), rgba(52,131,250,.7));
}

.history-events--timeline .history-event {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 86px max-content minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-right: 0;
  padding: 5px 8px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(52,131,250,.18), 0 1px 3px rgba(0,0,0,.08);
}

.history-events--timeline .history-event::before {
  content: "";
  position: absolute;
  left: -16px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: #fff;
}

.history-events--timeline .history-event + .history-event::after {
  content: "\2193";
  position: absolute;
  left: -18px;
  top: -16px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.history-events--timeline .history-event em {
  color: var(--text);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.history-promo-badge {
  justify-self: start;
  position: static;
  left: auto;
  bottom: auto;
  white-space: nowrap;
}

.history-flow-arrow {
  color: var(--blue);
  font-weight: 900;
}

.history-chart-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 220px;
  padding: 7px 9px;
  border-radius: 6px;
  background: rgba(33,33,33,.94);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
  font-size: 11px;
  font-weight: 800;
  line-height: 15px;
  pointer-events: none;
}

.history-site-cta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 7px;
  background: linear-gradient(90deg, #3483fa, #1f6de2);
  color: #fff;
  box-shadow: 0 8px 18px rgba(52,131,250,.2);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition: transform .14s ease, box-shadow .14s ease;
}

.history-site-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(52,131,250,.28);
}

body.dark .history-card-main:hover,
body.dark .history-card[open] .history-card-main {
  background: rgba(106,166,255,.08);
}

body.dark .history-watch,
body.dark .history-events--timeline .history-event {
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(255,255,255,.1);
}

body.dark .history-events--timeline .history-event::before {
  background: var(--surface);
}

@media (max-width: 980px) {
  .history-card-main {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .history-price-block,
  .history-mini-chart,
  .history-expand {
    grid-column: 2;
    justify-self: start;
  }

  .history-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-chart--expanded {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Harness visual pass: watched products in Offers stay compact and readable. */
.favorites-section {
  overflow: hidden;
}

.favorites-strip {
  grid-auto-columns: 282px !important;
  align-items: stretch !important;
  gap: 10px !important;
  padding-bottom: 8px;
  overflow-x: auto;
  overflow-y: hidden;
}

.favorite-card {
  display: grid !important;
  grid-template-columns: 92px minmax(0, 1fr) !important;
  grid-template-rows: 28px 108px 32px !important;
  grid-template-areas:
    "banners banners"
    "thumb info"
    "footer footer" !important;
  min-width: 282px !important;
  max-width: 282px !important;
  height: 176px !important;
  padding: 8px 28px 0 8px !important;
  overflow: hidden !important;
  border-radius: 6px;
}

.favorite-banners {
  grid-area: banners;
  min-height: 28px !important;
  padding: 0 0 4px !important;
}

.favorite-banner {
  min-height: 22px !important;
  max-width: 180px !important;
  padding: 3px 7px !important;
  font-size: 10px !important;
  line-height: 14px !important;
}

.favorite-thumb {
  grid-area: thumb;
  align-self: start;
  width: 86px !important;
  height: 86px !important;
  overflow: hidden;
  border-radius: 4px;
  background: #f5f5f5;
}

.favorite-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.favorite-score {
  left: 5px !important;
  top: 5px !important;
  transform: scale(.84);
  transform-origin: left top;
}

.favorite-info {
  grid-area: info;
  min-width: 0;
  padding: 2px 8px 2px 10px !important;
  overflow: hidden;
}

.favorite-title {
  min-height: 0 !important;
  max-height: 34px;
  font-size: 13px !important;
  line-height: 17px !important;
  -webkit-line-clamp: 2 !important;
}

.favorite-meta {
  margin-top: 1px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px !important;
  line-height: 15px !important;
}

.favorite-price-line {
  min-height: 14px !important;
  margin-top: 3px !important;
}

.favorite-price {
  margin-top: 0 !important;
  font-size: 18px !important;
  line-height: 21px !important;
}

.favorite-installments {
  max-height: 30px;
  margin-top: 1px !important;
  overflow: hidden;
  font-size: 12px !important;
  line-height: 15px !important;
  -webkit-line-clamp: 2 !important;
}

.favorite-coupon {
  max-width: 100% !important;
  margin-top: 2px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 16px !important;
}

.favorite-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  max-height: 18px;
  margin-top: 3px !important;
  overflow: hidden;
}

.favorite-footer {
  grid-area: footer;
  min-height: 32px !important;
  margin: 0 -28px 0 -8px !important;
  padding: 0 10px !important;
  font-size: 10px !important;
  line-height: 13px !important;
}

.favorite-footer span,
.favorite-footer strong {
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-remove {
  right: 5px !important;
  top: 5px !important;
}

.favorite-card--stable {
  background: linear-gradient(135deg, rgba(210,229,255,.95), #fff 48%, #f4f9ff) !important;
  border-color: rgba(52,131,250,.34) !important;
}

.favorite-card--down {
  background: linear-gradient(135deg, rgba(195,246,218,.95), #fff 48%, #f1fff7) !important;
  border-color: rgba(0,166,80,.4) !important;
}

.favorite-card--up {
  background: linear-gradient(135deg, rgba(255,198,205,.95), #fff 48%, #fff1f3) !important;
  border-color: rgba(209,36,47,.48) !important;
}

body.dark .favorite-card--stable {
  background: linear-gradient(135deg, rgba(52,131,250,.32), var(--surface) 48%, rgba(52,131,250,.12)) !important;
}

body.dark .favorite-card--down {
  background: linear-gradient(135deg, rgba(0,166,80,.32), var(--surface) 48%, rgba(0,166,80,.12)) !important;
}

body.dark .favorite-card--up {
  background: linear-gradient(135deg, rgba(209,36,47,.36), var(--surface) 48%, rgba(209,36,47,.14)) !important;
}

/* Favorite rail uses the same product-card language as the top cards. */
.favorites-strip {
  grid-auto-columns: 182px !important;
  gap: 12px !important;
}

.favorite-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 142px minmax(0, 1fr) 32px !important;
  grid-template-areas:
    "thumb"
    "info"
    "footer" !important;
  min-width: 182px !important;
  max-width: 182px !important;
  height: 350px !important;
  padding: 0 !important;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 6px;
  background: var(--surface) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}

.favorite-thumb {
  grid-area: thumb;
  position: relative;
  width: 100% !important;
  height: 142px !important;
  border-radius: 6px 6px 0 0;
  background: #f5f5f5;
}

.favorite-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.favorite-thumb .badge,
.favorite-thumb .countdown-timer {
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  min-height: 19px;
  font-size: 10px;
  line-height: 15px;
}

.favorite-score {
  left: 8px !important;
  top: 8px !important;
  transform: none !important;
}

.favorite-info {
  grid-area: info;
  padding: 10px 10px 8px !important;
  overflow: hidden;
}

.favorite-title {
  max-height: 36px;
  font-size: 13px !important;
  line-height: 18px !important;
  -webkit-line-clamp: 2 !important;
}

.favorite-meta {
  margin-top: 2px !important;
  font-size: 12px !important;
  line-height: 15px !important;
}

.favorite-price-line {
  min-height: 16px !important;
  margin-top: 5px !important;
}

.favorite-price {
  font-size: 19px !important;
  line-height: 22px !important;
}

.favorite-installments {
  display: -webkit-box;
  max-height: 31px;
  margin-top: 2px !important;
  overflow: hidden;
  font-size: 12px !important;
  line-height: 15px !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2 !important;
}

.favorite-coupon {
  display: block;
  width: fit-content;
  max-width: 100% !important;
  margin-top: 3px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

.favorite-tags {
  max-height: 34px;
  flex-wrap: wrap;
}

.favorite-footer {
  grid-area: footer;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 0 9px !important;
  border-top: 1px solid rgba(0,0,0,.04);
}

.favorite-card--stable {
  border-color: rgba(52,131,250,.34) !important;
}

.favorite-card--down {
  border-color: rgba(0,166,80,.46) !important;
}

.favorite-card--up {
  border-color: rgba(209,36,47,.52) !important;
}

/* Final image-fit pass: show complete photos without inflating compact rails. */
.top-card {
  grid-template-rows: 152px auto !important;
  min-height: 330px !important;
}

.top-thumb {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 152px !important;
  padding: 8px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  background: #f5f5f5 !important;
}

.favorites-strip {
  grid-auto-columns: 196px !important;
  align-items: stretch !important;
  gap: 12px !important;
}

.favorite-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 158px minmax(0, 1fr) 34px !important;
  grid-template-areas:
    "thumb"
    "info"
    "footer" !important;
  min-width: 196px !important;
  max-width: 196px !important;
  height: 430px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 6px !important;
}

.favorite-thumb {
  grid-area: thumb;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: start !important;
  width: 100% !important;
  height: 158px !important;
  padding: 8px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  border-radius: 6px 6px 0 0 !important;
  background: #f5f5f5 !important;
}

.top-thumb img,
.favorite-thumb img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
}

.favorite-info {
  grid-area: info;
  padding: 11px 11px 10px !important;
  overflow: hidden !important;
}

.favorite-title {
  max-height: 36px !important;
  font-size: 13px !important;
  line-height: 18px !important;
  -webkit-line-clamp: 2 !important;
}

.favorite-meta {
  margin-top: 2px !important;
  font-size: 12px !important;
  line-height: 15px !important;
}

.favorite-price-line {
  min-height: 16px !important;
  margin-top: 5px !important;
}

.favorite-price {
  font-size: 19px !important;
  line-height: 22px !important;
}

.favorite-installments {
  max-height: 45px !important;
}

.favorite-tags {
  max-height: 18px !important;
  margin-top: 3px !important;
}

.favorite-variation {
  margin-top: 5px !important;
  overflow: hidden !important;
  color: var(--muted) !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 15px !important;
}

.favorite-footer {
  grid-area: footer;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 10px !important;
}

.top-thumb .badge,
.top-thumb .countdown-timer {
  left: 8px !important;
  bottom: 8px !important;
}

.favorite-thumb .badge,
.favorite-thumb .countdown-timer {
  left: 8px !important;
  bottom: 8px !important;
}

.top-thumb > .score-badge.top-score {
  left: 8px !important;
  top: 8px !important;
}

.favorite-score {
  left: 8px !important;
  top: 8px !important;
}

.favorite-remove {
  right: 6px !important;
  top: 6px !important;
}

/* Stable catalog rails and history controls.
   This final layer intentionally owns the compact product rails after the
   previous prototype passes, so thumbnails, badges and footers do not drift. */
.empty-results {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 32px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
  color: var(--muted);
  text-align: center;
}

.empty-results strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.empty-results span {
  margin-top: 6px;
  font-size: 13px;
}

.top-rail-head h2 {
  width: 100%;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0;
}

.top-tabs {
  justify-content: center;
}

.top-tabs button {
  text-transform: uppercase;
}

.top-card,
.favorite-card {
  background: var(--surface) !important;
  color: var(--text) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.1) !important;
}

.top-card {
  grid-template-rows: 152px 1fr !important;
  min-height: 345px !important;
}

.top-info,
.favorite-info {
  min-width: 0 !important;
}

.top-title,
.favorite-title {
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}

.top-coupon,
.favorite-coupon {
  white-space: normal !important;
  line-height: 15px !important;
}

.favorite-card {
  grid-template-rows: 158px minmax(0, 1fr) 34px !important;
  height: 430px !important;
}

.favorite-footer {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

.favorite-footer span,
.favorite-footer strong {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.favorite-footer--stable {
  background: #cfe4ff !important;
  color: #0658c8 !important;
}

.favorite-footer--down {
  background: #d6f5e4 !important;
  color: #007a3d !important;
}

.favorite-footer--up {
  background: #ffd8de !important;
  color: #b00020 !important;
}

body.dark .empty-results,
body.dark .top-card,
body.dark .favorite-card {
  background: #202020 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.35) !important;
}

body.dark .favorite-footer--stable {
  background: rgba(52,131,250,.24) !important;
  color: #9fc4ff !important;
}

body.dark .favorite-footer--down {
  background: rgba(0,166,80,.22) !important;
  color: #75e0a7 !important;
}

body.dark .favorite-footer--up {
  background: rgba(209,36,47,.24) !important;
  color: #ff9ca7 !important;
}

.history-filterbar {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.history-filterbar button {
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(0,0,0,.055);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.history-filterbar button span {
  color: rgba(0,0,0,.42);
  font-weight: 700;
}

.history-filterbar button.active {
  background: rgba(52,131,250,.14);
  color: var(--blue);
  box-shadow: inset 0 -2px 0 var(--blue);
}

.history-filterbar button:disabled {
  opacity: .45;
  cursor: default;
}

.history-filterbar strong {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.history-highlights {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.history-highlights > div {
  min-width: 0;
  padding: 10px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(52,131,250,.10), rgba(255,255,255,.72));
  box-shadow: inset 0 0 0 1px rgba(52,131,250,.08);
}

.history-highlights h3 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.history-highlights a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 24px;
  color: var(--text);
  font-size: 12px;
  text-decoration: none;
}

.history-highlights a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-highlights a strong {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.history-promos .badge,
.history-events--timeline .badge {
  display: inline-flex;
  position: static;
  left: auto;
  bottom: auto;
}

.history-card-main .history-promos .badge--lightning {
  min-height: 20px;
}

.history-price-block .history-insight {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  line-height: 15px;
}

.history-insight--down {
  background: #d7f7e7;
  color: #007a3d;
}

.history-insight--stable {
  background: #e8f1ff;
  color: #1d5bbf;
}

.history-insight--up {
  background: #ffe3e6;
  color: #b00020;
}

.history-quality {
  border-color: rgba(52,131,250,.18) !important;
}

.history-quality--strong {
  background: #d9f8e8 !important;
  color: #007a3d !important;
}

.history-quality--ok {
  background: #e8f1ff !important;
  color: #1d5bbf !important;
}

.history-quality--soft,
.history-quality--new {
  background: #fff4d8 !important;
  color: #7a5400 !important;
}

.history-signal-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin: 8px 0 0;
}

.history-signal-event {
  min-width: 0;
  padding: 9px;
  border-radius: 6px;
  background: rgba(52,131,250,.06);
  box-shadow: inset 0 0 0 1px rgba(52,131,250,.08);
}

.history-signal-event strong,
.history-signal-event em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.history-signal-event strong {
  color: var(--text);
  font-weight: 800;
}

.history-signal-event em {
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
}

.history-signal-event span {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.history-signal {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
}

.signal--coupon {
  background: #dbeafe;
  color: #1d4ed8;
}

.signal--full,
.signal--same-price {
  background: #d6f5e4;
  color: #007a3d;
}

.signal--international {
  background: #ffe4e6;
  color: #b91c1c;
}

.signal--none {
  background: rgba(0,0,0,.06);
  color: var(--muted);
}

body.dark .history-filterbar button {
  background: rgba(255,255,255,.08);
}

body.dark .history-filterbar button span {
  color: rgba(255,255,255,.5);
}

body.dark .history-highlights > div,
body.dark .history-signal-event {
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

body.dark .history-insight--down,
body.dark .history-quality--strong,
body.dark .signal--full,
body.dark .signal--same-price {
  background: rgba(0,166,80,.22) !important;
  color: #8be9b6 !important;
}

body.dark .history-insight--stable,
body.dark .history-quality--ok,
body.dark .signal--coupon {
  background: rgba(52,131,250,.22) !important;
  color: #b9d5ff !important;
}

body.dark .history-insight--up,
body.dark .signal--international {
  background: rgba(209,36,47,.24) !important;
  color: #ffb8c0 !important;
}

@media (max-width: 900px) {
  .history-highlights {
    grid-template-columns: 1fr;
  }
}

/* Favorite footer emphasis: the price movement is the point, so it gets a
   dedicated row instead of competing with the capture time. */
.favorite-card {
  grid-template-rows: 158px minmax(0, 1fr) 48px !important;
  height: 442px !important;
}

.favorite-footer {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 1fr 1fr !important;
  gap: 0 !important;
  align-content: center !important;
  padding: 6px 10px !important;
  border-top-width: 1px !important;
}

.favorite-footer span,
.favorite-footer strong {
  display: block !important;
  max-width: 100% !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  line-height: 16px !important;
}

.favorite-footer span {
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

.favorite-footer strong {
  justify-self: end !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  opacity: .92 !important;
}

.favorite-footer--down {
  background: linear-gradient(90deg, #bff3d6, #dcfae9) !important;
  color: #006b35 !important;
  box-shadow: inset 0 1px 0 rgba(0,166,80,.22), 0 -8px 22px rgba(0,166,80,.12) !important;
}

.favorite-footer--down span {
  text-shadow: 0 0 12px rgba(0,166,80,.28) !important;
}

.favorite-footer--up {
  background: linear-gradient(90deg, #ffc7cf, #ffe3e7) !important;
  color: #a4001d !important;
  box-shadow: inset 0 1px 0 rgba(209,36,47,.2), 0 -8px 22px rgba(209,36,47,.13) !important;
}

.favorite-footer--up span {
  text-shadow: 0 0 12px rgba(209,36,47,.26) !important;
}

.favorite-footer--stable {
  background: linear-gradient(90deg, #bcdcff, #dcebff) !important;
  color: #064fb0 !important;
  box-shadow: inset 0 1px 0 rgba(52,131,250,.18), 0 -8px 22px rgba(52,131,250,.1) !important;
}

/* The favorites rail uses the same stable scrolling model as the Top 20 rail.
   Keeping it as flex avoids the old grid-auto-columns rules fighting during
   horizontal movement. */
.favorites-strip {
  display: flex !important;
  grid-auto-flow: unset !important;
  grid-auto-columns: unset !important;
  align-items: stretch !important;
  gap: 12px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-inline: contain !important;
  scroll-snap-type: x proximity !important;
  scroll-behavior: auto !important;
  padding: 2px 2px 10px !important;
  scrollbar-width: thin !important;
}

.favorite-card {
  flex: 0 0 196px !important;
  min-width: 196px !important;
  max-width: 196px !important;
  scroll-snap-align: start !important;
}

body.dark .favorite-footer--down {
  background: linear-gradient(90deg, rgba(0,166,80,.42), rgba(0,166,80,.2)) !important;
  color: #9cf0bd !important;
}

body.dark .favorite-footer--up {
  background: linear-gradient(90deg, rgba(209,36,47,.46), rgba(209,36,47,.22)) !important;
  color: #ffb8c0 !important;
}

body.dark .favorite-footer--stable {
  background: linear-gradient(90deg, rgba(52,131,250,.38), rgba(52,131,250,.18)) !important;
  color: #b9d5ff !important;
}

/* Top 20 and history insight cards. */
.top-rail-head h2 {
  text-align: center !important;
}

.top-strip {
  display: flex !important;
  grid-auto-flow: unset !important;
  grid-auto-columns: unset !important;
  justify-content: start !important;
  align-items: stretch !important;
  gap: 12px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-inline: contain !important;
  scroll-snap-type: x proximity !important;
  padding: 2px 2px 10px !important;
}

.top-card {
  flex: 0 0 180px !important;
  min-width: 180px !important;
  max-width: 180px !important;
  scroll-snap-align: start !important;
  overflow: hidden !important;
}

.history-highlights.history-highlights--cards {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-top: 12px !important;
}

.history-highlight-panel {
  max-height: 690px !important;
  min-width: 0 !important;
  padding: 12px !important;
  border-radius: 6px !important;
  background:
    linear-gradient(135deg, rgba(52,131,250,.12), rgba(255,255,255,.86) 62%),
    var(--surface) !important;
  box-shadow:
    0 1px 2px rgba(0,0,0,.08),
    inset 0 0 0 1px rgba(52,131,250,.08) !important;
}

.history-highlight-panel header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 9px !important;
}

.history-highlight-panel h3 {
  margin: 0 !important;
  color: var(--text) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 18px !important;
}

.history-highlight-panel header span {
  padding: 3px 8px !important;
  border-radius: 999px !important;
  background: rgba(52,131,250,.12) !important;
  color: var(--blue) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

.history-highlight-list {
  display: grid !important;
  gap: 8px !important;
  max-height: 615px !important;
  overflow: auto !important;
  padding-right: 4px !important;
  scrollbar-width: thin !important;
}

.history-highlight-card {
  display: grid !important;
  grid-template-columns: 92px minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: stretch !important;
  min-height: 116px !important;
  padding: 8px !important;
  border-radius: 6px !important;
  background: rgba(255,255,255,.86) !important;
  color: var(--text) !important;
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.08) !important;
  transition: transform .16s ease, box-shadow .16s ease !important;
}

.history-highlight-card:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 14px rgba(0,0,0,.12) !important;
}

.history-highlight-card--down {
  background: linear-gradient(100deg, rgba(0,166,80,.12), rgba(255,255,255,.92) 54%) !important;
}

.history-highlight-card--up {
  background: linear-gradient(100deg, rgba(209,36,47,.12), rgba(255,255,255,.92) 54%) !important;
}

.history-highlight-card--stable {
  background: linear-gradient(100deg, rgba(52,131,250,.12), rgba(255,255,255,.92) 54%) !important;
}

.history-highlight-thumb {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 92px !important;
  height: 92px !important;
  padding: 5px !important;
  overflow: hidden !important;
  border-radius: 5px !important;
  background: #f5f5f5 !important;
  box-sizing: border-box !important;
}

.history-highlight-thumb img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

.history-highlight-thumb .badge,
.history-highlight-thumb .countdown-timer {
  position: absolute !important;
  left: 4px !important;
  bottom: 4px !important;
  transform: scale(.76) !important;
  transform-origin: left bottom !important;
  max-width: 112px !important;
}

.history-highlight-score {
  position: absolute !important;
  top: 4px !important;
  left: 4px !important;
  bottom: auto !important;
  transform: none !important;
  min-width: 28px !important;
  height: 28px !important;
  font-size: 12px !important;
  z-index: 3 !important;
}

.history-highlight-info {
  display: grid !important;
  align-content: start !important;
  min-width: 0 !important;
}

.history-highlight-title {
  display: -webkit-box !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 15px !important;
}

.history-highlight-meta {
  overflow: hidden !important;
  margin-top: 2px !important;
  color: var(--muted) !important;
  font-size: 11px !important;
  line-height: 14px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.history-highlight-price-line {
  min-height: 15px !important;
  margin-top: 4px !important;
  font-size: 11px !important;
}

.history-highlight-price {
  color: var(--text) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 20px !important;
}

.history-highlight-note {
  display: inline-flex !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin-top: 5px !important;
  padding: 3px 7px !important;
  border-radius: 5px !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 900 !important;
  line-height: 14px !important;
}

.history-highlight-note--down {
  background: #d6f5e4 !important;
  color: #007a3d !important;
}

.history-highlight-note--up {
  background: #ffd8de !important;
  color: #b00020 !important;
}

.history-highlight-note--stable {
  background: #dcecff !important;
  color: #0658c8 !important;
}

body.dark .history-highlight-panel {
  background:
    linear-gradient(135deg, rgba(52,131,250,.16), rgba(255,255,255,.05) 62%),
    #1f1f1f !important;
  box-shadow:
    0 1px 2px rgba(0,0,0,.35),
    inset 0 0 0 1px rgba(255,255,255,.08) !important;
}

body.dark .history-highlight-card,
body.dark .history-highlight-card--down,
body.dark .history-highlight-card--up,
body.dark .history-highlight-card--stable {
  background: rgba(255,255,255,.06) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07) !important;
}

body.dark .history-highlight-thumb {
  background: #2b2b2b !important;
}

@media (max-width: 980px) {
  .history-highlights.history-highlights--cards {
    grid-template-columns: 1fr !important;
  }
}
