/* --- Distill.ai Design System: Amber Pot-Still Theme --- */

:root {
  --bg-main: #0c0c0e;
  --bg-card: rgba(22, 22, 26, 0.75);
  --bg-card-hover: rgba(33, 33, 40, 0.85);
  --bg-panel: #141419;
  --bg-terminal: #070709;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dark: #64748b;
  
  --amber-primary: #d97706;   /* Rich pot-still copper */
  --amber-glow: #f59e0b;      /* Glowing amber */
  --amber-light: rgba(245, 158, 11, 0.15);
  --amber-border: rgba(217, 119, 6, 0.25);
  --amber-border-focus: rgba(245, 158, 11, 0.6);
  
  --green-success: #10b981;
  --red-error: #ef4444;
  --blue-info: #0ea5e9;
  
  --font-ui: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --blur-glass: blur(12px);
  --shadow-glow: 0 4px 20px rgba(217, 119, 6, 0.15);
}

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

body {
  font-family: var(--font-ui);
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 10% 20%, rgba(217, 119, 6, 0.04) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(245, 158, 11, 0.03) 0px, transparent 50%);
  color: var(--text-main);
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
}

/* --- Layout Structure --- */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  padding: 0;
}

.scrollable-container {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--amber-primary) rgba(255, 255, 255, 0.03);
}

/* Custom Scrollbar */
.scrollable-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.scrollable-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}
.scrollable-container::-webkit-scrollbar-thumb {
  background: var(--amber-primary);
  border-radius: 4px;
}
.scrollable-container::-webkit-scrollbar-thumb:hover {
  background: var(--amber-glow);
}

/* --- Header Section --- */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(12, 12, 14, 0.85);
  backdrop-filter: var(--blur-glass);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  font-size: 1.75rem;
  color: var(--amber-glow);
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.4));
}

.brand h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
}

.accent-text {
  color: var(--amber-glow);
  font-weight: 500;
}

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.green {
  background-color: var(--green-success);
  box-shadow: 0 0 8px var(--green-success);
}

.status-label {
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Profile Switcher --- */
.profile-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.25rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.profile-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.02);
}

.profile-tab-btn.active {
  color: var(--bg-main);
  background: var(--amber-glow);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
  font-weight: 600;
}

/* --- Main Tab Navigation --- */
.main-tabs {
  display: flex;
  padding: 0 2rem;
  background: rgba(16, 16, 20, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  gap: 1.5rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 1rem 0.5rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  color: var(--amber-glow);
  font-weight: 600;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--amber-glow);
  box-shadow: 0 0 10px var(--amber-glow);
}

/* --- Category Sub-Navigation Tabs --- */
.category-tabs-bar {
  display: flex;
  justify-content: center;
  padding: 0.75rem 2rem;
  background: rgba(12, 12, 14, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.category-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.25rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  gap: 0.25rem;
}

.category-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 1.25rem;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.category-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.02);
}

.category-tab.active {
  color: var(--bg-main);
  background: var(--amber-glow);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
  font-weight: 600;
}

/* --- Profile Context Header --- */
.profile-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background: rgba(20, 20, 25, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.profile-title-container {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.profile-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber-glow);
  font-weight: 600;
}

#display-profile-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.profile-meta-metrics {
  display: flex;
  gap: 2rem;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.metric-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

/* --- Content Panels --- */
.content-panels {
  flex: 1;
  position: relative;
}

.tab-panel {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  flex-direction: column;
  padding: 1.5rem 2rem;
}

.tab-panel.active {
  display: flex;
}

/* --- Panel Header Filters --- */
.panel-header {
  margin-bottom: 1rem;
}

.search-filter-controls {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 450px;
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dark);
}

.search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.search-box input:focus {
  outline: none;
  border-color: var(--amber-border-focus);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
  background: rgba(255, 255, 255, 0.05);
}
.search-clear {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dark);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, color 0.15s;
}
.search-clear.visible {
  opacity: 1;
  pointer-events: all;
}
.search-clear:hover {
  color: var(--amber-glow, #f59e0b);
}
.search-box input {
  padding-right: 2rem; /* make room for clear btn */
}

.filter-dropdowns {
  display: flex;
  gap: 0.75rem;
}

.filter-dropdowns select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-main);
  padding: 0.65rem 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-dropdowns select:focus {
  outline: none;
  border-color: var(--amber-border-focus);
}

