*, *::before, *::after { box-sizing: border-box; }

:root {
  --prime-sage: #6d765b;
  --prime-sage-light: #788268;
  --prime-charcoal: #333333;
  --prime-ink: #23251b;
  --prime-cream: #e3e6dd;
  --prime-paper: #f5f2e8;
  --prime-yellow: #e6e600;
  --prime-red: #a92a22;
  --prime-shadow: 4px 4px 8px rgba(0, 0, 0, .28);
}

body.prime-page {
  margin: 0;
  min-height: 100vh;
  background: var(--prime-sage);
  color: var(--prime-ink);
  font-family: Arial, sans-serif;
}

/* ========================================================================== */
/* Nav                                                                        */
/* ========================================================================== */

.site-nav {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 16px;
  background: var(--prime-charcoal);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li {
  margin-right: 20px;
}

.site-nav a {
  display: block;
  padding: 14px 16px;
  color: #f9f6d3;
  font-size: 26px;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  background: #111;
}

.site-nav a:focus-visible,
.prime-filter:focus-visible,
.prime-view-button:focus-visible,
.prime-search input:focus-visible {
  outline: 3px solid var(--prime-yellow);
  outline-offset: 2px;
}

/* ========================================================================== */
/* Hero                                                                       */
/* ========================================================================== */
.prime-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  max-width: 1120px;
  margin: 14px auto 8px;
  padding: 14px 20px;
  border: 1px solid #3f5f78;
  border-radius: 12px;
  background:
    radial-gradient(circle at 94% 20%, rgba(145,246,254,.45), transparent 30%),
    linear-gradient(135deg, #d7eaff, #b9dcff);
  box-shadow: 4px 4px 8px rgba(0,0,0,.28);
  color: #102336;
}

.prime-hero__copy {
  min-width: 0;
}

.prime-kicker {
  margin: 0 0 3px;
  color: #0b5fa5;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.prime-hero h1 {
  max-width: none;
  margin: 0;
  color: #102336;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.02;
  letter-spacing: -.025em;
  text-shadow: 1px 1px 0 rgba(255,255,255,.7);
}

.prime-description {
  max-width: 760px;
  margin: 6px 0 0;
  color: #22384a;
  font-size: 16px;
  line-height: 1.28;
}

.prime-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.prime-status-pill {
  padding: 5px 9px;
  border: 1px solid #4d7593;
  border-radius: 999px;
  background: rgba(255,255,255,.5);
  color: #102336;
  font-size: 13px;
  font-weight: 700;
}

.prime-hero__brand {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}

.prime-hero__brand span {
color: #1f2f3a;  
  font-family: Arial, sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  text-shadow:
    1px 1px 0 rgba(255,255,255,.75),
    2px 2px 3px rgba(0,0,0,.12);
}

.prime-hero__llama {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(2px 3px 3px rgba(0,0,0,.25));
}

.affiliate-notice {
  max-width: 1120px;
  margin: 0 auto 18px;
  color: #e2dfd2;
  font-size: 15px;
  text-align: right;
}

/* ========================================================================== */
/* Main / toolbar                                                             */
/* ========================================================================== */

.prime-main {
  max-width: 85%;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.prime-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  margin: 0 auto 4px;
  padding: 0 12px;
  background: transparent;
}

.prime-filter-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 1500px;
  margin: 0 auto;
}
/* ========================================================================== */
/* Prime category filter buttons - muted rainbow, Prime-ish polish             */
/* ========================================================================== */

.prime-filter {
  --filter-bg: #d7e4f2;
  --filter-hi: #eef6ff;
  --filter-border: #31475c;

  padding: 6px 12px;
  border: 1px solid var(--filter-border);
  border-radius: 10px;
  background: linear-gradient(to bottom, var(--filter-hi), var(--filter-bg));
  color: #102336;
  font-family: Arial, sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.65),
    2px 2px 4px rgba(0,0,0,.25);
  transition: transform .1s ease, box-shadow .1s ease, filter .15s ease;
}

