/* 1. Theme Variables (Default Light Mode) */
:root {
  --bg-body: #f9f9f9;
  --bg-sidebar: #1a1a1a;
  --bg-card: #ffffff;
  --border-card: #eeeeee;
  --text-main: #333333;
  --text-muted: #777777;
  --text-desc: #555555;
  --accent-pink: #e91e63;
  --accent-pink-hover: #ff4081;
  --shadow-intensity: rgba(0,0,0,0.05);
  --manifesto-bg: rgba(0,0,0,0.9);
  --manifesto-text: #eee;
}

/* 2. Dark Mode Overrides */
[data-theme="dark"] {
  --bg-body: #121212;
  --bg-sidebar: #000000;
  --bg-card: #1e1e1e;
  --border-card: #2d2d2d;
  --text-main: #f0f0f0;
  --text-muted: #aaaaaa;
  --text-desc: #cccccc;
  --accent-pink: #ff4081;
  --accent-pink-hover: #ff79b0;
  --shadow-intensity: rgba(0,0,0,0.4);
  --manifesto-bg: rgba(0,0,0,0.6);
  --manifesto-text: #f0f0f0;
}

/* 3. Enhanced Fabulous Theme Overrides */
[data-theme="fabulous"] {
  --bg-body: #1a001e; /* Deep Midnight Purple base */
  --bg-sidebar: #3d0043;
  --bg-card: rgba(43, 0, 48, 0.75); /* Velvet purple sheet layer */
  --border-card: #ff007f;
  --text-main: #fff0f5;
  --text-muted: #ff66b2;
  --text-desc: #e0b0ff;
  --accent-pink: #ff007f;
  --accent-pink-hover: #ff66b2;
  --shadow-intensity: rgba(255, 0, 127, 0.3);
  --manifesto-bg: linear-gradient(135deg, rgba(147, 51, 234, 0.4) 0%, rgba(233, 30, 99, 0.4) 100%);
  --manifesto-text: #ffffff;
  backdrop-filter: blur(10px);
}

/* Layout Reset & Defaults */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  display: flex;
  background-color: var(--bg-body);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

/* Background Particle Overlay Canvas Layer */
#fabulousSparkleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* Mouse clicks pass directly through to elements */
  z-index: 99; /* Standard backdrop position */
  display: none;
}
[data-theme="fabulous"] #fabulousSparkleCanvas,
body[data-theme="fabulous"] #fabulousSparkleCanvas {
  display: block;
}

/* Sticky Sidebar Navigation */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background-color: var(--bg-sidebar);
  padding: 20px;
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 50px;
}

/* Base Navigation Gateway Buttons (Blue) */
.nav-btn {
  display: block;
  padding: 12px 20px;
  background-color: #2196F3;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.nav-btn:hover {
  background-color: #0b7dda;
  transform: translateX(8px) scale(1.03); /* Slide out tracking animation */
  box-shadow: -4px 6px 12px rgba(0,0,0,0.3);
}

/* Active Highlight State Tracker Button (Pink) */
.nav-btn.active {
  background-color: var(--accent-pink);
  border-left: 4px solid #fff;
}

.nav-btn.active:hover {
  background-color: var(--accent-pink-hover);
}

/* Animated Shifting Sidebar Buttons under Fabulous Mode */
[data-theme="fabulous"] .nav-btn:hover {
  background: linear-gradient(90deg, #ff007f, #9333ea, #00ffff);
  background-size: 200% auto;
  animation: shiftingGradient 2.5s ease-in-out infinite alternate;
}

/* Theme Dropdown Controller Layout */
.theme-controller {
  border-top: 1px solid #333;
  padding-top: 20px;
  margin-bottom: 20px;
}

.theme-label {
  color: #fff;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: block;
}

.theme-select {
  width: 100%;
  padding: 10px;
  background-color: #333;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  outline: none;
}

/* Main Content Layout Block */
.content {
  margin-left: 260px;
  padding: 40px;
  width: calc(100% - 260px);
  max-width: 1200px;
  position: relative;
  z-index: 101; /* Layer explicitly above drifting sparkles */
}

/* Banner Logo Header Area Box */
.logo-area {
  background: rgba(0,0,0,0.85);
  border: 2px dashed #555;
  padding: 40px;
  margin-bottom: 30px;
  border-radius: 10px;
  text-align: center;
}

.logo-placeholder-text { 
  font-size: 1.4rem; 
  letter-spacing: 2px; 
  color: #aaa; 
  font-weight: bold;
}

/* Shared Horizontal Spectrum Gradient Accent Rule */
.spectrum-bar {
  height: 6px;
  width: 100%;
  margin-bottom: 30px;
  border-radius: 3px;
  background: linear-gradient(to right, #9333ea, #4f46e5, #5bcefa, #f5a9b8, #f5a9b8, #5bcefa, #ffffff, #3b82f6);
}

/* The Manifesto Callout Container Block */
.manifesto {
  background: var(--manifesto-bg);
  padding: 35px;
  border-radius: 12px;
  margin-bottom: 40px;
  border-left: 6px solid #f5a9b8;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: background-color 0.3s, color 0.3s;
}

.manifesto h2 { 
  color: #5bcefa; 
  margin-top: 0; 
  margin-bottom: 12px;
  font-size: 1.6rem;
}

.manifesto p { 
  font-size: 1.15rem; 
  line-height: 1.7; 
  color: var(--manifesto-text); 
  font-style: italic; 
}

h2.section-title {
  margin-bottom: 25px;
  border-bottom: 2px solid var(--border-card);
  padding-bottom: 10px;
  font-size: 1.5rem;
  text-align: left;
}

/* Gateway Route Grid Setup */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

/* Gateway Selection Box Formatting */
.directory-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 25px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 6px var(--shadow-intensity);
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  text-align: left;
}

.directory-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px var(--shadow-intensity);
  border-color: var(--accent-pink);
}