.filter-dropdowns select option {
  background-color: #18181f;
  color: var(--text-main);
}

.btn-clear-filters {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-clear-filters:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--red-error);
}

/* --- Tables Styling --- */
.deals-table-container {
  flex: 1;
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.whisky-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.whisky-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-card, #1a1a23);
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  user-select: none;
}

.whisky-table th.sortable {
  cursor: pointer;
}
.whisky-table th.sortable:hover {
  color: var(--amber-glow);
}

.whisky-table td {
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}

.whisky-table tbody tr {
  transition: var(--transition-smooth);
}

.whisky-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

.whisky-table tbody tr.wishlist-row {
  background: rgba(245, 158, 11, 0.02);
}

/* Name Columns */
.bottle-name-cell {
  font-weight: 600;
  color: #fff;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alko-name-cell {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Shop Flags */
.shop-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flag-emoji {
  font-size: 1.1rem;
}

/* Savings Indicator */
.saving-badge {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  white-space: nowrap;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.saving-badge.standard-savings {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border-color: rgba(148, 163, 184, 0.2);
}

.saving-badge.good-savings {
  background: rgba(16, 185, 129, 0.12);
  color: var(--green-success);
  border-color: rgba(16, 185, 129, 0.2);
}

.saving-badge.high-savings,
.saving-badge.great-savings {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-glow);
  border-color: var(--amber-border);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.05);
}

.saving-badge.diamond-savings {
  background: linear-gradient(135deg,
    rgba(56, 189, 248, 0.15),  /* ice blue */
    rgba(167, 139, 250, 0.15), /* violet */
    rgba(56, 189, 248, 0.1)
  );
  color: #e0f2fe;                /* bright ice */
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow:
    0 0 12px rgba(56, 189, 248, 0.2),
    0 0 24px rgba(167, 139, 250, 0.1);
  position: relative;
  overflow: hidden;
}

/* Diamond Shimmer */
.saving-badge.diamond-shimmer::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  animation: diamond-shine 3.5s infinite;
}

@keyframes diamond-shine {
  0%   { left: -100%; }
  57%  { left: 140%; }
  100% { left: 140%; }
}

/* Diamond Row Highlight */
.whisky-table tbody tr.diamond-deal-row td:first-child {
  border-left: 3px solid rgba(56, 189, 248, 0.6);
}

.saving-pct {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.85;
}

/* Rating score stars */
.rating-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}

.star-icon {
  color: var(--amber-glow);
  font-size: 0.8rem;
}

/* Actions Buttons */
.btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary {
  background: var(--amber-primary);
  border-color: var(--amber-primary);
}

.btn-primary:hover {
  background: var(--amber-glow);
  border-color: var(--amber-glow);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.btn-accent {
  background: var(--amber-glow);
  color: var(--bg-main);
  border-color: var(--amber-glow);
  font-weight: 600;
}

.btn-accent:hover {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.btn-accent:disabled, .btn-primary:disabled, .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
  color: var(--text-dark);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
}

.btn-block {
  display: flex;
  width: 100%;
  justify-content: center;
}

.placeholder-row {
  text-align: center;
  padding: 4rem !important;
  color: var(--text-muted);
}

.loader-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--amber-glow);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}

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

/* --- Wishlist Tab Layout --- */
.wishlist-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  height: 100%;
  min-height: 0;
}

.wishlist-sidebar {
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wishlist-sidebar h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.person-selector-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  overflow-y: auto;
}

.person-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.65rem 1rem;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.person-btn:hover {
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
}

.person-btn.active {
  background: var(--amber-light);
  color: var(--amber-glow);
  border: 1px solid var(--amber-border);
}

.person-badge {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
}

.person-btn.active .person-badge {
  background: var(--amber-primary);
  color: #fff;
}

.wishlist-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  min-height: 0;
}

