/* ==========================================================================
   Tastemaster - Modern Adaptive Theme Stylesheet (Dark & Light Mode)
   Designed for Maximum Responsiveness (Mobile 320px up to 4K Ultra-Wide)
   ========================================================================== */

:root, [data-theme="dark"] {
  --bg-main: #090d16;
  --bg-surface: #111827;
  --bg-card: #162032;
  --bg-card-hover: #1e293b;
  --bg-input: #0b1120;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(6, 182, 212, 0.5);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.25);
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.25);
  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.25);
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.25);
  --rose: #f43f5e;
  --rose-glow: rgba(244, 63, 94, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-subtle);
  --shadow-glow: 0 0 25px -5px var(--cyan-glow);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 35px rgba(6, 182, 212, 0.15);

  --modal-backdrop-bg: rgba(0, 0, 0, 0.75);
  --modal-close-bg: rgba(15, 23, 42, 0.85);

  --product-img-col-bg: linear-gradient(180deg, #111a2e 0%, #0c121e 100%);
  --flavor-heading-grad: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  --tastecloud-bg: rgba(17, 24, 39, 0.75);
  --product-notes-bg: rgba(0, 0, 0, 0.25);
  --scale-segment-empty: rgba(255, 255, 255, 0.08);
  --scan-input-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --badge-category-bg: rgba(139, 92, 246, 0.25);
  --badge-category-text: #c084fc;
  --badge-category-border: rgba(139, 92, 246, 0.4);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="light"] {
  --bg-main: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f8fafc;
  
  --border-subtle: rgba(15, 23, 42, 0.09);
  --border-focus: rgba(8, 145, 178, 0.6);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --cyan: #0891b2;
  --cyan-glow: rgba(8, 145, 178, 0.18);
  --blue: #2563eb;
  --purple: #7c3aed;
  --purple-glow: rgba(124, 58, 237, 0.18);
  --green: #059669;
  --green-glow: rgba(5, 150, 105, 0.18);
  --amber: #d97706;
  --amber-glow: rgba(217, 119, 6, 0.18);
  --rose: #e11d48;
  --rose-glow: rgba(225, 29, 72, 0.18);

  --shadow-card: 0 8px 24px -4px rgba(15, 23, 42, 0.07), 0 0 0 1px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 20px -3px var(--cyan-glow);
  --shadow-modal: 0 20px 45px -10px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.08);

  --modal-backdrop-bg: rgba(15, 23, 42, 0.55);
  --modal-close-bg: rgba(255, 255, 255, 0.95);

  --product-img-col-bg: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  --flavor-heading-grad: linear-gradient(135deg, #0f172a 30%, #334155 100%);
  --tastecloud-bg: rgba(255, 255, 255, 0.88);
  --product-notes-bg: rgba(8, 145, 178, 0.06);
  --scale-segment-empty: rgba(15, 23, 42, 0.1);
  --scan-input-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  --badge-category-bg: rgba(124, 58, 237, 0.12);
  --badge-category-text: #6d28d9;
  --badge-category-border: rgba(124, 58, 237, 0.25);
}

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

html, body {
  min-height: 100vh;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Background ambient glow */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: 30%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, rgba(139, 92, 246, 0.05) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transition: background 0.3s ease;
}

[data-theme="light"] body::before {
  background: radial-gradient(circle, rgba(8, 145, 178, 0.05) 0%, rgba(124, 58, 237, 0.03) 50%, transparent 70%);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
  transition: border-color 0.25s ease;
}

.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-logo {
  height: 46px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.2s ease, filter 0.25s ease;
}

.brand-logo:hover {
  transform: scale(1.02);
}

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

.scanner-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

