/* ============================================
   THE GIFT EDIT — Bloomingdale's Style System
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  /* Color System */
  --black: #0a0a0a;
  --white: #ffffff;
  --off-white: #f8f6f3;
  --cream: #f0ebe3;
  --warm-gray-100: #f5f3f0;
  --warm-gray-200: #e8e4de;
  --warm-gray-300: #d4cec6;
  --warm-gray-400: #b8b0a5;
  --warm-gray-500: #8a8278;
  --warm-gray-600: #5c564e;
  --warm-gray-700: #3d3832;
  --dark: #1a1815;
  --dark-2: #222018;
  --dark-3: #2d2a24;
  --gold: #c9a96e;
  --gold-light: #e8d5b0;
  --gold-dark: #9b7a42;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, sans-serif;

  /* Spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.16), 0 8px 24px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--off-white);
  color: var(--dark);
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.serif { font-family: var(--font-serif); }
.uppercase { text-transform: uppercase; letter-spacing: 0.15em; }
.gold { color: var(--gold); }

/* ============================================
   NAVIGATION
   ============================================ */
#site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--warm-gray-200);
  padding: 0 var(--sp-8);
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  transition: box-shadow var(--dur-base) var(--ease);
}
#site-nav.scrolled { box-shadow: var(--shadow-sm); }

.nav-logo {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--black);
  cursor: pointer;
  transition: color var(--dur-fast);
}
.nav-logo:hover { color: var(--gold-dark); }
.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex; gap: var(--sp-6); align-items: center;
  list-style: none;
}
.nav-links li a, .nav-links li button {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm-gray-600);
  text-decoration: none;
  background: none; border: none;
  cursor: pointer;
  padding: var(--sp-2) 0;
  position: relative;
  transition: color var(--dur-fast);
}
.nav-links li button::after, .nav-links li a::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px; background: var(--dark);
  transform: scaleX(0); transition: transform var(--dur-base) var(--ease);
}
.nav-links li button:hover, .nav-links li a:hover { color: var(--dark); }
.nav-links li button:hover::after, .nav-links li a:hover::after { transform: scaleX(1); }

.nav-actions { display: flex; gap: var(--sp-4); align-items: center; }
.nav-icon-btn {
  background: none; border: none; cursor: pointer;
  color: var(--warm-gray-700);
  padding: var(--sp-2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), color var(--dur-fast);
  position: relative;
}
.nav-icon-btn:hover { background: var(--warm-gray-100); color: var(--dark); }
.nav-icon-btn .badge {
  position: absolute; top: 2px; right: 2px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); border: 1.5px solid var(--white);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 12px 24px;
  border: none; cursor: pointer;
  transition: all var(--dur-base) var(--ease);
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: var(--black); color: var(--white);
}
.btn-primary:hover { background: var(--dark-3); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: transparent; color: var(--black);
  border: 1px solid var(--warm-gray-300);
}
.btn-secondary:hover { border-color: var(--black); background: var(--black); color: var(--white); }
.btn-gold {
  background: var(--gold); color: var(--white);
}
.btn-gold:hover { background: var(--gold-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent; color: var(--warm-gray-600);
  border: 1px solid var(--warm-gray-300);
}
.btn-ghost:hover { color: var(--dark); border-color: var(--warm-gray-500); }
.btn-ai {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-3) 100%);
  color: var(--white);
  border: 1px solid var(--warm-gray-600);
  position: relative; overflow: hidden;
}
.btn-ai::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(201, 169, 110, 0.2) 100%);
  opacity: 0; transition: opacity var(--dur-base);
}
.btn-ai:hover { transform: translateY(-1px); }
.btn-ai:hover::before { opacity: 1; }

/* ============================================
   PAGE VIEWS — Base
   ============================================ */
.view {
  display: none;
  min-height: 100vh;
  padding-top: 56px;
}
.view.active { display: block; }

/* ============================================
   VIEW 1: ENTRY POINT / HOME (Bloomingdale's style — see blm-* classes below)
   ============================================ */

/* Hero Banner */
.home-hero {
  position: relative;
  width: 100%; height: 320px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.home-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--dark) 0%, #2c2518 50%, var(--dark-3) 100%);
}
.home-hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.15; mix-blend-mode: luminosity;
}
.home-hero-content {
  position: relative; z-index: 1;
  text-align: center; color: var(--white);
}
.home-hero-eyebrow {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: var(--sp-3);
}
.home-hero-title {
  font-family: var(--font-serif);
  font-size: 64px; font-weight: 400;
  letter-spacing: -0.01em; line-height: 1;
  margin-bottom: var(--sp-5);
}
.home-hero-title em { color: var(--gold-light); font-style: italic; }
.home-hero-sub {
  font-size: 13px; font-weight: 300;
  color: var(--warm-gray-300);
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-8);
}
.home-hero-actions { display: flex; gap: var(--sp-4); justify-content: center; }