.prime-filter:hover {
  filter: brightness(.96) saturate(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    3px 3px 6px rgba(0,0,0,.28);
}

/* Muted rainbow colors, matched intensity */
.prime-filter[data-filter="all"] {
  --filter-bg: #78b8e8;
  --filter-hi: #cceaff;
  --filter-border: #174f78;
}

.prime-filter[data-filter="general"] {
  --filter-bg: #d5dbe6;
  --filter-hi: #eef2f8;
}

.prime-filter[data-filter="pet"] {
  --filter-bg: #e4c2cc;
  --filter-hi: #f6dde5;
}

.prime-filter[data-filter="3d printing"],
.prime-filter[data-filter="3d"] {
  --filter-bg: #d4c7e9;
  --filter-hi: #eee5fb;
}

.prime-filter[data-filter="pc"] {
  --filter-bg: #b8d2ee;
  --filter-hi: #dceeff;
}

.prime-filter[data-filter="audio"] {
  --filter-bg: #c4cfea;
  --filter-hi: #e4ebfb;
}

.prime-filter[data-filter="electronics"] {
  --filter-bg: #b8dce2;
  --filter-hi: #dcf4f7;
}

.prime-filter[data-filter="gaming"] {
  --filter-bg: #dfc0e5;
  --filter-hi: #f2def7;
}

.prime-filter[data-filter="health"] {
  --filter-bg: #e3c1d1;
  --filter-hi: #f6deea;
}

.prime-filter[data-filter="home"] {
  --filter-bg: #c9dfc0;
  --filter-hi: #e6f5df;
}

.prime-filter[data-filter="tools"] {
  --filter-bg: #ead98c;
  --filter-hi: #fff0b8;
}

.prime-filter[data-filter="outdoor"] {
  --filter-bg: #b9dfc6;
  --filter-hi: #dcf5e3;
}

.prime-filter[data-filter="automotive"] {
  --filter-bg: #cfd6df;
  --filter-hi: #eef2f6;
}

.prime-filter[data-filter="office"] {
  --filter-bg: #cbd7ec;
  --filter-hi: #e8effb;
}

.prime-filter[data-filter="hobby"] {
  --filter-bg: #dac4ea;
  --filter-hi: #f1e2fb;
}

/* Fallback for new/unlisted categories */
.prime-filter:not([data-filter="all"]):not([data-filter="general"]):not([data-filter="pet"]):not([data-filter="3d printing"]):not([data-filter="3d"]):not([data-filter="pc"]):not([data-filter="audio"]):not([data-filter="electronics"]):not([data-filter="gaming"]):not([data-filter="health"]):not([data-filter="home"]):not([data-filter="tools"]):not([data-filter="outdoor"]):not([data-filter="automotive"]):not([data-filter="office"]):not([data-filter="hobby"]) {
  --filter-bg: #cfddec;
  --filter-hi: #edf5ff;
}

/* Selected button: keep category color, add mild yellow highlight */
.prime-filter.is-active {
  border: 2px solid #102336;
  outline: 3px solid rgba(255, 216, 20, .72);
  outline-offset: 1px;
  filter: brightness(.97) saturate(1.04);
  transform: translateY(1px);
  box-shadow:
    0 0 0 1px rgba(35,37,27,.35),
    0 0 7px rgba(255,216,20,.32),
    inset 1px 1px 2px rgba(0,0,0,.12),
    0 2px 5px rgba(0,0,0,.28);
}

.prime-search-row {
  display: flex;
  justify-content: flex-end;
  max-width: 1510px;
  margin: -4px auto 8px;
  padding: 0 20px;
  pointer-events: none;
}

.prime-search {
  pointer-events: auto;
}

.prime-search input {
  width: 250px;
  padding: 8px 12px;
  border: 1px solid #23251b;
  border-radius: 8px;
  background: #e3e6dd;
  color: #23251b;
  font-family: Arial, sans-serif;
  font-size: 16px;
  box-shadow: 2px 2px 4px rgba(0,0,0,.25);
}

.prime-search input::placeholder {
  color: #6b6b6b;
}

/* ========================================================================== */
/* Section heading                                                            */
/* ========================================================================== */

.prime-section-heading {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 28px;
  width: 100%;
  min-height: 78px;
  margin: 14px auto 12px;
  color: #ece5d6;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0,0,0,.5);
}

.prime-section-heading img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  flex: 0 0 auto;
}