.wishlist-editor-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.wishlist-editor-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Autocomplete form */
.wishlist-add-form {
  display: flex;
  gap: 0.75rem;
  background: var(--bg-card);
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.autocomplete-wrapper {
  position: relative;
  flex: 1;
}

.autocomplete-wrapper input {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 0.55rem 1rem;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

.autocomplete-wrapper input:focus {
  outline: none;
  border-color: var(--amber-border-focus);
}

.autocomplete-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #18181f;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 6px;
  margin-top: 4px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: none;
}

.suggestion-item {
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  transition: var(--transition-smooth);
}

.suggestion-item:hover {
  background: var(--amber-light);
  color: var(--amber-glow);
}

.wishlist-content-splits {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  min-height: 0; /* allows child containers to scroll */
}

.wishlist-box {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  min-height: 0;
}

.wishlist-box h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.wishlist-raw-items, .wishlist-hits-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--amber-primary) rgba(255, 255, 255, 0.03);
}

.wishlist-raw-items::-webkit-scrollbar,
.wishlist-hits-list::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.wishlist-raw-items::-webkit-scrollbar-track,
.wishlist-hits-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.wishlist-raw-items::-webkit-scrollbar-thumb,
.wishlist-hits-list::-webkit-scrollbar-thumb {
  background: var(--amber-primary);
  border-radius: 4px;
}

.wishlist-raw-items::-webkit-scrollbar-thumb:hover,
.wishlist-hits-list::-webkit-scrollbar-thumb:hover {
  background: var(--amber-glow);
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  color: var(--text-dark);
  font-size: 0.9rem;
  border: 1px dashed rgba(255,255,255,0.04);
  border-radius: 6px;
}

/* Raw items in editor */
.wishlist-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.03);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.wishlist-item-row:hover {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
}

.btn-remove-item {
  background: transparent;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.btn-remove-item:hover {
  color: var(--red-error);
}

/* Hit cards */
.wishlist-hit-card {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  background: rgba(245, 158, 11, 0.03);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 8px;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.wishlist-hit-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--amber-glow);
}

.hit-title {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}

.hit-details {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  align-items: center;
}

.hit-shop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
}

.hit-price-saving {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hit-price {
  font-weight: 600;
  color: var(--amber-glow);
}

.hit-saving {
  color: var(--green-success);
  font-weight: 500;
}

/* --- Scrapers & Status Tab --- */
.scrapers-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

.scrapers-grid-box {
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.scrapers-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 0.75rem;
}

.scrapers-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.scrapers-table-container {
  overflow-y: auto;
  max-height: 480px;
}

.scrapers-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.scrapers-table th {
  background: rgba(255, 255, 255, 0.02);
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.scrapers-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.scrapers-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.01);
}

/* --- Shop name cell: small logo + clickable English link --- */
.shop-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.shop-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  padding: 1px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--amber-border);
}

.baseline-star {
  color: var(--amber-glow);
}

.shop-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s ease;
}

.shop-link:hover {
  color: var(--amber-glow);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.shop-link-ext {
  font-size: 0.65rem;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.shop-link:hover .shop-link-ext {
  opacity: 0.7;
}

.scraper-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.scraper-status-indicator.idle {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
}
.scraper-status-indicator.scraping {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-glow);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
  animation: pulse 1.5s infinite;
}
.scraper-status-indicator.completed {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-success);
}
.scraper-status-indicator.failed {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-error);
}

@keyframes pulse {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

/* --- Live Scraping Console --- */
.scrapers-console-box {
  background: var(--bg-terminal);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  min-height: 250px;
  box-shadow: inset 0 4px 20px rgba(0,0,0,0.8);
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 0.5rem;
}

.console-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.console-status-badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.2);
  color: var(--amber-glow);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

/* Progress bars group inside console */
.console-progress-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  background: rgba(255,255,255,0.02);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.04);
}

.progress-bar-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--amber-primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-fill.accent {
  background: var(--amber-glow);
  box-shadow: 0 0 8px var(--amber-glow);
}

/* Text terminal logs output */
.terminal-log-output {
  flex: 1;
  background: #030304;
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #adbac7;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.log-line {
  margin-bottom: 0.25rem;
  border-left: 2px solid transparent;
  padding-left: 6px;
}

.log-line.system {
  color: var(--blue-info);
  border-color: var(--blue-info);
}

.log-line.error {
  color: var(--red-error);
  border-color: var(--red-error);
}

.log-line.regen {
  color: var(--text-muted);
  opacity: 0.75;
}

.log-line.info {
  color: var(--text-main);
}