/* Category Grid */
.gift-categories-section {
  padding: var(--sp-16) var(--sp-8) var(--sp-12);
}
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: var(--sp-8);
}
.section-title {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--warm-gray-500);
}
.section-link {
  font-size: 11px; font-weight: 400; letter-spacing: 0.08em;
  color: var(--warm-gray-500); text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color var(--dur-fast);
}
.section-link:hover { color: var(--dark); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-4);
}
.category-card {
  position: relative; cursor: pointer;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--cream);
  transition: transform var(--dur-slow) var(--ease);
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.category-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.category-card:hover img { transform: scale(1.04); }
.category-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.65) 0%, transparent 60%);
}
.category-card-label {
  position: absolute; bottom: var(--sp-5); left: var(--sp-5);
  color: var(--white);
}
.category-card-label span {
  display: block; font-size: 9px;
  font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 2px;
}
.category-card-label strong {
  display: block; font-family: var(--font-serif);
  font-size: 20px; font-weight: 500; letter-spacing: 0.01em;
}

/* AI Stylist Banner */
.ai-banner {
  margin: 0 var(--sp-8) var(--sp-16);
  background: var(--dark);
  display: flex; align-items: stretch;
  min-height: 220px;
  overflow: hidden;
  position: relative;
}
.ai-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(201,169,110,0.08) 0%, transparent 60%);
}
.ai-banner-content {
  padding: var(--sp-12) var(--sp-12);
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  position: relative; z-index: 1;
}
.ai-banner-eyebrow {
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: var(--sp-4);
  display: flex; align-items: center; gap: var(--sp-3);
}
.ai-banner-eyebrow::before {
  content: ''; display: block;
  width: 20px; height: 1px;
  background: var(--gold);
}
.ai-banner-title {
  font-family: var(--font-serif);
  font-size: 42px; font-weight: 400;
  color: var(--white); line-height: 1.1;
  margin-bottom: var(--sp-5);
}
.ai-banner-title em { font-style: italic; color: var(--gold-light); }
.ai-banner-desc {
  font-size: 13px; font-weight: 300;
  color: var(--warm-gray-400);
  max-width: 420px; line-height: 1.7;
  margin-bottom: var(--sp-8);
}
.ai-banner-image {
  width: 380px; flex-shrink: 0;
  position: relative; overflow: hidden;
}
.ai-banner-image img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: top;
}

/* Sparkle Banner */
.sparkle-banner {
  margin: 0 var(--sp-8) var(--sp-8);
  padding: var(--sp-10) var(--sp-12);
  background: var(--cream);
  display: flex; align-items: center; justify-content: space-between;
}
.sparkle-banner-text {
  font-family: var(--font-serif);
  font-size: 40px; font-weight: 400;
  font-style: italic; letter-spacing: 0.01em;
  color: var(--dark);
}
.sparkle-banner-img {
  width: 160px; height: 160px; object-fit: cover;
}
.sparkle-banner-cta { text-align: right; }
.sparkle-banner-cta p {
  font-size: 12px; color: var(--warm-gray-500);
  margin-bottom: var(--sp-4);
}

/* ============================================
   CURATOR SIDEBAR (Profile Builder)
   ============================================ */
#curator-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(10,10,10,0.5);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease);
}
#curator-overlay.open { opacity: 1; pointer-events: all; }

#curator-sidebar {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 420px; z-index: 2001;
  background: var(--dark);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  overflow: hidden;
}
#curator-sidebar.open { transform: translateX(0); }

.curator-header {
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.curator-logo {
  font-family: var(--font-serif);
  font-size: 16px; font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--white);
}
.curator-logo-tag {
  font-size: 9px; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-top: 2px;
}
.curator-close {
  background: none; border: none;
  color: var(--warm-gray-400); cursor: pointer;
  padding: var(--sp-2);
  transition: color var(--dur-fast);
}
.curator-close:hover { color: var(--white); }

/* Stepper */
.curator-stepper {
  display: flex; gap: 0;
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.curator-step {
  flex: 1; display: flex; flex-direction: column;
  gap: 4px; position: relative;
  padding-bottom: var(--sp-3);
}
.curator-step::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: rgba(255,255,255,0.1);
}
.curator-step.active::after { background: var(--gold); }
.curator-step.done::after { background: rgba(201,169,110,0.4); }
.step-num {
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.1em; color: var(--warm-gray-500); text-transform: uppercase;
}
.curator-step.active .step-num, .curator-step.done .step-num { color: var(--gold); }
.step-label {
  font-size: 9px; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--warm-gray-600);
}
.curator-step.active .step-label { color: var(--white); }

/* Curator Body */
.curator-body {
  flex: 1; overflow-y: auto; padding: var(--sp-6);
  scrollbar-width: thin; scrollbar-color: var(--dark-3) transparent;
}
.curator-body::-webkit-scrollbar { width: 4px; }
.curator-body::-webkit-scrollbar-track { background: transparent; }
.curator-body::-webkit-scrollbar-thumb { background: var(--dark-3); border-radius: 4px; }

