/* ═══════════════════════════════════════════════════════════════════════════
   AuraCompare — Pink/Rose Design System (v3.0)
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Poppins:wght@300;400;500;600&display=swap');

:root {
  --primary: #ff6b9d;      --primary-hover: #e55a8a;
  --secondary: #c44569;    --secondary-hover: #a33a57;
  --accent: #f8b500;       --success: #10b981; --danger: #ef4444; --warning: #f59e0b;
  --bg-primary: #fff5f7;   --bg-secondary: #ffffff;
  --text-primary: #2d3436; --text-secondary: #636e72;
  --glass-bg: rgba(255,255,255,0.25);
  --glass-border: rgba(255,255,255,0.18);
  --shadow: rgba(196,69,105,0.15);
  --gradient-1: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
  --gradient-2: linear-gradient(135deg, #f8b500 0%, #fceabb 100%);
  --radius: 12px;  --radius-sm: 8px; --radius-lg: 20px; --radius-xl: 24px;
  --transition: 0.3s ease;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Poppins', sans-serif;
}

body { font-family: var(--font-body); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }

[data-theme="dark"] {
  --bg-primary: #1a1a2e;   --bg-secondary: #16213e;
  --text-primary: #eaeaea; --text-secondary: #a0a0a0;
  --glass-bg: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.1);
  --shadow: rgba(0,0,0,0.3);
}

/* ─── Glass Card Base ───────────────────────────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px var(--shadow);
}

/* ─── Dropdown Animations ──────────────────────────────────────────────── */
.dropdown {
  animation: dropdownFadeIn 0.15s ease;
  border-radius: var(--radius) !important;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Buy Links ─────────────────────────────────────────────────────────── */
.buy-link {
  display: inline-block;
  background: var(--gradient-1);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
  box-shadow: 0 4px 12px var(--shadow);
}
.buy-link:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--shadow); color: #fff; }

