/* ═══════════════════════════════════════════════
   Xena the Lab — Shared Styles
   Educational kids' brand design system
   ═══════════════════════════════════════════════ */

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

:root {
  --ink: #1a1a2e;
  --cream: #fef9f0;
  --tangerine: #ff6b35;
  --tangerine-dark: #e55a28;
  --sky: #4ecdc4;
  --lavender: #a388ee;
  --blush: #ffb5a7;
  --warm-white: #fff8f2;
  --sunshine: #ffd166;
  --leaf: #06d6a0;
  --gray-100: #f5f0e8;
  --gray-200: #e8e0d4;
  --gray-400: #999;
  --gray-600: #666;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.12);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Navigation Bar ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 8vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(254, 249, 240, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(26, 26, 46, 0.06);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo .paw { font-size: 1.3rem; }

.nav-logo img,
.nav-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
}

.nav-links .btn-nav {
  padding: 10px 24px;
  background: var(--tangerine);
  color: white;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 1;
  transition: background 0.2s;
}

.nav-links .btn-nav:hover {
  background: var(--tangerine-dark);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .nav { padding: 14px 6vw; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--cream);
    padding: 20px 6vw;
    gap: 16px;
    border-bottom: 1px solid var(--gray-200);
  }
  .nav-links.open { display: flex; }
}

/* ── Page Container ── */
.page {
  padding-top: 80px;
  min-height: 100vh;
}

/* ── Section Helpers ── */
.section {
  padding: 80px 8vw;
}

.section-header {
  margin-bottom: 48px;
}

.section-header h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--gray-600);
  max-width: 560px;
  line-height: 1.7;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 40px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--tangerine);
  color: white;
}
.btn-primary:hover { background: var(--tangerine-dark); transform: translateY(-1px); }

.btn-secondary {
  background: var(--ink);
  color: var(--cream);
}
.btn-secondary:hover { background: #2a2a4e; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--cream); }

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

/* ── Product Cards ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.product-card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product-card-img {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

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

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

.product-card-img .product-emoji {
  font-size: 4rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge-bestseller { background: var(--tangerine); color: white; }
.badge-new { background: var(--sky); color: var(--ink); }
.badge-popular { background: var(--lavender); color: white; }
.badge-fan-favorite { background: var(--blush); color: var(--ink); }

.product-card-body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--tangerine);
  margin-bottom: 6px;
}

.product-card-body h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-card-body .product-desc {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
}

.product-action {
  padding: 8px 18px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.product-action:hover { background: var(--tangerine); }

/* ── Category Filter Tabs ── */
.category-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.category-tab {
  padding: 10px 24px;
  border-radius: 40px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid var(--gray-200);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.category-tab:hover {
  border-color: var(--ink);
}

.category-tab.active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

/* ── Character Page ── */
.character-hero {
  padding: 100px 8vw 60px;
  background: linear-gradient(160deg, var(--cream) 0%, #fff5eb 40%, #f0e6ff 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: 70vh;
}

.character-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.character-photo-frame {
  width: 100%;
  max-width: 420px;
  position: relative;
}

.character-main-photo {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

.character-photo-frame::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 32px;
  border: 3px dashed var(--tangerine);
  opacity: 0.3;
  animation: spin 20s linear infinite;
}

.character-avatar {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blush) 0%, var(--lavender) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.character-avatar::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 3px dashed var(--tangerine);
  opacity: 0.3;
  animation: spin 20s linear infinite;
}

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

.character-info h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 12px;
}

.character-info .tagline {
  font-size: 1.3rem;
  color: var(--tangerine);
  font-weight: 600;
  margin-bottom: 24px;
}

.character-info .backstory {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 32px;
}

.character-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trait-tag {
  padding: 8px 18px;
  background: rgba(163, 136, 238, 0.12);
  color: var(--lavender);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ── Xena Photo Timeline ── */
.xena-timeline {
  padding: 80px 8vw;
  background: var(--warm-white);
}

.timeline-header {
  text-align: center;
  margin-bottom: 56px;
}

.timeline-header h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
}

.timeline-header p {
  font-size: 1.1rem;
  color: var(--gray-600);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.timeline-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.timeline-card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s;
}

.timeline-card:hover {
  transform: translateY(-4px);
}

.timeline-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.timeline-label {
  padding: 24px;
}

.timeline-label h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.timeline-label p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* Character detail cards */
.character-details {
  padding: 80px 8vw;
  background: var(--cream);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.detail-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.detail-card .card-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.detail-card h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.detail-card p {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ── Product Detail Page ── */
.product-detail {
  padding: 100px 8vw 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-detail-img {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  position: sticky;
  top: 100px;
  overflow: hidden;
}

.product-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.product-detail-info h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 8px;
  line-height: 1.2;
}

.product-detail-category {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--tangerine);
  margin-bottom: 20px;
}

.product-detail-price {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--ink);
  margin-bottom: 24px;
}

.product-detail-desc {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 32px;
}

.product-detail-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── CTA Banner ── */
.cta-banner {
  padding: 80px 8vw;
  background: var(--ink);
  color: var(--cream);
  text-align: center;
}

.cta-banner h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 16px;
}

.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.7;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ── Footer ── */
.site-footer {
  padding: 32px 8vw;
  background: #111126;
  color: rgba(255,255,255,0.35);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-footer a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer a:hover { color: rgba(255,255,255,0.8); }

/* ── Loading State ── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px;
  font-size: 1.1rem;
  color: var(--gray-400);
}

.loading::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--tangerine);
  border-radius: 50%;
  animation: spinner 0.6s linear infinite;
  margin-left: 12px;
}

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

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--gray-400);
}

.empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--ink);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .section { padding: 60px 6vw; }
  .character-hero {
    grid-template-columns: 1fr;
    padding: 80px 6vw 40px;
    text-align: center;
  }
  .character-photo-frame { max-width: 300px; margin: 0 auto; }
  .character-avatar { width: 240px; height: 240px; font-size: 7rem; }
  .character-traits { justify-content: center; }
  .character-details { padding: 60px 6vw; }
  .xena-timeline { padding: 60px 6vw; }
  .timeline-photos { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .product-detail {
    grid-template-columns: 1fr;
    padding: 80px 6vw 40px;
  }
  .product-detail-img { position: static; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .site-footer { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
}
