/* ============================================================================
   Butikkpris — app.css  |  Premium Design System v2.0
   ============================================================================ */

/* ── Google Fonts Import ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;1,14..32,400&family=Poppins:wght@600;700;800;900&display=swap');

/* ── Design Tokens — Light Mode ──────────────────────────────────────────── */
:root {
  /* Brand & Semantic Colors */
  --primary:          hsl(148, 64%, 32%);
  --primary-light:    hsl(148, 64%, 44%);
  --primary-dark:     hsl(148, 64%, 22%);
  --primary-surface:  hsl(148, 60%, 95%);
  --primary-border:   hsl(148, 55%, 82%);

  --secondary:        hsl(217, 91%, 52%);
  --secondary-surface: hsl(217, 91%, 95%);

  --success:          hsl(148, 64%, 32%);
  --success-surface:  hsl(148, 60%, 95%);
  --warning:          hsl(36, 92%, 50%);
  --warning-surface:  hsl(36, 92%, 94%);
  --danger:           hsl(0, 80%, 52%);
  --danger-surface:   hsl(0, 80%, 95%);
  --info:             hsl(199, 85%, 46%);
  --info-surface:     hsl(199, 85%, 94%);

  /* Backgrounds & Surfaces */
  --background:       hsl(210, 24%, 97%);
  --surface:          hsl(0, 0%, 100%);
  --surface-2:        hsl(210, 22%, 96%);
  --surface-3:        hsl(210, 18%, 92%);
  --surface-glass:    hsla(0, 0%, 100%, 0.85);

  /* Text Hierarchy */
  --text-primary:     hsl(218, 28%, 12%);
  --text-secondary:   hsl(218, 16%, 42%);
  --text-muted:       hsl(218, 12%, 58%);
  --text-disabled:    hsl(218, 10%, 72%);
  --text-inverse:     hsl(0, 0%, 100%);

  /* Borders */
  --border:           hsl(216, 18%, 88%);
  --border-strong:    hsl(216, 18%, 76%);
  --border-focus:     hsl(148, 64%, 32%);

  /* Shadows */
  --shadow-xs:   0 1px 2px  rgba(0, 0, 0, 0.04);
  --shadow-sm:   0 1px 4px  rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow:      0 4px 8px  rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md:   0 8px 20px rgba(0, 0, 0, 0.09), 0 4px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg:   0 20px 40px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);
  --shadow-xl:   0 32px 64px rgba(0, 0, 0, 0.15);
  --shadow-primary: 0 4px 16px hsla(148, 64%, 32%, 0.28);
  --shadow-inset: inset 0 1px 3px rgba(0, 0, 0, 0.07);

  /* Border Radii */
  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius:      12px;
  --radius-md:   16px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-2xl:  36px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Poppins', var(--font-sans);
  --font-mono:    'SF Mono', 'Fira Code', 'Consolas', monospace;

  /* Transitions */
  --transition:       0.18s ease;
  --transition-med:   0.28s ease;
  --transition-slow:  0.38s cubic-bezier(0.4, 0, 0.2, 1);
  --spring:           0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --nav-height:        64px;
  --mobile-nav-height: 64px;
  --sidebar-width:     260px;
}