.curator-intro-text {
  font-size: 11px; font-weight: 300; line-height: 1.7;
  color: var(--warm-gray-400); margin-bottom: var(--sp-6);
}
.curator-section { margin-bottom: var(--sp-6); }
.curator-section-label {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--warm-gray-500); margin-bottom: var(--sp-3);
}
.tag-grid {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
}
.tag {
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--warm-gray-400);
  cursor: pointer; background: none;
  transition: all var(--dur-base) var(--ease);
  white-space: nowrap;
}
.tag:hover { border-color: var(--gold); color: var(--gold); }
.tag.selected { background: var(--gold); color: var(--dark); border-color: var(--gold); }

/* Budget slider */
.budget-slider-group { margin-bottom: var(--sp-3); }
.budget-display {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--warm-gray-400);
  margin-bottom: var(--sp-3);
}
.budget-display strong { color: var(--gold); font-size: 14px; }
.budget-slider {
  width: 100%; height: 2px;
  -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,0.1);
  outline: none; border-radius: 2px;
}
.budget-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold); cursor: pointer;
  box-shadow: 0 0 0 3px rgba(201,169,110,0.25);
}

/* Recipient age text input */
.curator-input {
  width: 100%; padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--white); font-size: 13px;
  outline: none;
  transition: border-color var(--dur-fast);
  font-family: var(--font-sans);
}
.curator-input::placeholder { color: var(--warm-gray-600); }
.curator-input:focus { border-color: var(--gold); }

.curator-footer {
  padding: var(--sp-5) var(--sp-6);
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

/* Photo Upload Area */
.photo-upload-area {
  border: 1px dashed rgba(255,255,255,0.2);
  padding: var(--sp-6); text-align: center;
  cursor: pointer; transition: border-color var(--dur-base);
  margin-bottom: var(--sp-4);
  position: relative;
}
.photo-upload-area:hover { border-color: var(--gold); }
.photo-upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.photo-upload-icon { color: var(--warm-gray-500); margin-bottom: var(--sp-3); }
.photo-upload-text { font-size: 11px; color: var(--warm-gray-500); }
.photo-upload-text strong { color: var(--warm-gray-300); display: block; margin-bottom: 4px; }
.photo-preview {
  display: none; width: 100%; aspect-ratio: 4/3;
  object-fit: cover; margin-bottom: var(--sp-4);
}
.photo-preview.visible { display: block; }

/* ============================================
   VIEW 2: AI WORKSPACE
   ============================================ */
#view-workspace {
  background: var(--off-white);
}

.workspace-layout {
  display: grid;
  grid-template-columns: 320px 1fr 320px;
  height: calc(100vh - 56px);
  overflow: hidden;
}

/* Left: Chat Panel */
.chat-panel {
  background: var(--dark);
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.05);
  overflow: hidden;
}
.chat-panel-header {
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.chat-panel-header h2 {
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 500;
  color: var(--white); margin-bottom: 3px;
}
.chat-panel-header p {
  font-size: 10px; color: var(--warm-gray-500);
  letter-spacing: 0.06em;
}
.chat-messages {
  flex: 1; overflow-y: auto;
  padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-4);
  scrollbar-width: thin; scrollbar-color: var(--dark-3) transparent;
}
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--dark-3); border-radius: 3px; }

.chat-msg {
  display: flex; gap: var(--sp-3); align-items: flex-start;
}
.chat-msg.user { flex-direction: row-reverse; }
.chat-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.chat-avatar.ai { background: var(--gold); color: var(--dark); }
.chat-avatar.user { background: var(--warm-gray-700); color: var(--white); }
.chat-bubble {
  max-width: 85%;
  padding: var(--sp-3) var(--sp-4);
  font-size: 12px; line-height: 1.6;
}
.chat-bubble.ai {
  background: rgba(255,255,255,0.07);
  color: var(--warm-gray-300);
  border: 1px solid rgba(255,255,255,0.06);
}
.chat-bubble.user {
  background: var(--gold);
  color: var(--dark);
}

.chat-typing {
  display: flex; align-items: center; gap: var(--sp-3);
}
.typing-dots { display: flex; gap: 4px; }
.typing-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--warm-gray-500);
  animation: typingPulse 1.4s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

.chat-input-area {
  padding: var(--sp-4);
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.chat-input-row {
  display: flex; gap: var(--sp-2); align-items: flex-end;
}
.chat-textarea {
  flex: 1; padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--white); font-size: 12px;
  resize: none; outline: none; min-height: 40px;
  max-height: 120px; font-family: var(--font-sans);
  line-height: 1.5;
  transition: border-color var(--dur-fast);
}
.chat-textarea::placeholder { color: var(--warm-gray-600); }
.chat-textarea:focus { border-color: var(--gold); }
.chat-send-btn {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--gold); border: none;
  color: var(--dark); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.chat-send-btn:hover { background: var(--gold-dark); transform: scale(1.05); }

/* Center: Product Grid */
.products-panel {
  overflow-y: auto;
  padding: var(--sp-6);
  scrollbar-width: thin; scrollbar-color: var(--warm-gray-200) transparent;
}
.products-panel::-webkit-scrollbar { width: 4px; }
.products-panel::-webkit-scrollbar-thumb { background: var(--warm-gray-200); border-radius: 4px; }