[data-theme="light"] .scanner-status {
  color: #047857;
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.25);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  width: 40px;
  height: 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 1.1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn-icon:hover, .btn-icon.active {
  background: var(--bg-card-hover);
  color: var(--cyan);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn-pill:hover {
  border-color: var(--border-focus);
  background: var(--bg-card-hover);
  color: var(--cyan);
  transform: translateY(-1px);
}

/* ==========================================================================
   Scan & Search Toolbar
   ========================================================================== */
.scan-bar-section {
  margin-bottom: 1.5rem;
}

.scan-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.35rem 0.6rem;
  transition: all 0.25s ease;
  box-shadow: var(--scan-input-shadow);
}

.scan-input-wrapper:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px var(--cyan-glow), var(--scan-input-shadow);
}

.scan-icon {
  margin-left: 0.65rem;
  color: var(--cyan);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.scan-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0.7rem 0.85rem;
  font-family: inherit;
}

.scan-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 1rem;
}

.scan-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.btn-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.btn-clear.visible {
  display: inline-flex;
}

.btn-clear:hover {
  color: var(--rose);
}

.btn-camera {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border: none;
  color: #fff;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px var(--cyan-glow);
  white-space: nowrap;
}

.btn-camera:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-camera.active {
  background: linear-gradient(135deg, var(--rose), var(--purple));
}

/* ==========================================================================
   Camera Scanner Viewport & Mobile Precision Tools
   ========================================================================== */
.camera-container {
  display: none;
  margin-bottom: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  overflow: hidden;
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.camera-container.active {
  display: block;
}

.camera-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}

.camera-res-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-cam-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.btn-cam-close:hover {
  color: var(--rose);
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--rose);
}

#reader {
  width: 100% !important;
  max-width: 520px;
  min-height: 220px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.3);
  position: relative;
  background: #000;
}

#reader video {
  width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
  border-radius: inherit;
}

.camera-container.active #reader::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan), #fff, var(--cyan), transparent);
  box-shadow: 0 0 16px var(--cyan);
  animation: scanLaser 2s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 10;
}

@keyframes scanLaser {
  0% { top: 5%; opacity: 0.9; }
  100% { top: 95%; opacity: 0.9; }
}

.camera-hint {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Kamera Steuerelemente (Zoom, Licht, Linse, Foto-Scan) */
.camera-toolbar {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.camera-zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.camera-tool-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-right: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-zoom {
  padding: 0.3rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-zoom:hover, .btn-zoom.active {
  background: var(--cyan);
  color: #021a24;
  border-color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.camera-action-group {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.btn-camera-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-camera-ctrl:hover, .btn-camera-ctrl.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.btn-photo-scan {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.2));
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--cyan);
  font-weight: 700;
}

.btn-photo-scan:hover {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  box-shadow: 0 4px 15px var(--cyan-glow);
}

/* Direkter Foto-Scan Button in der Suchleiste */
.btn-photo-direct {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2)) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  color: #34d399 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-photo-direct:hover {
  background: linear-gradient(135deg, #10b981, #06b6d4) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4) !important;
}

/* Kamera Fallback Box bei WebRTC-Sperre / unsicherem HTTP */
.camera-fallback-card {
  padding: 2.25rem 1.5rem;
  background: rgba(15, 23, 42, 0.88);
  border: 2px dashed rgba(6, 182, 212, 0.4);
  border-radius: var(--radius-lg);
  margin: 1rem auto;
  max-width: 480px;
  text-align: center;
  backdrop-filter: blur(8px);
}

/* Packungsgröße / Mengenangabe Badges */
.badge-package-size {
  background: rgba(59, 130, 246, 0.2) !important;
  border: 1px solid rgba(59, 130, 246, 0.45) !important;
  color: #93c5fd !important;
  font-weight: 700 !important;
}

.spec-box-pkg {
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.05);
}

.search-item-pkg {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.75rem;
}

/* Tastecloud Badge Styles */
.chip-count {
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.16);
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  margin-left: 0.35rem;
  display: inline-block;
  vertical-align: middle;
}

[data-theme="light"] .chip-count {
  background: rgba(0, 0, 0, 0.1);
  color: inherit;
}