/* ── Dark Mode Tokens ─────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --primary:          hsl(148, 58%, 42%);
  --primary-light:    hsl(148, 58%, 54%);
  --primary-dark:     hsl(148, 58%, 30%);
  --primary-surface:  hsl(148, 35%, 12%);
  --primary-border:   hsl(148, 35%, 22%);
  --secondary-surface: hsl(217, 40%, 14%);

  --background:       hsl(218, 28%, 8%);
  --surface:          hsl(218, 24%, 12%);
  --surface-2:        hsl(218, 22%, 16%);
  --surface-3:        hsl(218, 20%, 20%);
  --surface-glass:    hsla(218, 24%, 12%, 0.88);

  --text-primary:     hsl(210, 20%, 94%);
  --text-secondary:   hsl(215, 14%, 62%);
  --text-muted:       hsl(215, 11%, 46%);
  --text-disabled:    hsl(215, 10%, 34%);
  --text-inverse:     hsl(218, 28%, 8%);

  --border:           hsl(215, 18%, 20%);
  --border-strong:    hsl(215, 18%, 28%);

  --shadow-xs:   0 1px 2px  rgba(0, 0, 0, 0.25);
  --shadow-sm:   0 2px 6px  rgba(0, 0, 0, 0.30);
  --shadow:      0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md:   0 8px 24px rgba(0, 0, 0, 0.40);
  --shadow-lg:   0 20px 48px rgba(0, 0, 0, 0.50);
  --shadow-primary: 0 4px 20px hsla(148, 58%, 42%, 0.35);

  --success-surface:  hsl(148, 35%, 12%);
  --warning-surface:  hsl(36, 40%, 12%);
  --danger-surface:   hsl(0, 40%, 13%);
  --info-surface:     hsl(199, 40%, 12%);
}

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 0.9375rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.22;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.45rem); }
h4 { font-size: clamp(1rem, 2vw, 1.2rem); }
h5 { font-size: clamp(0.95rem, 1.5vw, 1.05rem); letter-spacing: -0.01em; }
h6 { font-size: 0.9rem; }

p { color: var(--text-secondary); line-height: 1.7; }
a { color: var(--primary); transition: color var(--transition); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

strong, b { font-weight: 700; color: var(--text-primary); }
small { font-size: 0.8125rem; }

/* ── Layout Utilities ─────────────────────────────────────────────────────── */
.container-app {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}
.max-w-1200 { max-width: 1200px !important; }
.max-w-800  { max-width: 800px !important; }
.max-w-600  { max-width: 600px !important; }

.app-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.app-main-content { flex: 1; }

/* Entry Animations */
.fade-in         { animation: fadeIn  0.32s ease both; }
.slide-up        { animation: slideUp 0.38s ease both; }
.scale-in        { animation: scaleIn 0.28s ease both; }

@keyframes fadeIn  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes pulse-ring { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: 0.7; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes slideInLeft  { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }
@keyframes bounceIn     { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

/* ── Navigation ─────────────────────────────────────────────────────────── */
.navbar-app {
  height: var(--nav-height);
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-sm);
}
.navbar-app > .container-app {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 20px;
}

/* Brand Logo */
.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.03em;
}
.brand-logo-orb {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px hsla(148, 64%, 32%, 0.35);
  flex-shrink: 0;
}
.brand-name-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}
.brand-name-text .text-primary { color: var(--primary) !important; }

/* Desktop Nav Links */
.navbar-nav { display: flex; gap: 2px; list-style: none; margin: 0; }
.navbar-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.navbar-nav a:hover  { color: var(--primary); background: var(--primary-surface); }
.navbar-nav a.active {
  color: var(--primary);
  background: var(--primary-surface);
  font-weight: 600;
  border: 1px solid var(--primary-border);
}

/* Ghost Button nav style */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text-primary); border-color: var(--border); }

/* Mobile header */
.mobile-header {
  display: none;
  height: 56px;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: var(--shadow-xs);
}

/* Mobile bottom nav */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-nav-items { display: flex; justify-content: space-around; height: var(--mobile-nav-height); align-items: center; }
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.69rem;
  font-weight: 500;
  gap: 3px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
}
.mobile-nav-item i { font-size: 1.3rem; line-height: 1; }
.mobile-nav-item.active { color: var(--primary); }
.mobile-nav-item.active i { transform: scale(1.12); }
.mobile-nav-item:hover { color: var(--primary); background: var(--primary-surface); }

/* Mobile tab bar active indicator pill */
.tab-indicator {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
  opacity: 0;
  transition: opacity var(--transition);
}
.mobile-nav-item.active .tab-indicator { opacity: 1; }

/* ── Progress Bar ─────────────────────────────────────────────────────────── */
#pageProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light), hsl(148, 80%, 60%));
  z-index: 9999;
  transition: width 0.2s ease, opacity 0.3s ease;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px hsla(148, 64%, 44%, 0.6);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary-app {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all var(--transition-med);
  text-decoration: none;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 8px hsla(148, 64%, 32%, 0.25);
  position: relative;
  overflow: hidden;
}
.btn-primary-app::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.12), rgba(255,255,255,0));
  pointer-events: none;
}
.btn-primary-app:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary);
  color: #fff;
}
.btn-primary-app:active { transform: scale(0.97); box-shadow: none; }

