/* =========================
   DESIGN SYSTEM
   ========================= */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;700&display=swap');

:root {
  /* Colors */
  --bg-main: #fdfdf4;
  --bg-sage: #e8f5e1;
  --bg-white: #ffffff;
  --color-primary: #2a7f2a;
  --color-primary-dark: #1e5a1e;
  --color-accent: #f9e79f;
  --color-text: #1d2b1d;
  --color-text-muted: #5e6d5e;
  --color-border: #e0e6e0;
  
  /* Spacing (Restored to compact) */
  --section-padding: 2rem 0;
  --container-width: 1200px;
}

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

body {
  font-family: 'Lora', serif;
  color: var(--color-text);
  line-height: 1.6;
  background-color: var(--bg-main);
}

h1, h2, h3, h4, .section-title {
  font-family: 'Lora', serif;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.section-title {
  font-family: 'Lora', serif;
  font-weight: 700;
}

/* CONTAINER */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

/* =========================
   HEADER (3 columnas Minimal)
   ========================= */
.site-header {
  background-color: var(--bg-main); /* Match reference image background */
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0;
}

.header-left {
  display: flex;
  justify-content: flex-start;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
}

.hamburger .line {
  display: block;
  width: 24px;
  height: 1.5px;
  background-color: var(--color-text);
  transition: all 0.3s ease;
}

.nav-desktop {
  display: none !important; /* Always hidden in favor of minimalist look */
}

.site-header .logo img {
  height: 48px;
  width: auto;
  display: block;
  mix-blend-mode: multiply; /* Removes white background from image */
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 1.35rem; /* Slightly larger, minimalist */
  color: var(--color-text);
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 8px;
  text-decoration: none;
}

.icon-btn:hover {
  color: var(--color-primary);
}

.cart-badge {
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 10px;
  position: absolute;
  top: 4px;
  right: 0px;
  font-weight: bold;
}

.admin-gauge-btn {
  color: var(--color-primary) !important;
}

.logout-form {
  margin: 0;
  display: flex;
  align-items: center;
}

/* Idiomas */
.lang {
  position: relative;
}

.lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: white;
  color: #333;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  min-width: 140px;
  z-index: 50;
}

.lang-menu a {
  display: block;
  padding: 0.65rem 0.8rem;
  text-decoration: none;
  color: #333;
  font-weight: 700;
}

.lang-menu a:hover {
  background: #f2f2f2;
}

.lang:hover .lang-menu {
  display: block;
}

/* SIDEBAR MENU & OVERLAY */
.menu-toggle {
  display: none;
}

.nav-mobile {
  position: fixed;
  top: 0;
  left: -100%; /* Hidden by default */
  width: 85%;
  max-width: 400px;
  height: 100vh;
  background-color: var(--bg-main);
  z-index: 2000;
  box-shadow: 10px 0 30px rgba(0,0,0,0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 2rem;
}

.sidebar-header {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 2rem;
}

.sidebar-close {
  font-size: 1.8rem;
  color: var(--color-text);
  cursor: pointer;
  transition: color 0.3s;
}

.sidebar-close:hover {
  color: var(--color-primary);
}

.nav-mobile ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-mobile li {
  margin-bottom: 1.5rem;
}

.nav-mobile a {
  display: block;
  color: var(--color-text);
  text-decoration: none;
  font-family: 'Lora', serif;
  font-size: 1.8rem; /* Large, bold serif as in image */
  font-weight: 700;
  line-height: 1.1;
  transition: all 0.3s ease;
}

.nav-mobile a:hover {
  color: var(--color-primary);
  padding-left: 10px;
}

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

.btn-sidebar {
  display: inline-block;
  font-family: 'Lora', serif;
  text-decoration: none;
  color: var(--color-text-muted);
  font-weight: bold;
}

/* Overlay logic */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  cursor: pointer;
}

.menu-toggle:checked ~ .nav-mobile {
  left: 0;
}

.menu-toggle:checked ~ .sidebar-overlay {
  opacity: 1;
  visibility: visible;
}

/* SECTION VARIATIONS */
.section-sage {
  background-color: var(--bg-sage);
}

.section-cream {
  background-color: var(--bg-main);
}

.mobile-actions {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.mobile-lang {
  display: flex;
  gap: 0.75rem;
  padding: 0.8rem 5%;
  color: white;
  align-items: center;
  flex-wrap: wrap;
}

.mobile-lang a {
  text-decoration: underline;
}

/* BUTTONS */
.btn-primary {
  background-color: var(--color-primary);
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  cursor: pointer;
  border-radius: 5px; /* Back to original */
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s;
  font-weight: 700;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
}

.btn-secondary {
  background-color: var(--color-primary);
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  cursor: pointer;
  border-radius: 5px; /* Back to original */
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s;
  font-weight: 700;
}

.btn-secondary:hover {
  background-color: var(--color-primary-dark);
}

/* SECTIONS */
.section-container {
  padding: var(--section-padding);
}

.section-title {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* FORMS */
input, textarea {
  padding: 0.8rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 1rem;
  width: 100%;
}

select {
  padding: 0.8rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 1rem;
  width: auto;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #2a7f2a;
  box-shadow: 0 0 0 2px rgba(42, 127, 42, 0.1);
}

/* FOOTER */
footer {
  background-color: #2a7f2a;
  color: white;
  padding: 4rem 0 2rem 0;
  text-align: center;
}

.footer-newsletter {
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 3rem;
}

.newsletter-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.newsletter-content h3 {
  margin: 0;
}

.newsletter-form {
  display: flex;
  position: relative;
  width: 100%;
  max-width: 400px;
}

.newsletter-form input {
  padding-right: 50px;
}

.newsletter-form button {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  padding: 0 15px;
  border-radius: 4px;
}

footer ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  padding: 0;
}

footer ul li a {
  color: white;
  text-decoration: none;
}

footer ul li a:hover {
  text-decoration: underline;
}

/* HELPERS */
.full-width { width: 100%; }
.center-content { text-align: center; }
.margin-top-1 { margin-top: 1rem; }
.margin-top-2 { margin-top: 2rem; }
.hidden { display: none !important; }
.min-height-80 { min-height: 80vh; }

/* ALERTS */
.alert {
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

.alert-link {
  color: inherit;
  font-weight: bold;
  margin-left: 10px;
  text-decoration: underline;
}

/* AUTH HELPERS */
.auth-main {
  max-width: 520px;
  margin: 0 auto;
}

.checkbox-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.checkbox-group input {
  width: auto;
}

/* RESPONSIVE BREAKPOINT */
@media (max-width: 768px) {
  .header-container {
    grid-template-columns: auto 1fr auto;
  }

  .lang-menu {
    display: none !important;
  }
}