.products-panel-header {
  margin-bottom: var(--sp-6);
}
.products-panel-title {
  font-family: var(--font-serif);
  font-size: 28px; font-weight: 400; color: var(--dark);
  margin-bottom: 4px;
}
.products-panel-sub {
  font-size: 11px; color: var(--warm-gray-400);
  letter-spacing: 0.06em;
}
.ai-curation-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: var(--dark); color: var(--gold);
  font-size: 9px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: var(--sp-5);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
}
.product-card {
  background: var(--white);
  cursor: pointer;
  transition: transform var(--dur-slow) var(--ease), box-shadow var(--dur-slow) var(--ease);
  position: relative;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.product-card-img {
  width: 100%; aspect-ratio: 1;
  position: relative; overflow: hidden;
  background: var(--cream);
}
.product-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-badge {
  position: absolute; top: var(--sp-3); left: var(--sp-3);
  padding: 3px 8px;
  font-size: 8px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
}
.badge-trending { background: var(--dark); color: var(--white); }
.badge-rated { background: var(--gold); color: var(--dark); }
.badge-new { background: var(--white); color: var(--dark); border: 1px solid var(--warm-gray-200); }

.product-add-btn {
  position: absolute; bottom: var(--sp-3); right: var(--sp-3);
  width: 32px; height: 32px;
  background: var(--white); border: 1px solid var(--warm-gray-200);
  color: var(--dark); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(4px);
  transition: opacity var(--dur-base), transform var(--dur-base), background var(--dur-fast);
  box-shadow: var(--shadow-sm);
}
.product-card:hover .product-add-btn { opacity: 1; transform: translateY(0); }
.product-add-btn:hover { background: var(--dark); color: var(--white); border-color: var(--dark); }
.product-add-btn.added { background: var(--gold); color: var(--dark); border-color: var(--gold); opacity: 1; transform: translateY(0); }

.product-card-body { padding: var(--sp-4); }
.product-brand {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--warm-gray-400); margin-bottom: 3px;
}
.product-name {
  font-family: var(--font-serif);
  font-size: 14px; font-weight: 400; color: var(--dark);
  line-height: 1.3; margin-bottom: var(--sp-2);
}
.product-ai-note {
  font-size: 10px; color: var(--warm-gray-500);
  line-height: 1.5; font-style: italic; margin-bottom: var(--sp-3);
}
.product-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.product-price {
  font-size: 15px; font-weight: 500; color: var(--dark);
}
.product-rating {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--warm-gray-500);
}
.stars { color: var(--gold); font-size: 10px; }

/* Right: Selection Panel */
.selection-panel {
  background: var(--white);
  border-left: 1px solid var(--warm-gray-200);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.selection-panel-header {
  padding: var(--sp-5);
  border-bottom: 1px solid var(--warm-gray-200);
  flex-shrink: 0;
}
.selection-panel-header h3 {
  font-family: var(--font-serif);
  font-size: 16px; font-weight: 500; color: var(--dark);
  margin-bottom: 2px;
}
.selection-panel-header p { font-size: 10px; color: var(--warm-gray-400); }

.selection-items {
  flex: 1; overflow-y: auto;
  padding: var(--sp-4);
  display: flex; flex-direction: column; gap: var(--sp-3);
  scrollbar-width: thin; scrollbar-color: var(--warm-gray-200) transparent;
}
.selection-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: var(--sp-8);
  color: var(--warm-gray-400);
  gap: var(--sp-3);
}
.selection-empty svg { opacity: 0.3; }
.selection-empty p { font-size: 12px; line-height: 1.6; }

.selection-item {
  display: flex; gap: var(--sp-3); align-items: center;
  padding: var(--sp-3);
  border: 1px solid var(--warm-gray-200);
  background: var(--warm-gray-100);
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}
.selection-item-img {
  width: 52px; height: 52px; flex-shrink: 0;
  object-fit: cover; background: var(--cream);
}
.selection-item-info { flex: 1; min-width: 0; }
.selection-item-name {
  font-family: var(--font-serif);
  font-size: 12px; color: var(--dark); margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.selection-item-price { font-size: 11px; color: var(--warm-gray-500); }
.selection-remove {
  background: none; border: none; cursor: pointer;
  color: var(--warm-gray-500); padding: var(--sp-2);
  transition: color var(--dur-fast);
}
.selection-remove:hover { color: var(--dark); }

.selection-total {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--warm-gray-200);
  flex-shrink: 0;
}
.selection-total-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: var(--sp-4);
}
.selection-total-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--warm-gray-500); }
.selection-total-amount { font-family: var(--font-serif); font-size: 20px; color: var(--dark); }

/* ============================================
   VIEW 3: GIFT GUIDE
   ============================================ */
#view-guide {
  background: var(--white);
}