.btn-outline-app {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.btn-outline-app:hover {
  background: var(--primary-surface);
  border-color: var(--primary-dark);
  color: var(--primary-dark);
  box-shadow: 0 0 0 3px var(--primary-surface);
}

.btn-icon {
  background: var(--surface-2);
  border: 1px solid var(--border);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
}
.btn-icon:hover { background: var(--surface-3); border-color: var(--border-strong); color: var(--text-primary); }

/* Theme toggle */
.theme-toggle {
  background: var(--surface-2);
  border: 1px solid var(--border);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
}
.theme-toggle:hover { background: var(--surface-3); color: var(--primary); }
.theme-toggle i { transition: transform var(--spring); }
[data-theme="dark"] .theme-toggle i { transform: rotate(20deg); }

/* ── Search ─────────────────────────────────────────────────────────────── */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px 6px 4px 0;
  transition: border-color var(--transition), box-shadow var(--transition);
  flex: 1;
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-surface);
}
.search-box-icon { padding: 0 10px 0 16px; color: var(--text-muted); font-size: 1rem; flex-shrink: 0; }
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-sans);
  padding: 8px 0;
  min-width: 0;
}
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  padding: 9px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.search-btn:hover { background: var(--primary-dark); }

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  display: none;
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
}
.search-dropdown.show { display: block; animation: fadeIn 0.18s ease; }
.search-suggestion-item {
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
}
.search-suggestion-item:last-child { border-bottom: none; }
.search-suggestion-item:hover { background: var(--surface-2); }
.search-suggestion-item .product-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.search-suggestion-item .suggestion-info { flex: 1; min-width: 0; }
.search-suggestion-item .suggestion-name  { font-weight: 600; font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.search-suggestion-item .suggestion-price { color: var(--primary); font-weight: 700; font-size: 0.85rem; font-family: var(--font-mono); }
.search-suggestion-item .suggestion-meta  { color: var(--text-muted); font-size: 0.775rem; margin-top: 1px; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 72px;
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% -10%, hsla(148, 64%, 32%, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { max-width: 740px; margin: 0 auto; position: relative; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-surface);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  border: 1px solid var(--primary-border);
}
.hero-title {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}
.hero-subtitle {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 2vw, 1.12rem);
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}
.hero-search { max-width: 620px; margin: 0 auto 28px; }
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.hero-stat { display: flex; flex-direction: column; align-items: center; }
.hero-stat-num  { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; line-height: 1; color: var(--text-primary); letter-spacing: -0.03em; }
.hero-stat-label{ font-size: 0.76rem; color: var(--text-muted); font-weight: 500; margin-top: 2px; }
.hero-stat-divider { width: 1px; height: 30px; background: var(--border); }

/* ── Section Layout ─────────────────────────────────────────────────────── */
.section-block { margin-bottom: 52px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.section-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; }
.section-subtitle { color: var(--text-muted); font-size: 0.83rem; margin-top: 2px; line-height: 1.5; }
.section-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.845rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}
.section-link:hover { gap: 8px; color: var(--primary-dark); }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card-app {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--transition-slow);
}
.card-hover { cursor: pointer; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.hover-lift { transition: all var(--transition-slow); }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ── Product Cards ───────────────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-slow);
}
.product-card.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.product-card-image-wrap { position: relative; aspect-ratio: 1; background: var(--surface-2); border-bottom: 1px solid var(--border); overflow: hidden; }
.product-card-image { width: 100%; height: 100%; object-fit: contain; transition: transform var(--transition-slow); padding: 8px; }
.product-card:hover .product-card-image { transform: scale(1.05); }
.product-no-image { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-muted); font-size: 2rem; }
.product-card-body { padding: 12px 14px; display: flex; flex-direction: column; flex: 1; gap: 4px; }
.product-card-brand { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.product-card-name {
  font-weight: 600;
  font-size: 0.865rem;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-name:hover { color: var(--primary); }
.product-card-footer { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.product-card-price { font-size: 1.05rem; font-weight: 700; color: var(--primary); line-height: 1; font-family: var(--font-mono); }
.product-card-price .from-label { font-size: 0.7rem; font-weight: 400; color: var(--text-muted); font-family: var(--font-sans); }
.product-card-shops { font-size: 0.74rem; color: var(--text-muted); }

/* Thumbnail wrap for product images */
.product-thumb-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.product-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* Favorite button */
.btn-favorite {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
}
.btn-favorite:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-surface); }
.btn-favorite.active { color: var(--danger); background: var(--danger-surface); border-color: var(--danger); }
.btn-favorite.active i::before { content: '\f415'; }

/* Product card hover overlay */
.product-card-hover { transition: all var(--transition-slow); }
.product-card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ── Offer Cards ──────────────────────────────────────────────────────────── */
.offers-scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  scroll-snap-type: x mandatory;
}
.offers-scroll-row::-webkit-scrollbar { height: 4px; }
.offers-scroll-row::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.offers-scroll-row::-webkit-scrollbar-track { background: transparent; }

