/* Shared color scheme and base styles */
:root{
    --bg: #FFFFFF;
    --ink: #001B2E;          /* Primary ink */
    --accent: #0A84FF;       /* Single accent (refined blue) */
    --muted: #667085;        /* Neutral muted */
    --card: #ffffff;
    --border: #E6E8EC;
    --shadow: 0 6px 20px rgba(0,27,46,0.06);
    /* Retain category colors for on-hat/text accents only */
    --blue: #0A84FF;
    --red: #EC4E20;
    --yellow: #FFD545;
    --gold: #DAA520;
    --green: #228B22;
  }
  
  /* Base HTML and body styling */
  html,body{margin:0;padding:0;background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;}
  
  /* Base button styling with variants for consistent styling */
  .btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:12px 16px;
    border-radius:14px;
    border:none;
    outline:none;
    background:var(--ink);
    font-weight:700;
    text-decoration:none;
    color:#fff;
    box-shadow:var(--shadow);
    cursor:pointer;
    transition:transform 0.2s ease;
  }
  
  .btn:hover {
    transform: translateY(-1px);
  }
  
  .btn:focus{
    outline:none;
  }
  
  /* Button variants - use these instead of conflicting overrides */
  .btn--primary { background: var(--ink); color:#fff; }
  
  .btn--ghost {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--border);
  }
  
  .btn--secondary { background: var(--accent); color:#fff; }
  
  .btn--danger { background: var(--red); color:#fff; }

/* ===================================================== */
/* CENTRALIZED HEADER STYLING */
/* ===================================================== */
/* Standard header used across all pages except quiz */
/* Quiz maintains its own larger, centered header styling */
.standard-header {
  position: sticky;
  top: 0;
  z-index: 120; /* Above quiz overlay so header remains visible during quiz */
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.standard-header .wrap {
  max-width: 1050px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Header nav cluster: left brand, center nav, right utilities */
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; opacity: .9; position: relative; }
.site-nav a:hover { opacity: 1; }

/* Small vertical divider between nav items (skip first) */
.site-nav a + a::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 16px;
  background: var(--border);
}

.site-search { display: inline-flex; align-items:center; gap:8px; }
.site-search input {
  padding: 10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  min-width: 200px;
}
/* Standardized search button styling - always uses btn--primary for consistency across all pages */
.site-search button { padding: 10px 12px; border-radius:12px; }

.standard-header .brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.standard-header .brand span { font-size: 22px; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn { background:#fff; border:1px solid var(--border); padding:8px 10px; border-radius:12px; box-shadow:var(--shadow); cursor:pointer; }

/* Remove lego bars for a minimal look */
.lego-row, .personality-divider { display:none !important; }

/* ===================================================== */
/* COMMON LAYOUT COMPONENTS */
/* ===================================================== */

/* Main content wrapper with max-width and centering - used on all pages */
.wrap {
  max-width: 1050px;
  margin: 0 auto;
  padding: 24px;
}

/* Standard card component used across multiple pages */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ===================================================== */
/* LEGO BAR COMPONENTS (Brand Element) */
/* ===================================================== */

/* Container for lego bars - decorative colored bars used throughout site */
.lego-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* Individual lego bar styling */
.lego {
  height: 10px;
  border-radius: 4px;
  flex: 1;
}

/* Lego bar color variants */
.lego.blue {
  background: var(--blue);
}

.lego.red {
  background: var(--red);
}

.lego.yellow {
  background: var(--yellow);
}

.lego.gold {
  background: var(--gold);
}

.lego.green {
  background: var(--green);
}

/* ===================================================== */
/* COMMON BUTTON ENHANCEMENTS */
/* ===================================================== */

/* Disabled button state */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Large button variant for important actions */
.btn.large {
  padding: 16px 32px;
  font-size: 16px;
}

/* ===================================================== */
/* LOADING COMPONENTS */
/* ===================================================== */

/* General loading spinner used across pages */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Large loading spinner for main content areas */
.loading-large {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--blue);
}

/* Loading container for centered loading states */
.loading-container {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

/* Loading message text */
.loading-text {
  margin-top: 16px;
  color: var(--muted);
}

/* Keyframe animation for loading spinners */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ===================================================== */
/* COMMON TEXT STYLES */
/* ===================================================== */

/* Muted text color used across pages */
.text-muted {
  color: var(--muted);
}

/* Center aligned text */
.text-center {
  text-align: center;
}

/* ===================================================== */
/* ERROR AND SUCCESS STATES */
/* ===================================================== */

/* Error state styling */
.error {
  text-align: center;
  padding: 60px 20px;
}

.error h2 {
  color: var(--red);
  margin: 0 0 16px;
}

/* Success icon styling */
.success-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

/* ===================================================== */
/* Personality Results Section */
/* ===================================================== */
.personality-section {
  text-align: center;
  margin: 40px 0 30px 0;
  padding: 0 20px;
}


/* UPDATED: Increased font size from 1.1em to 1.6em for better visibility */
.personality-header {
  font-size: 1.7em;
  margin-bottom: 15px;
  color: var(--ink);
}

/* Colored humor type within personality header */
.humor-type-colored {
  font-weight: bold;
}

.humor-type-colored.blue {
  color: var(--blue);
}

.humor-type-colored.red {
  color: var(--red);
}

.humor-type-colored.yellow {
  color: #B8860B; /* Darker yellow for better readability */
}

/* NEW: Added color styling for jesus category */
.humor-type-colored.gold {
  color: var(--gold);
}

/* NEW: Added color styling for good_vibes category */
.humor-type-colored.green {
  color: var(--green);
}

/* UPDATED: Increased font size from 1.05em to 1.4em for better readability */
.personality-quote {
  font-style: italic;
  font-size: 1.4em;
  line-height: 1.4;
  margin: 15px auto;
  max-width: 600px;
  position: relative;
  /* Color will be set dynamically by personality type classes */
}

/* Personality quote color variants - matches personality type */
.personality-quote.blue {
  color: var(--blue);
}

.personality-quote.red {
  color: var(--red);
}

.personality-quote.yellow {
  color: #B8860B; /* Darker yellow for better readability */
}

/* NEW: Added personality quote styling for jesus category */
.personality-quote.gold {
  color: var(--gold);
}

/* NEW: Added personality quote styling for good_vibes category */
.personality-quote.green {
  color: var(--green);
}

.personality-quote::before,
.personality-quote::after {
  content: '"';
  font-size: 1.3em;
  font-weight: bold;
  /* Color will inherit from parent personality-quote class */
}

/* Personality section blue divider bar - single lego bar at 1/3 width */
.personality-divider {
  display: flex;
  justify-content: center;
  margin: 25px auto;
  width: 33.33%;
}

/* Lego bar styling for personality divider - color determined by personality type */
.personality-divider .lego {
  height: 10px;
  border-radius: 4px;
  flex: 1;
  /* Background color set by .blue, .red, .yellow, .gold, or .green classes */
}

/* NEW: Added lego bar colors for new categories */
.personality-divider .lego.gold {
  background: var(--gold);
}

.personality-divider .lego.green {
  background: var(--green);
}

/* ===================================================== */
/* TAGLINE QUOTES - Add quotes around all taglines */
/* ===================================================== */
/* Automatically add quotes around taglines in product cards */
[x-text="p.tagline"]::before,
[x-text="p.tagline"]::after {
  content: '"';
  color: var(--muted);
}

/* Automatically add quotes around taglines on product detail pages */
.product-tagline::before,
.product-tagline::after {
  content: '"';
  color: var(--muted);
}

/* Automatically add quotes around taglines in quiz hat options */
.hat-option-tagline::before,
.hat-option-tagline::after {
  content: '"';
  color: var(--muted);
}

/* ===================================================== */
/* CSS For quiz specifically - Hat rating/selection UI */
/* ===================================================== */
.hat-rating-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  max-width: 1000px;
  margin: 0 auto;
  align-items: flex-start; /* Changed from center to flex-start for top alignment */
  min-height: 400px;
}

.hat-showcase-left {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 40px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  max-width: 500px;
  justify-self: end;
}

.hat-image-large {
  width: 100%;
  height: 250px;
  margin: 0 auto 25px auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hat-image-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hat-info {
  text-align: center;
}

.hat-name-large {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--ink);
  text-shadow: none;
  background: var(--yellow);
  border: none;
  border-radius: 20px;
  padding: 15px 25px;
  display: inline-block;
  box-shadow: var(--shadow);
}

.hat-tagline-large {
  font-size: 18px;
  color: var(--muted);
  font-style: italic;
}

.rating-buttons-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  justify-self: start;
  align-self: flex-start; /* Added to align with top of hat image */
}

.rating-btn {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 25px 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.rating-btn:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  background: var(--yellow);
  box-shadow: 0 8px 25px rgba(0, 27, 46, 0.15);
}

.rating-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  z-index: 1;
}

.rating-btn:hover .rating-text {
  font-weight: 700;
}

/* Responsive layout */
@media (max-width: 900px) {
  .hat-rating-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hat-showcase-left {
    justify-self: center;
    max-width: 400px;
  }
  
  .rating-buttons-right {
    max-width: 400px;
    justify-self: center;
  }
}

@media (max-width: 600px) {
  .rating-buttons-right {
    gap: 15px;
  }
  
  .rating-btn {
    padding: 20px 25px;
  }
  
  .rating-text {
    font-size: 18px;
  }
}

/* ===================================================== */
/* FOOTER */
/* ===================================================== */
footer{margin-top:60px}

.site-footer{padding:48px 24px;background:var(--ink);color:#fff;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);padding-left:calc(50vw - 50% + 24px);padding-right:calc(50vw - 50% + 24px)}

.site-footer .grid{display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));gap:24px 28px;max-width:1050px;margin:0 auto}

.site-footer h4{margin:0 0 12px;font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:rgba(255,255,255,0.6)}
.site-footer p{margin:0;color:rgba(255,255,255,0.75);line-height:1.5}

.footer-brand{display:flex;align-items:center;gap:10px;font-weight:800}
/* Increase footer brand logo size by 50% */
.footer-brand img{height:60px}
.footer-note{margin-top:8px;color:rgba(255,255,255,0.7);font-size:14px}

.site-footer a{color:#fff;text-decoration:none;opacity:.85}
.site-footer a:hover{opacity:1}

.footer-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:28px;padding-top:16px;border-top:1px solid rgba(255,255,255,0.12);color:rgba(255,255,255,0.65);max-width:1050px;margin-left:auto;margin-right:auto}

.footer-links{display:flex;gap:14px;flex-wrap:wrap}
.footer-inline{display:flex;gap:12px;align-items:center}
.social-links{display:flex;gap:10px}
.social-links a{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid rgba(255,255,255,0.18);border-radius:10px}