/* --- Footer Area --- */
.app-footer {
  text-align: center;
  padding: 0.75rem 2rem;
  font-size: 0.8rem;
  color: var(--text-dark);
  background: rgba(12,12,14,0.9);
  border-top: 1px solid rgba(255,255,255,0.03);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .wishlist-layout {
    grid-template-columns: 1fr;
  }
  .wishlist-sidebar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: auto;
  }
  .person-selector-list {
    flex-direction: row;
    overflow-x: auto;
  }
  .console-progress-container {
    grid-template-columns: 1fr;
  }
}

/* ============================================= */
/* --- Splash Screen / Login Overlay ---         */
/* ============================================= */

.splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  /* Card sits in the lower third so the Distill.ai logo stays the hero up top */
  align-items: flex-end;
  justify-content: center;
  overflow-y: auto;
  background-color: var(--bg-main);
  background-image:
    linear-gradient(rgba(12, 12, 14, 0.45), rgba(12, 12, 14, 0.65)),
    url('login-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* 'scroll' (not 'fixed') — fixed backgrounds are janky/ignored on iOS Safari */
  background-attachment: scroll;
  padding: 1.25rem 1.25rem 18vh;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Short viewports (landscape phones): re-centre so the card never clips off-screen */
@media (max-height: 620px) {
  .splash-overlay {
    align-items: center;
    padding-bottom: 1.25rem;
  }
}

.splash-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-card {
  background: rgba(20, 20, 25, 0.85);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  box-shadow:
    0 8px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(217, 119, 6, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: splashFadeIn 0.6s ease-out;
}

@keyframes splashFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.splash-logo {
  text-align: center;
}

.splash-icon {
  font-size: 3.5rem;
  color: var(--amber-glow);
  filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.5));
  margin-bottom: 0.75rem;
  display: block;
}

.splash-logo h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}

.splash-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Profile Toggle */
.splash-profile-toggle {
  display: flex;
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.splash-profile-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.7rem 1rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.splash-profile-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.splash-profile-btn.active {
  color: var(--bg-main);
  background: var(--amber-glow);
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.35);
}

/* Password Input Group */
.splash-password-group {
  width: 100%;
}

.splash-input-wrapper {
  position: relative;
  width: 100%;
}

.splash-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dark);
  font-size: 0.9rem;
  z-index: 1;
}

.splash-input-wrapper input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.85rem 3rem 0.85rem 2.75rem;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.splash-input-wrapper input:focus {
  outline: none;
  border-color: var(--amber-border-focus);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.splash-pw-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.splash-pw-toggle:hover {
  color: var(--amber-glow);
}

/* Error Banner */
.splash-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.6rem 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  color: var(--red-error);
  font-size: 0.85rem;
  font-weight: 500;
  animation: shakeError 0.4s ease;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* Unlock Button */
.splash-unlock-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--amber-primary), var(--amber-glow));
  border: none;
  color: #000;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
}

.splash-unlock-btn:hover {
  background: linear-gradient(135deg, var(--amber-glow), #fbbf24);
  box-shadow: 0 6px 30px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.splash-unlock-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}

.splash-unlock-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --- Multi-select Dropdown styles --- */
.multiselect-dropdown {
  position: relative;
  display: inline-block;
  min-width: 200px;
}

.multiselect-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-main);
  padding: 0.65rem 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.multiselect-btn:hover {
  border-color: var(--amber-border-focus);
}

.multiselect-content {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #18181f;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  padding: 0.5rem;
}

.multiselect-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.multiselect-item:hover {
  background: rgba(245, 158, 11, 0.05);
}

.multiselect-item input {
  cursor: pointer;
}

.multiselect-item span {
  font-size: 0.85rem;
  user-select: none;
}

