:root {
  --bg: #F9F9F5;
  --text: #2C2C2C;
  --primary: #D4AF37; /* Gold */
  --secondary: #1A2E35; /* Navy */
  --card: #FFFFFF;
  --border: #E0E0E0;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #121212;
  --text: #E0E0E0;
  --primary: #F0C448;
  --secondary: #2C3E50;
  --card: #1E1E1E;
  --border: #333;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-links {
  padding-bottom: 2rem;
}

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

/* =========================
   NAV (PERFECT ALIGNMENT)
   ========================= */
.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* 3-column layout: brand | links | actions */
.nav-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

/* brand */
.brand--logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo {
  height: 100px; /* sane navbar logo size */
  width: auto;
  display: block;
}

.brand-text {
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--text);
  line-height: 1;
}

/* nav links - consistent spacing (NO space-between) */
.nav-links {
  min-width: 0; /* critical: prevents layout pushing */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px; /* uniform spacing */
  flex-wrap: nowrap;
}

.nav-links a {
  font-weight: 700;
  opacity: 0.92;
  white-space: nowrap;
  padding: 8px 2px; /* consistent hit area */
  line-height: 1;
}

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

/* right side actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  white-space: nowrap;
}

/* primary nav button */
.btn-nav {
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* language switcher pills */
.lang-switcher {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-switcher a {
  font-size: 0.85rem;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  opacity: 0.8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lang-switcher a.active {
  opacity: 1;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

/* theme toggle */
.theme-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
}

.theme-toggle button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* cart */
.nav-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.cart-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-badge.is-empty {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

/* burger */
.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* =========================
   HERO
   ========================= */
.hero {
  background: var(--secondary);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  display: inline-block;
  font-weight: bold;
  margin-top: 1rem;
}

/* =========================
   CARDS & GRIDS
   ========================= */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* =========================
   FORMS
   ========================= */
input,
textarea,
select {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 4px;
}

button[type="submit"] {
  background: var(--secondary);
  color: white;
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  border-radius: 4px;
}

/* =========================
   CAROUSEL (SIMPLE)
   ========================= */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  height: 400px;
  background-color: #ddd;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-nav {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: center;
}

.carousel-btn {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 980px) {
  /* allow links to scroll instead of spacing exploding */
  .nav-links {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
}

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

  .nav-burger {
    display: flex;
  }

  /* collapse links */
  .nav-links {
    display: none;
  }

  body.nav-open .nav-links {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 10px;
  }

  .brand-logo {
    height: 40px;
  }
}

@media (max-width: 520px) {
  .brand-text {
    display: none;
  }
}
