/* =============================================
   BOUGH BUILT — Dark Woodshop / LCARS Design System
   ============================================= */

/* ---------- CSS Custom Properties ---------- */
:root {
  --bg-primary: #1a1a2e;
  --bg-surface: #242440;
  --bg-surface-hover: #2c2c50;
  --accent-wood: #8B5E3C;
  --accent-wood-hover: #6B4528;
  --accent-wood-light: #a07850;
  --accent-gold: #C9A96E;
  --accent-gold-dim: #b89855;
  --text-primary: #e8e0d0;
  --text-secondary: #a09888;
  --text-muted: #706858;
  --border-color: #3a3a5a;
  --success: #4caf50;
  --error: #e53935;
  --info: #42a5f5;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  --font-display: 'Georgia', 'Times New Roman', serif;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 12px rgba(201, 169, 110, 0.15);

  --max-width: 1200px;
  --nav-height: 64px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-wood-light);
}

ul {
  list-style: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-xl);
  position: relative;
  padding-bottom: var(--space-md);
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-wood), var(--accent-gold));
  margin: var(--space-sm) auto 0;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.gold-accent {
  color: var(--accent-gold);
}

.wood-accent {
  color: var(--accent-wood);
}

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  height: var(--nav-height);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--space-xl);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-logo:hover {
  color: var(--accent-gold);
  opacity: 0.9;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: var(--space-xs) 0;
  position: relative;
  transition: color 0.2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: width 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-gold);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-xs);
}

.cart-toggle {
  position: relative;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.cart-toggle:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent-wood);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s ease;
}

.cart-badge.visible {
  opacity: 1;
  transform: scale(1);
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: var(--space-3xl) var(--space-xl);
  background: radial-gradient(ellipse at center, var(--bg-surface) 0%, var(--bg-primary) 70%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(135deg, rgba(139, 94, 60, 0.08) 0%, transparent 50%),
    linear-gradient(225deg, rgba(201, 169, 110, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  letter-spacing: 0.02em;
}

.hero-tagline .highlight {
  color: var(--accent-gold);
  display: block;
  font-style: italic;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  line-height: 1.6;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-xl);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  letter-spacing: 0.03em;
}

.btn-primary {
  background: var(--accent-wood);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-wood-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

.btn-secondary:hover {
  background: rgba(201, 169, 110, 0.1);
  color: var(--accent-gold);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  border-color: var(--accent-wood);
  color: var(--accent-wood-light);
}

.btn-lg {
  padding: var(--space-md) var(--space-2xl);
  font-size: 1.1rem;
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: 0.85rem;
}

.btn-block {
  display: block;
  width: 100%;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201, 169, 110, 0.3);
}

.card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--border-color);
}

.card-body {
  padding: var(--space-md);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.card-price {
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.card-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

.card-footer {
  padding: 0 var(--space-md) var(--space-md);
}

/* ---------- Product Grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-xl);
  padding: 0 var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-4xl) var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-wide {
  padding: var(--space-4xl) var(--space-xl);
}

.section-dark {
  background: var(--bg-surface);
}

.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  margin: var(--space-2xl) 0;
}

/* ---------- Featured Products ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* ---------- CTA Section ---------- */
.cta-section {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-primary) 100%);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.cta-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: var(--space-md);
}

.cta-text {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto var(--space-xl);
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: var(--space-3xl) var(--space-xl) var(--space-xl);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2xl);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent-gold);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.06em;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.footer-heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
  font-family: var(--font-sans);
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.footer-social a {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--accent-gold);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: var(--space-xl) auto 0;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---------- Filter Tabs ---------- */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
  padding: 0 var(--space-xl);
}

.filter-tab {
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.filter-tab.active {
  background: var(--accent-wood);
  border-color: var(--accent-wood);
  color: #fff;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.02em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(201, 169, 110, 0.15);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  cursor: pointer;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-lg) 0;
}

.faq-question {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent-gold);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------- Skill Level Indicators ---------- */
.skill-levels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.skill-card {
  text-align: center;
  padding: var(--space-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.skill-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin: 0 auto var(--space-md);
}

.skill-dot.beginner { background: #4caf50; }
.skill-dot.intermediate { background: #ffc107; }
.skill-dot.advanced { background: #e53935; }

.skill-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.skill-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ---------- What's In The Box ---------- */
.box-contents {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.box-item {
  text-align: center;
  padding: var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.box-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.box-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ---------- Portfolio Grid ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* ---------- Pickup Callout ---------- */
.pickup-callout {
  text-align: center;
  padding: var(--space-2xl);
  background: var(--bg-surface);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  max-width: 600px;
  margin: var(--space-2xl) auto;
}

.pickup-callout h3 {
  color: var(--accent-gold);
  margin-bottom: var(--space-sm);
}

/* ---------- Best For (3-column) ---------- */
.best-for-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.best-for-card {
  text-align: center;
  padding: var(--space-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.best-for-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

/* ---------- Video Link Icon ---------- */
.video-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 500;
}

.video-link:hover {
  color: var(--accent-wood-light);
}

/* ---------- Skill Tags ---------- */
.skill-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.skill-tag.beginner { background: rgba(76, 175, 80, 0.2); color: #81c784; }
.skill-tag.intermediate { background: rgba(255, 193, 7, 0.2); color: #ffd54f; }
.skill-tag.advanced { background: rgba(229, 57, 53, 0.2); color: #ef9a9a; }

/* ---------- Info Banner ---------- */
.info-banner {
  background: linear-gradient(135deg, var(--accent-wood) 0%, var(--accent-wood-hover) 100%);
  padding: var(--space-xl);
  text-align: center;
  margin: var(--space-3xl) 0;
}

.info-banner h3 {
  color: #fff;
  margin-bottom: var(--space-xs);
}

.info-banner p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + var(--space-md));
  right: var(--space-xl);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 280px;
  max-width: 400px;
  animation: toastIn 0.3s ease;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--error); }
.toast.info { border-left: 3px solid var(--info); }

.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 0 0 var(--space-sm);
}

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: var(--space-md) var(--space-xl);
    border-bottom: 1px solid var(--border-color);
    gap: var(--space-sm);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-link {
    padding: var(--space-sm) 0;
  }

  .featured-grid,
  .product-grid {
    grid-template-columns: 1fr;
    padding: 0 var(--space-md);
  }

  .section {
    padding: var(--space-2xl) var(--space-md);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }

  .toast-container {
    right: var(--space-md);
    left: var(--space-md);
  }

  .toast {
    min-width: auto;
    max-width: none;
  }

  .hero {
    min-height: 60vh;
    padding: var(--space-2xl) var(--space-md);
  }

  .skill-levels,
  .box-contents,
  .best-for-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Utility Classes ---------- */
.text-center { text-align: center; }
.text-gold { color: var(--accent-gold); }
.text-muted { color: var(--text-muted); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
