/* ============================================================
   SnagPulse Component Library
   ============================================================
   Every component is a small system. Precise, intentional.
   ============================================================ */

/* === HEADER === */

.sp-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: var(--header-h);
  background: var(--surface-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 var(--content-pad);
}

.sp-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

/* Logo */
.sp-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  text-decoration: none;
  flex-shrink: 0;
}

/* Image logos (dark/light mode switching) */
.sp-logo__img {
  height: 38px;
  width: auto;
  display: none;
}

[data-theme="dark"] .sp-logo__img--dark { display: block; }
[data-theme="dark"] .sp-logo__img--light { display: none; }
[data-theme="light"] .sp-logo__img--dark { display: none; }
[data-theme="light"] .sp-logo__img--light { display: block; }

/* Desktop: align logo text bottom with nav link text bottom */
@media (min-width: 1025px) {
  .sp-logo__img {
    transform: translateY(-5px);
  }
}

/* Navigation */
.sp-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex: 1;
}

.sp-nav__item {
  position: relative;
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--ff-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease;
  cursor: pointer;
  white-space: nowrap;
}

.sp-nav__item:hover,
.sp-nav__item[aria-expanded="true"] {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.sp-nav__item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--sp-3);
  right: var(--sp-3);
  height: 2px;
  background: var(--accent-coral);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform var(--dur-base) var(--ease-out);
}

.sp-nav__item:hover::after,
.sp-nav__item.is-active::after {
  transform: scaleX(1);
}

.sp-nav__chevron {
  width: 12px;
  height: 12px;
  margin-left: 2px;
  transition: transform var(--dur-fast) ease;
  color: var(--text-tertiary);
}

.sp-nav__item[aria-expanded="true"] .sp-nav__chevron {
  transform: rotate(180deg);
}

/* Dropdown — solid background for readability */
.sp-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--sp-2);
  box-shadow: var(--shadow-xl);
  display: none;
  z-index: var(--z-dropdown);
}

.sp-dropdown.is-open {
  display: block;
}

.sp-dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  color: var(--text-secondary);
  font-size: var(--fs-small);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease;
  text-decoration: none;
}

.sp-dropdown__item:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.sp-dropdown__section {
  padding: var(--sp-2) var(--sp-3) var(--sp-1);
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--text-tertiary);
}

.sp-dropdown__divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--sp-2) var(--sp-3);
}

/* Mega dropdown for categories */
.sp-dropdown--mega {
  min-width: 560px;
  padding: var(--sp-5);
  display: none;
}

.sp-dropdown--mega.is-open {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
}

/* Search */
.sp-search-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease;
  background: none;
  border: none;
}

.sp-search-trigger:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* Theme Toggle */
.sp-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  position: relative;
}

.sp-theme-toggle:hover {
  color: var(--accent-coral);
  background: var(--bg-elevated);
}

/* Theme toggle: icon container */
.sp-theme-toggle__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  position: relative;
}

.sp-theme-toggle__icon svg {
  width: 20px;
  height: 20px;
}

/* Icon visibility handled by animations.css via opacity crossfade */

/* Header actions */
.sp-header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

/* Desktop: align Sign In right edge with sidebar card right edge */
@media (min-width: 1025px) {
  .sp-header__actions {
    margin-right: var(--content-pad);
  }
}

/* Mobile hamburger */
.sp-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--sp-2);
  background: none;
  border: none;
  cursor: pointer;
}

.sp-hamburger__line {
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-fast) ease;
}

.sp-hamburger.is-open .sp-hamburger__line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.sp-hamburger.is-open .sp-hamburger__line:nth-child(2) {
  opacity: 0;
}

.sp-hamburger.is-open .sp-hamburger__line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === HERO / FEATURED DEAL === */

.sp-hero {
  background: var(--gradient-hero);
  padding: var(--sp-12) var(--content-pad) var(--sp-16);
  position: relative;
  overflow: hidden;
}

/* Subtle gradient orbs in background */
.sp-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(232, 93, 93, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.sp-hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(52, 199, 123, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.sp-hero__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-10);
  align-items: center;
  position: relative;
  z-index: var(--z-base);
}

.sp-hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.sp-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--accent-coral);
}

.sp-hero__eyebrow-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-coral);
  border-radius: 50%;
  animation: sp-pulse-hot 2s ease-in-out infinite;
}