.chip-generic {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

/* ==========================================================================
   Recent Scans Bar
   ========================================================================== */
.recent-scans-bar {
  margin-bottom: 1.5rem;
}

.recent-scans-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.recent-items {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  -webkit-overflow-scrolling: touch;
}

.recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.recent-chip:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}

/* ==========================================================================
   Product Detail Card (High Impact & Responsive)
   ========================================================================== */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: grid;
  grid-template-columns: 320px 1fr;
  margin-bottom: 2rem;
  transition: border-color 0.3s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  border-color: rgba(6, 182, 212, 0.35);
}

/* Left: Photo Column */
.product-image-col {
  background: var(--product-img-col-bg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-subtle);
  position: relative;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.product-img-wrapper {
  position: relative;
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-img-wrapper:hover .product-img {
  transform: scale(1.05);
}

.badge-overlay-top {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 2;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.badge-category {
  background: var(--badge-category-bg);
  color: var(--badge-category-text);
  border: 1px solid var(--badge-category-border);
}

.badge-rechargeable {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

[data-theme="light"] .badge-rechargeable {
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
  border-color: rgba(5, 150, 105, 0.3);
}

/* Right: Content Column */
.product-content-col {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.product-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.brand-badge {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.flavor-heading {
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1.2;
  background: var(--flavor-heading-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  word-break: break-word;
  overflow-wrap: break-word;
}

.product-submodel {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.gtin-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.gtin-badge-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}

/* ==========================================================================
   Taste & Aroma Profile Section (Cooling & Sweetness Gauges)
   ========================================================================== */
.taste-profile-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.scale-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.scale-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.scale-label-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-primary);
}

.scale-label-val {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Segmented Visual Bars (1 to 5) */
.scale-segments {
  display: flex;
  gap: 6px;
  height: 12px;
}

.segment {
  flex: 1;
  background: var(--scale-segment-empty);
  border-radius: 4px;
  transition: all 0.3s ease;
}

/* Cooling Fill */
.scale-cooling .segment.active {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
}

/* Sweetness Fill */
.scale-sweetness .segment.active {
  background: linear-gradient(90deg, #d97706, #fbbf24);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.45);
}

/* Nicotine Badge */
.nicotine-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  transition: all 0.25s ease;
}

.nicotine-0 {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}
.nicotine-10 {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.nicotine-20 {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

[data-theme="light"] .nicotine-0 {
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.3);
  color: #047857;
}
[data-theme="light"] .nicotine-10 {
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.3);
  color: #b45309;
}
[data-theme="light"] .nicotine-20 {
  background: rgba(225, 29, 72, 0.1);
  border-color: rgba(225, 29, 72, 0.3);
  color: #be123c;
}

.nicotine-val {
  font-size: 1.35rem;
  font-weight: 900;
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.nicotine-val span {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.85;
}

.nicotine-desc {
  font-size: 0.85rem;
  opacity: 0.95;
}

/* ==========================================================================
   Specs Grid (Puffs, Capacity, Battery)
   ========================================================================== */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.65rem;
}

.spec-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transition: background 0.25s ease;
}

.spec-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
}

.spec-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Tags */
.flavor-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.flavor-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

[data-theme="light"] .flavor-tag {
  background: rgba(15, 23, 42, 0.04);
  color: var(--text-secondary);
}

.flavor-tag:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Advisory & Notes */
.product-notes {
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--product-notes-bg);
  border-left: 3px solid var(--cyan);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.55;
  transition: background 0.25s ease;
}

/* Card Actions */
.product-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

/* ==========================================================================
   Empty & Search Result States
   ========================================================================== */
.empty-state {
  background: var(--bg-card);
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 3rem 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  color: var(--cyan);
  opacity: 0.75;
}

.empty-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.empty-desc {
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Unknown GTIN Alert Box */
.unknown-gtin-box {
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.08) 0%, rgba(244, 63, 94, 0.02) 100%);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-xl);
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.unknown-gtin-code {
  display: inline-block;
  font-family: monospace;
  font-size: 1.35rem;
  font-weight: 800;
  background: #0f172a;
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  margin: 0.75rem 0 1.25rem;
}

[data-theme="light"] .unknown-gtin-code {
  background: #fee2e2;
  border-color: rgba(239, 68, 68, 0.35);
  color: #b91c1c;
}

/* Live Search Dropdown / List */
.search-results-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  gap: 0.9rem;
  align-items: center;
  box-shadow: var(--shadow-card);
}

.search-item-card:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .search-item-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.search-item-thumb {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  object-fit: contain;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.search-item-info {
  flex: 1;
  min-width: 0;
}

.search-item-brand {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.search-item-flavor {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.search-item-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop-bg);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  transform: scale(0.95);
  transition: transform 0.25s ease, background-color 0.25s ease;
  position: relative;
}

.modal-backdrop.active .modal-box {
  transform: scale(1);
}

/* Product Detail Modal Specifics */
.product-detail-modal-box {
  position: relative;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
}

.product-detail-modal-box .product-card {
  margin-bottom: 0;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.modal-close-floating {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 30;
  background: var(--modal-close-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.modal-close-floating:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: var(--rose);
  color: #fff;
  transform: scale(1.08);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem;
}

.modal-close:hover {
  color: var(--rose);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.25s ease;
  min-height: 42px;
}

.form-control:focus {
  border-color: var(--cyan);
}

textarea.form-control {
  resize: vertical;
  min-height: 85px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border: none;
  color: #fff;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px var(--cyan-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.btn-danger {
  background: var(--rose);
  border: none;
  color: #fff;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

/* Range Sliders */
.range-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.range-slider {
  flex: 1;
  accent-color: var(--cyan);
  cursor: pointer;
  height: 6px;
}

.range-value {
  font-weight: 800;
  font-size: 1.1rem;
  min-width: 24px;
  text-align: center;
  color: var(--cyan);
}

/* Image Upload Area */
.upload-dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  background: var(--bg-input);
  transition: all 0.2s ease;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.05);
}

.preview-thumb-box {
  width: 100px;
  height: 100px;
  margin: 0.5rem auto 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: none;
}

.preview-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--cyan);
  color: var(--text-primary);
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: 600;
  font-size: 0.92rem;
  max-width: 90vw;
}

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

.toast.error {
  border-left-color: var(--rose);
}

.toast.success {
  border-left-color: var(--green);
}

/* ==========================================================================
   Tastecloud (Aroma- & Geschmacks-Explorer)
   ========================================================================== */
.tastecloud-section {
  background: var(--tastecloud-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

.tastecloud-header {
  margin-bottom: 0.85rem;
}

.tastecloud-title {
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.tastecloud-subtitle {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.tastecloud-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.taste-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.taste-chip:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: var(--cyan);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.taste-chip.active {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff !important;
  border-color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
  transform: scale(1.05);
}

/* Category Accent Styles */
.chip-fruit:hover { border-color: #f43f5e; color: #fda4af; }
.chip-ice:hover { border-color: #38bdf8; color: #7dd3fc; }
.chip-mint:hover { border-color: #10b981; color: #6ee7b7; }
.chip-tobacco:hover { border-color: #d97706; color: #fcd34d; }
.chip-energy:hover { border-color: #f59e0b; color: #fde68a; }
.chip-drink:hover { border-color: #ec4899; color: #fbcfe8; }
.chip-candy:hover { border-color: #a855f7; color: #e9d5ff; }
.chip-dessert:hover { border-color: #fbbf24; color: #fef08a; }
.chip-salt { border-color: rgba(56, 189, 248, 0.4); background: rgba(2, 132, 199, 0.15); }
.chip-salt:hover { border-color: #38bdf8; color: #e0f2fe; }
.chip-brand { border-color: rgba(139, 92, 246, 0.3); }
.chip-brand:hover { border-color: #a855f7; color: #d8b4fe; }
.chip-nic-0 { border-color: rgba(16, 185, 129, 0.35); background: rgba(16, 185, 129, 0.1); }
.chip-nic-0:hover { border-color: #10b981; color: #34d399; }
.chip-nic-10 { border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.1); }
.chip-nic-10:hover { border-color: #fbbf24; color: #fde68a; }
.chip-nic-20 { border-color: rgba(244, 63, 94, 0.35); background: rgba(244, 63, 94, 0.1); }
.chip-nic-20:hover { border-color: #f43f5e; color: #fb7185; }
.chip-pod { border-color: rgba(147, 51, 234, 0.35); }
.chip-pod:hover { border-color: #c084fc; color: #e9d5ff; }
.chip-pouch { border-color: rgba(148, 163, 184, 0.35); }
.chip-pouch:hover { border-color: #cbd5e1; color: #f8fafc; }

[data-theme="light"] .chip-fruit:hover { border-color: #e11d48; color: #be123c; }
[data-theme="light"] .chip-ice:hover { border-color: #0284c7; color: #0369a1; }
[data-theme="light"] .chip-mint:hover { border-color: #059669; color: #047857; }
[data-theme="light"] .chip-tobacco:hover { border-color: #b45309; color: #92400e; }
[data-theme="light"] .chip-energy:hover { border-color: #d97706; color: #b45309; }
[data-theme="light"] .chip-drink:hover { border-color: #db2777; color: #be185d; }
[data-theme="light"] .chip-candy:hover { border-color: #7c3aed; color: #6d28d9; }
[data-theme="light"] .chip-dessert:hover { border-color: #d97706; color: #92400e; }
[data-theme="light"] .chip-salt { border-color: rgba(2, 132, 199, 0.3); background: rgba(2, 132, 199, 0.08); }
[data-theme="light"] .chip-salt:hover { border-color: #0284c7; color: #0369a1; }
[data-theme="light"] .chip-brand { border-color: rgba(124, 58, 237, 0.25); }
[data-theme="light"] .chip-brand:hover { border-color: #7c3aed; color: #6d28d9; }
[data-theme="light"] .chip-nic-0 { border-color: rgba(5, 150, 105, 0.3); background: rgba(5, 150, 105, 0.08); }
[data-theme="light"] .chip-nic-0:hover { border-color: #059669; color: #047857; }
[data-theme="light"] .chip-nic-10 { border-color: rgba(217, 119, 6, 0.3); background: rgba(217, 119, 6, 0.08); }
[data-theme="light"] .chip-nic-10:hover { border-color: #d97706; color: #b45309; }
[data-theme="light"] .chip-nic-20 { border-color: rgba(225, 29, 72, 0.3); background: rgba(225, 29, 72, 0.08); }
[data-theme="light"] .chip-nic-20:hover { border-color: #e11d48; color: #be123c; }
[data-theme="light"] .chip-pod { border-color: rgba(124, 58, 237, 0.25); }
[data-theme="light"] .chip-pod:hover { border-color: #7c3aed; color: #6d28d9; }
[data-theme="light"] .chip-pouch { border-color: rgba(100, 116, 139, 0.3); }
[data-theme="light"] .chip-pouch:hover { border-color: #475569; color: #0f172a; }

/* ==========================================================================
   COMPREHENSIVE RESPONSIVENESS (Breakpoints for Mobile & Tablet)
   ========================================================================== */

/* --- Tablet / Medium Screen (max-width: 860px) --- */
@media (max-width: 860px) {
  .product-card {
    grid-template-columns: 1fr;
  }

  .product-image-col {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.75rem 1rem;
  }

  .product-img-wrapper {
    max-width: 220px;
  }

  .product-content-col {
    padding: 1.75rem 1.5rem;
    gap: 1.25rem;
  }

  .flavor-heading {
    font-size: 1.75rem;
  }
}

/* --- Mobile Landscape / Large Phone (max-width: 680px) --- */
@media (max-width: 680px) {
  .container {
    padding: 0.85rem;
  }

  .app-header {
    padding: 0.5rem 0 1rem;
    gap: 0.5rem;
  }

  .brand-logo {
    height: 38px;
    max-width: 160px;
  }

  .scanner-status {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
  }

  .btn-icon {
    width: 38px;
    height: 38px;
  }

  .btn-pill {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .taste-profile-box {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    padding: 0.75rem;
  }

  .modal-box {
    max-height: 94vh;
  }

  .modal-body {
    padding: 1.15rem;
  }

  .modal-header {
    padding: 1rem 1.15rem;
  }

  .modal-footer {
    padding: 1rem 1.15rem;
  }
}

/* --- Standard Mobile (max-width: 540px) --- */
@media (max-width: 540px) {
  .header-actions {
    gap: 0.35rem;
  }

  .scanner-status .status-text {
    display: none;
  }

  .scan-input-wrapper {
    padding: 0.25rem 0.4rem;
  }

  .scan-icon {
    margin-left: 0.4rem;
  }

  .scan-input {
    font-size: 1rem;
    padding: 0.5rem 0.4rem;
  }

  .scan-input::placeholder {
    font-size: 0.88rem;
  }

  .btn-camera {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
  }

  .flavor-heading {
    font-size: 1.45rem;
    line-height: 1.25;
  }

  .product-submodel {
    font-size: 0.95rem;
  }

  .product-content-col {
    padding: 1.25rem 1rem;
    gap: 1rem;
  }

  .product-image-col {
    padding: 1.25rem 0.75rem;
  }

  .product-img-wrapper {
    max-width: 180px;
  }

  .specs-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
  }

  .spec-box {
    padding: 0.5rem 0.2rem;
  }

  .spec-title {
    font-size: 0.65rem;
  }

  .spec-value {
    font-size: 0.95rem;
  }

  .nicotine-callout {
    padding: 0.75rem 1rem;
  }

  .nicotine-val {
    font-size: 1.15rem;
  }

  .tastecloud-section {
    padding: 1rem;
    border-radius: var(--radius-lg);
  }

  .tastecloud-title {
    font-size: 0.95rem;
  }

  .tastecloud-subtitle {
    font-size: 0.78rem;
  }

  .taste-chip {
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
  }

  .search-results-list {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .modal-close-floating {
    top: 0.65rem;
    right: 0.65rem;
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }
}

/* --- Extra-Small Mobile (max-width: 380px) --- */
@media (max-width: 380px) {
  .container {
    padding: 0.6rem;
  }

  .brand-logo {
    height: 34px;
    max-width: 130px;
  }

  .btn-pill-text {
    display: none;
  }

  .btn-camera .btn-cam-text {
    display: none;
  }

  .btn-pill {
    padding: 0.4rem 0.6rem;
  }

  .tastecloud-chips {
    gap: 0.35rem;
  }

  .taste-chip {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }
}

/* ==========================================================================
   ONLINE IMAGE SUGGESTION & FORM CASCADE CONTROLS
   ========================================================================== */
.btn-lookup-inline {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.btn-lookup-inline:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}

.online-image-suggestion {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  margin-bottom: 0.85rem;
  animation: fadeIn 0.25s ease-out;
}

.suggestion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.suggestion-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #10b981;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.suggestion-source {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.suggestion-body {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.suggestion-img-wrap {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.suggestion-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.suggestion-content {
  flex: 1;
  min-width: 0;
}

.suggestion-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

[data-theme="light"] .suggestion-title {
  color: #0f172a;
}

.suggestion-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

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

.btn-apply-suggestion {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.btn-apply-suggestion:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-dismiss-suggestion {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-dismiss-suggestion:hover {
  color: #ffffff;
  border-color: var(--border-strong);
}

[data-theme="light"] .btn-dismiss-suggestion:hover {
  color: #0f172a;
}

.online-image-loading {
  background: rgba(6, 182, 212, 0.08);
  border: 1px dashed rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(6, 182, 212, 0.3);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.btn-remove-thumb {
  margin-top: 0.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-remove-thumb:hover {
  background: #ef4444;
  color: #ffffff;
}