.offer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  max-width: 220px;
  flex-shrink: 0;
  position: relative;
  transition: all var(--transition-slow);
  scroll-snap-align: start;
}
.offer-card.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.offer-card-discount {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--danger);
  color: white;
  font-size: 0.79rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  z-index: 1;
  font-family: var(--font-mono);
}
.offer-card-shop { padding: 8px 14px; color: white; font-size: 0.74rem; font-weight: 600; text-align: right; letter-spacing: 0.02em; }
.offer-card-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.offer-card-name { font-weight: 600; font-size: 0.875rem; line-height: 1.38; flex: 1; color: var(--text-primary); }
.offer-card-prices { display: flex; align-items: baseline; gap: 8px; }
.price-old { text-decoration: line-through; color: var(--text-muted); font-size: 0.84rem; }
.price-new { color: var(--primary); font-weight: 800; font-size: 1.1rem; font-family: var(--font-mono); }
.offer-card-expiry { font-size: 0.74rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

/* ── Category Cards ──────────────────────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-slow);
  text-align: center;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); background: var(--primary-surface); border-color: var(--primary-border); }
.category-card:hover .category-card-icon { background: var(--primary); color: white; }
.category-card-icon {
  width: 48px;
  height: 48px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
  transition: all var(--transition);
}
.category-card-name { font-size: 0.8rem; font-weight: 600; line-height: 1.3; color: var(--text-primary); }

/* Category orb pro */
.cat-orb-pro {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  color: var(--primary);
  transition: all var(--transition-med);
  border: 1px solid var(--border);
}

/* ── Shop Chips ──────────────────────────────────────────────────────────── */
.shops-row { display: flex; flex-wrap: wrap; gap: 10px; }
.shop-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.865rem;
  transition: all var(--transition);
}
.shop-chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.shop-chip-color { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.shop-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ── Price Detail Table ──────────────────────────────────────────────────── */
.price-comparison-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.price-row { display: flex; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); gap: 14px; transition: background var(--transition); }
.price-row:last-child { border-bottom: none; }
.price-row:hover { background: var(--surface-2); }
.price-row.cheapest { background: var(--primary-surface); }
.price-row-name { flex: 1; font-weight: 500; font-size: 0.9rem; }
.price-row-unit { font-size: 0.79rem; color: var(--text-muted); font-family: var(--font-mono); }
.price-row-amount { font-size: 1.1rem; font-weight: 700; color: var(--primary); font-family: var(--font-mono); }
.price-row-badge { font-size: 0.74rem; background: var(--primary); color: white; padding: 2px 9px; border-radius: var(--radius-full); font-weight: 600; }

/* Price bar (visual) */
.price-bar-wrap { height: 5px; background: var(--surface-3); border-radius: var(--radius-full); overflow: hidden; margin-top: 4px; flex: 1; }
.price-bar { height: 100%; border-radius: var(--radius-full); background: var(--primary); transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.price-bar.bar-highest { background: var(--danger); }

/* ── Search Results Page ─────────────────────────────────────────────────── */
.search-page-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; }
.filter-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 80px;
}
.filter-group { margin-bottom: 22px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Active filter chips */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-surface);
  color: var(--primary-dark);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-full);
  padding: 3px 10px 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}
.filter-chip-remove {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  opacity: 0.7;
}
.filter-chip-remove:hover { opacity: 1; }