.badge-deal {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-unicorn {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

/* "New this run" badge */
.badge-new {
  font-size: 13px;
  vertical-align: middle;
  margin-right: 2px;
  cursor: default;
}

/* Multi-shop count badge on unicorn rows */
.pm-alko-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
  white-space: nowrap;
}
.pm-alko-badge--disc  { background: rgba(255,160,0,0.18); color: #ffb84d; border: 1px solid rgba(255,160,0,0.35); }
.pm-alko-badge--new   { background: rgba(80,200,120,0.18); color: #50c878; border: 1px solid rgba(80,200,120,0.35); }
.pm-alko-badge--order { background: rgba(100,160,255,0.15); color: #7ab4ff; border: 1px solid rgba(100,160,255,0.3); }
.pm-alko-badge--stock { background: rgba(160,160,160,0.12); color: var(--text-muted); border: 1px solid rgba(160,160,160,0.25); }

.multi-shop-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
  cursor: default;
  vertical-align: middle;
}

/* --- Price Range Filter Styling --- */
.price-range-group {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.2rem 0.6rem;
  gap: 0.25rem;
  transition: var(--transition-smooth);
}

.price-range-group:focus-within {
  border-color: var(--amber-border-focus);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.price-range-group input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  width: 58px;
  text-align: center;
  padding: 0.45rem 0.25rem;
}

.price-range-group input:focus {
  outline: none;
}

/* Hide native number spinners */
.price-range-group input::-webkit-outer-spin-button,
.price-range-group input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.price-range-group input[type=number] {
  -moz-appearance: textfield;
}

.price-separator {
  color: var(--text-dark);
  font-size: 0.85rem;
  user-select: none;
  font-weight: 600;
}

/* --- Bundle by Shop Tab Styles --- */
#panel-bundles {
  display: none;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 1rem;
}

#panel-bundles.active {
  display: flex;
}

.bundles-controls-box {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.bundles-controls-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.bundles-controls-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.bundles-options {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.bundles-options .option-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bundles-options label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.threshold-presets {
  display: flex;
  gap: 0.4rem;
}

#input-bundles-thresholds {
  width: 130px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  color: #fff;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  text-align: center;
  transition: var(--transition-smooth);
}

#input-bundles-thresholds:focus {
  outline: none;
  border-color: var(--amber-border-focus);
}

.bundles-board {
  flex: 1;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.75rem;
  min-height: 0;
  align-items: stretch;
}

.shop-bundle-column {
  width: 360px;
  min-width: 360px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  backdrop-filter: var(--blur-glass);
}

.shop-bundle-column .column-header {
  padding: 1rem;
  border-radius: 12px 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.shop-bundle-column .shop-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shop-bundle-column .shop-brand-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.shop-bundle-column .shop-flag-icon {
  font-size: 1.2rem;
}

.shop-bundle-column .shop-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

.shop-bundle-column .shop-link-icon {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: var(--transition-smooth);
}

.shop-bundle-column .shop-link-icon:hover {
  color: var(--amber-glow);
}

.shop-bundle-column .shop-ship-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.shop-bundle-column .items-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shop-bundle-column .item-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.shop-bundle-column .item-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.shop-bundle-column .item-card.deal {
  background: rgba(245, 158, 11, 0.04);
  border-color: rgba(245, 158, 11, 0.12);
}

.shop-bundle-column .item-card.unicorn {
  background: rgba(139, 92, 246, 0.04);
  border-color: rgba(139, 92, 246, 0.12);
}

.shop-bundle-column .card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.shop-bundle-column .card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  word-break: break-all;
}

.shop-bundle-column .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.shop-bundle-column .card-price {
  font-weight: 700;
  color: var(--text-main);
}

.shop-bundle-column .item-card.deal .card-price {
  color: var(--amber-glow);
}

.shop-bundle-column .item-card.unicorn .card-price {
  color: #a78bfa;
}

.shop-bundle-column .badge-deal {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.shop-bundle-column .badge-unicorn {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.shop-bundle-column .badge-avail {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.shop-bundle-column .wisher-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
  font-size: 0.75rem;
  color: #fff;
  margin-right: 0.25rem;
  display: inline-block;
}

/* Footer Section pinned at bottom of column */
.shop-bundle-column .column-footer {
  padding: 1rem;
  background: rgba(12, 12, 14, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.shop-bundle-column .footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.shop-bundle-column .footer-row.total-row {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.6rem;
  margin-top: 0.2rem;
}

.shop-bundle-column .progress-text {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.85rem;
}

.shop-bundle-column .progress-mini-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.15rem;
}

.shop-bundle-column .progress-mini-fill {
  height: 100%;
  background: var(--amber-primary);
  border-radius: 3px;
  transition: var(--transition-smooth);
}

.shop-bundle-column .progress-mini-fill.completed {
  background: var(--green-success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

/* ── Flag button (inline in action cell) ─────────────────────────────── */
.flag-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  color: var(--text-dark);
  font-size: 0.75rem;
  opacity: 0.35;
  transition: opacity 0.15s, color 0.15s;
  vertical-align: middle;
  margin-left: 0.3rem;
}
.flag-btn:hover { opacity: 1; color: var(--red-error); }

/* ── Flag Dialog ──────────────────────────────────────────────────────── */
.flag-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flag-dialog-box {
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--amber-border);
  border-radius: 12px;
  padding: 1.5rem;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.flag-dialog-box h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-main);
}

.flag-product-name {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.45rem 0.7rem;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  word-break: break-word;
  line-height: 1.4;
}

.flag-dialog-box label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.flag-dialog-box select,
.flag-dialog-box textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  outline: none;
  transition: border-color 0.2s;
}
.flag-dialog-box select:focus,
.flag-dialog-box textarea:focus { border-color: var(--amber-border-focus); }
.flag-dialog-box textarea { resize: vertical; }

.flag-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.flag-status-msg       { font-size: 0.8rem; color: var(--text-muted); min-height: 1.1em; }
.flag-status-ok        { color: var(--green-success); }
.flag-status-err       { color: var(--red-error); }

/* ── Wishlist quick-add button ──────────────────────────────── */
.wl-add-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  font-size: 0.75rem;
  opacity: 0.45;
  transition: color 0.15s, opacity 0.15s, background 0.15s;
  line-height: 1;
}
.wl-add-btn:hover {
  color: var(--amber);
  opacity: 1;
  background: rgba(245, 158, 11, 0.12);
}
.wl-add-btn.wl-added {
  color: #10b981;
  opacity: 1;
}

/* ── Wishlist person-select popover ─────────────────────────── */
.wl-popover {
  position: fixed;
  z-index: 1300;
  background: var(--surface-1, #1a1a23);
  border: 1px solid var(--amber, #d97706);
  border-radius: 10px;
  padding: 0.6rem;
  min-width: 180px;
  max-width: 250px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.wl-popover-header {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dark, #64748b);
  margin-bottom: 0.1rem;
}
.wl-popover-bottle {
  font-size: 0.78rem;
  color: var(--text-light, #f1f5f9);
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.07));
  padding-bottom: 0.35rem;
}
.wl-person-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-2, #22222e);
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  border-radius: 6px;
  color: var(--text-light, #f1f5f9);
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
  text-align: left;
  transition: background 0.12s, border-color 0.12s;
  width: 100%;
}
.wl-person-btn:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--amber, #d97706);
}
.wl-person-btn.added {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.35);
}
.wl-person-btn.added i {
  color: #10b981;
}

/* ── Toast notifications ────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1400;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-width: 240px;
  max-width: 360px;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(20, 20, 26, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.45);
  color: var(--text-light, #f1f5f9);
  font-size: 0.85rem;
  line-height: 1.4;
  pointer-events: all;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateX(110%);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.22,1,0.36,1);
}
.toast.toast-visible {
  opacity: 1;
  transform: translateX(0);
}
.toast.toast-hiding {
  opacity: 0;
  transform: translateX(110%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast i:first-child {
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-size: 0.9rem;
}
.toast span {
  flex: 1;
}
.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-dark, #64748b);
  cursor: pointer;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1;
  margin-top: 0.1rem;
  transition: color 0.15s;
}
.toast-close:hover { color: var(--text-light, #f1f5f9); }

/* Type variants */
.toast-success { border-color: rgba(16,185,129,0.4); }
.toast-success i:first-child { color: #10b981; }
.toast-error   { border-color: rgba(239,68,68,0.45); }
.toast-error   i:first-child { color: #ef4444; }
.toast-warning { border-color: rgba(245,158,11,0.45); }
.toast-warning i:first-child { color: var(--amber, #d97706); }
.toast-info    { border-color: rgba(148,163,184,0.25); }
.toast-info    i:first-child { color: #94a3b8; }

/* Progress bar (auto-dismiss indicator) */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform-origin: left;
  border-radius: 0 0 10px 10px;
}
.toast-success .toast-progress { background: #10b981; }
.toast-error   .toast-progress { background: #ef4444; }
.toast-warning .toast-progress { background: var(--amber, #d97706); }
.toast-info    .toast-progress { background: #94a3b8; }

/* ══════════════════════════════════════════════════════════════
   Product detail modal (Phase 3)
   ══════════════════════════════════════════════════════════════ */

/* Clickable row affordance */
.pm-clickable {
  cursor: pointer;
}
.pm-clickable:hover td {
  background: rgba(245, 158, 11, 0.05) !important;
}

/* Overlay backdrop */
.pm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Modal card */
.pm-card {
  position: relative;
  background: var(--surface-1, #14141a);
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  max-width: 860px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.75rem;
}

/* Close button */
.pm-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 8px;
  color: var(--text-dark, #64748b);
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background 0.15s, color 0.15s;
}
.pm-close-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text-light, #f1f5f9);
}

/* Body layout */
.pm-body {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
}

/* Left: image column */
.pm-image-col {
  flex-shrink: 0;
  width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.pm-image {
  width: 130px;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
}
.pm-image-placeholder {
  width: 130px;
  height: 200px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.15);
}
.pm-anchor-badge-wrap {
  width: 100%;
  text-align: center;
}
.pm-anchor-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.07);
  color: var(--text-dark, #64748b);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Right: detail column */
.pm-detail-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Deal/unicorn summary banner */
/* Deal/unicorn summary banner */
.pm-deal-summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
}
.pm-deal-summary.pm-deal-standard {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.3);
  color: #94a3b8;
}
.pm-deal-summary.pm-deal-good {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}
.pm-deal-summary.pm-deal-great {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--amber-glow);
}
.pm-deal-summary.pm-deal-high { /* fallback compatibility */
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--amber-glow);
}
.pm-deal-summary.pm-deal-diamond {
  background: linear-gradient(135deg,
    rgba(56, 189, 248, 0.15),  /* ice blue */
    rgba(167, 139, 250, 0.15), /* violet */
    rgba(56, 189, 248, 0.1)
  );
  color: #e0f2fe;                /* bright ice */
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow:
    0 0 12px rgba(56, 189, 248, 0.2),
    0 0 24px rgba(167, 139, 250, 0.1);
  position: relative;
  overflow: hidden;
}
.pm-deal-summary.pm-deal-diamond.diamond-shimmer::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  animation: diamond-shine 3.5s infinite;
}
.pm-deal-summary.pm-unicorn-note {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
  color: #a78bfa;
}
.pm-deal-pct {
  margin-left: auto;
  font-size: 1rem;
}

/* ── Product modal: name, meta, section label ──────────────────────── */
/* Product name */
.pm-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-light);
  margin: 0.25rem 0 0.5rem;
  line-height: 1.3;
}

.pm-meta,
.pm-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.pm-meta span,
.pm-meta-chips span {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pm-style,
.pm-style-notes {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.pm-section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1rem 0 0.4rem;
}

/* ── Offers table ───────────────────────────────────────────────────── */
.pm-offers-wrap {
  overflow-x: auto;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
}

.pm-offers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.pm-offers-table thead tr {
  background: rgba(255,255,255,0.05);
}

.pm-offers-table th {
  padding: 0.45rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.pm-offers-table td {
  padding: 0.55rem 0.75rem;
  vertical-align: middle;
  color: var(--text-light);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  white-space: nowrap;
}

.pm-offers-table tbody tr:last-child td {
  border-bottom: none;
}

.pm-shop-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pm-raw-name {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.pm-row-baseline td {
  background: rgba(255, 160, 0, 0.06);
}

.pm-row-cheapest td {
  background: rgba(80, 200, 120, 0.07);
}

.pm-row-cheapest td:nth-child(5) {
  color: #50c878;
}

/* ── Whiskybase chip / score ────────────────────────────────────────── */
.pm-wb-score {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
}

.pm-wb-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 4px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  color: var(--amber-glow, #d97706);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.pm-wb-chip:hover {
  background: rgba(217, 119, 6, 0.22);
  border-color: rgba(217, 119, 6, 0.6);
  color: #f59e0b;
}

.pm-chart-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.5rem 0;
}

.pm-price-chart {
  width: 100%;
  margin-top: 0.5rem;
}