.guide-hero {
  padding: var(--sp-20) var(--sp-16) var(--sp-12);
  text-align: center;
  border-bottom: 1px solid var(--warm-gray-200);
  position: relative;
  overflow: hidden;
}
.guide-hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold));
}
.guide-eyebrow {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--gold); margin-bottom: var(--sp-4);
  display: flex; align-items: center; justify-content: center; gap: var(--sp-3);
}
.guide-eyebrow::before, .guide-eyebrow::after {
  content: ''; display: block;
  width: 32px; height: 1px; background: var(--gold);
}
.guide-title {
  font-family: var(--font-serif);
  font-size: 60px; font-weight: 400; line-height: 1;
  color: var(--dark); margin-bottom: var(--sp-5);
  letter-spacing: -0.02em;
}
.guide-subtitle {
  font-size: 13px; color: var(--warm-gray-500);
  max-width: 480px; margin: 0 auto var(--sp-6);
  line-height: 1.7;
}
.guide-meta {
  display: flex; gap: var(--sp-6); justify-content: center;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--warm-gray-400);
}
.guide-meta span { display: flex; align-items: center; gap: 6px; }

/* Guide Sections */
.guide-sections {
  max-width: 1100px; margin: 0 auto;
  padding: var(--sp-16) var(--sp-8);
}
.guide-section { margin-bottom: var(--sp-16); }
.guide-section-header {
  display: flex; align-items: baseline;
  justify-content: space-between;
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--warm-gray-200);
  margin-bottom: var(--sp-8);
}
.guide-section-title {
  font-family: var(--font-serif);
  font-size: 36px; font-weight: 400;
  color: var(--dark);
}
.guide-section-title em { font-style: italic; color: var(--warm-gray-400); }
.guide-section-sub {
  font-size: 11px; color: var(--warm-gray-400);
  letter-spacing: 0.06em;
}

.guide-product-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}

/* ============================================
   VIEW 4: GIFTING HISTORY
   ============================================ */
#view-history {
  background: var(--off-white);
}
.history-header {
  padding: var(--sp-12) var(--sp-8) var(--sp-8);
  background: var(--white);
  border-bottom: 1px solid var(--warm-gray-200);
}
.history-title {
  font-family: var(--font-serif);
  font-size: 44px; font-weight: 400; color: var(--dark);
  margin-bottom: var(--sp-2);
}
.history-subtitle { font-size: 13px; color: var(--warm-gray-400); }

.history-body {
  padding: var(--sp-8);
  max-width: 900px; margin: 0 auto;
}
.history-grid {
  display: flex; flex-direction: column; gap: var(--sp-4);
}
.history-item {
  background: var(--white);
  display: flex; gap: var(--sp-5); align-items: center;
  padding: var(--sp-5);
  border: 1px solid var(--warm-gray-200);
  cursor: pointer;
  transition: border-color var(--dur-base), box-shadow var(--dur-base), transform var(--dur-base);
}
.history-item:hover {
  border-color: var(--warm-gray-400);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}
.history-item-imgs {
  display: flex; gap: -8px;
  flex-shrink: 0;
}
.history-item-imgs img {
  width: 64px; height: 64px; object-fit: cover;
  border: 2px solid var(--white);
}
.history-item-imgs img:not(:first-child) { margin-left: -16px; }
.history-item-info { flex: 1; }
.history-item-recipient {
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 400; color: var(--dark);
  margin-bottom: 3px;
}
.history-item-occasion {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 4px;
}
.history-item-date { font-size: 11px; color: var(--warm-gray-400); }
.history-item-amount {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 400; color: var(--dark);
  flex-shrink: 0;
}
.history-item-arrow {
  color: var(--warm-gray-300);
  transition: transform var(--dur-base), color var(--dur-base);
}
.history-item:hover .history-item-arrow { transform: translateX(4px); color: var(--dark); }

/* ============================================
   LOADING STATE
   ============================================ */
.loading-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: var(--dark);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--sp-5);
  transition: opacity var(--dur-slow) var(--ease),
              pointer-events var(--dur-slow);
}
.loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loading-logo {
  font-family: var(--font-serif);
  font-size: 36px; font-weight: 400;
  color: var(--white);
}
.loading-logo span { color: var(--gold); }
.loading-bar-track {
  width: 200px; height: 1px;
  background: rgba(255,255,255,0.1);
  position: relative; overflow: hidden;
}
.loading-bar {
  position: absolute; top: 0; left: 0; height: 100%;
  background: var(--gold);
  animation: loadingBar 1.8s ease-in-out forwards;
}
@keyframes loadingBar {
  0% { width: 0%; }
  60% { width: 70%; }
  100% { width: 100%; }
}
.loading-text {
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--warm-gray-500);
  animation: fadeInOut 1.8s ease infinite;
}
@keyframes fadeInOut {
  0%, 100% { opacity: 0.4; } 50% { opacity: 1; }
}

/* ============================================
   AI GENERATING ANIMATION
   ============================================ */