.sp-hero__title {
  font-size: var(--fs-display-xl);
  font-family: var(--ff-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

.sp-hero__context {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
}

.sp-hero__price-block {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.sp-hero__cta-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-2);
}

.sp-hero__image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.sp-hero__image {
  max-width: 380px;
  max-height: 380px;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-xl);
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

.sp-hero__score-ring {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
}

/* === DEAL CARD === */

.sp-deal-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 48px 120px 1fr auto;
  grid-template-rows: auto auto auto;
  gap: var(--sp-3) var(--sp-4);
  align-items: start;
}

/* Expired card dimming */
.sp-deal-card--expired {
  opacity: 0.5;
  pointer-events: auto;
}

.sp-deal-card--expired::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
  opacity: 0.3;
  border-radius: var(--radius-lg);
  pointer-events: none;
}

/* Score ring column */
.sp-deal-card__score {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Image column */
.sp-deal-card__image-wrap {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-hover);
  flex-shrink: 0;
}

.sp-deal-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-base) var(--ease-out);
}

.sp-deal-card:hover .sp-deal-card__image {
  transform: scale(1.04);
}

/* Content column */
.sp-deal-card__content {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  min-width: 0;
}

.sp-deal-card__title {
  font-family: var(--ff-display);
  font-size: var(--fs-heading);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  line-height: var(--lh-tight);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-deal-card__title a {
  color: inherit;
  text-decoration: none;
}

.sp-deal-card__title a:hover {
  color: var(--accent-ice);
}

.sp-deal-card__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-micro);
  color: var(--text-tertiary);
}

.sp-deal-card__meta-dot {
  width: 3px;
  height: 3px;
  background: var(--text-tertiary);
  border-radius: 50%;
}

.sp-deal-card__excerpt {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  grid-column: 3;
  grid-row: 2;
}

/* Price column */
.sp-deal-card__price-block {
  grid-column: 4;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-1);
  text-align: right;
  min-width: 140px;
}

.sp-deal-card__discount-badge {
  display: inline-flex;
  padding: 2px 8px;
  background: var(--accent-coral-dim);
  color: var(--accent-coral);
  font-family: var(--ff-mono);
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Action row */
.sp-deal-card__actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--sp-1);
}

.sp-deal-card__actions-spacer {
  flex: 1;
}

/* Status badge (positioned top-right) */
.sp-deal-card__status {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
}

/* === STATUS BADGE === */

.sp-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.sp-status-badge--hot {
  background: var(--accent-coral-dim);
  color: var(--accent-coral);
}

.sp-status-badge--verified {
  background: var(--accent-mint-dim);
  color: var(--accent-mint);
}

.sp-status-badge--ymmv {
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
}

.sp-status-badge--expiring {
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
}

.sp-status-badge--expired {
  background: rgba(90, 100, 120, 0.1);
  color: var(--text-tertiary);
}

.sp-status-badge__icon {
  width: 12px;
  height: 12px;
}

/* === VOTE WIDGET === */

.sp-vote {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}

.sp-vote__label {
  font-size: var(--fs-micro);
  color: var(--text-tertiary);
  font-weight: var(--fw-medium);
  margin-right: 2px;
  white-space: nowrap;
}

.sp-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-tertiary);
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all var(--dur-fast) ease;
  position: relative;
  overflow: hidden;
}

.sp-vote-btn:hover {
  border-color: var(--border-default);
  color: var(--text-secondary);
  background: var(--bg-hover);
}

.sp-vote-btn--live.is-voted {
  border-color: var(--accent-mint);
  color: var(--accent-mint);
  background: var(--accent-mint-dim);
}

.sp-vote-btn--dead.is-voted {
  border-color: var(--accent-coral);
  color: var(--accent-coral);
  background: var(--accent-coral-dim);
}

.sp-vote-btn__icon {
  width: 14px;
  height: 14px;
}

/* === BUTTONS === */

.sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--ff-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

/* Primary CTA — coral */
.sp-btn-cta {
  padding: var(--sp-3) var(--sp-5);
  background: var(--accent-coral);
  color: #FFFFFF;
}

