/*
Theme Name: MacawView Farm
Author: MacawView Farm
Version: 1.2.1
Description: Fast custom theme for MacawView Farm with 1M-5Y growth timeline, TH/EN bilingual switcher, OS Auto / Dark / Light mode switcher, 24/7 Live dropdown, and shop-ready architecture.
*/

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  --bg: #09090b;
  --surface: #121216;
  --surface-alt: #0d0d10;
  --surface-hover: #1a1a20;
  --media-empty: #18181b;
  --meta-bg: rgba(255, 255, 255, 0.02);
  --border: #27272a;
  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, 0.15);
  --text: #f4f4f5;
  --heading: #ffffff;
  --body-copy: #d4d4d8;
  --muted: #a1a1aa;
  --green: #10b981;
  --header-bg: rgba(9, 9, 11, 0.85);
  --hero-glow: radial-gradient(circle at top, rgba(212, 175, 55, 0.14), transparent 60%);
  --badge-bg: rgba(9, 9, 11, 0.82);
  --menu-bg: #141418;
  --menu-shadow: 0 16px 36px rgba(0, 0, 0, 0.75);
  --live-text: #f87171;
  --twitch-text: #a970ff;
  --soop-text: #60a5fa;
  --reserved-text: #fbbf24;
  --active-btn-text: #09090b;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Sarabun", "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body.mvf-dark {
  --bg: #09090b;
  --surface: #121216;
  --surface-alt: #0d0d10;
  --surface-hover: #1a1a20;
  --media-empty: #18181b;
  --meta-bg: rgba(255, 255, 255, 0.02);
  --border: #27272a;
  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, 0.15);
  --text: #f4f4f5;
  --heading: #ffffff;
  --body-copy: #d4d4d8;
  --muted: #a1a1aa;
  --green: #10b981;
  --header-bg: rgba(9, 9, 11, 0.85);
  --hero-glow: radial-gradient(circle at top, rgba(212, 175, 55, 0.14), transparent 60%);
  --badge-bg: rgba(9, 9, 11, 0.82);
  --menu-bg: #141418;
  --menu-shadow: 0 16px 36px rgba(0, 0, 0, 0.75);
  --live-text: #f87171;
  --twitch-text: #a970ff;
  --soop-text: #60a5fa;
  --reserved-text: #fbbf24;
  --active-btn-text: #09090b;
}

body.mvf-light {
  --bg: #f8f8fa;
  --surface: #ffffff;
  --surface-alt: #f1f2f6;
  --surface-hover: #e8eaef;
  --media-empty: #e4e4e7;
  --meta-bg: #f8f8fa;
  --border: #e4e4e7;
  --gold: #b48914;
  --gold-soft: rgba(180, 137, 20, 0.12);
  --text: #18181b;
  --heading: #09090b;
  --body-copy: #3f3f46;
  --muted: #71717a;
  --green: #059669;
  --header-bg: rgba(255, 255, 255, 0.88);
  --hero-glow: radial-gradient(circle at top, rgba(180, 137, 20, 0.12), transparent 60%);
  --badge-bg: rgba(255, 255, 255, 0.92);
  --menu-bg: #ffffff;
  --menu-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
  --live-text: #dc2626;
  --twitch-text: #7c3aed;
  --soop-text: #2563eb;
  --reserved-text: #d97706;
  --active-btn-text: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--heading);
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand span {
  color: var(--gold);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Live Dropdown */
.live-dropdown {
  position: relative;
}

.live-badge {
  background: rgba(239, 68, 68, 0.15);
  color: var(--live-text);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s;
  cursor: pointer;
  font-family: inherit;
}

.live-badge:hover {
  background: rgba(239, 68, 68, 0.24);
}

.live-badge .caret {
  font-size: 0.75rem;
  margin-left: 2px;
  transition: transform 0.2s;
}

.live-dropdown.open .caret {
  transform: rotate(180deg);
}

.dot {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.live-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 265px;
  background: var(--menu-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--menu-shadow);
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 60;
}

.live-dropdown.open .live-menu {
  display: flex;
}

.live-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.2s;
}

.live-item:hover {
  background: var(--surface-hover);
}

.live-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.2;
}

.live-item small {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.platform-tag {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

.platform-tag.twitch {
  background: rgba(145, 70, 255, 0.16);
  color: var(--twitch-text);
  border: 1px solid rgba(145, 70, 255, 0.35);
}

.platform-tag.soop {
  background: rgba(59, 130, 246, 0.16);
  color: var(--soop-text);
  border: 1px solid rgba(59, 130, 246, 0.35);
}

/* Theme & Language Switchers */
.theme-switch,
.lang-switch {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.theme-switch button {
  background: transparent;
  border: none;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
}

.theme-switch button:hover {
  color: var(--text);
}

.theme-switch button.active {
  background: var(--gold);
  color: var(--active-btn-text);
}

.lang-switch a {
  padding: 6px 11px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  transition: 0.2s;
}

.lang-switch a.active {
  background: var(--gold);
  color: var(--active-btn-text);
}

/* Hero */
.hero {
  text-align: center;
  padding: 64px 20px 48px;
  background: var(--hero-glow);
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--heading);
}

.hero h1 span {
  color: var(--gold);
}

.hero p {
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Bird Showcase Grid */
.bird-list {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-bottom: 80px;
}

.bird-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  transition: border-color 0.3s, background-color 0.25s;
}

.bird-card:hover {
  border-color: var(--gold);
}

@media (max-width: 860px) {
  .bird-card {
    grid-template-columns: 1fr;
  }
}

/* Gallery Side */
.bird-media {
  padding: 24px;
  background: var(--surface-alt);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: var(--media-empty);
  cursor: zoom-in;
}

.main-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.main-photo-wrap:hover img {
  transform: scale(1.03);
}

.age-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--badge-bg);
  backdrop-filter: blur(6px);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Timeline Tabs (1M - 5Y) */
.timeline-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.age-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
}

.age-tab:hover {
  border-color: var(--gold);
  color: var(--text);
}

.age-tab.active {
  background: var(--gold);
  color: var(--active-btn-text);
  border-color: var(--gold);
}

/* Thumbnails Strip */
.thumb-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.thumb-item {
  width: 62px;
  height: 62px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.65;
  transition: 0.2s;
  flex-shrink: 0;
}

.thumb-item.active,
.thumb-item:hover {
  opacity: 1;
  border-color: var(--gold);
}

/* Info Side */
.bird-info {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.bird-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.bird-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--heading);
}

.bird-species {
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 2px;
}

.status-pill {
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-showcase {
  background: var(--surface-hover);
  color: var(--muted);
}

.status-available {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-reserved {
  background: rgba(245, 158, 11, 0.15);
  color: var(--reserved-text);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: var(--meta-bg);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 12px;
}

.meta-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.meta-item strong {
  font-size: 0.95rem;
  color: var(--text);
}

.bird-history h4 {
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bird-history p {
  color: var(--body-copy);
  font-size: 0.95rem;
  white-space: pre-line;
}

/* Future Shop Box (Plugin-Ready) */
.shop-box {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.price-tag {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--green);
}

.btn-inquire {
  background: var(--gold);
  color: var(--active-btn-text);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: 0.2s;
}

.btn-inquire:hover {
  filter: brightness(1.08);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 2rem;
  color: #ffffff;
  cursor: pointer;
}

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}