.ai-generating {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4);
  background: rgba(201,169,110,0.08);
  border: 1px solid rgba(201,169,110,0.2);
  font-size: 11px; color: var(--gold);
  letter-spacing: 0.06em;
}
.ai-spinner {
  width: 14px; height: 14px;
  border: 1.5px solid rgba(201,169,110,0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
#toast {
  position: fixed; bottom: var(--sp-8); right: var(--sp-8);
  z-index: 9000;
  background: var(--dark); color: var(--white);
  padding: var(--sp-4) var(--sp-6);
  font-size: 12px; letter-spacing: 0.04em;
  box-shadow: var(--shadow-xl);
  transform: translateY(16px);
  opacity: 0; pointer-events: none;
  transition: transform var(--dur-base) var(--ease), opacity var(--dur-base);
  display: flex; align-items: center; gap: var(--sp-3);
}
#toast.show { transform: translateY(0); opacity: 1; pointer-events: all; }
#toast .toast-icon { color: var(--gold); }

/* ============================================
   PRODUCT DETAIL MODAL
   ============================================ */
#product-modal {
  position: fixed; inset: 0; z-index: 4000;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-8);
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease);
}
#product-modal.open { opacity: 1; pointer-events: all; }
.modal-inner {
  background: var(--white);
  display: flex;
  max-width: 840px; width: 100%;
  max-height: 80vh;
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  transition: transform var(--dur-slow) var(--ease);
  position: relative;
}
#product-modal.open .modal-inner { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: var(--sp-4); right: var(--sp-4);
  background: var(--white); border: 1px solid var(--warm-gray-200);
  width: 32px; height: 32px;
  color: var(--dark); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 1; transition: background var(--dur-fast);
}
.modal-close:hover { background: var(--warm-gray-100); }
.modal-img {
  width: 380px; flex-shrink: 0;
  background: var(--cream);
}
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-content {
  flex: 1; padding: var(--sp-10) var(--sp-8);
  overflow-y: auto;
}
.modal-brand {
  font-size: 9px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: var(--sp-3);
}
.modal-name {
  font-family: var(--font-serif);
  font-size: 28px; font-weight: 400; line-height: 1.2;
  color: var(--dark); margin-bottom: var(--sp-5);
}
.modal-ai-insight {
  padding: var(--sp-4) var(--sp-5);
  background: var(--warm-gray-100);
  border-left: 2px solid var(--gold);
  margin-bottom: var(--sp-6);
}
.modal-ai-insight-label {
  font-size: 9px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: var(--sp-2);
}
.modal-ai-insight-text { font-size: 12px; line-height: 1.7; color: var(--warm-gray-600); }
.modal-price {
  font-family: var(--font-serif); font-size: 28px; color: var(--dark);
  margin-bottom: var(--sp-3);
}
.modal-rating {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  font-size: 11px; color: var(--warm-gray-500);
}
.modal-actions { display: flex; flex-direction: column; gap: var(--sp-3); }
.modal-social-proof {
  display: flex; gap: var(--sp-4);
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--warm-gray-200);
}
.social-proof-stat { text-align: center; flex: 1; }
.social-proof-num {
  font-family: var(--font-serif); font-size: 22px; color: var(--dark);
  margin-bottom: 2px;
}
.social-proof-label { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--warm-gray-400); }

/* ============================================
   MICRO-ANIMATIONS & UTILITIES
   ============================================ */
.fade-in {
  animation: fadeIn var(--dur-slow) var(--ease) forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }

/* Divider */
.divider {
  height: 1px; background: var(--warm-gray-200);
  margin: var(--sp-6) 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .workspace-layout { grid-template-columns: 280px 1fr 280px; }
}
@media (max-width: 900px) {
  .blm-category-grid { grid-template-columns: repeat(3, 1fr); }
  .workspace-layout { grid-template-columns: 1fr; }
  .chat-panel, .selection-panel { display: none; }
  .guide-product-row { grid-template-columns: repeat(2, 1fr); }
  #curator-sidebar { width: 100%; max-width: 400px; }
}

/* ============================================
   HIDE DEFAULT NAV ON HOME, SHOW ON OTHER VIEWS
   ============================================ */
#site-nav { display: none; } /* hidden on home — blm-header takes over */
#view-workspace.active ~ * #site-nav,
#view-guide.active ~ * #site-nav,
#view-history.active ~ * #site-nav { display: flex; }

/* When non-home view is active, show the inner nav */
.site-nav-inner { display: none; }
#view-workspace.active ~ .site-nav-inner,
#view-guide.active ~ .site-nav-inner,
#view-history.active ~ .site-nav-inner { display: flex; }

/* Non-home views need padding for the fixed nav */
#view-workspace, #view-guide, #view-history { padding-top: 56px; }

/* Home view handles its own header */
#view-home { padding-top: 0; }

/* ============================================
   BLOOMINGDALE'S HOME — PROMO BAR
   ============================================ */