.sp-btn-cta:hover {
  background: var(--accent-coral-hover);
  box-shadow: var(--shadow-glow-coral);
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* Large CTA */
.sp-btn-cta--lg {
  padding: var(--sp-4) var(--sp-8);
  font-size: var(--fs-body);
  border-radius: var(--radius-lg);
}

/* Ghost button */
.sp-btn-ghost {
  padding: var(--sp-2) var(--sp-4);
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.sp-btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-emphasis);
  background: var(--bg-hover);
}

/* Button arrow icon */
.sp-btn__arrow {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-base) var(--ease-out);
}

.sp-btn:hover .sp-btn__arrow {
  transform: translateX(3px);
}

/* === FILTER BAR === */

.sp-filters {
  position: sticky;
  top: var(--header-h);
  z-index: calc(var(--z-sticky) - 1);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--sp-3) var(--content-pad);
}

.sp-filters__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.sp-filter-pills {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  position: relative;
}

.sp-filter-pill {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: color var(--dur-fast) ease;
  position: relative;
  z-index: 1;
}

.sp-filter-pill:hover {
  color: var(--text-primary);
}

.sp-filter-pill.is-active {
  color: var(--accent-coral);
}

/* Animated indicator that slides between pills */
.sp-filter-pills__indicator {
  position: absolute;
  height: 100%;
  background: var(--accent-coral-dim);
  border-radius: var(--radius-full);
  z-index: 0;
  transition: left var(--dur-base) var(--ease-spring), width var(--dur-base) var(--ease-spring);
}

.sp-filter-divider {
  width: 1px;
  height: 20px;
  background: var(--border-subtle);
}

/* Category scroll pills */
.sp-category-pills {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
  flex: 1;
}

.sp-category-pills::-webkit-scrollbar {
  display: none;
}

.sp-category-pill {
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  color: var(--text-tertiary);
  background: var(--bg-hover);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--dur-fast) ease;
  white-space: nowrap;
}

.sp-category-pill:hover {
  color: var(--text-secondary);
  border-color: var(--border-default);
}

.sp-category-pill.is-active {
  color: var(--accent-ice);
  background: var(--accent-ice-dim);
  border-color: rgba(91, 159, 230, 0.2);
}

/* Expired toggle */
.sp-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  font-size: var(--fs-small);
  color: var(--text-tertiary);
  user-select: none;
}

.sp-toggle__switch {
  width: 36px;
  height: 20px;
  background: var(--bg-hover);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.sp-toggle__switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: transform var(--dur-base) var(--ease-spring);
}

.sp-toggle input:checked + .sp-toggle__switch {
  background: var(--accent-ice-dim);
  border-color: var(--accent-ice);
}

.sp-toggle input:checked + .sp-toggle__switch::after {
  transform: translateX(16px);
  background: var(--accent-ice);
}

.sp-toggle input { display: none; }

/* === FILTER TRIGGER BUTTON === */

.sp-filter-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease, background var(--dur-fast) ease;
  flex-shrink: 0;
}

.sp-filter-trigger:hover {
  color: var(--text-primary);
  border-color: var(--border-emphasis);
  background: var(--bg-hover);
}

.sp-filter-trigger.is-active {
  color: var(--accent-coral);
  border-color: var(--accent-coral);
  background: var(--accent-coral-dim);
}

.sp-filter-trigger__icon {
  width: 14px;
  height: 14px;
}

.sp-filter-trigger__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: var(--fw-bold);
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: var(--accent-coral);
  border-radius: var(--radius-full);
}

/* === FILTER PANEL === */

.sp-filter-panel {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sp-filter-panel[hidden] {
  display: none;
}

.sp-filter-panel__backdrop {
  position: absolute;
  inset: 0;
  background: var(--surface-overlay);
  opacity: 0;
  transition: opacity var(--dur-base) ease;
}

.sp-filter-panel.is-open .sp-filter-panel__backdrop {
  opacity: 1;
}

.sp-filter-panel__sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  overflow: hidden;
}

.sp-filter-panel.is-open .sp-filter-panel__sheet {
  transform: translateY(0);
}

.sp-filter-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.sp-filter-panel__title {
  font-family: var(--ff-display);
  font-size: var(--fs-heading);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin: 0;
}

.sp-filter-panel__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease;
}

.sp-filter-panel__close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.sp-filter-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.sp-filter-panel__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
  gap: var(--sp-3);
}

.sp-filter-panel__reset {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-tertiary);
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.sp-filter-panel__reset:hover {
  color: var(--text-secondary);
  border-color: var(--border-emphasis);
}