/* Trans-Fixed Middle Accent Highlighting Core Parameter */
.card-trans-highlight {
  border: 2px solid #f5a9b8;
}

/* Pulsing Neon Glow Border Animation for Base Cards under Fabulous Mode */
[data-theme="fabulous"] .directory-card {
  position: relative;
  border: 1px solid rgba(255, 0, 127, 0.4);
  animation: fabulousBorderPulse 4s infinite ease-in-out;
}

/* Next-Level Hover Sparkle and Sassy Kinetic Rotation Tilt */
[data-theme="fabulous"] .directory-card:hover {
  border-color: #00ffff; /* Switch instantly to electric Cyan */
  transform: translateY(-10px) scale(1.04) rotate(1deg); /* Extra lift + sassy tilt */
  box-shadow: 0 0 25px rgba(255, 0, 127, 0.7), 0 0 50px rgba(0, 255, 255, 0.4); /* Dual layered glow */
}

.card-header h3 {
  font-size: 1.3rem;
  color: var(--text-main);
  margin-bottom: 10px;
}

.card-body-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-desc);
  margin-bottom: 20px;
}

/* Metadata Badge Assembly Layer */
.badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border-card);
}

.verification-badge {
  font-size: 0.72rem;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  color: #fff;
}

.badge-ageverif  { background-color: #4CAF50; } 
.badge-selfie    { background-color: #00BCD4; } 
.badge-corporate { background-color: #777777; } 

/* Onboarding Call to Action Form Box Layout */
.cta-section {
  background: #ffffff;
  color: #111111;
  padding: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.cta-section h2 { font-size: 1.5rem; margin-bottom: 10px; }
.cta-section p { font-size: 1rem; color: #555; margin-bottom: 20px; }

.cta-btn {
  display: inline-block;
  background: #e91e63;
  color: #fff;
  padding: 14px 28px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 6px;
  font-size: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: background-color 0.2s, transform 0.2s;
}

.cta-btn:hover {
  background-color: #ff4081;
  transform: scale(1.03);
}

/* CSS Keyframes Core Animation Library Engines */
@keyframes fabulousBorderPulse {
  0%, 100% { box-shadow: 0 4px 6px rgba(255, 0, 127, 0.1); }
  50% { box-shadow: 0 0 20px rgba(255, 0, 127, 0.5); border-color: #9333ea; }
}

@keyframes shiftingGradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Basic Responsive Tweak for Mobile Screen Widths */
@media (max-width: 768px) {
  body { flex-direction: column; }
  .sidebar { position: relative; width: 100%; height: auto; padding: 15px; }
  .nav-menu { margin-top: 10px; flex-direction: row; flex-wrap: wrap; }
  .nav-btn { flex: 1 1 40%; text-align: center; padding: 10px; font-size: 0.9rem; }
  .nav-btn:hover { transform: translateY(-3px); }
  .theme-controller { border-top: none; padding-top: 10px; margin-bottom: 0; width: 100%; }
  .content { margin-left: 0; width: 100%; padding: 20px; }
}
/* ==========================================
   DIRECTORY CARD LAYOUT FIXES (MAIL ORDER & CATEGORY PAGES)
   ========================================== */

/* Fixes card image positioning inside the boxes */
.card-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
}

/* Formats the vendor store logos */
.provider-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 4px;
  background: #f0f0f0;
}

/* Fixes font sizing for retailer titles */
.provider-name {
  font-size: 1.2rem;
  color: var(--text-main);
}

/* Positions the location pin text */
.provider-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: bold;
  margin-bottom: 8px;
}

/* Controls the merchant text copy spacing inside the box */
.provider-desc {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-desc);
  margin-bottom: 15px;
}

/* Explicit color overrides for Mail Order micro badges */{
.badge-print   { background-color: #607D8B; } /* Slate Gray */
.badge-postal  { background-color: #795548; } /* Traditional Brown */
}

/* ==========================================
   UK CONSUMER ADVISORY BANNER LAYOUT
   ========================================== */
.advisory-banner {
  background: #ff0055; 
  color: #ffffff; 
  padding: 15px; 
  text-align: left; 
  font-weight: bold; 
  font-size: 0.9rem;
  border-radius: 6px;
  margin-bottom: 30px;
  line-height: 1.4;
  box-shadow: 0 4px 6px var(--shadow-intensity);
}

.advisory-banner strong {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================
   EDITORIAL SECTION LAYOUT (MAIL ORDER)
   ========================================== */
.editorial-section {
  background: var(--editorial-bg, #ffffff);
  padding: 30px;
  border-radius: 8px;
  border: 1px solid var(--editorial-border, #eeeeee);
  box-shadow: 0 4px 6px var(--shadow-intensity);
  margin-bottom: 40px;
  line-height: 1.6;
  text-align: left;
  transition: background-color 0.3s, border-color 0.3s;
}

.editorial-section h2 {
  color: var(--text-main);
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.editorial-section p {
  margin-bottom: 15px;
  color: var(--text-desc);
  font-size: 1rem;
}

.doorstep-notice {
  background: #fff8e1;
  border-left: 4px solid #ffb300;
  padding: 15px;
  margin-top: 20px;
  border-radius: 0 4px 4px 0;
  font-size: 0.95rem;
  color: #5d4037;
}

/* Dark Mode Editorial Colors */
[data-theme="dark"] {
  --editorial-bg: #1e1e1e;
  --editorial-border: #2d2d2d;
}

/* Fabulous Mode Editorial Colors */
[data-theme="fabulous"] {
  --editorial-bg: rgba(43, 0, 48, 0.85);
  --editorial-border: #ff007f;
}