.blm-promo-bar {
  background: #111;
  color: #fff;
  text-align: center;
  padding: 9px 48px;
  font-size: 11px;
  letter-spacing: 0.04em;
  display: flex; align-items: center; justify-content: space-between;
  position: relative;
}
.blm-promo-bar p { flex: 1; text-align: center; }
.blm-promo-bar a { color: #fff; text-decoration: underline; margin-left: 4px; }
.blm-promo-arrow {
  background: none; border: none; cursor: pointer;
  color: #888; font-size: 16px; padding: 0 12px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.blm-promo-arrow:hover { color: #fff; }

/* ============================================
   BLOOMINGDALE'S HOME — HEADER
   ============================================ */
.blm-header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky; top: 0; z-index: 1000;
}
.blm-header-inner {
  display: flex; align-items: center;
  padding: 12px 24px;
  gap: 24px;
}
.blm-logo {
  font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-size: 22px; font-weight: 300;
  letter-spacing: -0.01em;
  color: #111; cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.blm-logo:hover { opacity: 0.75; }
.blm-search {
  flex: 1; max-width: 420px;
  display: flex; align-items: center;
  border: 1px solid #ccc;
  padding: 8px 14px; gap: 8px;
  color: #666;
}
.blm-search input {
  border: none; outline: none; background: none;
  font-size: 13px; width: 100%; color: #111;
}
.blm-search input::placeholder { color: #aaa; }
.blm-header-actions {
  display: flex; align-items: center; gap: 20px;
  margin-left: auto;
}
.blm-header-action {
  background: none; border: none; cursor: pointer;
  color: #111; display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  transition: opacity 0.15s;
}
.blm-header-action:hover { opacity: 0.65; }
.blm-header-action span {
  font-size: 10px; letter-spacing: 0.04em; color: #333;
}

/* ============================================
   BLOOMINGDALE'S HOME — DEPARTMENT NAV
   ============================================ */
.blm-dept-nav {
  display: flex; align-items: center; gap: 0;
  overflow-x: auto; white-space: nowrap;
  padding: 0 24px;
  border-top: 1px solid #f0f0f0;
  scrollbar-width: none;
}
.blm-dept-nav::-webkit-scrollbar { display: none; }
.blm-dept-link {
  background: none; border: none; cursor: pointer;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.06em;
  color: #222;
  padding: 11px 14px;
  white-space: nowrap;
  transition: color 0.15s;
  display: inline-flex; align-items: center; gap: 5px;
  border-bottom: 2px solid transparent;
}
.blm-dept-link:hover { color: #000; border-bottom-color: #000; }
.blm-dept-new { color: #c00 !important; }
.blm-dept-new:hover { color: #900 !important; border-bottom-color: #c00; }
.blm-dept-gifts { font-weight: 600; }
.blm-dept-menu { font-weight: 600; }

/* ============================================
   BLOOMINGDALE'S HOME — PAGE BODY
   ============================================ */
.blm-page-body {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* Breadcrumb */
.blm-breadcrumb {
  padding: 14px 0 0;
  font-size: 11px; color: #888;
  letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 6px;
}
.blm-bc-link {
  cursor: pointer; text-decoration: underline;
  transition: color 0.15s;
}
.blm-bc-link:hover { color: #111; }
.blm-bc-sep { color: #ccc; }

/* ============================================
   BLOOMINGDALE'S HOME — OUR BEST GIFTS
   ============================================ */
.blm-gifts-section { padding: 24px 0 0; }
.blm-gifts-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.blm-gifts-title {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 26px; font-weight: 500;
  letter-spacing: 0.06em; color: #111;
  text-transform: uppercase;
}
.blm-ask-ai-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border: 1px solid #333;
  background: none; cursor: pointer;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; color: #111;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}
.blm-ask-ai-btn:hover { background: #111; color: #fff; }

/* Category Tiles Grid */
.blm-category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.blm-cat-tile {
  cursor: pointer;
  display: flex; flex-direction: column; gap: 10px;
}
.blm-cat-tile-img {
  width: 100%; aspect-ratio: 1/1;
  overflow: hidden;
  background: #f5f0ea;
}
.blm-cat-tile-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.blm-cat-tile:hover .blm-cat-tile-img img { transform: scale(1.04); }
.blm-cat-label {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; color: #111;
  text-decoration: underline;
  text-align: center;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.blm-cat-tile:hover .blm-cat-label { color: #555; }

/* Divider */
.blm-divider {
  border: none; border-top: 1px solid #e8e8e8;
  margin: 40px 0 32px;
}

/* ============================================
   BLOOMINGDALE'S HOME — SHOP BY OBSESSION
   ============================================ */
.blm-obsession-section { margin-bottom: 32px; }
.blm-obsession-title {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 22px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #111;
  text-align: center;
}

/* ============================================
   BLOOMINGDALE'S HOME — SPARKLE & SHINE
   ============================================ */
.blm-sparkle-section {
  display: flex; align-items: center;
  background: #0a0a0a;
  min-height: 240px;
  overflow: hidden;
  position: relative;
  padding: 0 0 0 60px;
}
.blm-sparkle-left { flex: 1; }
.blm-sparkle-text {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 56px; font-weight: 400;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.01em;
}
.blm-sparkle-right {
  width: 200px; flex-shrink: 0;
  position: relative;
  display: flex; align-items: center; justify-content: flex-end;
}
.blm-sparkle-model {
  width: 175px; height: 220px;
  object-fit: cover;
  object-position: top;
}
.blm-sparkle-play {
  position: absolute;
  right: 16px; bottom: 50%;
  transform: translateY(50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.5);
  color: #fff; font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  padding-left: 3px;
}
.blm-sparkle-play:hover { background: rgba(255,255,255,0.3); }

/* Make the .blm-view not get the old 56px padding */
.blm-view { padding-top: 0 !important; }

/* When workspace/guide/history are active, show the secondary nav */
#view-workspace:not(.active) { display: none; }
#view-guide:not(.active) { display: none; }
#view-history:not(.active) { display: none; }

/* ============================================
   VIEW 5: RESULT / VIRTUAL TRY-ON
   ============================================ */
.result-page {
  background: #fdfdfd;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.result-header {
  background: var(--white);
  border-bottom: 1px solid #eee;
  padding: 0 40px;
  height: 60px;
}

.result-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.result-logo {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.result-top-nav {
  display: flex;
  gap: 24px;
}

.result-top-nav button {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #444;
  cursor: pointer;
}

.result-header-actions {
  display: flex;
  gap: 20px;
  color: #333;
}

.result-container {
  display: flex;
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Sidebars */
.result-sidebar-left, .result-sidebar-right {
  width: 280px;
  padding: 32px 24px;
  background: #fff;
  border-right: 1px solid #f0f0f0;
}

.result-sidebar-right {
  border-right: none;
  border-left: 1px solid #f0f0f0;
  width: 320px;
}

.sidebar-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #111;
}

.sidebar-subtitle {
  font-size: 9px;
  color: #888;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.ai-box {
  background: #f9f9f9;
  padding: 16px;
  border: 1px solid #eee;
  margin-bottom: 32px;
}

.ai-box p {
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}

.sidebar-group-label {
  font-size: 9px;
  font-weight: 700;
  color: #bbb;
  margin-bottom: 12px;
}

.sidebar-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  background: none;
  border: none;
  border-bottom: 1px solid #f5f5f5;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  letter-spacing: 0.05em;
}

.sidebar-nav-item.active {
  color: #111;
}

.sidebar-action-btn {
  width: 100%;
  margin-top: 40px;
}

/* Main Content */
.result-main {
  flex: 1;
  padding: 32px 40px;
  background: #fff;
}

.preview-eyebrow {
  font-size: 9px;
  color: #999;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.preview-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.preview-title {
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 500;
  color: #111;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #166534;
}

.tryon-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tryon-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 4/5;
  background: #f5f5f5;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

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

.tryon-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 12px;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  color: #333;
}

.tryon-badge .dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
}

.tryon-zoom {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.tryon-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px;
  border-radius: 4px;
}

.control-btn {
  padding: 6px 12px;
  background: none;
  border: none;
  font-size: 9px;
  font-weight: 700;
  color: #888;
  cursor: pointer;
}

.control-btn.active {
  background: #111;
  color: #fff;
}

.tryon-caption {
  margin-top: 24px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: #666;
}

/* Right Sidebar Tabs & Items */
.result-tabs {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 24px;
}

.tab {
  flex: 1;
  padding: 12px 0;
  background: none;
  border: none;
  font-size: 9px;
  font-weight: 700;
  color: #999;
  cursor: pointer;
  text-align: center;
}

.tab.active {
  color: #111;
  border-bottom: 2px solid #111;
}

.curation-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.curation-item {
  display: flex;
  gap: 16px;
  align-items: center;
}

.curation-item-img {
  width: 64px;
  height: 80px;
  background: #f9f9f9;
  overflow: hidden;
}

.curation-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-cat {
  font-size: 8px;
  color: #aaa;
  font-weight: 700;
  margin-bottom: 2px;
}

.item-name {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.item-desc {
  font-size: 10px;
  color: #888;
  margin-bottom: 4px;
}

.item-price {
  font-size: 12px;
  font-weight: 700;
  color: #111;
}

.add-accessory-btn {
  width: 100%;
  padding: 16px;
  background: #fbfbfb;
  border: 1px dashed #ddd;
  font-size: 9px;
  font-weight: 700;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}

.result-total-section {
  border-top: 1px solid #eee;
  padding-top: 24px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
}

.total-label {
  font-size: 10px;
  font-weight: 700;
  color: #999;
}

.total-price {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-sans);
}

.checkout-action-btn {
  width: 100%;
  margin-bottom: 12px;
}

.save-action-btn {
  width: 100%;
}


/* Nano Banana 2 Synthesis Interface */
.ai-synthesis-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  opacity: 1;
  /* No auto-fade — JS controls this based on when the real image arrives */
  transition: opacity 0.8s ease-in-out;
}

.synthesis-content {
  text-align: center;
  color: white;
}

.synthesis-spinner {
  width: 40px; height: 40px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: #22d3ee;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.synthesis-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
  color: #fff;
}

.synthesis-sub {
  font-size: 10px;
  color: #22d3ee;
  font-style: italic;
}

/* Cleanup old overlays */
.tryon-overlay { display: none !important; }

#result-photo {
  transition: opacity 0.5s ease-in-out;
}
