/* iOS 26 Liquid Glass — Full stylesheet for Vegaslavia WebApp
   — Light and Dark modes
   — Preserves original structure and classes
   — Liquid glass visuals: backdrop-filter, translucency, soft shadows
   — Rich hover/press/scroll/gradient animations
   — Expanded: all sections from original + enhanced micro-interactions
*/

/* =======================
   Base / Resets
   ======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  /* Light theme defaults (overridden in dark media query) */
  --bg: rgba(255,255,255,0.66);
  --surface: rgba(255,255,255,0.6);
  --muted: rgba(0,0,0,0.45);
  --text: #0b0b0b;
  --accent: rgba(77,163,255,0.95);
  --accent-2: rgba(255,102,204,0.95);
  --border: rgba(11,11,11,0.04);
  --success: #28a745;
  --danger: #dc3545;
}

html, body, #root {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; /* system look */
  background: linear-gradient(135deg, rgba(255,255,255,0.72), rgba(245,245,250,0.6));
  color: var(--text);
  line-height: 1.6;
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  transition: background 0.6s ease, color 0.3s ease;
  /* subtle animated ambient gradient */
  animation: ambientShift 18s ease-in-out infinite alternate;
  display: contents;
}

@keyframes ambientShift {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =======================
   Utilities
   ======================= */
.u-center { text-align: center; }
.u-muted { color: var(--muted); }
.u-pill { border-radius: 999px; }

.fade-in { animation: fadeIn 0.45s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* small soft glow utility */
.glow { box-shadow: 0 6px 20px rgba(77,163,255,0.08), 0 1px 0 rgba(255,255,255,0.35) inset; }

/* sheen / gloss overlay (used on cards/buttons for liquid effect) */
.sheen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02) 30%, transparent 60%);
  mix-blend-mode: overlay;
  border-radius: inherit;
}

/* =======================
   Header
   ======================= */
.header {
  margin-top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  text-align: center;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 6px 24px rgba(11,11,11,0.03);
  border-radius: 0 0 20px 20px;
  position: relative;
z-index: 10;
  height: 105px;
}

.header h1 {
font-size: 16px;
  font-weight: 700;
  margin-bottom: 33px;
  display: block;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  color: transparent;
  animation: headerGradient 8s linear infinite;
position: relative;
margin-top: -50px;
  text-transform: lowercase;
}

@keyframes headerGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.header img {
width: 40vw;
  max-width: 300px;
  margin: auto;
}
.subtitle {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.back-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  transition: transform 0.18s ease, background 0.2s ease;
}

.back-btn:hover { transform: translateX(-3px) scale(1.02); background: rgba(77,163,255,0.06); }

/* =======================
   Main layout
   ======================= */
.main { flex: 1; padding: 18px 18px 96px; }

/* =======================
   Search section
   ======================= */
h3 {
  font-size: 14px;
  padding: 12px;
}

.search-section { margin-bottom: 24px; }

.search-box {
  display: flex; align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.56);
  padding: 8px; border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(11,11,11,0.03);
  border: 1px solid rgba(255,255,255,0.6);
  position: relative;
}

.search-box input {
  flex: 1; padding: 12px 14px; border: none; background: transparent; font-size: 16px; color: var(--text);
}

.search-box input::placeholder { color: rgba(11,11,11,0.36); }

.search-btn {
  background: linear-gradient(180deg, rgba(77,163,255,0.95), rgba(77,163,255,0.85));
  color: #fff; border: none; padding: 10px 14px; border-radius: 12px; cursor: pointer; font-size: 16px;
  box-shadow: 0 8px 20px rgba(77,163,255,0.12);
  transition: transform 0.18s ease, box-shadow 0.22s ease;
  position: relative; overflow: hidden;
}

.search-btn:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(77,163,255,0.18); }

.barcode-btn {
  width: 100%; background: rgba(255,255,255,0.46);
  border: 2px dashed rgba(77,163,255,0.7); color: rgba(77,163,255,1);
  padding: 16px; border-radius: 14px; font-size: 16px; cursor: pointer; transition: background 0.25s ease;
}

.barcode-btn:hover { background: rgba(77,163,255,0.08); color: #fff; }

/* Quick sheen for interactive elements */
.interactive { position: relative; }
.interactive::before { content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none; }

/* =======================
   Quick actions (grid)
   ======================= */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; margin-bottom: 24px; }

.action-card {
  background: rgba(255,255,255,0.62);
  border-radius: 16px; padding: 16px; text-align: center; color: var(--text);
  transition: transform 0.22s cubic-bezier(.2,.9,.2,1), box-shadow 0.3s ease;
  position: relative; overflow: hidden; border: 1px solid rgba(11,11,11,0.03);
  text-decoration: none;
}

.action-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(11,11,11,0.06); }

.action-icon { font-size: 28px; margin-bottom: 8px; }
.action-icon img { width: 70px; }
.action-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.action-card p { font-size: 12px; color: var(--muted); }

/* =======================
   Stats Section
   ======================= */
.stats-section { margin-bottom: 24px; }
.stats-section h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.stat-card { background: rgba(255,255,255,0.6); padding: 14px; border-radius: 14px; text-align:center; }
.stat-number { font-size: 22px; font-weight:800; color: var(--accent); margin-bottom: 6px; }
.stat-label { font-size:12px; color: var(--muted); }

/* =======================
   Recent Searches
   ======================= */
.recent-section h2{ font-size:18px; font-weight:700; margin-bottom:12px; }
.recent-list { background: rgba(255,255,255,0.6); border-radius:12px; padding:12px; }
.recent-item { padding:8px 0; border-bottom:1px solid rgba(11,11,11,0.03); cursor:pointer; color: var(--accent); }
.recent-item:last-child { border-bottom:none; }

/* =======================
   Product Card (detailed)
   ======================= */
.product-card { background: rgba(255,255,255,0.6); border-radius: 20px; padding: 20px; margin-bottom: 20px; position: relative; overflow: visible; }

.product-images { display:flex; gap:8px; margin-bottom:16px; overflow-x:auto; }
.product-image { width: 80px; height:80px; object-fit:cover; border-radius: 12px; flex-shrink:0; border: 1px solid rgba(11,11,11,0.04); }

.product-name { font-size:20px; font-weight:700; margin-bottom:8px; }
.product-brand { font-size:14px; color: var(--muted); margin-bottom:12px; }