.sp-filter-panel__apply {
  flex: 1;
  max-width: 200px;
}

/* Filter group (fieldset) */
.sp-filter-group {
  border: none;
  padding: 0;
  margin: 0;
}

.sp-filter-group__label {
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--text-tertiary);
  margin-bottom: var(--sp-3);
}

.sp-filter-group__options {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.sp-filter-group__options--row {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

/* Radio option (sort by) */
.sp-filter-option {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}

.sp-filter-option:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sp-filter-option input {
  display: none;
}

.sp-filter-option__check {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-default);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: border-color var(--dur-fast) ease;
}

.sp-filter-option__check::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-coral);
  transform: scale(0);
  transition: transform var(--dur-fast) var(--ease-spring);
}

.sp-filter-option input:checked ~ .sp-filter-option__check {
  border-color: var(--accent-coral);
}

.sp-filter-option input:checked ~ .sp-filter-option__check::after {
  transform: scale(1);
}

.sp-filter-option:has(input:checked) {
  color: var(--text-primary);
}

/* Chip filter (status, category, date) */
.sp-filter-chip {
  cursor: pointer;
}

.sp-filter-chip input {
  display: none;
}

.sp-filter-chip__inner {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  color: var(--text-tertiary);
  background: var(--bg-hover);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  transition: all var(--dur-fast) ease;
  white-space: nowrap;
}

.sp-filter-chip:hover .sp-filter-chip__inner {
  color: var(--text-secondary);
  border-color: var(--border-default);
}

.sp-filter-chip input:checked + .sp-filter-chip__inner {
  color: var(--accent-coral);
  background: var(--accent-coral-dim);
  border-color: rgba(232, 93, 93, 0.25);
}

/* === SIDEBAR === */

.sp-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  width: var(--sidebar-w);
  flex-shrink: 0;
}

.sp-sidebar-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
}

.sp-sidebar-card__title {
  font-family: var(--ff-display);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--text-tertiary);
  margin-bottom: var(--sp-4);
}

/* Latest deals in sidebar */
.sp-latest-deals {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.sp-latest-deal {
  display: flex;
  gap: var(--sp-3);
  text-decoration: none;
  padding: var(--sp-2);
  margin: 0 calc(-1 * var(--sp-2));
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) ease;
}

.sp-latest-deal:hover {
  background: var(--bg-hover);
}

.sp-latest-deal__image {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-hover);
  flex-shrink: 0;
}

.sp-latest-deal__info {
  flex: 1;
  min-width: 0;
}

.sp-latest-deal__title {
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.sp-latest-deal__price {
  font-family: var(--ff-mono);
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
  color: var(--accent-mint);
  margin-top: 2px;
}

.sp-latest-deal__store {
  font-size: var(--fs-micro);
  color: var(--text-tertiary);
}

.sp-latest-deal__time {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* === NEWSLETTER SIGNUP === */

.sp-newsletter {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  position: relative;
  overflow: hidden;
}

/* Subtle gradient accent in corner */
.sp-newsletter::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--accent-coral-glow), transparent 70%);
  pointer-events: none;
}

.sp-newsletter__title {
  font-family: var(--ff-display);
  font-size: var(--fs-display-md);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
  position: relative;
}

.sp-newsletter__desc {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
  line-height: var(--lh-relaxed);
}

.sp-newsletter__form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.sp-newsletter__form .sp-btn {
  width: 100%;
}

.sp-newsletter__input {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-hover);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--ff-body);
  font-size: var(--fs-small);
  outline: none;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.sp-newsletter__input::placeholder {
  color: var(--text-tertiary);
}

.sp-newsletter__input:focus {
  border-color: var(--accent-coral);
  box-shadow: 0 0 0 3px var(--accent-coral-glow);
}

/* === PAGINATION === */

.sp-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  padding: var(--sp-10) 0;
}

.sp-pagination__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-family: var(--ff-mono);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--dur-fast) ease;
  text-decoration: none;
}

.sp-pagination__btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.sp-pagination__btn.is-active {
  background: var(--accent-coral-dim);
  color: var(--accent-coral);
  border-color: rgba(232, 93, 93, 0.2);
  font-weight: var(--fw-bold);
}

/* === FOOTER === */

.sp-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border-subtle);
  padding: var(--sp-16) var(--content-pad) var(--sp-8);
}