.prime-section-heading__copy {
  align-self: center;
}

.prime-section-heading p {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
}

.prime-section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
}

.prime-search--heading {
  position: absolute;
  right: 0;
  bottom: 8px;
  margin: 0;
  text-shadow: none;
}

.prime-search input {
  width: 250px;
  padding: 8px 12px;
  border: 1px solid #23251b;
  border-radius: 8px;
  background: #e3e6dd;
  color: #23251b;
  font-family: Arial, sans-serif;
  font-size: 16px;
  box-shadow: 2px 2px 4px rgba(0,0,0,.25);
}

.prime-search input::placeholder {
  color: #6b6b6b;
}

/* ========================================================================== */
/* Prime deal grid + cards                                                    */
/* ========================================================================== */

.prime-deal-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  gap: 4px;
  width: 100%;
}

.prime-deal-card {
  display: grid;
  grid-template-columns: 179px minmax(0, 1fr);
  width: 500px;
  min-height: 205px;
  margin: 10px;
  overflow: visible;
  border: 1px solid #23251b;
  border-radius: 9px;
  background: var(--prime-cream);
  box-shadow: var(--prime-shadow);
}

.prime-deal-card[hidden] {
  display: none;
}

.prime-deal-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 205px;
  padding: 34px 8px 22px;
}

.prime-deal-card__topline {
  position: absolute;
  top: 6px;
  left: 8px;
  display: flex;
  justify-content: flex-start;
  width: auto;
  margin: 0;
}

.prime-category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 150px;
  padding: 5px 8px;
  border: 1px solid #23251b;
  border-radius: 7px;
  background: #5f6a52;
  color: #fffbe0;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0;
  line-height: 1.1;
  text-align: center;
  text-transform: none;
  box-shadow: 2px 2px 4px rgba(0,0,0,.22);
}
.prime-live-badge {
  display: none;
}

.prime-deal-card__image {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 0;
  padding: 0;
  background: transparent;
}

.prime-deal-card__image img {
  width: auto;
  height: auto;
  max-width: 176px;
  max-height: 168px;
  object-fit: contain;
  display: block;
  border: 1px solid #999;
  border-radius: 4px;
  background: #fff;
  box-shadow: 4px 3px 8px rgba(0,0,0,0.28);
}


.prime-verified {
  position: absolute;
  left: 5;
  right: 0;
  bottom: 5px;
  width: 100%;
  margin: 0;
  color: #68705d;
  font-size: 11px;
  text-align: center;
}

.prime-deal-card__body {
  display: flex;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 12px 10px 0;
}

.prime-deal-title {
  display: -webkit-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  color: #0000d5;
  font-size: 19px;
  font-weight: 550;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.prime-deal-title:hover {
  text-decoration: underline;
}

.prime-price-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  gap: 10px;
  align-items: baseline;
  margin-top: 8px;
}

.prime-price-row strong {
  color: var(--prime-red);
  font-size: 24px;
}

.prime-was-price {
  color: #444938;
  font-size: 17px;
  text-decoration: line-through;
}

.prime-coupon,
.prime-checkout,
.prime-note {
  align-self: center;
  max-width: 100%;
  margin: 7px 0 0;
  padding: 4px 6px;
  border: 2px solid #444938;
  border-radius: 5px;
  background: #fffacd;
  color: #444938;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.18;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  box-sizing: border-box;
}

.prime-checkout {
  color: #263d75;
  text-decoration: none;
}

.prime-checkout:hover {
  text-decoration: underline;
}

.prime-note {
  background: #eef1e8;
  font-weight: 600;
}