/* ── Shopping List ───────────────────────────────────────────────────────── */
.list-item { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--surface-2); }
.list-item.checked .item-name { text-decoration: line-through; color: var(--text-muted); }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge-demo    { position: absolute; top: 8px; left: 8px; background: hsl(38,92%,90%); color: hsl(38,92%,28%); font-size: 0.69rem; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full); z-index: 1; }
.badge-offer   { background: var(--danger); color: white; font-size: 0.69rem; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-full); }
.badge-new     { background: var(--info); color: white; font-size: 0.69rem; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-full); }
.badge-savings { background: var(--success-surface); color: var(--primary-dark); font-size: 0.69rem; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-full); border: 1px solid var(--primary-border); }

/* ── Typography Utilities ────────────────────────────────────────────────── */
.text-primary-app { color: var(--primary); }
.text-muted-app   { color: var(--text-muted); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.tracking-tight { letter-spacing: -0.03em; }
.price-text { font-weight: 800; color: var(--primary); font-family: var(--font-mono); }
.font-monospace { font-family: var(--font-mono) !important; }
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bg-surface   { background: var(--surface) !important; }
.bg-surface-2 { background: var(--surface-2) !important; }
.bg-surface-3 { background: var(--surface-3) !important; }
.text-sm  { font-size: 0.84375rem; }
.text-xs  { font-size: 0.75rem; }
.text-2xs { font-size: 0.69rem; }

/* ── Toast Notifications ─────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: calc(var(--mobile-nav-height) + 20px); right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast-msg {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease;
  max-width: 340px;
  pointer-events: all;
  cursor: pointer;
}
.toast-msg.success { border-left: 3px solid var(--success); }
.toast-msg.error   { border-left: 3px solid var(--danger); }
.toast-msg.info    { border-left: 3px solid var(--info); }
.toast-msg.warning { border-left: 3px solid var(--warning); }
.toast-msg i { font-size: 1.1rem; flex-shrink: 0; }
.toast-msg.success i { color: var(--success); }
.toast-msg.error i   { color: var(--danger); }
.toast-msg.info i    { color: var(--info); }
.toast-msg.warning i { color: var(--warning); }

/* ── Upload / Empty State Orb ────────────────────────────────────────────── */
.upload-icon-orb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-control-app, .form-control-pro {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  line-height: 1.5;
}
.form-control-app:focus, .form-control-pro:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-surface);
}
.form-label-app, .form-label-pro {
  font-size: 0.845rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
  color: var(--text-primary);
}
.form-hint-pro { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; line-height: 1.5; }
.input-group-pro { position: relative; }
.input-group-pro .form-control-pro { padding-left: 40px; }
.input-icon-pro {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.95rem;
}

/* ── Price Chart ─────────────────────────────────────────────────────────── */
.price-chart-wrap { height: 210px; }

/* ── Skeleton Loader ─────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── Scroll Animation ────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── Status Badges ───────────────────────────────────────────────────────── */
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; }
.status-active   { background: hsl(148,64%,92%); color: hsl(148,64%,22%); }
.status-inactive { background: var(--surface-3); color: var(--text-muted); }
.status-error    { background: hsl(0,80%,93%); color: hsl(0,80%,32%); }
.status-warning  { background: hsl(36,92%,91%); color: hsl(36,92%,28%); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }

/* Pulse animation for live indicators */
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  animation: pulse-ring 2s ease infinite;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination { justify-content: center; flex-wrap: wrap; gap: 4px; }
.page-link { color: var(--primary); border-color: var(--border); border-radius: var(--radius-sm) !important; padding: 8px 13px; font-weight: 500; font-size: 0.875rem; }
.page-link:hover { background: var(--primary-surface); border-color: var(--primary); color: var(--primary-dark); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); box-shadow: var(--shadow-primary); }