.sp-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.sp-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: var(--sp-10);
  margin-bottom: var(--sp-12);
}

.sp-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.sp-footer__tagline {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  max-width: 280px;
}

.sp-footer__col-title {
  font-family: var(--ff-display);
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--text-tertiary);
  margin-bottom: var(--sp-4);
}

.sp-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.sp-footer__links a {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}

.sp-footer__links a:hover {
  color: var(--text-primary);
}

.sp-footer__social {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}

.sp-footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all var(--dur-fast) ease;
}

.sp-footer__social-link:hover {
  color: var(--text-primary);
  border-color: var(--border-default);
  background: var(--bg-hover);
}

.sp-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border-subtle);
  gap: var(--sp-4);
}

.sp-footer__disclosure {
  font-size: var(--fs-micro);
  color: var(--text-tertiary);
  line-height: var(--lh-relaxed);
  max-width: 600px;
}

.sp-footer__copyright {
  font-size: var(--fs-micro);
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* === SEARCH OVERLAY === */

.sp-search-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: var(--surface-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.sp-search-overlay.is-open {
  display: flex;
}

.sp-search-overlay__inner {
  width: 100%;
  max-width: 640px;
  padding: 0 var(--content-pad);
}

.sp-search-overlay__input {
  width: 100%;
  padding: var(--sp-5) var(--sp-6);
  background: var(--bg-elevated);
  border: 1px solid var(--border-emphasis);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-family: var(--ff-display);
  font-size: var(--fs-display-md);
  font-weight: var(--fw-medium);
  outline: none;
  box-shadow: var(--shadow-xl);
}

.sp-search-overlay__input::placeholder {
  color: var(--text-tertiary);
}

.sp-search-overlay__hint {
  text-align: center;
  margin-top: var(--sp-4);
  font-size: var(--fs-small);
  color: var(--text-tertiary);
}

.sp-search-overlay__hint kbd {
  padding: 2px 8px;
  background: var(--bg-hover);
  border: 1px solid var(--border-default);
  border-radius: 4px;
  font-family: var(--ff-mono);
  font-size: var(--fs-micro);
}

/* === REPORT MODAL === */

.sp-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--surface-overlay);
  backdrop-filter: blur(4px);
  display: none;
}

.sp-modal-backdrop.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-xl);
}

.sp-modal__title {
  font-family: var(--ff-display);
  font-size: var(--fs-display-md);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-5);
}

.sp-modal__option {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-2);
  cursor: pointer;
  transition: all var(--dur-fast) ease;
}

.sp-modal__option:hover {
  border-color: var(--border-emphasis);
  background: var(--bg-hover);
}

.sp-modal__option.is-selected {
  border-color: var(--accent-coral);
  background: var(--accent-coral-dim);
}

.sp-modal__radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-emphasis);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--dur-fast) ease;
}

.sp-modal__option.is-selected .sp-modal__radio {
  border-color: var(--accent-coral);
}

.sp-modal__option.is-selected .sp-modal__radio::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-coral);
  border-radius: 50%;
}

.sp-modal__textarea {
  width: 100%;
  min-height: 80px;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-hover);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--ff-body);
  font-size: var(--fs-small);
  resize: vertical;
  outline: none;
  margin-top: var(--sp-4);
  transition: border-color var(--dur-fast) ease;
}

.sp-modal__textarea:focus {
  border-color: var(--accent-coral);
}

.sp-modal__actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  justify-content: flex-end;
}

/* === BREADCRUMBS === */

.sp-breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-micro);
  color: var(--text-tertiary);
  margin-bottom: var(--sp-4);
}

.sp-breadcrumbs a {
  color: var(--text-tertiary);
  transition: color var(--dur-fast) ease;
}

.sp-breadcrumbs a:hover {
  color: var(--text-secondary);
}

.sp-breadcrumbs__sep {
  color: var(--border-emphasis);
  font-size: 10px;
}

/* === COUPON STACK BREAKDOWN === */

.sp-coupon-stack {
  background: var(--bg-elevated);
  border: 1px solid var(--accent-mint);
  border-left: 3px solid var(--accent-mint);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  margin: var(--sp-4) 0;
}

.sp-coupon-stack__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--ff-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-heading);
  color: var(--accent-mint);
  margin-bottom: var(--sp-4);
}

.sp-coupon-stack__layer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) 0;
  font-size: var(--fs-small);
}

