/* ==========================================================================
   AMZDEALS CSS STYLESHEET - PREMIUM GLASSMORPHISM DARK DESIGN
   ========================================================================== */

/* 1. RESET & VARIABLE TOKENS */
:root {
  /* Dark Theme Palette (Default) */
  --bg-main: #09090b;
  --bg-panel: #18181b;
  --bg-card: rgba(24, 24, 27, 0.7);
  --bg-input: #27272a;
  --border-color: rgba(63, 63, 70, 0.4);
  --border-glow: rgba(16, 185, 129, 0.15);
  
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dark: #18181b;
  
  /* Accent Colors */
  --accent: #10b981; /* Savings Emerald Green */
  --accent-rgb: 16, 185, 129;
  --accent-glow-color: rgba(16, 185, 129, 0.4);
  --amazon-orange: #ff9900;
  --amazon-orange-rgb: 255, 153, 0;
  --danger: #ef4444;
  --warning: #f59e0b;
  
  /* Fonts */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-data: 'JetBrains Mono', monospace;
  
  /* Layout tokens */
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.2);
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Light Theme Variables */
body.light-theme {
  --bg-main: #f4f4f5;
  --bg-panel: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-input: #e4e4e7;
  --border-color: rgba(228, 224, 230, 0.8);
  --border-glow: rgba(16, 185, 129, 0.1);
  
  --text-main: #18181b;
  --text-muted: #71717a;
  --text-dark: #f4f4f5;
  --accent-glow-color: rgba(16, 185, 129, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-display);
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.3s ease;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-input);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* 2. TOP LIVE TICKER */
.ticker-wrapper {
  background: #000;
  border-bottom: 1px solid var(--border-color);
  height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  z-index: 50;
}

.ticker-label {
  background: var(--accent);
  color: #fff;
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  gap: 8px;
  z-index: 2;
  box-shadow: 10px 0 20px rgba(0,0,0,0.5);
  flex-shrink: 0;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #fff;
  border-radius: 50%;
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.5; box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
  50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 6px rgba(255,255,255,0); }
  100% { transform: scale(0.8); opacity: 0.5; box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.ticker-content {
  flex-grow: 1;
  overflow: hidden;
  position: relative;
}

.ticker-items {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 35s linear infinite;
  padding-left: 20px;
}

.ticker-items:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0 30px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.ticker-item:hover {
  color: var(--accent);
}

.ticker-item .ticker-pct {
  color: var(--accent);
  font-family: var(--font-data);
  font-weight: 700;
}

.ticker-item .ticker-item-old {
  text-decoration: line-through;
  opacity: 0.6;
}

@keyframes ticker-scroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* 3. APP CONTAINER & HEADER */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 25px;
  min-height: calc(100vh - 38px);
}

@media (max-width: 768px) {
  .app-container {
    padding: 15px 15px;
    gap: 15px;
  }
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.header-logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-logo-image {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0 10px rgba(255, 85, 0, 0.4));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
  cursor: pointer;
}

.app-logo-image:hover {
  transform: scale(1.1) rotate(8deg);
  filter: drop-shadow(0 0 16px rgba(255, 85, 0, 0.75));
}

.logo-text h1 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.logo-text h1 span {
  color: var(--amazon-orange);
}

.logo-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Scraping indicator badge */
.scraping-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.02);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.badge-idle .badge-dot {
  background-color: var(--text-muted);
}

.badge-live-ready {
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--text-main);
}

.badge-live-ready .badge-dot {
  background-color: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.badge-scraping {
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--accent);
}

.badge-scraping .badge-dot {
  background-color: var(--accent);
  animation: glow-pulse 1s infinite alternate;
}

@keyframes glow-pulse {
  from { box-shadow: 0 0 2px var(--accent); }
  to { box-shadow: 0 0 10px var(--accent); }
}

/* Header Alerts Button */
.btn-alerts-header {
  background: rgba(245, 158, 11, 0.08);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
  position: relative;
}

.btn-alerts-header:hover {
  background: rgba(245, 158, 11, 0.16);
  border-color: var(--warning);
  transform: translateY(-1px);
}

.btn-alerts-header i {
  width: 16px;
  height: 16px;
}

.alerts-count-badge {
  background: var(--warning);
  color: #000;
  font-family: var(--font-data);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 50px;
  margin-left: 2px;
}