/* ─── Pill Badges ───────────────────────────────────────────────────────── */
.tag { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.tag-sephora { background: #fce4ec; color: #c44569; }
.tag-amazon  { background: #fff8e1; color: #f8b500; }
.tag-shopify { background: #e3f2fd; color: #1976d2; }

/* ─── Comparison Table ──────────────────────────────────────────────────── */
.table-wrap {
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 8px 32px var(--shadow) !important;
  background: var(--glass-bg) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border) !important;
  overflow: hidden;
}
.table-wrap table tbody tr:hover td { background: rgba(255, 107, 157, 0.05); }
.table-wrap table tbody tr:hover td:first-child { background: rgba(255, 107, 157, 0.08); }

/* ─── Loading Spinner ───────────────────────────────────────────────────── */
.spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid #fce4ec; border-top-color: #ff6b9d; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Compare Toolbar ────────────────────────────────────────────────── */
.compare-sort select { border-radius: var(--radius) !important; border-color: var(--glass-border) !important; }
.compare-sort select:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.15) !important; }
.btn-clear { border-radius: var(--radius) !important; }
.btn-clear:hover { background: #fee2e2 !important; }

/* ─── Ingredient Analysis ────────────────────────────────────────────── */
.ing-common { display: inline-block; background: #fce4ec; color: #c44569; padding: 2px 8px; border-radius: 6px; font-size: 0.8rem; margin: 1px 0; }
.ing-unique { display: inline-block; background: #fff8e1; color: #f8b500; padding: 2px 8px; border-radius: 6px; font-size: 0.8rem; margin: 1px 0; }
.ing-analysis-summary { background: var(--glass-bg); backdrop-filter: blur(20px); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 16px 20px; margin-top: 12px; font-size: 0.85rem; line-height: 1.8; }
[data-theme="dark"] .ing-common { background: #4a1a2e; color: #ff8fa3; }
[data-theme="dark"] .ing-unique { background: #3a2e00; color: #f8b500; }

/* ─── Share Button & Toast ────────────────────────────────────────────── */
.btn-share { display: inline-flex; align-items: center; gap: 6px; padding: 10px 24px; border: 2px solid var(--primary); border-radius: var(--radius); background: var(--glass-bg); backdrop-filter: blur(20px); color: var(--primary); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.btn-share:hover { background: var(--gradient-1); color: white; border-color: transparent; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--gradient-1); color: #fff; padding: 12px 24px; border-radius: var(--radius); font-size: 0.9rem; font-weight: 500; box-shadow: 0 8px 24px var(--shadow); opacity: 0; transition: all 0.3s ease; z-index: 9999; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── Product Detail Page ──────────────────────────────────────────────── */
.breadcrumb a { color: var(--primary) !important; }
.product-image-placeholder { background: var(--gradient-1) !important; border-radius: var(--radius-xl) !important; box-shadow: 0 16px 48px var(--shadow) !important; color: rgba(255,255,255,0.4) !important; }
.product-brand { color: var(--secondary) !important; }
.price-cad { color: var(--primary) !important; }
.ingredient-list li { background: var(--glass-bg) !important; backdrop-filter: blur(10px); border: 1px solid var(--glass-border); border-radius: 14px !important; }
.skin-badge { background: #fce4ec !important; color: #c44569 !important; }
.btn-primary { background: var(--gradient-1) !important; color: white !important; border: none !important; border-radius: var(--radius) !important; box-shadow: 0 4px 12px var(--shadow) !important; transition: all var(--transition) !important; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--shadow); }
.btn-wishlist { background: var(--glass-bg) !important; backdrop-filter: blur(10px); border: 1px solid var(--glass-border) !important; color: var(--primary) !important; border-radius: var(--radius) !important; }
.btn-wishlist:hover { background: #fce4ec !important; border-color: var(--primary) !important; }
.btn-wishlist.wishlist-active { background: #fce4ec !important; border-color: var(--primary) !important; color: var(--secondary) !important; }
.btn-affiliate { background: #f0fdf4; color: #166534; border: 2px solid #86efac; border-radius: var(--radius) !important; }
.btn-affiliate:hover { background: #dcfce7; }
.product-error .btn { display: inline-block; padding: 12px 24px; }

/* ─── Wishlist Page ───────────────────────────────────────────────────── */
.wishlist-card { background: var(--glass-bg) !important; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--glass-border) !important; border-radius: var(--radius-lg) !important; box-shadow: 0 8px 32px var(--shadow) !important; }
.wishlist-card:hover { transform: translateY(-6px) !important; box-shadow: 0 16px 48px var(--shadow) !important; }
.wishlist-card-image { background: var(--gradient-1) !important; }
.wishlist-card-body .card-brand { color: var(--secondary) !important; }
.wishlist-card-body .card-price { color: var(--primary) !important; }
.btn-remove { background: #fce4ec !important; color: #e55a8a !important; }
.btn-remove:hover { background: #f8bbd0 !important; }
.btn-danger { background: var(--gradient-1) !important; color: white !important; border-radius: var(--radius) !important; }
.btn-danger:hover { background: var(--secondary-hover) !important; }
.wishlist-empty-icon { color: var(--primary) !important; opacity: 0.5; }
.btn-outline { background: var(--glass-bg) !important; backdrop-filter: blur(10px); border: 1px solid var(--glass-border) !important; color: var(--text-primary) !important; border-radius: var(--radius) !important; }
.btn-outline:hover { border-color: var(--primary) !important; color: var(--primary) !important; }

/* ─── Category Grid ────────────────────────────────────────────────── */
.category-card { background: var(--glass-bg) !important; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--glass-border) !important; border-radius: var(--radius-lg) !important; box-shadow: 0 8px 32px var(--shadow) !important; }
.category-card:hover { transform: translateY(-6px) !important; box-shadow: 0 16px 48px var(--shadow) !important; }
.card-image { background: var(--gradient-1) !important; }
.card-img-placeholder { background: rgba(255,255,255,0.3) !important; color: white !important; font-family: var(--font-heading); }
.card-brand { color: var(--secondary) !important; }
.card-price { color: var(--primary) !important; }
.star-full { color: var(--accent) !important; }
.star-half { color: var(--accent) !important; }
.star-empty { color: #fce4ec !important; }

/* ─── Dark Mode Overrides ──────────────────────────────────────────────── */
[data-theme="dark"] .product-image-placeholder { background: linear-gradient(135deg, #4a1a2e, #2a1a3e) !important; }
[data-theme="dark"] .star-empty { color: #3a2a3a !important; }
[data-theme="dark"] .ingredient-list li { background: rgba(255,255,255,0.05) !important; border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .skin-badge { background: #3a1a2e !important; color: #ff8fa3 !important; }
[data-theme="dark"] .btn-wishlist { background: rgba(255,255,255,0.05) !important; border-color: rgba(255,255,255,0.1) !important; }
[data-theme="dark"] .btn-wishlist.wishlist-active { background: #4a1a2e !important; border-color: #ff6b9d !important; }
[data-theme="dark"] .btn-affiliate { background: #052e16; border-color: #166534; color: #86efac; }
[data-theme="dark"] .btn-affiliate:hover { background: #0a3d1a; }
[data-theme="dark"] .btn-remove { background: #4a1a2e !important; color: #ff8fa3 !important; }
[data-theme="dark"] .btn-remove:hover { background: #6a2a3e !important; }
[data-theme="dark"] .wishlist-card-image { background: linear-gradient(135deg, #4a1a2e, #2a1a3e) !important; }
[data-theme="dark"] .category-card .card-image { background: linear-gradient(135deg, #4a1a2e, #2a1a3e) !important; }

/* ─── Theme Toggle ──────────────────────────────────────────────────────── */
.theme-toggle {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition);
}
.theme-toggle:hover { transform: scale(1.1); box-shadow: 0 4px 12px var(--shadow); }

/* ─── Cookie Consent Banner (Pink Theme) ────────────────────────────── */
#consent-banner p { font-size: .85rem; line-height: 1.5; }
@media(max-width:768px){ #consent-banner { flex-direction: column; text-align: center; padding: 12px 16px; } }

/* ─── Age Verification Modal ────────────────────────────────────────── */
#age-modal div[style*="position:fixed"] { padding: 16px; }
#age-modal div[style*="background:#1e293b"] { padding: 24px !important; margin: 16px; }
@media(max-width:480px){ #age-modal div[style*="background:#1e293b"] { padding: 20px 16px !important; } #age-modal button { width: 100%; } }

/* ─── Print Styles ──────────────────────────────────────────────────────── */
@media print {
  header, nav, .skip-link, .search-section, .chips, .btn-compare, .disclosure, .compare-toolbar, #share-section, .toast,
  .bg-animation, #consent-banner, #age-modal, .buy-link { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .table-wrap { box-shadow: none !important; border: 1px solid #ccc !important; background: #fff !important; backdrop-filter: none !important; }
  th { background: #f0f0f0 !important; color: #000 !important; }
  td:first-child { background: #f9f9f9 !important; }
}

/* ─── Focus Visible ─────────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

/* ─── Responsive Table ────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .table-wrap { margin: 16px -16px; border-radius: 0 !important; }
  .buy-link { padding: 6px 12px; font-size: 0.8rem; }
}

/* ─── Scrollbar Styling ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary); }

/* ─── Selection ─────────────────────────────────────────────────────────── */
::selection { background: var(--primary); color: white; }

/* ═══════════════════════════════════════════════════════════════════════════
   Forum — Community Discussion Styles (v1.0)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Category Cards ──────────────────────────────────────────────────── */
.forum-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.forum-category-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 8px 32px var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.forum-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px var(--shadow);
}
.forum-category-icon { font-size: 2.5rem; line-height: 1; }
.forum-category-name { font-size: 1.2rem; font-weight: 600; margin-bottom: 4px; font-family: var(--font-heading); }
.forum-category-desc { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 8px; line-height: 1.4; }
.forum-category-stats { display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-secondary); }
.forum-category-stats span { display: flex; align-items: center; gap: 4px; }

/* ─── Topic List ──────────────────────────────────────────────────────── */
.forum-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px var(--shadow);
}
.forum-sort-btn {
  padding: 6px 16px;
  border: 2px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.forum-sort-btn:hover { border-color: var(--primary); color: var(--primary); }
.forum-sort-btn.active { background: var(--gradient-1); color: white; border-color: transparent; }

.topic-list { display: flex; flex-direction: column; gap: 8px; }
.topic-row {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: all var(--transition);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}
.topic-row:hover { background: var(--bg-secondary); transform: translateX(4px); }
.topic-row.pinned { border-left: 3px solid var(--accent); }
.topic-row.locked { opacity: 0.7; }
.topic-title { font-weight: 600; font-size: 1rem; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topic-meta { font-size: 0.8rem; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 12px; }
.topic-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.topic-tag { font-size: 0.7rem; padding: 1px 8px; border-radius: 8px; background: rgba(255,107,157,0.1); color: var(--primary); }
.topic-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.topic-stats .stat { display: flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--text-secondary); }
.topic-stats .stat i { width: 14px; text-align: center; }

/* ─── Post Thread ──────────────────────────────────────────────────────── */
.forum-post {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
}
.forum-post-avatar { text-align: center; }
.forum-post-avatar .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gradient-1);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 1.1rem; margin: 0 auto 4px;
}
.forum-post-content { font-size: 0.95rem; line-height: 1.7; word-wrap: break-word; }
.forum-post-content p { margin-bottom: 8px; }
.forum-post-content ul, .forum-post-content ol { margin: 8px 0; padding-left: 24px; }
.forum-post-content blockquote { border-left: 3px solid var(--primary); padding-left: 12px; margin: 8px 0; color: var(--text-secondary); }
.forum-post-content code { background: rgba(255,107,157,0.1); padding: 2px 6px; border-radius: 4px; font-size: 0.85rem; }
.forum-post-footer { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--glass-border); }
.forum-post-footer button {
  background: none; border: none; cursor: pointer;
  font-size: 0.85rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.forum-post-footer button:hover { background: rgba(255,107,157,0.1); color: var(--primary); }
.forum-post-footer button.liked { color: var(--danger); }

/* ─── Editor ───────────────────────────────────────────────────────────── */
.forum-editor-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.forum-editor-toolbar button {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.forum-editor-toolbar button:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ─── Notification ─────────────────────────────────────────────────────── */
.forum-notif-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.forum-notif-dropdown {
  position: absolute;
  top: 100%; right: 0;
  width: 360px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px var(--shadow);
  display: none;
  z-index: 100;
}
.forum-notif-dropdown.show { display: block; }
.forum-notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--glass-border);
  cursor: pointer;
  transition: background 0.2s;
}
.forum-notif-item:last-child { border-bottom: none; }
.forum-notif-item:hover { background: rgba(255,107,157,0.05); }
.forum-notif-item.unread { background: rgba(255,107,157,0.08); }

/* ─── Pagination ───────────────────────────────────────────────────────── */
.forum-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.forum-page-btn {
  padding: 8px 14px;
  border: 2px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.forum-page-btn:hover { border-color: var(--primary); color: var(--primary); }
.forum-page-btn.active { background: var(--gradient-1); color: white; border-color: transparent; }
.forum-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .forum-post { grid-template-columns: 1fr; }
  .forum-post-avatar { display: flex; gap: 8px; align-items: center; }
  .forum-post-avatar .avatar { margin: 0; }
  .topic-row { grid-template-columns: 1fr; }
  .topic-stats { flex-direction: row; justify-content: flex-start; }
  .forum-toolbar { flex-direction: column; align-items: stretch; }
  .forum-toolbar .btn { width: 100%; text-align: center; }
}