.product-status { display:inline-block; padding:6px 12px; border-radius: 999px; font-size:12px; font-weight:700; margin-bottom:16px; }
/* statuses */
.status-unknown { background: rgba(0,0,0,0.04); color: rgba(0,0,0,0.6); }
.status-not_vegan { background: rgba(220,53,69,0.12); color: #8b1c24; }
.status-vegan_unconfirmed { background: rgba(255,193,7,0.12); color: #856404; }
.status-vegan_star { background: rgba(255,235,59,0.12); color: #d39e00; }
.status-vegan_moderator, .status-vegan_letter { background: rgba(40,167,69,0.08); color: #155724; }

.product-barcode, .product-description, .product-ingredients, .product-additives, .product-categories { margin-bottom: 16px; }
.product-barcode strong, .product-description strong, .product-ingredients strong, .product-additives strong, .product-categories strong { display:block; margin-bottom:6px; font-size:14px; }

.additives-list, .categories-list { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.additive-tag, .category-tag { background: rgba(11,11,11,0.04); color: var(--text); padding:6px 10px; border-radius:12px; font-size:12px; }

/* =======================
   Product actions
   ======================= */
.product-actions { margin-top:20px; padding-top:20px; border-top:1px solid rgba(11,11,11,0.03); display:flex; gap:8px; flex-direction:column; }

.action-btn { width:100%; padding:12px 16px; border:none; border-radius:12px; font-size:16px; font-weight:600; cursor:pointer; transition: transform 0.18s ease, box-shadow 0.2s ease; position:relative; overflow:hidden; }

.action-btn.primary { background: linear-gradient(180deg, var(--accent), rgba(77,163,255,0.85)); color:#fff; box-shadow: 0 8px 24px rgba(77,163,255,0.12); }
.action-btn.secondary { background: rgba(255,255,255,0.5); color: var(--text); border:1px solid rgba(11,11,11,0.04); }
.action-btn.success { background: linear-gradient(180deg, #2ecc71, #28a745); color:#fff; }
.action-btn.danger { background: linear-gradient(180deg, #ff6b6b, #dc3545); color:#fff; }
.action-btn.warning { background: linear-gradient(180deg, #ffcf4d, #ffc107); color:#212529; }

.action-btn:hover { transform: translateY(-5px); }

/* moderator actions */
.moderator-actions { margin-top:20px; padding-top:20px; border-top:1px solid rgba(11,11,11,0.03); }
.moderator-actions h3 { font-size:16px; font-weight:700; margin-bottom:12px; }

/* verification info */
.verification-info { margin-top:20px; padding-top:20px; border-top:1px solid rgba(11,11,11,0.03); }
.verification-info h3 { font-size:16px; font-weight:700; margin-bottom:12px; }
.moderator-info-btn, .user-info-btn { background:none; border:none; color: var(--accent); text-decoration: underline; cursor:pointer; }

/* =======================
   Modals
   ======================= */
.modal { display:none; position:fixed; z-index:1000; left:0; top:0; width:100%; height:100%; background-color: rgba(11,11,11,0.45); }
.modal-content { background: rgba(255,255,255,0.66); margin: 6% auto; padding:0; border-radius: 16px; width:90%; max-width:680px; max-height:80vh; overflow-y:auto; border: 1px solid rgba(11,11,11,0.04); box-shadow: 0 14px 40px rgba(11,11,11,0.08); }
.modal-header { padding:20px; display:flex; align-items:center; justify-content:space-between; }
.modal-header h3{ font-size:18px; font-weight:700; }
.close-btn { background:none; border:none; font-size:22px; cursor:pointer; color:var(--muted); }
.modal-body { padding:20px; }

/* =======================
   Forms
   ======================= */
.form-group { margin-bottom:16px; }
.form-group label { display:block; margin-bottom:8px; font-weight:600; }
.form-group input, .form-group select, .form-group textarea { width:100%; padding:12px; border-radius:10px; border:1px solid rgba(11,11,11,0.06); background: rgba(255,255,255,0.78); font-size:16px; color:var(--text); }
.form-group input[type="checkbox"]{ width:auto; margin-right:8px; }

/* =======================
   Upload progress
   ======================= */
.upload-progress { margin-top:16px; }
.progress-bar { width:100%; height:6px; background: rgba(11,11,11,0.04); border-radius:12px; overflow:hidden; }
.progress-bar::after { content:''; display:block; width: 0%; height:100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); animation: progressAnimate 4s linear infinite; }
@keyframes progressAnimate { 0% { width:0%; } 50% { width:80%; } 100% { width:0%; } }
.progress-text { text-align:center; margin-top:8px; font-size:13px; color:var(--muted); }

/* =======================
   Search results and product list
   ======================= */
.product-item { background: rgba(255,255,255,0.6); border-radius:12px; padding:16px; margin-bottom:12px; cursor:pointer; transition: background 0.2s ease, transform 0.2s ease; display: flex; align-items: center; gap: 10px; }
.product-item:hover { background: linear-gradient(90deg, rgba(255,255,255,0.7), rgba(250,250,255,0.68)); transform: translateY(-6px); }
.product-info h4 { font-size:16px; font-weight:700; margin-bottom:4px; }
.product-photo { min-width: 20%; width: 20%; }
.product-photo > img { width: 100%; }
.product-brand { font-size:14px; color:var(--muted); margin-bottom:8px; }

/* =======================
   Bottom navigation
   ======================= */
.bottom-nav { position:fixed; bottom:12px; left:12px; right:12px; background: rgba(255,255,255,0.66); border-radius: 18px; padding:8px; display:flex; gap:8px; align-items:center; justify-content:space-around; box-shadow:0 20px 40px rgba(11,11,11,0.06); border:1px solid rgba(11,11,11,0.04); z-index:100;    background-color: rgba(255, 255, 255, 0.5); /* Полупрозрачный фон */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Для Safari */}

.nav-item { flex:1; display:flex; flex-direction:column; align-items:center; padding:8px; text-decoration:none; color: var(--muted); transition: color 0.2s ease; }
.nav-item.active { color: var(--accent); }
.nav-icon { font-size:18px; margin-bottom:4px; }
.nav-icon img { width: 40px; }
.nav-label { font-size:12px; }

/* =======================
   Responsive tweaks
   ======================= */
@media (max-width:480px) {
  .main { padding:12px 12px 96px; }
  .quick-actions { grid-template-columns: repeat(2,1fr); }
  .stats-grid { grid-template-columns: 1fr; gap:8px; }
  .modal-content { width:95%; margin:5% auto; }
}

/* =======================
   Animations (card-level)
   ======================= */
@keyframes floatUp { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.card-float { animation: floatUp 0.6s cubic-bezier(.2,.9,.2,1) both; }

/* =======================
   Ratings and reviews
   ======================= */
.product-rating { margin-bottom:16px; }
.rating-display { display:flex; gap:8px; align-items:center; margin-top:8px; }
.rating-stars { font-size:18px; }
.rating-text { font-size:14px; color:var(--muted); }

.reviews-section { margin-top:24px; padding-top:24px; border-top:1px solid rgba(11,11,11,0.03); }
.reviews-section h3 { font-size:18px; font-weight:700; margin-bottom:16px; }
.no-reviews { text-align:center; color:var(--muted); font-style:italic; padding:20px; }
.reviews-list { display:flex; flex-direction:column; gap:16px; }
.review-item { background: rgba(255,255,255,0.6); border-radius:12px; padding:16px; }
.review-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.review-rating { font-size:16px; }
.review-date { font-size:12px; color:var(--muted); }
.review-comment { margin-bottom:12px; line-height:1.5; }
.review-images { display:flex; gap:8px; margin-bottom:12px; overflow-x:auto; }
.review-image { width:80px; height:80px; object-fit:cover; border-radius:8px; }
.review-actions { display:flex; justify-content:flex-end; }
.helpful-btn { background:none; border:1px solid rgba(11,11,11,0.04); color:var(--text); padding:6px 12px; border-radius:20px; font-size:12px; cursor:pointer; }
.helpful-btn:hover { background:rgba(255,255,255,0.8); }

/* =======================
   Moderator and moderation UI
   ======================= */
.moderation-sections .section { margin-bottom:32px; }
.moderation-sections h2 { font-size:18px; font-weight:700; margin-bottom:16px; padding-bottom:8px; border-bottom:2px solid rgba(77,163,255,0.18); }
.moderation-item { background: rgba(255,255,255,0.6); border-radius:12px; padding:16px; margin-bottom:12px; }
.moderation-item .item-info h4 { font-size:16px; font-weight:700; margin-bottom:8px; }
.moderation-item .item-meta { font-size:12px; color:var(--muted); margin-bottom:8px; }
.moderation-item .review-comment, .moderation-item .ingredient-text { background: rgba(255,255,255,0.9); padding:8px 12px; border-radius:6px; font-size:14px; margin-bottom:12px; border:1px solid rgba(11,11,11,0.04); }
.moderation-item .item-actions { display:flex; gap:8px; flex-wrap:wrap; }
.moderation-item .item-actions .action-btn { flex:1; min-width:120px; font-size:14px; padding:8px 12px; }

.no-items { text-align:center; color:var(--muted); font-style:italic; padding:20px; }

/* =======================
   Product image galleries
   ======================= */
.product-images-section, .composition-images-section, .letter-images-section, .pending-images-section { margin-bottom:24px; }
.product-images-section h3, .composition-images-section h3, .letter-images-section h3, .pending-images-section h3 { font-size:16px; font-weight:700; margin-bottom:12px; padding-bottom:8px; border-bottom:1px solid rgba(11,11,11,0.03); }
.product-images, .composition-images, .letter-images, .pending-images { display:flex; gap:12px; overflow-x:auto; padding-bottom:8px; }
.image-container { position:relative; flex-shrink:0; }
.product-image { width:120px; height:120px; object-fit:cover; border-radius:8px; border:2px solid rgba(11,11,11,0.04); }
.image-delete-btn { position:absolute; top:-8px; right:-8px; background:#dc3545; color:#fff; border:none; border-radius:50%; width:24px; height:24px; font-size:12px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.pending-image-item { display:flex; flex-direction:column; gap:12px; background: rgba(255,255,255,0.6); border-radius:12px; padding:16px; border:2px solid rgba(255,193,7,0.12); }
.image-type-badge { position:absolute; bottom:6px; left:6px; background: rgba(0,0,0,0.6); color:#fff; padding:4px 8px; border-radius:6px; font-size:11px; font-weight:700; }
.image-actions { display:flex; gap:8px; flex-wrap:wrap; }
.image-actions .action-btn { flex:1; min-width:80px; font-size:12px; padding:6px 8px; }

/* moderation photo */
.moderation-image { width:100px; height:100px; object-fit:cover; border-radius:8px; border:2px solid rgba(11,11,11,0.04); }
.image-preview { display:flex; justify-content:center; margin-bottom:12px; }

/* =======================
   Rating input
   ======================= */
.rating-input { display:flex; gap:4px; margin-bottom:8px; }
.star-btn { background:none; border:none; font-size:24px; cursor:pointer; padding:4px; transition:transform 0.08s ease; }
.star-btn:hover { transform: scale(1.12); }

/* =======================
   Ingredient lists, user compositions
   ======================= */
.product-user-ingredients { margin-bottom:16px; }
.ingredients-list { margin-top:8px; }
.ingredient-item { background: rgba(255,255,255,0.6); padding:8px 12px; border-radius:8px; margin-bottom:6px; display:flex; justify-content:space-between; align-items:center; }
.ingredient-text { flex:1; font-size:14px; }
.ingredient-meta { font-size:12px; color:var(--muted); white-space:nowrap; }

/* =======================
   Review images & actions
   ======================= */
.review-images { display:flex; gap:8px; margin-bottom:12px; overflow-x:auto; }
.review-image { width:80px; height:80px; object-fit:cover; border-radius:8px; }

/* =======================
   Accessibility tweaks
   ======================= */
:focus { outline: 3px solid rgba(77,163,255,0.2); outline-offset: 2px; }

/* =======================
   Dark theme: iOS26 Liquid Glass — comprehensive
   ======================= */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: rgba(12,12,16,0.6);
    --surface: rgba(20,20,26,0.5);
    --muted: rgba(200,200,200,0.6);
    --text: #ffffff;
    --accent: rgba(77,163,255,0.95);
    --accent-2: rgba(255,102,204,0.9);
    --border: rgba(255,255,255,0.04);
  }

  body {
    background: linear-gradient(135deg, rgba(14,16,20,0.95), rgba(28,24,40,0.92));
    color: var(--text);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
    transition: background 0.5s ease, color 0.2s ease;
    animation: darkAmbient 20s ease-in-out infinite alternate;
  }

  @keyframes darkAmbient {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
  }

  /* header and cards as translucent glass */
  .header, .product-card, .action-card, .stat-card, .recent-list, .review-item, .moderation-item, .pending-image-item {
    background: rgba(24,24,30,0.4);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 16px 40px rgba(2,6,23,0.6);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    backdrop-filter: blur(28px) saturate(200%);
  }

  .header h1 { background: linear-gradient(90deg, #4da3ff, #ff66cc); background-clip:text; -webkit-background-clip:text; color:transparent; }

  .subtitle { color: var(--muted); }
  .back-btn { color: var(--accent); }

  /* inputs and surfaces */
  .search-box { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.04); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
  .search-box input { color: var(--text); }
  .search-box input::placeholder { color: rgba(255,255,255,0.35); }
  .search-btn { box-shadow: 0 10px 30px rgba(77,163,255,0.12); }

  .barcode-btn { background: rgba(255,255,255,0.02); border: 2px dashed rgba(77,163,255,0.18); color: var(--accent); }
  .barcode-btn:hover { background: rgba(77,163,255,0.06); color: #fff; }

  .action-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.03); }
  .action-card:hover { box-shadow: 0 22px 60px rgba(1,10,40,0.6); }

  .stat-number { color: var(--accent); }

  .recent-list { background: rgba(255,255,255,0.02); }
  .recent-item { color: var(--accent); border-bottom: 1px solid rgba(255,255,255,0.02); }

  .product-card { background: linear-gradient(180deg, rgba(20,20,28,0.36), rgba(18,18,22,0.32)); }
  .product-image { border: 1px solid rgba(255,255,255,0.03); }
  .product-name { color: #fff; }
  .product-brand { color: var(--muted); }

  .product-status { color: #fff; }
  .status-not_vegan { background: rgba(220,53,69,0.12); color: #ffb3b8; }
  .status-vegan_unconfirmed { background: rgba(255,193,7,0.1); color: #ffd98b; }
  .status-vegan_moderator, .status-vegan_letter { background: rgba(40,167,69,0.08); color: #b8ffda; }

  .product-actions { border-top: 1px solid rgba(255,255,255,0.04); }
  .action-btn.secondary { background: rgba(255,255,255,0.02); color: var(--text); border: 1px solid rgba(255,255,255,0.04); }
  .action-btn.primary { background: linear-gradient(180deg, rgba(77,163,255,0.95), rgba(77,163,255,0.78)); color: #fff; box-shadow: 0 14px 40px rgba(77,163,255,0.16); }

  /* modal dark */
  .modal-content { background: rgba(12,12,14,0.6); border: 1px solid rgba(255,255,255,0.04); box-shadow: 0 20px 60px rgba(0,0,0,0.7); }
  .modal-header h3 { color: #fff; }
  .close-btn { color: var(--muted); }

  /* forms dark */
  .form-group input, .form-group select, .form-group textarea { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); color: var(--text); }

  /* bottom nav dark */
  .bottom-nav { background: rgba(20,20,28,0.4); border: 1px solid rgba(255,255,255,0.03); box-shadow: 0 30px 60px rgba(0,0,0,0.7); }
  .nav-item { color: var(--muted); }
  .nav-item.active { color: var(--accent); }

  /* reviews dark */
  .review-item { background: rgba(255,255,255,0.02); }
  .helpful-btn { border: 1px solid rgba(255,255,255,0.04); color: var(--text); }

  /* images dark */
  .product-image, .review-image { border: 1px solid rgba(255,255,255,0.04); }

}
/* =======================
   Catalog Page Styles
   ======================= */

/* Catalog Stats Section */
.catalog-stats {
  margin-bottom: 24px;
}

.stats-card {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(11, 11, 11, 0.03);
  border: 1px solid rgba(11, 11, 11, 0.04);
  transition: transform 0.22s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(11, 11, 11, 0.06);
}

/* Categories Section */
.categories-section {
  margin-bottom: 32px;
}

.categories-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  transition: all 0.2s ease;
  user-select: none;
box-shadow: 0 10px 30px rgba(11, 11, 11, 0.03);
  border: 1px solid rgba(11, 11, 11, 0.04);
}

.categories-section h2:hover {
  background: rgba(77, 163, 255, 0.06);
  color: var(--accent);
}

.categories-section h2::after {
  content: '▼';
  font-size: 14px;
  transition: transform 0.3s ease;
  margin-left: auto;
}

.categories-section h2.collapsed::after {
  transform: rotate(-90deg);
}

.categories-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Category Card */
.category-card {
  background: rgba(255, 255, 255, 0.62);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(11, 11, 11, 0.04);
  transition: all 0.25s cubic-bezier(0.2, 0.9, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(11, 11, 11, 0.03);
}

.category-card:hover {
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(11, 11, 11, 0.06);
}

.category-card.active {
  background: linear-gradient(135deg, rgba(77, 163, 255, 0.08), rgba(255, 102, 204, 0.06));
  border: 2px solid rgba(77, 163, 255, 0.3);
  box-shadow: 0 10px 30px rgba(77, 163, 255, 0.12);
}

.category-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  gap: 12px;
}

.category-icon {
  font-size: 24px;
  min-width: 32px;
  text-align: center;
}

.category-name {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
}

.category-count {
  background: rgba(77, 163, 255, 0.12);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}

.subcategory-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 14px;
  color: var(--accent);
  padding: 8px;
  transition: transform 0.2s ease, color 0.2s ease;
  user-select: none;
}

.subcategory-toggle:hover {
  color: var(--accent-2);
  transform: translateY(-50%) scale(1.1);
}

.subcategory-list {
  margin-top: 12px;
  padding: 12px 0 4px 44px;
  border-top: 1px solid rgba(11, 11, 11, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subcategory-link {
  display: block;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.18s ease;
}

.subcategory-link:hover {
  background: rgba(77, 163, 255, 0.06);
  color: var(--accent);
  transform: translateX(4px);
}

.subcategory-list .view-all {
  font-weight: 700;
  color: var(--accent);
  margin-top: 4px;
  display: inline-block;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.18s ease;
}

.subcategory-list .view-all:hover {
  background: rgba(77, 163, 255, 0.08);
  transform: translateX(4px);
}

/* Products Section */
.products-section {
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.view-toggle {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.5);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(11, 11, 11, 0.04);
}

.view-btn {
  background: transparent;
  border: none;
  padding: 8px 12px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 8px;
  color: var(--muted);
  transition: all 0.18s ease;
}

.view-btn:hover {
  background: rgba(77, 163, 255, 0.06);
  color: var(--accent);
}

.view-btn.active {
  background: linear-gradient(180deg, rgba(77, 163, 255, 0.95), rgba(77, 163, 255, 0.85));
  color: #fff;
  box-shadow: 0 4px 12px rgba(77, 163, 255, 0.2);
}

/* No Results */
.no-results {
  text-align: center;
  padding: 48px 24px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  border: 2px dashed rgba(11, 11, 11, 0.08);
}

.no-results-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.no-results h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.no-results p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 6px;
}

.no-results .hint {
  font-size: 13px;
  font-style: italic;
  color: var(--accent);
}

/* Products Container */
.products-container {
  display: grid;
  gap: 16px;
}

.products-container.grid-view {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.products-container.list-view {
  grid-template-columns: 1fr;
}

/* Product Card Catalog */
.product-card-catalog {
  background: rgba(255, 255, 255, 0.62);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.9, 0.2, 1);
  border: 1px solid rgba(11, 11, 11, 0.04);
  box-shadow: 0 6px 20px rgba(11, 11, 11, 0.03);
  position: relative;
}

.product-card-catalog:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(11, 11, 11, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.product-card-catalog:active {
  transform: translateY(-3px);
}

.product-image-container {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(250, 250, 250, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image-catalog {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card-catalog:hover .product-image-catalog {
  transform: scale(1.05);
}

.product-image-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(245, 245, 250, 0.8), rgba(240, 240, 245, 0.6));
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-icon {
  font-size: 48px;
  opacity: 0.3;
}

.product-info-catalog {
  padding: 12px;
}

.product-name-catalog {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-brand-catalog {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-status-catalog {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

.product-barcode-catalog {
  font-size: 11px;
  color: var(--muted);
  font-family: 'Courier New', monospace;
}

/* List View Adjustments */
.products-container.list-view .product-card-catalog {
  display: flex;
  flex-direction: row;
}

.products-container.list-view .product-image-container,
.products-container.list-view .product-image-placeholder {
  width: 100px;
  min-width: 100px;
  aspect-ratio: 1;
}

.products-container.list-view .product-info-catalog {
  flex: 1;
  padding: 12px 16px;
}

.products-container.list-view .product-name-catalog {
  font-size: 16px;
  -webkit-line-clamp: 1;
}

/* Load More Section */
.load-more-section {
  margin-top: 24px;
  text-align: center;
}

.load-more-btn {
  background: linear-gradient(180deg, rgba(77, 163, 255, 0.95), rgba(77, 163, 255, 0.85));
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(77, 163, 255, 0.12);
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.load-more-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(77, 163, 255, 0.18);
}

.load-more-btn:active {
  transform: translateY(-2px);
}

/* =======================
   Dark Mode Overrides
   ======================= */
@media (prefers-color-scheme: dark) {
  .stats-card {
    background: rgba(24, 24, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
  }

  .category-card {
    background: rgba(24, 24, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.5);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
  }

  .category-card:hover {
    background: rgba(30, 30, 38, 0.5);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.7);
  }

  .category-card.active {
    background: linear-gradient(135deg, rgba(77, 163, 255, 0.12), rgba(255, 102, 204, 0.08));
    border: 2px solid rgba(77, 163, 255, 0.4);
    box-shadow: 0 14px 40px rgba(77, 163, 255, 0.2);
  }

  .category-count {
    background: rgba(77, 163, 255, 0.18);
    color: rgba(77, 163, 255, 0.95);
  }

  .subcategory-list {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
  }

  .subcategory-link:hover {
    background: rgba(77, 163, 255, 0.08);
  }

  .subcategory-list .view-all:hover {
    background: rgba(77, 163, 255, 0.12);
  }

  .view-toggle {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
  }

  .view-btn:hover {
    background: rgba(77, 163, 255, 0.08);
  }

  .no-results {
    background: rgba(24, 24, 30, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.08);
  }

  .product-card-catalog {
    background: rgba(24, 24, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.5);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
  }

  .product-card-catalog:hover {
    background: rgba(30, 30, 38, 0.5);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.7);
  }

  .product-image-container {
    background: rgba(40, 40, 48, 0.4);
  }

  .product-image-placeholder {
    background: linear-gradient(135deg, rgba(30, 30, 38, 0.6), rgba(25, 25, 32, 0.5));
  }

  .placeholder-icon {
    opacity: 0.2;
  }

  .product-name-catalog {
    color: #ffffff;
  }

  .load-more-btn {
    background: linear-gradient(180deg, rgba(77, 163, 255, 0.95), rgba(77, 163, 255, 0.78));
    box-shadow: 0 14px 40px rgba(77, 163, 255, 0.16);
  }

  .load-more-btn:hover {
    box-shadow: 0 18px 48px rgba(77, 163, 255, 0.22);
  }
}

/* =======================
   Responsive Adjustments
   ======================= */
@media (max-width: 480px) {
  .categories-section h2,
  .section-header h2 {
    font-size: 18px;
  }

  .products-container.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .category-name {
    font-size: 15px;
  }

  .subcategory-list {
    padding-left: 32px;
  }
}
/* =======================
   PART 1: UPDATES TO EXISTING STYLES
   ======================= */

/* Enhanced Product Card for Detail Page */
.product-card {
  background: rgba(255, 255, 255, 0.62);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: visible;
  box-shadow: 0 10px 30px rgba(11, 11, 11, 0.04);
  border: 1px solid rgba(11, 11, 11, 0.04);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

/* Enhanced Product Images Section */
.product-images-section,
.composition-images-section,
.letter-images-section,
.pending-images-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(11, 11, 11, 0.04);
}

.product-images-section h3,
.composition-images-section h3,
.letter-images-section h3,
.pending-images-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Enhanced Product Images Grid */
.product-images,
.composition-images,
.letter-images,
.pending-images {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.product-images::-webkit-scrollbar,
.composition-images::-webkit-scrollbar,
.letter-images::-webkit-scrollbar,
.pending-images::-webkit-scrollbar {
  height: 6px;
}

.product-images::-webkit-scrollbar-track,
.composition-images::-webkit-scrollbar-track,
.letter-images::-webkit-scrollbar-track,
.pending-images::-webkit-scrollbar-track {
  background: rgba(11, 11, 11, 0.03);
  border-radius: 10px;
}

.product-images::-webkit-scrollbar-thumb,
.composition-images::-webkit-scrollbar-thumb,
.letter-images::-webkit-scrollbar-thumb,
.pending-images::-webkit-scrollbar-thumb {
  background: rgba(77, 163, 255, 0.3);
  border-radius: 10px;
}

/* Enhanced Image Container */
.image-container {
  position: relative;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(11, 11, 11, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(11, 11, 11, 0.1);
}

/* Enhanced Product Images */
.product-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(11, 11, 11, 0.04);
  cursor: pointer;
  transition: transform 0.2s ease;
  display: block;
}

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

.product-image.thumb {
  cursor: pointer;
}

/* Enhanced Image Delete Button */
.image-delete-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(180deg, #ff6b6b, #dc3545);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
  transition: all 0.18s ease;
  z-index: 10;
}

.image-delete-btn:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
}

/* Enhanced Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(11, 11, 11, 0.75);
/*  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); */
  animation: fadeIn 0.25s ease;
}

.modal-content {
  background: rgba(255, 255, 255, 0.72);
  margin: 5% auto;
  padding: 0;
  border-radius: 20px;
  width: 90%;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid rgba(11, 11, 11, 0.06);
  box-shadow: 0 20px 60px rgba(11, 11, 11, 0.15);
/*  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);*/
  animation: slideUp 0.3s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(11, 11, 11, 0.06);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 20px 20px 0 0;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.18s ease;
}

.close-btn:hover {
  background: rgba(220, 53, 69, 0.08);
  color: #dc3545;
  transform: rotate(90deg);
}

.modal-body {
  padding: 24px;
}

/* =======================
   PART 2: NEW STYLES TO ADD
   ======================= */

/* Product Image Modal (Full Screen View) */
.product-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.product-modal .modal-content {
  background: transparent;
  border: none;
  box-shadow: none;
  margin: auto;
  display: block;
  max-width: 95%;
  max-height: 95%;
  width: auto;
  height: auto;
  border-radius: 16px;
  overflow: hidden;
}

.product-modal .modal-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-modal .close {
  position: absolute;
  top: 24px;
  right: 36px;
  color: white;
  font-size: 44px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2001;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.5);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.product-modal .close:hover {
  background: rgba(220, 53, 69, 0.8);
  transform: rotate(90deg) scale(1.1);
}

/* Image Type Badge */
.image-type-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Pending Image Item */
.pending-image-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 243, 205, 0.3);
  border-radius: 16px;
  padding: 16px;
  border: 2px solid rgba(255, 193, 7, 0.3);
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.08);
}

/* Image Actions */
.image-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.image-actions .action-btn {
  flex: 1;
  min-width: 100px;
  font-size: 13px;
  padding: 8px 12px;
}

/* Product Info Section */
.product-info {
  margin-bottom: 24px;
}

.product-info h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.3;
}

.product-brand {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 500;
}

/* Product Barcode */
.product-barcode {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(245, 245, 250, 0.5);
  border-radius: 10px;
  border: 1px solid rgba(11, 11, 11, 0.04);
}

.product-barcode strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Product Ingredients */
.product-ingredients,
.product-user-ingredients {
  margin-bottom: 20px;
}

.product-ingredients strong,
.product-user-ingredients strong {
  display: block;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.ingredients-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ingredient-item {
  background: rgba(255, 255, 255, 0.6);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(11, 11, 11, 0.04);
  transition: all 0.18s ease;
}

.ingredient-item:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateX(4px);
}

.ingredient-text {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.ingredient-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  margin-left: 12px;
}

/* Product Rating Display */
.product-rating {
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(255, 250, 240, 0.4);
  border-radius: 12px;
  border: 1px solid rgba(255, 193, 7, 0.15);
}

.product-rating strong {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 700;
}

.rating-display {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.rating-stars {
  font-size: 20px;
  letter-spacing: 2px;
  color: #ffc107;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.rating-text {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

/* Product Categories */
.product-categories {
  margin-bottom: 20px;
}

.product-categories strong {
  display: block;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
}

.categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.category-tag {
  background: rgba(77, 163, 255, 0.08);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(77, 163, 255, 0.15);
  transition: all 0.18s ease;
}

.category-tag:hover {
  background: rgba(77, 163, 255, 0.15);
  transform: translateY(-2px);
}

/* Moderator Actions Section */
.moderator-actions {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid rgba(77, 163, 255, 0.15);
  background: rgba(77, 163, 255, 0.03);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.moderator-actions h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.moderator-actions h3::before {
  content: '🛡️';
}

/* Verification Info Section */
.verification-info {
  margin-top: 24px;
  padding: 20px;
  background: rgba(40, 167, 69, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(40, 167, 69, 0.15);
}

.verification-info h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 8px;
}

.verification-info h3::before {
  content: '✓';
  font-size: 20px;
}

.verification-info p {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.moderator-info-btn,
.user-info-btn {
  background: none;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.18s ease;
}

.moderator-info-btn:hover,
.user-info-btn:hover {
  background: rgba(77, 163, 255, 0.08);
  text-decoration: none;
}

/* Reviews Section Enhanced */
.reviews-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(11, 11, 11, 0.06);
}

.reviews-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.no-reviews {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 32px 20px;
  background: rgba(245, 245, 250, 0.4);
  border-radius: 12px;
  border: 2px dashed rgba(11, 11, 11, 0.08);
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-item {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid rgba(11, 11, 11, 0.04);
  transition: all 0.22s ease;
}

.review-item:hover {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 6px 20px rgba(11, 11, 11, 0.06);
  transform: translateY(-2px);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.review-rating {
  font-size: 16px;
  letter-spacing: 1px;
  color: #ffc107;
}

.review-date {
  font-size: 12px;
  color: var(--muted);
}

.review-comment {
  margin-bottom: 12px;
  line-height: 1.6;
  color: var(--text);
  font-size: 14px;
}

.review-images {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.review-image {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(11, 11, 11, 0.04);
  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.review-image:hover {
  transform: scale(1.05);
}

.review-actions {
  display: flex;
  justify-content: flex-end;
}

.helpful-btn {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(11, 11, 11, 0.06);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
  font-weight: 500;
}

.helpful-btn:hover {
  background: rgba(77, 163, 255, 0.08);
  border-color: rgba(77, 163, 255, 0.2);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Rating Input (Star Selection) */
.rating-input {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  padding: 4px;
  transition: all 0.15s ease;
  color: #ddd;
}

.star-btn:hover,
.star-btn.active {
  color: #ffc107;
  transform: scale(1.15);
}

/* Form Groups Enhanced for Product Page */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.form-group input[type="text"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(11, 11, 11, 0.08);
  background: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  color: var(--text);
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(77, 163, 255, 0.4);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 4px rgba(77, 163, 255, 0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.form-group input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  cursor: pointer;
}

/* Upload Progress */
.upload-progress {
  margin-top: 20px;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(11, 11, 11, 0.06);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: progressLoad 2s ease-in-out infinite;
  border-radius: 12px;
}

@keyframes progressLoad {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 0%; }
}

.progress-text {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* =======================
   Dark Mode for Product Page
   ======================= */
@media (prefers-color-scheme: dark) {
  .product-card {
    background: linear-gradient(180deg, rgba(20, 20, 28, 0.4), rgba(18, 18, 22, 0.35));
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.6);
  }

  .product-images-section,
  .composition-images-section,
  .letter-images-section,
  .pending-images-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .image-container {
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.4);
  }

  .product-image {
    border: 2px solid rgba(255, 255, 255, 0.06);
  }

  .modal {
    background-color: rgba(0, 0, 0, 0.85);
  }

  .modal-content {
    background: rgba(20, 20, 28, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8);
  }

  .modal-header {
    background: rgba(24, 24, 30, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .pending-image-item {
    background: rgba(60, 50, 30, 0.3);
    border: 2px solid rgba(255, 193, 7, 0.25);
  }

  .product-barcode {
    background: rgba(30, 30, 38, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.04);
  }

  .ingredient-item {
    background: rgba(30, 30, 38, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.04);
  }

  .ingredient-item:hover {
    background: rgba(40, 40, 48, 0.5);
  }

  .product-rating {
    background: rgba(60, 50, 30, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.12);
  }

  .category-tag {
    background: rgba(77, 163, 255, 0.12);
    border: 1px solid rgba(77, 163, 255, 0.2);
  }

  .moderator-actions {
    background: rgba(77, 163, 255, 0.05);
    border-top: 2px solid rgba(77, 163, 255, 0.2);
  }

  .verification-info {
    background: rgba(40, 167, 69, 0.08);
    border: 1px solid rgba(40, 167, 69, 0.2);
  }

  .reviews-section {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .no-reviews {
    background: rgba(30, 30, 38, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.08);
  }

  .review-item {
    background: rgba(30, 30, 38, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  .review-item:hover {
    background: rgba(35, 35, 42, 0.5);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.5);
  }

  .review-image {
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  .helpful-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .helpful-btn:hover {
    background: rgba(77, 163, 255, 0.12);
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
  }

  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(77, 163, 255, 0.12);
  }

  .progress-bar {
    background: rgba(255, 255, 255, 0.06);
  }
}

/* =======================
   Responsive for Product Page
   ======================= */
@media (max-width: 480px) {
  .product-card {
    padding: 18px;
    border-radius: 16px;
  }

  .product-info h2 {
    font-size: 20px;
  }

  .product-images,
  .composition-images,
  .letter-images {
    gap: 8px;
  }

  .product-image {
    width: 100px;
    height: 100px;
  }

  .modal-content {
    width: 95%;
    margin: 180px auto;
  }

  .modal-header {
    padding: 18px;
  }

  .modal-body {
    padding: 18px;
  }

  .review-image {
    width: 70px;
    height: 70px;
  }

  .product-modal .close {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    font-size: 36px;
  }
}
/* =======================
   Home Page Specific Styles
   (Elements not in catalog/product pages)
   ======================= */

/* Barcode Section */
.barcode-section {
  margin-top: 12px;
}

.barcode-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.5);
  border: 2px dashed rgba(77, 163, 255, 0.4);
  color: var(--accent);
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.9, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.barcode-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(77, 163, 255, 0.05), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.barcode-btn:hover {
  background: rgba(77, 163, 255, 0.08);
  border-color: rgba(77, 163, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(77, 163, 255, 0.15);
}

.barcode-btn:hover::before {
  transform: translateX(100%);
}

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

/* Recent Searches Section */
.recent-section {
  margin-bottom: 32px;
}

.recent-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.recent-list {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(11, 11, 11, 0.04);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 6px 20px rgba(11, 11, 11, 0.03);
}

.recent-list p {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 16px;
  font-style: italic;
}

.recent-item {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(11, 11, 11, 0.04);
  cursor: pointer;
  color: var(--text);
  font-size: 15px;
  transition: all 0.18s ease;
  border-radius: 8px;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
}

.recent-item::before {
  content: '🔍';
  margin-right: 10px;
  opacity: 0.5;
}

.recent-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.recent-item:hover {
  background: rgba(77, 163, 255, 0.06);
  color: var(--accent);
  transform: translateX(6px);
  border-bottom-color: transparent;
}

.recent-item:active {
  background: rgba(77, 163, 255, 0.12);
  transform: translateX(3px);
}

/* Stats Section - Enhanced for Home */
.stats-section {
  margin-bottom: 32px;
}

.stats-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.6);
  padding: 16px 12px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(11, 11, 11, 0.04);
  box-shadow: 0 6px 20px rgba(11, 11, 11, 0.03);
  transition: all 0.25s cubic-bezier(0.2, 0.9, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(11, 11, 11, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 6px;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: numberPulse 2s ease-in-out infinite;
}

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

.stat-label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
  font-weight: 500;
}

/* Product Item in Search Results */
.product-item {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.2, 0.9, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(11, 11, 11, 0.04);
  position: relative;
  overflow: hidden;
}

.product-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.product-item:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateX(6px);
  box-shadow: 0 8px 24px rgba(11, 11, 11, 0.08);
}

.product-item:hover::before {
  transform: scaleY(1);
}

.product-item:active {
  transform: translateX(3px) scale(0.98);
}

.product-photo {
  min-width: 70px;
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(245, 245, 250, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(11, 11, 11, 0.04);
}

.product-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-item:hover .product-photo img {
  transform: scale(1.08);
}

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

.product-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.product-info .product-brand {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-info .product-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}

/* Search Results Modal Body - Enhanced */
#searchResultsContent {
  max-height: 60vh;
  overflow-y: auto;
}

#searchResultsContent::-webkit-scrollbar {
  width: 8px;
}

#searchResultsContent::-webkit-scrollbar-track {
  background: rgba(11, 11, 11, 0.03);
  border-radius: 10px;
}

#searchResultsContent::-webkit-scrollbar-thumb {
  background: rgba(77, 163, 255, 0.3);
  border-radius: 10px;
}

#searchResultsContent::-webkit-scrollbar-thumb:hover {
  background: rgba(77, 163, 255, 0.5);
}

#searchResultsContent p {
  text-align: center;
  color: var(--muted);
  padding: 32px 20px;
  font-style: italic;
}

/* Loading State for Stats */
.stat-number.loading::after {
  content: '...';
  animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* =======================
   Dark Mode for Home Page
   ======================= */
@media (prefers-color-scheme: dark) {
  .barcode-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(77, 163, 255, 0.3);
  }

  .barcode-btn:hover {
    background: rgba(77, 163, 255, 0.12);
    border-color: rgba(77, 163, 255, 0.5);
    box-shadow: 0 10px 30px rgba(77, 163, 255, 0.2);
  }

  .recent-list {
    background: rgba(24, 24, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.5);
  }

  .recent-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .recent-item:hover {
    background: rgba(77, 163, 255, 0.12);
  }

  .recent-item:active {
    background: rgba(77, 163, 255, 0.18);
  }

  .stat-card {
    background: rgba(24, 24, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.5);
  }

  .stat-card:hover {
    background: rgba(30, 30, 38, 0.5);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.7);
  }

  .product-item {
    background: rgba(24, 24, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  .product-item:hover {
    background: rgba(30, 30, 38, 0.5);
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.6);
  }

  .product-photo {
    background: rgba(40, 40, 48, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  #searchResultsContent::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
  }

  #searchResultsContent::-webkit-scrollbar-thumb {
    background: rgba(77, 163, 255, 0.4);
  }

  #searchResultsContent::-webkit-scrollbar-thumb:hover {
    background: rgba(77, 163, 255, 0.6);
  }
}

/* =======================
   Responsive for Home Page
   ======================= */
@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 14px 10px;
  }

  .stat-number {
    font-size: 24px;
  }

  .product-photo {
    min-width: 60px;
    width: 60px;
    height: 60px;
  }

  .product-info h4 {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .barcode-btn {
    padding: 14px 16px;
    font-size: 15px;
  }

  .recent-item {
    padding: 10px 12px;
    font-size: 14px;
  }

  .product-item {
    padding: 12px;
    gap: 10px;
  }
}
/* =======================
   E-Numbers Page Styles
   ======================= */

/* E-Numbers Header (если используется) */
.e-numbers-header {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
  color: white;
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Search Section for E-Numbers */
.search-section {
  background: rgba(255, 255, 255, 0.62);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(11, 11, 11, 0.04);
  border: 1px solid rgba(11, 11, 11, 0.04);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.search-form {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.search-input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid rgba(11, 11, 11, 0.08);
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.25s ease;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
}

.search-input:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.5);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.08);
  transform: translateY(-2px);
}

.search-input::placeholder {
  color: var(--muted);
}

/* Category Filters */
.category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-btn {
  padding: 10px 18px;
  border: 2px solid rgba(11, 11, 11, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.2, 0.9, 0.2, 1);
  font-size: 14px;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.category-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-btn:hover {
  border-color: rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.category-btn:hover::before {
  opacity: 1;
}

.category-btn.active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.category-btn.active::before {
  opacity: 0;
}

/* E-Numbers List */
.e-numbers-list {
  background: rgba(255, 255, 255, 0.62);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(11, 11, 11, 0.04);
  border: 1px solid rgba(11, 11, 11, 0.04);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

/* E-Number Item */
.e-number-item {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(11, 11, 11, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.e-number-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
  transform: scaleY(0);
  transition: transform 0.25s ease;
}

.e-number-item:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateX(4px);
}

.e-number-item:hover::before {
  transform: scaleY(1);
}

.e-number-item:last-child {
  border-bottom: none;
}

/* E-Number Header */
.e-number-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.e-number-code {
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.e-number-name {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.4;
}

/* E-Number Status Badge */
.e-number-status {
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.status-vegan {
  background: rgba(40, 167, 69, 0.12);
  color: #155724;
  border: 1px solid rgba(40, 167, 69, 0.2);
}

.status-possibly-vegan {
  background: rgba(255, 193, 7, 0.12);
  color: #856404;
  border: 1px solid rgba(255, 193, 7, 0.2);
}

.status-not-vegan {
  background: rgba(220, 53, 69, 0.12);
  color: #721c24;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.status-unknown {
  background: rgba(108, 117, 125, 0.12);
  color: #495057;
  border: 1px solid rgba(108, 117, 125, 0.2);
}

/* E-Number Description */
.e-number-description {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* E-Number Details (Expandable) */
.e-number-details {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(11, 11, 11, 0.06);
  animation: slideDown 0.3s ease;
}

.e-number-details.expanded {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Details Sections */
.details-section {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(245, 245, 250, 0.5);
  border-radius: 10px;
  border: 1px solid rgba(11, 11, 11, 0.04);
}

.details-section:last-child {
  margin-bottom: 0;
}

.details-label {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.details-content {
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
}

/* Origin Bar (Vegan Probability) */
.origin-bar {
  position: relative;
  width: 100%;
  height: 24px;
  background: rgba(11, 11, 11, 0.06);
  border-radius: 12px;
  overflow: hidden;
  margin: 10px 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.origin-fill {
  height: 100%;
  background: linear-gradient(90deg, 
    #dc3545 0%, 
    #ffc107 40%, 
    #28a745 70%, 
    #20c997 100%
  );
  border-radius: 12px;
  transition: width 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.origin-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.2) 50%, 
    transparent 100%
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.origin-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 800;
  font-size: 12px;
  color: var(--text);
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9),
               0 0 10px rgba(255, 255, 255, 0.5);
  z-index: 1;
}

/* No Results State */
.no-results {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.no-results-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.4;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.no-results h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.no-results p {
  font-size: 14px;
  color: var(--muted);
}

/* =======================
   Dark Mode for E-Numbers
   ======================= */
@media (prefers-color-scheme: dark) {
  .e-numbers-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    box-shadow: 0 12px 36px rgba(102, 126, 234, 0.3);
  }

  .search-section {
    background: rgba(24, 24, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.6);
  }

  .search-input {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
  }

  .search-input:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
  }

  .search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
  }

  .category-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
  }

  .category-btn:hover {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.2);
  }

  .category-btn.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  }

  .e-numbers-list {
    background: rgba(24, 24, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.6);
  }

  .e-number-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .e-number-item:hover {
    background: rgba(30, 30, 38, 0.5);
  }

  .e-number-code {
    background: linear-gradient(135deg, rgba(102, 126, 234, 1), rgba(118, 75, 162, 1));
    background-clip: text;
    -webkit-background-clip: text;
  }

  .status-vegan {
    background: rgba(40, 167, 69, 0.15);
    color: #b8ffda;
    border-color: rgba(40, 167, 69, 0.3);
  }

  .status-possibly-vegan {
    background: rgba(255, 193, 7, 0.15);
    color: #ffd98b;
    border-color: rgba(255, 193, 7, 0.3);
  }

  .status-not-vegan {
    background: rgba(220, 53, 69, 0.15);
    color: #ffb3b8;
    border-color: rgba(220, 53, 69, 0.3);
  }

  .status-unknown {
    background: rgba(108, 117, 125, 0.15);
    color: #a8b0b8;
    border-color: rgba(108, 117, 125, 0.3);
  }

  .details-section {
    background: rgba(30, 30, 38, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  .origin-bar {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
  }

  .origin-text {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8),
                 0 0 10px rgba(0, 0, 0, 0.5);
  }
}

/* =======================
   Responsive for E-Numbers
   ======================= */
@media (max-width: 600px) {
  .search-form {
    flex-direction: column;
  }

  .category-filters {
    justify-content: center;
  }

  .e-number-header {
    align-items: flex-start;
    gap: 8px;
  }

  .e-number-status {
    align-self: flex-start;
  }

  .e-number-code {
    font-size: 16px;
  }

  .origin-bar {
    height: 20px;
  }

  .origin-text {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .search-section {
    padding: 16px;
  }

  .search-input {
    padding: 12px 14px;
    font-size: 15px;
  }

  .category-btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  .e-number-item {
    padding: 14px 16px;
  }

  .details-section {
    padding: 10px;
  }

  .no-results {
    padding: 36px 16px;
  }

  .no-results-icon {
    font-size: 48px;
  }
}
/* =======================
   Places Page Styles
   ======================= */

/* Location Section */
.location-section {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.location-section .action-btn {
  flex: 1;
  min-width: 140px;
}

/* Map Container */
.map-container {
  background: rgba(255, 255, 255, 0.62);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(11, 11, 11, 0.04);
  border: 1px solid rgba(11, 11, 11, 0.04);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  overflow: hidden;
}

#map {
  height: 400px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(11, 11, 11, 0.08);
  border: 1px solid rgba(11, 11, 11, 0.04);
}

/* Map Controls */
.map-controls {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.city-select {
  padding: 10px 16px;
  border: 2px solid rgba(11, 11, 11, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  min-width: 180px;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.city-select:focus {
  outline: none;
  border-color: rgba(77, 163, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 4px rgba(77, 163, 255, 0.08);
}

/* User Marker Icon */
.user-marker {
  background: none;
  border: none;
  font-size: 28px;
  text-align: center;
  line-height: 30px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Places List */
.places-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Place Card */
.place-card {
  background: rgba(255, 255, 255, 0.62);
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.9, 0.2, 1);
  border: 1px solid rgba(11, 11, 11, 0.04);
  box-shadow: 0 6px 20px rgba(11, 11, 11, 0.03);
  display: flex;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.place-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.place-card:hover {
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(11, 11, 11, 0.08);
}

.place-card:hover::before {
  transform: scaleY(1);
}

.place-card:active {
  transform: translateY(-2px);
}

/* Place Info */
.place-info {
  flex: 1;
  min-width: 0;
}

.place-info h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
  line-height: 1.3;
}

.place-type {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(40, 167, 69, 0.12);
  color: #155724;
  border: 1px solid rgba(40, 167, 69, 0.2);
}

.place-description {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Place Rating */
.place-rating {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.place-rating .rating-stars {
  font-size: 16px;
  letter-spacing: 1px;
  color: #ffc107;
}

.place-rating .rating-text {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* Place Distance */
.place-distance {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 8px;
}

/* Place Image */
.place-image {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(245, 245, 250, 0.6);
  border: 1px solid rgba(11, 11, 11, 0.04);
}

.place-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.place-card:hover .place-image img {
  transform: scale(1.08);
}

/* Place Details in Modal */
.place-details {
  padding: 0;
}

.place-details .place-type {
  margin-bottom: 16px;
}

.place-details .place-description {
  display: block;
  -webkit-line-clamp: unset;
  margin-bottom: 16px;
  font-size: 15px;
}

.place-details .place-rating {
  padding: 12px;
  background: rgba(255, 250, 240, 0.4);
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 193, 7, 0.15);
}

/* Place Actions */
.place-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(11, 11, 11, 0.06);
  flex-wrap: wrap;
}

.place-actions .action-btn {
  flex: 1;
  min-width: 140px;
}

/* Reviews Section in Place Details */
.place-details .reviews-section {
  margin-top: 0;
}

.place-details .reviews-section h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.place-details .review-item {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(11, 11, 11, 0.04);
}

.place-details .review-rating {
  font-size: 16px;
  letter-spacing: 1px;
  margin-bottom: 8px;
  color: #ffc107;
}

.place-details .review-comment {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 8px;
}

.place-details .review-date {
  font-size: 12px;
  color: var(--muted);
}

/* No Results for Places */
.no-results {
  text-align: center;
  padding: 48px 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  border: 2px dashed rgba(11, 11, 11, 0.08);
}

.no-results p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 8px;
}

.no-results .hint {
  font-size: 13px;
  color: var(--accent);
  font-style: italic;
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(11, 11, 11, 0.15);
  border: 1px solid rgba(11, 11, 11, 0.06);
}

.leaflet-popup-content {
  margin: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
}

.leaflet-popup-content b {
  color: var(--text);
  font-size: 15px;
  display: block;
  margin-bottom: 6px;
}

.leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Marker Clusters (if used) */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(77, 163, 255, 0.2);
  border-radius: 50%;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: rgba(77, 163, 255, 0.8);
  color: white;
  border-radius: 50%;
  font-weight: 700;
}

/* =======================
   Dark Mode for Places
   ======================= */
@media (prefers-color-scheme: dark) {
  .map-container {
    background: rgba(24, 24, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.6);
  }

  #map {
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.5);
  }

  .city-select {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23aaa' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  }

  .city-select:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(77, 163, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(77, 163, 255, 0.15);
  }

  .place-card {
    background: rgba(24, 24, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.5);
  }

  .place-card:hover {
    background: rgba(30, 30, 38, 0.5);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.7);
  }

  .place-type {
    background: rgba(40, 167, 69, 0.15);
    color: #b8ffda;
    border-color: rgba(40, 167, 69, 0.3);
  }

  .place-image {
    background: rgba(40, 40, 48, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  .place-details .place-rating {
    background: rgba(60, 50, 30, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.12);
  }

  .place-actions {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .place-details .review-item {
    background: rgba(30, 30, 38, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  .no-results {
    background: rgba(24, 24, 30, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.08);
  }

  .leaflet-popup-content-wrapper {
    background: rgba(20, 20, 28, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  }

  .leaflet-popup-content b {
    color: #ffffff;
  }

  .leaflet-popup-tip {
    background: rgba(20, 20, 28, 0.95);
  }

  .marker-cluster-small,
  .marker-cluster-medium,
  .marker-cluster-large {
    background: rgba(77, 163, 255, 0.25);
  }

  .marker-cluster-small div,
  .marker-cluster-medium div,
  .marker-cluster-large div {
    background: rgba(77, 163, 255, 0.85);
  }
}

/* =======================
   Responsive for Places
   ======================= */
@media (max-width: 600px) {
  .location-section {
    flex-direction: column;
  }

  .location-section .action-btn {
    width: 100%;
  }

  .map-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .city-select {
    width: 100%;
    min-width: unset;
  }

  .place-card {
    flex-direction: column;
  }

  .place-image {
    width: 100%;
    height: 180px;
    order: -1;
  }

  .place-actions {
    flex-direction: column;
  }

  .place-actions .action-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .map-container {
    padding: 16px;
  }

  #map {
    height: 300px !important;
  }

  .place-card {
    padding: 14px;
  }

  .place-info h3 {
    font-size: 16px;
  }

  .place-description {
    font-size: 13px;
  }

  .no-results {
    padding: 36px 16px;
  }

  .leaflet-popup-content-wrapper {
    border-radius: 10px;
  }

  .leaflet-popup-content {
    margin: 10px 12px;
    font-size: 13px;
  }
}
/* =======================
   Extra polish: advanced micro-interactions
   - hover ripple
   - focus glow
   - scroll reveal with stagger
   ======================= */

/* ripple pseudo element for larger click affordances */
.ripple { position: relative; overflow: hidden; }
.ripple::after { content: ''; position: absolute; width: 120px; height: 120px; background: rgba(255,255,255,0.12); border-radius: 50%; transform: scale(0); opacity: 0; pointer-events: none; transition: transform 0.6s ease, opacity 0.4s ease; }
.ripple:active::after { transform: scale(2.4); opacity: 1; transition: transform 0s; }

/* focus ring for accessibility */
.btn-focus:focus { box-shadow: 0 0 0 6px rgba(77,163,255,0.08); }

/* scroll reveal helpers (JS-friendly classes) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s cubic-bezier(.2,.9,.2,1), transform 0.7s cubic-bezier(.2,.9,.2,1); }
.reveal.show { opacity: 1; transform: translateY(0); }

/* stagger utilities for lists */
.stagger > * { opacity: 0; transform: translateY(12px); }
.stagger.show > * { animation: staggerIn 0.6s cubic-bezier(.2,.9,.2,1) forwards; }
@keyframes staggerIn { to { opacity:1; transform: translateY(0); } }

/* =======================
   Fallbacks & legacy
   ======================= */
@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none) {
  /* browsers that support blur get the full effect */
}
@supports not ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) {
  /* degrade gracefully */
  .header, .product-card, .action-card { background-color: rgba(255,255,255,0.98); }
}

/* =======================
   Moderation Buttons
   ======================= */
.moderation-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: center;
  padding: 4px 0;
}

.moderation-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.moderation-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.moderation-btn:active {
  transform: scale(0.95);
}

.moderation-btn.not-vegan {
  background: rgba(220, 53, 69, 0.9);
  color: white;
}

.moderation-btn.not-vegan:hover {
  background: rgba(220, 53, 69, 1);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.moderation-btn.vegan-star {
  background: rgba(255, 193, 7, 0.9);
  color: white;
}

.moderation-btn.vegan-star:hover {
  background: rgba(255, 193, 7, 1);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.moderation-btn.vegan-moderator {
  background: rgba(40, 167, 69, 0.9);
  color: white;
}

.moderation-btn.vegan-moderator:hover {
  background: rgba(40, 167, 69, 1);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Dark mode adjustments for moderation buttons */
@media (prefers-color-scheme: dark) {
  .moderation-btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
  
  .moderation-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
  
  .moderation-btn.not-vegan {
    background: rgba(220, 53, 69, 0.8);
  }
  
  .moderation-btn.vegan-star {
    background: rgba(255, 193, 7, 0.8);
  }
  
  .moderation-btn.vegan-moderator {
    background: rgba(40, 167, 69, 0.8);
  }
}

/* =======================
   Editable Fields for Moderators
   ======================= */
[contenteditable="true"] {
  outline: none;
  border: 2px dashed transparent;
  border-radius: 4px;
  padding: 4px 8px;
  margin: 2px 0;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
}

[contenteditable="true"]:hover {
  border-color: rgba(77, 163, 255, 0.3);
  background: rgba(77, 163, 255, 0.05);
}

[contenteditable="true"]:focus {
  border-color: rgba(77, 163, 255, 0.6);
  background: rgba(77, 163, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.1);
}

.moderation-actions {
  display: flex;
  gap: 12px;
  margin: 16px 0;
  padding: 12px;
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.moderation-actions .action-btn {
  flex: 1;
  max-width: 200px;
}

/* Dark mode adjustments for editable fields */
@media (prefers-color-scheme: dark) {
  [contenteditable="true"] {
    background: rgba(255, 255, 255, 0.05);
  }
  
  [contenteditable="true"]:hover {
    background: rgba(77, 163, 255, 0.1);
  }
  
  [contenteditable="true"]:focus {
    background: rgba(77, 163, 255, 0.15);
  }
  
  .moderation-actions {
    background: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.4);
  }
}

/* =======================
   New Image Structure
   ======================= */
.product-images, .composition-images, .letter-images {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0;
}

.image-container {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-container:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.image-container.draggable {
  cursor: grab;
}

.image-container.draggable:active {
  cursor: grabbing;
}

.image-container.dragging {
  opacity: 0.5;
  transform: rotate(5deg);
}

.product-image.thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.delete-image-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(220, 53, 69, 0.9);
  color: white;
  border: none;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.image-container:hover .delete-image-btn {
  opacity: 1;
}

.upload-placeholder {
  width: 80px;
  height: 80px;
  border: 2px dashed rgba(77, 163, 255, 0.5);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(77, 163, 255, 0.05);
}

.upload-placeholder:hover {
  border-color: rgba(77, 163, 255, 0.8);
  background: rgba(77, 163, 255, 0.1);
  transform: scale(1.05);
}

.upload-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.upload-text {
  font-size: 10px;
  color: rgba(77, 163, 255, 0.8);
  text-align: center;
  line-height: 1.2;
}

/* Drag and drop styles */
.drag-over {
  border-color: rgba(40, 167, 69, 0.8);
  background: rgba(40, 167, 69, 0.1);
}

.drag-placeholder {
  width: 80px;
  height: 80px;
  border: 2px dashed rgba(255, 193, 7, 0.5);
  border-radius: 8px;
  background: rgba(255, 193, 7, 0.1);
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .upload-placeholder {
    border-color: rgba(77, 163, 255, 0.3);
    background: rgba(77, 163, 255, 0.05);
  }
  
  .upload-placeholder:hover {
    border-color: rgba(77, 163, 255, 0.6);
    background: rgba(77, 163, 255, 0.1);
  }
  
  .upload-text {
    color: rgba(77, 163, 255, 0.6);
  }
  
  .drag-over {
    border-color: rgba(40, 167, 69, 0.6);
    background: rgba(40, 167, 69, 0.1);
  }
  
  .drag-placeholder {
    border-color: rgba(255, 193, 7, 0.3);
    background: rgba(255, 193, 7, 0.05);
  }
}

/* =======================
   End of file
   ======================= */