/* TWO-ROW GRID LAYOUT FOR MOBILE VIEWPORTS */
@media (max-width: 576px) {
  .app-header {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    row-gap: 12px !important;
    column-gap: 8px !important;
    align-items: center !important;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px !important;
  }
  
  .header-logo-section {
    grid-column: 1;
    grid-row: 1;
  }
  
  .header-controls {
    display: contents !important;
  }
  
  #theme-toggle-btn {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  
  #scraping-indicator {
    display: none !important;
  }

  #open-my-alerts-btn {
    grid-column: 1;
    grid-row: 2;
    width: 100% !important;
    height: 42px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    border-radius: var(--border-radius-md) !important;
    font-size: 0.82rem !important;
    padding: 0 12px !important;
  }
  
  #refresh-deals-btn {
    grid-column: 2;
    grid-row: 2;
    width: 100% !important;
    height: 42px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    border-radius: var(--border-radius-md) !important;
    font-size: 0.82rem !important;
    padding: 0 16px !important;
    white-space: nowrap !important;
  }

  .app-logo-image {
    width: 42px !important;
    height: 42px !important;
  }
  
  .logo-text h1 {
    font-size: 1.5rem !important;
  }
  
  .logo-text p {
    font-size: 0.65rem !important;
    letter-spacing: 1px !important;
  }
}

/* 4. BUTTONS & INPUTS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--border-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #059669);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  opacity: 0.95;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-refresh {
  background: var(--bg-panel);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-refresh:hover {
  background: var(--bg-input);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-refresh i {
  transition: transform 0.5s ease;
}

.btn-refresh:hover i {
  transform: rotate(180deg);
}

.btn-icon-only {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--border-radius-md);
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-icon-only:hover {
  background: var(--bg-input);
  border-color: var(--text-muted);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: var(--bg-input);
  border-color: var(--accent);
}

.btn-full {
  width: 100%;
}

/* 5. SEARCH & FILTERS */
.search-filter-section {
  width: 100%;
}

.search-box-container {
  display: flex;
  gap: 12px;
}

@media (max-width: 600px) {
  .search-box-container {
    flex-direction: column;
  }
}

.search-input-wrapper {
  position: relative;
  flex-grow: 1;
}

.search-input-wrapper input {
  width: 100%;
  height: 52px;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 0 20px 0 46px;
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.clear-search-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.clear-search-btn:hover {
  color: var(--text-main);
}

/* 6. CATEGORIES NAVIGATION */
.categories-nav {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.categories-scroll-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 5px;
  scrollbar-width: none; /* Firefox */
}

.categories-scroll-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 50px;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.category-tab:hover {
  color: var(--text-main);
  background-color: var(--bg-input);
  border-color: var(--text-muted);
}

.category-tab.active {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.category-tab .cat-count {
  background: var(--accent);
  color: #fff;
  border-radius: 50px;
  padding: 1px 6px;
  font-size: 0.65rem;
  font-family: var(--font-data);
}

/* 7. STATUS BANNER */
.status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: var(--border-radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.banner-live {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.15);
  color: var(--accent);
}

.banner-fallback {
  background: rgba(245, 158, 11, 0.04);
  border-color: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

/* 7b. SMART QUICK FILTERS BAR */
.quick-filters-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0;
}

.quick-filters-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.quick-filters-label svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.quick-filters-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.quick-filters-scroll::-webkit-scrollbar {
  display: none;
}

.quick-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 50px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-filter-chip:hover {
  border-color: var(--accent);
  color: var(--text-main);
  transform: translateY(-1px);
}

.quick-filter-chip.active {
  background: rgba(16, 185, 129, 0.14);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.qf-count {
  font-family: var(--font-data);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.light-theme .qf-count {
  background: rgba(0, 0, 0, 0.06);
}

.quick-filter-chip.active .qf-count {
  background: var(--accent);
  color: #090A0F;
}

@media (max-width: 640px) {
  .quick-filters-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .quick-filters-scroll {
    width: 100%;
  }
}

/* 8. MAIN CONTENT LAYOUT */
.main-content-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: start;
}

.deals-section-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 480px) {
  .section-title-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

.section-title-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title-left h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.title-meta-tag {
  background-color: var(--bg-input);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 50px;
}

.sort-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.select-style-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.select-style-wrapper select {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 32px 6px 12px;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.select-style-wrapper select:focus {
  outline: none;
  border-color: var(--accent);
}

.select-chevron {
  position: absolute;
  right: 10px;
  width: 14px;
  height: 14px;
  pointer-events: none;
  color: var(--text-muted);
}

/* 9. DEALS GRID & CARDS */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* Deal Card Component */
.deal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.deal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: var(--transition-smooth);
}

.deal-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.08);
}

.deal-card:hover::before {
  opacity: 1;
}

/* Image section */
.card-image-section {
  position: relative;
  padding-top: 68%; /* 3:2 Aspect Ratio */
  background-color: #fff;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.card-image-section img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform 0.5s ease;
}

.deal-card:hover .card-image-section img {
  transform: scale(1.05);
}

/* Badge overlay */
.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, var(--accent), #059669);
  color: #fff;
  font-family: var(--font-data);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: var(--border-radius-sm);
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.deal-card.super-deal .discount-badge {
  background: linear-gradient(135deg, var(--danger), #dc2626);
}

.card-actions-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateX(10px);
  transition: var(--transition-smooth);
  z-index: 10;
}

.deal-card:hover .card-actions-overlay {
  opacity: 1;
  transform: translateX(0);
}

.btn-card-action {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(5px);
  transition: var(--transition-smooth);
}

.btn-card-action:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}