.prime-view-button {
  align-self: center;
  margin-top: 13px;
  padding: 8px 11px;
  border: 1px solid #0b3f75;
  border-radius: 7px;
  background: #146eb4;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: bold;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  box-shadow: 2px 2px 4px rgba(0,0,0,.22);
}

.prime-view-button:hover {
  background: #0f5a99;
}

/* ========================================================================== */
/* Empty state / footer                                                       */
/* ========================================================================== */

.prime-empty-state {
  padding: 30px;
  border: 1px solid #23251b;
  border-radius: 9px;
  background: var(--prime-cream);
  text-align: center;
  box-shadow: var(--prime-shadow);
}

.prime-empty-state--page {
  max-width: 680px;
  margin: 0 auto;
}

.prime-empty-state img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.prime-empty-state code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #d8ddcd;
}

.prime-empty-state a {
  color: #0000d5;
  font-weight: 700;
}

.prime-footer-note {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 9px;
  background: rgba(35,37,27,.45);
  color: #f2efdf;
  font-size: 14px;
  line-height: 1.5;
}

.prime-footer-note span {
  display: block;
  margin-top: 5px;
  color: #d9d5c7;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ========================================================================== */
/* Responsive                                                                 */
/* ========================================================================== */

@media (max-width: 1120px) {
  .prime-hero {
    grid-template-columns: minmax(0, 1fr) 120px;
    margin-inline: 16px;
    padding: 28px;
  }

  .prime-hero__llama {
    width: 112px;
    height: 112px;
  }

  .affiliate-notice {
    margin-inline: 20px;
  }

.prime-main {
  max-width: 100%;
}

.prime-deal-grid {
  grid-template-columns: repeat(auto-fill, 520px);
}
}

@media (max-width: 640px) {
  .site-nav {
    min-height: 44px;
    padding: 0 6px;
  }

  .site-nav a {
    padding: 10px 9px;
    font-size: 16px;
  }

  .prime-hero {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 14px 10px 10px;
    padding: 22px 20px;
  }

  .prime-hero h1 {
    font-size: 38px;
  }

  .prime-description {
    font-size: 16px;
  }

  .prime-hero__llama {
    width: 92px;
    height: 92px;
    justify-self: end;
    margin-top: -14px;
  }

  .affiliate-notice {
    margin: 0 14px 14px;
    text-align: left;
  }

.prime-main {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.prime-toolbar {
  padding: 0 8px;
}

.prime-filter-group {
  gap: 7px;
}

.prime-filter {
  padding: 5px 8px;
  font-size: 14px;
}

.prime-search-row {
  justify-content: center;
  max-width: 100%;
  margin: 8px auto 10px;
  padding: 0 10px;
}

.prime-search,
.prime-search input {
  width: 100%;
}

.prime-section-heading {
  grid-template-columns: auto auto auto;
  gap: 10px;
  margin: 12px 0 10px;
}

.prime-section-heading img {
  width: 54px;
  height: 54px;
}

.prime-section-heading__copy {
  grid-column: 2;
}

.prime-search--heading {
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
  margin: 4px 0 0;
}

.prime-search,
.prime-search input {
  width: 100%;
}

  .prime-deal-grid {
    grid-template-columns: 1fr;
  }

  .prime-deal-card {
  width: 100%;
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 200px;
  margin: 8px 0;
}

.prime-deal-card__media {
  padding: 8px 6px 7px;
}

.prime-category {
  max-width: 106px;
  font-size: 10px;
  padding: 4px 5px;
}

.prime-deal-card__image img {
  max-width: 106px;
  max-height: 118px;
}

.prime-verified {
  font-size: 10px;
}

.prime-deal-card__body {
  padding: 10px 9px 9px 0;
}

.prime-deal-title {
  font-size: 15px;
  -webkit-line-clamp: 5;
}

.prime-price-row {
  margin-top: 5px;
}

.prime-price-row strong {
  font-size: 20px;
}

  .prime-coupon,
  .prime-checkout,
  .prime-note {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .site-nav { height: 50px; padding: 0 16px; }
  .site-nav li { margin-right: 0; }
  .site-nav a { padding: 10px 12px; font-size: 18px; }
}