.sp-coupon-stack__layer + .sp-coupon-stack__layer {
  border-top: 1px dashed var(--border-subtle);
}

.sp-coupon-stack__label {
  color: var(--text-secondary);
}

.sp-coupon-stack__value {
  font-family: var(--ff-mono);
  font-weight: var(--fw-semibold);
  color: var(--accent-mint);
}

.sp-coupon-stack__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-3);
  margin-top: var(--sp-2);
  border-top: 2px solid var(--accent-mint);
  font-weight: var(--fw-bold);
}

.sp-coupon-stack__total-label {
  font-family: var(--ff-display);
  color: var(--text-primary);
}

.sp-coupon-stack__total-value {
  font-family: var(--ff-mono);
  font-size: var(--fs-price-card);
  color: var(--accent-mint);
}

/* === CALLOUT BOX (credit card tip, cashback, etc.) === */

.sp-callout {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin: var(--sp-3) 0;
}

.sp-callout__icon {
  width: 20px;
  height: 20px;
  color: var(--accent-amber);
  flex-shrink: 0;
  margin-top: 1px;
}

.sp-callout__text {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
}

.sp-callout__text strong {
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
}

/* === DEAL ALERTS FORM === */

.sp-alert-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.sp-alert-form__field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.sp-alert-form__label {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

.sp-alert-form__label .sp-required {
  color: var(--accent-coral);
  margin-left: 2px;
}

.sp-alert-form__input {
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-hover);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  outline: none;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.sp-alert-form__input:focus {
  border-color: var(--accent-ice);
  box-shadow: 0 0 0 3px var(--accent-ice-glow);
}

.sp-alert-form__row {
  display: flex;
  gap: var(--sp-3);
}

.sp-alert-form__row > * {
  flex: 1;
}

/* === BLOG CARD === */

.sp-blog-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}

.sp-blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.sp-blog-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.sp-blog-card:hover .sp-blog-card__image {
  transform: scale(1.04);
}

.sp-blog-card__image-wrap {
  overflow: hidden;
}

.sp-blog-card__body {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.sp-blog-card__tag {
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--accent-coral);
}

.sp-blog-card__title {
  font-family: var(--ff-display);
  font-size: var(--fs-heading);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  line-height: var(--lh-tight);
}

.sp-blog-card__title a {
  color: inherit;
  text-decoration: none;
}

.sp-blog-card__excerpt {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-blog-card__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-micro);
  color: var(--text-tertiary);
  margin-top: var(--sp-2);
}

/* === TOAST NOTIFICATION === */

.sp-toast-container {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.sp-toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 400px;
}

.sp-toast--success {
  border-left: 3px solid var(--accent-mint);
}

.sp-toast--error {
  border-left: 3px solid var(--accent-coral);
}

.sp-toast__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sp-toast--success .sp-toast__icon { color: var(--accent-mint); }
.sp-toast--error .sp-toast__icon { color: var(--accent-coral); }

.sp-toast__text {
  font-size: var(--fs-small);
  color: var(--text-primary);
  flex: 1;
}

.sp-toast__close {
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color var(--dur-fast) ease;
}

.sp-toast__close:hover {
  color: var(--text-secondary);
}

/* === AGE VERIFICATION CHECKBOX (G-06 — COPPA) === */

.sp-age-verify {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  cursor: pointer;
  margin: var(--sp-2) 0;
}

.sp-age-verify input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--accent-coral);
  flex-shrink: 0;
}

.sp-age-verify__text {
  font-size: var(--fs-micro);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
}

/* === COOKIE CONSENT BANNER (G-01 — GDPR/CCPA) === */

.sp-cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-toast);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-default);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  padding: var(--sp-4) var(--content-pad);
}

.sp-cookie-consent[hidden] {
  display: none;
}

.sp-cookie-consent__content {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.sp-cookie-consent__text {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  flex: 1;
  min-width: 240px;
}

.sp-cookie-consent__text a {
  color: var(--accent-ice);
  text-decoration: underline;
}

.sp-cookie-consent__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.sp-cookie-consent__link {
  font-size: var(--fs-micro);
  color: var(--text-tertiary);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .sp-cookie-consent__content {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .sp-cookie-consent__actions {
    justify-content: center;
  }

  .sp-cookie-consent {
    bottom: 72px;
  }
}