.btn-card-action.btn-alert:hover {
  background: var(--warning);
  border-color: var(--warning);
}

/* Body section */
.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-category {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
}

/* Star rating */
.card-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.stars-container {
  color: var(--amazon-orange);
  display: flex;
  gap: 1px;
}

.stars-container i {
  fill: var(--amazon-orange);
}

/* Price row */
.card-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.price-current {
  font-family: var(--font-data);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
}

.price-original {
  font-family: var(--font-data);
  font-size: 0.85rem;
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Sparkline price history */
.card-sparkline-container {
  margin-bottom: 16px;
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
}

.sparkline-title {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sparkline-title span.trend-down {
  color: var(--accent);
}

.sparkline-svg {
  width: 100%;
  height: 30px;
  overflow: visible;
}

/* Button */
.btn-buy-card {
  margin-top: auto;
  background: var(--bg-input);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 8px;
  border-radius: var(--border-radius-sm);
  text-align: center;
  font-weight: 600;
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.deal-card:hover .btn-buy-card {
  background: linear-gradient(135deg, var(--amazon-orange), #ffb700);
  color: #000;
  border-color: var(--amazon-orange);
  box-shadow: 0 4px 10px rgba(255, 153, 0, 0.2);
}

/* 10. SKELETON LOADER CARDS */
.skeleton-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  height: 380px;
  display: flex;
  flex-direction: column;
}

.skeleton-img {
  height: 170px;
  background: linear-gradient(90deg, var(--bg-panel) 25%, var(--bg-input) 50%, var(--bg-panel) 75%);
  background-size: 200% 100%;
  animation: loading-wave 1.5s infinite;
}

.skeleton-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.skeleton-title {
  height: 18px;
  background: linear-gradient(90deg, var(--bg-panel) 25%, var(--bg-input) 50%, var(--bg-panel) 75%);
  background-size: 200% 100%;
  animation: loading-wave 1.5s infinite;
  border-radius: 4px;
}

.skeleton-price {
  height: 24px;
  width: 60%;
  background: linear-gradient(90deg, var(--bg-panel) 25%, var(--bg-input) 50%, var(--bg-panel) 75%);
  background-size: 200% 100%;
  animation: loading-wave 1.5s infinite;
  border-radius: 4px;
}

.skeleton-sparkline {
  height: 30px;
  background: linear-gradient(90deg, var(--bg-panel) 25%, var(--bg-input) 50%, var(--bg-panel) 75%);
  background-size: 200% 100%;
  animation: loading-wave 1.5s infinite;
  border-radius: 4px;
  margin-top: 10px;
}

.skeleton-button {
  height: 32px;
  background: linear-gradient(90deg, var(--bg-panel) 25%, var(--bg-input) 50%, var(--bg-panel) 75%);
  background-size: 200% 100%;
  animation: loading-wave 1.5s infinite;
  border-radius: 4px;
  margin-top: auto;
}

@keyframes loading-wave {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 11. SIDEBAR CHAT PANEL */
.ai-sidebar-container {
  position: sticky;
  top: 20px;
  height: calc(100vh - 120px);
  min-height: 500px;
}

.ai-panel {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}

.ai-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.01);
}

.ai-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ai-avatar i {
  width: 20px;
  height: 20px;
}

.active-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  background-color: var(--accent);
  border: 2px solid var(--bg-panel);
  border-radius: 50%;
}

.ai-title-text h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.ai-title-text p {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.btn-clear-chat {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.btn-clear-chat:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.05);
}

/* Chat area */
.ai-chat-messages {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-image: radial-gradient(var(--border-color) 0.5px, transparent 0.5px);
  background-size: 16px 16px;
}

.chat-bubble {
  max-width: 85%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-bubble .bubble-content {
  padding: 12px 16px;
  font-size: 0.85rem;
  line-height: 1.45;
  border-radius: var(--border-radius-md);
}

.chat-bubble .bubble-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  align-self: flex-end;
  padding: 0 4px;
}

/* AI Bubble */
.ai-bubble {
  align-self: flex-start;
}

.ai-bubble .bubble-content {
  background-color: var(--bg-input);
  color: var(--text-main);
  border-bottom-left-radius: 2px;
}

.ai-bubble .bubble-content p {
  margin-bottom: 8px;
}

.ai-bubble .bubble-content p:last-child {
  margin-bottom: 0;
}

.ai-bubble .bubble-content ul {
  padding-left: 16px;
  margin-top: 4px;
}

/* User Bubble */
.user-bubble {
  align-self: flex-end;
}

.user-bubble .bubble-content {
  background: linear-gradient(135deg, var(--accent), #059669);
  color: #fff;
  border-bottom-right-radius: 2px;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.15);
}

/* Embedded Chat Recommendations */
.chat-recos-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.chat-reco-card {
  display: flex;
  gap: 10px;
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 8px;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chat-reco-card:hover {
  border-color: var(--accent);
  background: rgba(0,0,0,0.25);
  transform: translateX(4px);
}

.chat-reco-img {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background-color: #fff;
  object-fit: contain;
  padding: 2px;
  flex-shrink: 0;
}

.chat-reco-info {
  flex-grow: 1;
  min-width: 0;
}

.chat-reco-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-reco-prices {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
}

.chat-reco-price {
  font-family: var(--font-data);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.chat-reco-discount {
  font-size: 0.65rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent);
  padding: 0 4px;
  border-radius: 2px;
  font-weight: 700;
}

/* Chat input */
.ai-panel-input-container {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.01);
}

.ai-panel-input-container input {
  flex-grow: 1;
  height: 40px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 0 14px;
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.ai-panel-input-container input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-chat-submit {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--border-radius-md);
  flex-shrink: 0;
}

/* Typing bubble */
.typing-indicator-container {
  align-self: flex-start;
  margin-left: 20px;
  margin-bottom: 5px;
}

.typing-bubble {
  background-color: var(--bg-input);
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  border-bottom-left-radius: 2px;
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-bubble span {
  width: 6px;
  height: 6px;
  background-color: var(--text-muted);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-bubble span:nth-child(1) { animation-delay: -0.32s; }
.typing-bubble span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* 12. MODAL OVERLAYS & MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
  transform: rotate(90deg);
}

/* Scanning / Terminal Modal */
.scanning-terminal-container {
  width: 100%;
  max-width: 640px;
  background-color: #0c0c0e;
  border: 1px solid var(--accent);
  border-radius: var(--border-radius-md);
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 380px;
}

.terminal-header {
  background-color: #141416;
  border-bottom: 1px solid #1f1f23;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background-color: #ef4444; }
.dot-yellow { background-color: #f59e0b; }
.dot-green { background-color: #10b981; }

.terminal-title {
  color: var(--accent);
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.terminal-title i {
  width: 14px;
  height: 14px;
}

.terminal-body {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  font-family: var(--font-data);
  font-size: 0.8rem;
  color: #a7f3d0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  line-height: 1.4;
}

.term-line {
  display: block;
}

.term-line.cmd {
  color: #10b981;
}

.term-line.success {
  color: #34d399;
  font-weight: 600;
}

.term-line.warn {
  color: #fbbf24;
}

.term-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background-color: var(--accent);
  margin-left: 4px;
  animation: cursor-blink 1s infinite;
  vertical-align: middle;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

.terminal-progress-container {
  height: 4px;
  background-color: #1f1f23;
  width: 100%;
}

.terminal-progress-bar {
  height: 100%;
  background-color: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  transition: width 0.1s linear;
}

/* Detail Modal */
.detail-modal-container {
  width: 100%;
  max-width: 800px;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.detail-modal-content {
  overflow-y: auto;
  padding: 30px;
}

@media (max-width: 640px) {
  .detail-modal-content {
    padding: 15px;
  }
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
}

@media (max-width: 640px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-img-box {
  background-color: #fff;
  border-radius: var(--border-radius-md);
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 280px;
  border: 1px solid var(--border-color);
}

.detail-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.detail-info {
  display: flex;
  flex-direction: column;
}

.detail-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.detail-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.detail-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.detail-price-box {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.detail-prices {
  display: flex;
  flex-direction: column;
}

.detail-prices-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.detail-price-curr {
  font-family: var(--font-data);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
}

.detail-price-orig {
  font-family: var(--font-data);
  font-size: 1rem;
  text-decoration: line-through;
  color: var(--text-muted);
}

.detail-savings {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

.detail-badge-savings {
  background-color: var(--accent);
  color: #fff;
  font-family: var(--font-data);
  font-weight: 800;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

/* History Chart section in modal */
.detail-chart-section {
  border-top: 1px dashed var(--border-color);
  padding-top: 20px;
  margin-bottom: 25px;
}

.chart-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.chart-title-row h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.chart-legend {
  display: flex;
  gap: 12px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-color {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-color.green { background-color: var(--accent); }
.legend-color.orange { background-color: var(--amazon-orange); }

.detail-chart-svg-box {
  width: 100%;
  height: 120px;
  background-color: rgba(0,0,0,0.15);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  padding: 10px;
  overflow: visible;
}

.chart-large-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Specs list */
.detail-specs-section {
  margin-bottom: 25px;
}

.detail-specs-section h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.spec-item {
  background-color: var(--bg-input);
  border-radius: var(--border-radius-sm);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--border-color);
}

.spec-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.spec-val {
  font-size: 0.8rem;
  color: var(--text-main);
  font-weight: 500;
}

/* Buy section in modal */
.detail-buy-row {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

@media (max-width: 480px) {
  .detail-buy-row {
    flex-direction: column;
  }
}

.btn-amazon-buy {
  background: linear-gradient(135deg, var(--amazon-orange), #ffb700);
  color: #000;
  font-size: 1rem;
  padding: 12px 30px;
  border-radius: var(--border-radius-md);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-grow: 1;
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3);
  transition: var(--transition-smooth);
}

.btn-amazon-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 153, 0, 0.4);
}

/* Price Alert Modal Custom */
.alert-modal-container {
  width: 100%;
  max-width: 450px;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px;
  position: relative;
}

.alert-modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.alert-bell-icon {
  width: 44px;
  height: 44px;
  color: var(--warning);
  background-color: rgba(245, 158, 11, 0.1);
  padding: 8px;
  border-radius: 50%;
  margin-bottom: 12px;
  animation: bell-swing 2s infinite ease-in-out alternate;
}

@keyframes bell-swing {
  0% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
  100% { transform: rotate(-8deg); }
}

.alert-modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.alert-modal-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.alert-modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.form-input {
  height: 42px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0 14px;
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 0.88rem;
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-input.readonly {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.price-badge-current {
  height: 42px;
  background-color: rgba(255,255,255,0.02);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-data);
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.9rem;
}

.input-price-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-price-prefix span {
  position: absolute;
  left: 14px;
  font-family: var(--font-data);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.input-price-prefix input {
  width: 100%;
  padding-left: 30px;
}

/* 13. TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
  max-width: 320px;
  pointer-events: none;
}

.toast {
  background-color: #141416;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  gap: 12px;
  align-items: center;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: auto;
}

.toast-clickable {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.toast-clickable:hover {
  transform: translateY(-2px) scale(1.02) !important;
  border-color: var(--accent) !important;
  box-shadow: var(--shadow-glow) !important;
}

.toast.active {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-success .toast-icon-wrapper {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--accent);
}

.toast-info .toast-icon-wrapper {
  background-color: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.toast-content {
  flex-grow: 1;
}

.toast-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
}

.toast-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.toast-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
}

/* 14. EMPTY STATE */
.empty-state-container {
  text-align: center;
  padding: 50px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-panel);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-lg);
  max-width: 500px;
  margin: 40px auto;
}

.empty-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-icon-box i {
  width: 30px;
  height: 30px;
}

.empty-state-container h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-state-container p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  max-width: 360px;
  line-height: 1.4;
}

/* ==========================================================================
   15. NEW V2 FEATURES: TIME-AGO, COUPONS, PAGINATION, MY ALERTS MODAL
   ========================================================================== */

/* Card Meta Row (Category + Relative Time Badge) */
.card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.card-meta-row .card-category {
  margin-bottom: 0;
}

.time-ago-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 2px 7px;
  border-radius: 50px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.time-ago-badge.fresh {
  color: var(--accent);
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
}

/* Coupon Badge on Card & Detail Modal */
.coupon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px dashed var(--warning);
  color: var(--warning);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
}

.coupon-badge:hover {
  background: rgba(245, 158, 11, 0.22);
  transform: translateY(-1px);
}

.coupon-badge strong {
  font-family: var(--font-data);
  letter-spacing: 0.5px;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
}

.coupon-badge i {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.detail-coupon-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1.5px dashed var(--warning);
  border-radius: var(--border-radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.detail-coupon-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-main);
}

.detail-coupon-left code {
  font-family: var(--font-data);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--warning);
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
}

.btn-copy-coupon {
  background: var(--warning);
  color: #000;
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 6px 12px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-copy-coupon:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

.btn-copy-coupon i {
  width: 14px;
  height: 14px;
}

/* Load More Pagination */
.load-more-container {
  display: flex;
  justify-content: center;
  margin: 15px 0 10px;
}

.btn-load-more {
  padding: 12px 28px;
  font-size: 0.9rem;
  border-radius: 50px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-load-more:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* My Alerts & Custom Link Tracker Modal */
.my-alerts-modal-container {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 600px) {
  .my-alerts-modal-container {
    padding: 18px;
    max-height: 92vh;
  }
}

.my-alerts-modal-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.my-alerts-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-right: 30px;
}

.my-alerts-icon-badge {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--warning);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.my-alerts-title-row h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.my-alerts-title-row p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.my-alerts-tabs {
  display: flex;
  gap: 10px;
}

.my-alerts-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.my-alerts-tab i {
  width: 16px;
  height: 16px;
}

.my-alerts-tab.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}

.my-alerts-tab-content {
  overflow-y: auto;
  flex-grow: 1;
  padding-right: 4px;
}

/* Email Connect & OTP Box */
.email-connect-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 18px;
  margin-bottom: 16px;
}

.email-connect-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.email-connect-info i {
  color: var(--accent);
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.email-connect-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.email-connect-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.connect-input-row {
  display: flex;
  gap: 10px;
}

@media (max-width: 520px) {
  .connect-input-row {
    flex-direction: column;
  }
}

.connect-input-row .form-input {
  flex: 1;
}

.otp-hint {
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 500;
}

.otp-code-input {
  font-family: var(--font-data);
  letter-spacing: 4px;
  font-weight: 700;
  text-align: center;
}

/* Connected Email Bar */
.connected-email-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.82rem;
}

.connected-email-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.connected-email-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-small-link {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-small-disconnect {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
}

.btn-small-disconnect:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* Alert Items List */
.my-alerts-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.my-alert-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
  transition: var(--transition-smooth);
}

.my-alert-card.inactive {
  opacity: 0.6;
}

.my-alert-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  padding: 4px;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.my-alert-info {
  flex: 1;
  min-width: 0;
}

.my-alert-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.my-alert-prices {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.76rem;
}

.my-alert-target {
  color: var(--accent);
  font-family: var(--font-data);
  font-weight: 700;
}

.my-alert-current {
  color: var(--text-muted);
  font-family: var(--font-data);
}

.my-alert-asin {
  font-family: var(--font-data);
  font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.my-alert-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-alert-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-alert-icon i {
  width: 15px;
  height: 15px;
}

.btn-alert-icon:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.btn-alert-icon.active-toggle.is-active {
  color: var(--accent);
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.1);
}

.btn-alert-icon.delete-alert:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

/* ASIN Detected Pill */
.asin-detected-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.asin-detected-pill.invalid {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}

.asin-detected-pill i {
  width: 14px;
  height: 14px;
}

.alerts-empty-box {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.alerts-empty-box i {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  opacity: 0.6;
}

