/* ========================================
   LightwaveLlama -- Design System
   ======================================== */

:root {
  --color-bg:        #0f0f13;
  --color-bg-card:   #1a1a22;
  --color-bg-hover:  #22222e;
  --color-surface:   #24242f;
  --color-border:    #2a2a38;
  --color-accent:    #c8875c;
  --color-accent-2:  #e8a96e;
  --color-text:      #e4ddd4;
  --color-text-dim:  #9a9490;
  --color-text-mute: #6b6560;
  --color-white:     #fff;
  --font-display:    'Righteous', cursive, system-ui;
  --font-body:       'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm:  0.5rem;
  --radius-md:  0.75rem;
  --radius-lg:  1rem;
  --radius-xl:  1.25rem;
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* ========================================
   Layout
   ======================================== */

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========================================
   Navigation
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

.nav.scrolled {
  background: rgba(15, 15, 19, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--color-border);
  padding: 0.6rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.nav-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-white);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-dim);
  transition: color 0.2s, background 0.2s;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-white);
  background: rgba(255,255,255,0.05);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1.25rem;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

/* ========================================
   Hero
   ======================================== */

.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 1.5rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(200, 135, 92, 0.15), transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(200, 135, 92, 0.08), transparent 60%);
  animation: heroGlow 10s ease-in-out infinite alternate;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, var(--color-bg) 100%);
}

@keyframes heroGlow {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1;   transform: scale(1.05); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,135,92,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,135,92,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0%   { opacity: 0; transform: translateY(0) scale(0); }
  15%  { opacity: 0.6; transform: scale(1); }
  85%  { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-100vh) scale(0.5); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(200, 135, 92, 0.12);
  border: 1px solid rgba(200, 135, 92, 0.25);
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-accent-2);
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.5); }
}

.hero-logo-img {
  width: 6rem;
  height: 6rem;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(200, 135, 92, 0.3), 0 0 120px rgba(200, 135, 92, 0.1);
  animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--color-text-dim);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover::before { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), #b07048);
  color: var(--color-white);
  box-shadow: 0 4px 20px rgba(200, 135, 92, 0.3);
}

.btn-primary:hover {
  transform: scale(1.04);
  background: linear-gradient(135deg, #d4986c, var(--color-accent));
  box-shadow: 0 4px 24px rgba(200, 135, 92, 0.45);
}

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

.btn-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-white);
  background: rgba(200, 135, 92, 0.12);
  transform: scale(1.04);
}

.btn-icon {
  font-size: 1.1rem;
}

/* ========================================
   Section Shared
   ======================================== */

.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header-compact {
  margin-bottom: 2rem;
}

.section-header-compact .section-title {
  margin-bottom: 0;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 1rem;
  color: var(--color-text-dim);
  max-width: 550px;
  margin: 0 auto;
}

/* ========================================
   Category Filter Tabs
   ======================================== */

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-dim);
  border: 1px solid transparent;
  transition: all 0.3s var(--ease-out);
}

.filter-btn:hover {
  color: var(--color-text);
  background: rgba(255,255,255,0.04);
}

.filter-btn.active {
  color: var(--color-accent-2);
  background: rgba(200, 135, 92, 0.1);
  border-color: rgba(200, 135, 92, 0.3);
}

/* ========================================
   Product Cards
   ======================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,135,92,0.3), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.card:hover {
  border-color: rgba(200, 135, 92, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 40px rgba(200,135,92,0.06);
}

.card:hover::before { opacity: 1; }

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-icon-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-accent);
}

.card-meta {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 0.2rem;
}

.seller-byline {
  color: var(--color-text-mute, #9a9088);
  font-size: 0.82rem;
  margin: 0.15rem 0 0.35rem;
}

.card-category {
  font-size: 0.75rem;
  color: var(--color-text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--color-text-dim);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.25rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.tag {
  padding: 0.2rem 0.6rem;
  background: rgba(200, 135, 92, 0.08);
  border: 1px solid rgba(200, 135, 92, 0.15);
  border-radius: 1rem;
  font-size: 0.7rem;
  color: var(--color-accent-2);
  letter-spacing: 0.02em;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent);
  transition: gap 0.3s var(--ease-out), color 0.2s;
}

.card:hover .card-link {
  gap: 0.7rem;
  color: var(--color-accent-2);
}

.card-link-arrow {
  transition: transform 0.3s var(--ease-out);
}

.card:hover .card-link-arrow {
  transform: translateX(3px);
}

.card-featured {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  background: rgba(200, 135, 92, 0.15);
  color: var(--color-accent-2);
  border-radius: 1rem;
  font-weight: 500;
}

/* ========================================
   Featured Spotlight
   ======================================== */

.featured-section {
  background: linear-gradient(180deg, var(--color-bg) 0%, rgba(200,135,92,0.03) 50%, var(--color-bg) 100%);
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

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

.featured-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out);
}

.featured-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(200,135,92,0.06), transparent 70%);
  transition: opacity 0.4s;
  opacity: 0;
}

.featured-card:hover {
  border-color: rgba(200,135,92,0.3);
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.featured-card:hover::after { opacity: 1; }

.featured-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.featured-card-icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.featured-card-icon img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

.featured-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.featured-card p {
  color: var(--color-text-dim);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.featured-card .btn {
  position: relative;
  z-index: 2;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--color-text-dim);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--color-text-mute);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  font-size: 0.8rem;
  color: var(--color-text-mute);
  transition: color 0.2s;
}

.footer-link:hover { color: var(--color-accent); }

/* ========================================
   Scroll Reveal Animations
   ======================================== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Stagger children */
.stagger-children .card:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .card:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .card:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .card:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .card:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .card:nth-child(6) { transition-delay: 0.3s; }
.stagger-children .card:nth-child(7) { transition-delay: 0.35s; }
.stagger-children .card:nth-child(8) { transition-delay: 0.4s; }

/* Hero entrance */
.hero-enter { animation: heroEnter 1s var(--ease-out) both; }
.hero-enter-delay { animation: heroEnter 1s var(--ease-out) 0.15s both; }
.hero-enter-delay-2 { animation: heroEnter 1s var(--ease-out) 0.3s both; }
.hero-enter-delay-3 { animation: heroEnter 1s var(--ease-out) 0.45s both; }

@keyframes heroEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Card empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-mute);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

/* ========================================
   Loading Skeleton
   ======================================== */

.skeleton {
  background: linear-gradient(90deg, var(--color-bg-card) 25%, var(--color-surface) 50%, var(--color-bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 640px) {
  .hero { min-height: 75vh; padding: 5rem 1rem 3rem; }
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: 1rem; }
  .hero-logo-img { width: 4.5rem; height: 4.5rem; }
  .card-grid { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
  /* Phones: links collapse behind the menu button (added by nav.js / index.html). */
  .nav-inner { position: relative; }
  .nav .nav-menu-btn { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 12rem;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.5rem;
    background: rgba(15, 15, 19, 0.97);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  }
  .nav.menu-open .nav-links { display: flex; }
  .nav-links .nav-link { padding: 0.75rem 1rem; font-size: 1rem; }
  .nav-link.active::after { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
}

.nav-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-left: auto;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-dim);
  cursor: pointer;
}
.nav-menu-btn:hover,
.nav.menu-open .nav-menu-btn { color: var(--color-white); background: rgba(255, 255, 255, 0.05); }

@media (min-width: 641px) and (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========================================
   Smooth page load
   ======================================== */

.page-loading {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.page-loaded {
  opacity: 1;
}

/* The hidden attribute must win over component display rules (e.g. .pay-spinner used to stay visible). */
[hidden] { display: none !important; }