/* ── How It Works ────────────────────────────────────────────────────────── */
.how-it-works { text-align: center; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-top: 12px; }
.how-step { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.how-step-icon {
  width: 68px;
  height: 68px;
  background: var(--primary-surface);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: var(--primary);
  border: 1px solid var(--primary-border);
  transition: all var(--transition-med);
}
.how-step:hover .how-step-icon { background: var(--primary); color: white; transform: scale(1.05); }
.how-step h3 { font-size: 1rem; font-weight: 700; }
.how-step p { font-size: 0.86rem; color: var(--text-muted); max-width: 220px; line-height: 1.6; }
.how-step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: white; font-size: 0.78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ── Data Table ──────────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 16px; text-align: left; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); border-bottom: 2px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 0.875rem; vertical-align: middle; color: var(--text-primary); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-2); }
.data-table .col-check { width: 40px; }
.data-table .col-img { width: 60px; }
.data-table .col-actions { width: 110px; text-align: right; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: auto;
}
.footer-brand { font-family: var(--font-heading); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; color: var(--text-primary); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--text-muted); font-size: 0.875rem; text-decoration: none; transition: color var(--transition); }
.footer-links a:hover { color: var(--primary); }
.footer-heading { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 14px; }
.footer-divider { border: none; border-top: 1px solid var(--border); margin: 32px 0 24px; }
.footer-copy { font-size: 0.82rem; color: var(--text-muted); }

/* ── Admin Styles ─────────────────────────────────────────────────────────── */
.admin-body { margin: 0; background: var(--background); }
.admin-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 4px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: flex-start; gap: 16px; transition: all var(--transition-slow); }
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card-icon { width: 46px; height: 46px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.stat-card-body { flex: 1; }
.stat-card-value { font-family: var(--font-heading); font-size: 1.75rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stat-card-label { font-size: 0.79rem; color: var(--text-muted); margin-top: 4px; }
.stat-card-trend { font-size: 0.74rem; margin-left: auto; flex-shrink: 0; }

.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.admin-card-title { font-size: 0.95rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 8px; }
.admin-card-body { padding: 20px; }
.chart-card .admin-card-body { padding: 16px; height: 320px; }

.admin-page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-page-title { font-size: 1.5rem; font-weight: 800; margin: 0; letter-spacing: -0.03em; }
.admin-page-subtitle { color: var(--text-muted); font-size: 0.875rem; margin-top: 4px; }

.btn-admin-primary { background: var(--primary); color: white; border: none; padding: 9px 18px; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: all var(--transition); }
.btn-admin-primary:hover { background: var(--primary-dark); color: white; box-shadow: var(--shadow-primary); }
.btn-admin-outline { background: transparent; color: var(--text-primary); border: 1.5px solid var(--border); padding: 8px 16px; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: all var(--transition); }
.btn-admin-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-admin-link { color: var(--primary); text-decoration: none; font-size: 0.825rem; font-weight: 600; }
.btn-admin-link:hover { text-decoration: underline; }
.admin-content { padding: 24px; }

.source-status-row { padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); gap: 12px; }
.source-status-row:last-child { border-bottom: none; }
.status-dot.green  { background: var(--success); box-shadow: 0 0 0 3px hsl(148,64%,88%); }
.status-dot.red    { background: var(--danger); box-shadow: 0 0 0 3px hsl(0,80%,90%); }
.status-dot.yellow { background: var(--warning); box-shadow: 0 0 0 3px hsl(36,92%,88%); }
.badge-type { background: var(--surface-2); color: var(--text-muted); font-size: 0.74rem; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-full); border: 1px solid var(--border); }

.activity-row { padding: 12px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.activity-row:last-child { border-bottom: none; }
.activity-icon { width: 34px; height: 34px; border-radius: var(--radius-full); background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; color: var(--text-secondary); flex-shrink: 0; }
.activity-body { flex: 1; min-width: 0; }
.activity-action { font-weight: 600; font-size: 0.875rem; }
.activity-detail { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-time { font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

.quick-action-btn { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 20px; font-size: 0.875rem; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text-primary); transition: all var(--transition); }
.quick-action-btn:hover { background: var(--primary-surface); border-color: var(--primary-border); color: var(--primary); }
.empty-state-sm { text-align: center; padding: 36px; color: var(--text-muted); }

/* ── Product Detail Layout ───────────────────────────────────────────────── */
.product-detail-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; margin-bottom: 48px; }
.product-detail-image { border-radius: var(--radius-md); overflow: hidden; background: white; border: 1px solid var(--border); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.product-detail-image img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }

/* ── Compare Matrix ──────────────────────────────────────────────────────── */
.comparison-matrix-table th, .comparison-matrix-table td { padding: 14px 16px; vertical-align: middle; }
.matrix-feature-col { width: 220px; background: var(--surface-2); font-size: 0.84rem; font-weight: 700; color: var(--text-muted); }
.matrix-feature-label { font-size: 0.85rem; font-weight: 600; background: var(--surface-2); }
.matrix-product-col { min-width: 180px; }

/* ── Autocomplete Popover ────────────────────────────────────────────────── */
.autocomplete-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1050;
  display: none;
  max-height: 360px;
  overflow-y: auto;
}
.autocomplete-popover.show { display: block; animation: fadeIn 0.16s ease; }

/* ── Alert Card ──────────────────────────────────────────────────────────── */
.alert-card { border-radius: var(--radius); transition: all var(--transition-slow); }
.alert-card:hover { box-shadow: var(--shadow-md); }

/* ── Progress Bar (price toward target) ─────────────────────────────────── */
.target-progress-wrap { height: 6px; background: var(--surface-3); border-radius: var(--radius-full); overflow: hidden; }
.target-progress-bar { height: 100%; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--danger), var(--warning), var(--primary)); transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }

/* ── Responsive Breakpoints ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .product-detail-grid { grid-template-columns: 1fr; }
  .search-page-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
}

@media (max-width: 768px) {
  :root { --nav-height: 56px; }
  .navbar-app { display: none; }
  .mobile-header { display: flex; }
  .mobile-nav { display: block; }
  .app-wrapper { padding-bottom: var(--mobile-nav-height); }
  .hero { padding: 48px 0; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
  .toast-container { left: 16px; right: 16px; bottom: calc(var(--mobile-nav-height) + 12px); }
  .toast-msg { max-width: 100%; }
  .container-app { padding: 0 16px; }
  h1 { font-size: clamp(1.5rem, 6vw, 2rem); }
  h2 { font-size: clamp(1.15rem, 4vw, 1.5rem); }
}

@media (max-width: 480px) {
  .container-app { padding: 0 12px; }
  .hero { padding: 36px 0; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .categories-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .hero-stats { gap: 14px; }
  .how-grid { grid-template-columns: 1fr; }
  .section-block { margin-bottom: 36px; }
}

/* ── Print Styles ────────────────────────────────────────────────────────── */
@media print {
  .navbar-app, .mobile-nav, .mobile-header, .site-footer, .btn-primary-app, .btn-outline-app { display: none !important; }
  body { background: white; color: black; }
  .card-app { border: 1px solid #ddd; box-shadow: none; }
}

/* ── Premium Pagination ──────────────────────────────────────────────────── */
.pagination {
  gap: 4px;
  flex-wrap: wrap;
}

.pagination .page-item .page-link {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  background: var(--surface);
  font-size: 0.845rem;
  font-weight: 600;
  padding: 7px 13px;
  line-height: 1.3;
  transition: all var(--transition);
  min-width: 38px;
  text-align: center;
}

.pagination .page-item .page-link:hover {
  background: var(--primary-surface);
  border-color: var(--primary);
  color: var(--primary);
  z-index: 1;
}

.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-primary);
  pointer-events: none;
}

.pagination .page-item.disabled .page-link {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

/* Ellipsis */
.pagination .page-ellipsis {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 7px 6px;
  min-width: auto;
  pointer-events: none;
}

/* Prev / Next nav buttons — slightly wider with icon */
.pagination .page-nav-btn {
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Dark mode overrides */
[data-theme="dark"] .pagination .page-item .page-link {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-secondary);
}
[data-theme="dark"] .pagination .page-item .page-link:hover {
  background: var(--primary-surface);
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Mobile App Polish & Touch Optimization ─────────────────────────────── */
@media (max-width: 991px) {
  /* Fluid responsive sizing for headings */
  h1 { font-size: clamp(1.4rem, 4vw, 2rem) !important; }
  h2 { font-size: clamp(1.2rem, 3.2vw, 1.6rem) !important; }
  
  /* Ensure tap targets meet standard accessibility (>= 44px) */
  button, a.btn-primary-app, a.btn-outline-app, .tab-item-btn, .app-dock-tab {
    min-height: 40px;
    touch-action: manipulation;
  }
  
  /* Smooth horizontal swipe containers */
  .scroll-x-touch {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 8px;
  }
  .scroll-x-touch::-webkit-scrollbar { display: none; }
  .scroll-x-touch > * {
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  /* Compact grid spacing on mobile */
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* Global focus visibility */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
