/* =============================================
   Salud Natural Luz — Storefront
   Colors: --green #1a953d / --green-pale #E8F8EE / --white #FFFFFF
   ============================================= */

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

:root {
  --green:       #1a953d;
  --green-light: #157931;
  --green-pale:  #E8F8EE;
  --green-tint:  #F2FBF5;
  --gold:        #F5C842;
  --gold-dark:   #D4A820;
  --cream:       #ffffff;
  --terra:       #C0392B;
  --dark:        #1A1A1A;
  --gray:        #6B6B6B;
  --white:       #ffffff;
  --border:      #C8EFD2;
  --shadow:      0 4px 20px rgba(12,194,65,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  background: var(--white);
  color: var(--dark);
  font-size: 16px;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- HEADER ---- */
.header {
  background: var(--white);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  line-height: 1.1;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.brand-name {
  font-family: 'Bullina', sans-serif;
  font-weight: 400;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--green);
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav a:hover { color: var(--green); }

.cart-btn {
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 24px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.cart-btn:hover { background: var(--green-light); }

.admin-link {
  opacity: 0.5;
}

.admin-link:hover { opacity: 1; }

.cart-count {
  background: var(--gold);
  color: var(--dark);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 0 0 3px white;
}

/* ---- HERO ---- */
.hero {
  background: linear-gradient(135deg, #0f6b2a 0%, var(--green) 50%, #1db84a 100%);
  color: var(--white);
  padding: 100px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 24px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.hero-text h1 {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--white);
}

.hero-text h1 span {
  color: var(--gold);
  display: block;
}

.hero-text p {
  font-size: 1.1rem;
  opacity: 0.88;
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-trust {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-trust span {
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.9;
  letter-spacing: 0.02em;
}

.hero-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

.hero-ctas-secondary {
  margin-top: 4px;
  margin-bottom: 0;
}

.hero-ctas .btn-gold {
  padding: 10px 18px;
  font-size: 0.88rem;
  background: var(--green-pale);
  color: var(--green);
  border-color: var(--green-pale);
  outline: none;
}

.hero-ctas .btn-gold:hover {
  background: #d0f0da;
  border-color: #d0f0da;
}

.hero-visual {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo-ring {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 3px solid rgba(255,255,255,0.25);
  box-shadow: 0 0 0 16px rgba(255,255,255,0.06), 0 24px 64px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  overflow: hidden;
}

.hero-logo-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-logo-name {
  text-align: center;
  margin-top: 20px;
  font-family: 'Bullina', sans-serif;
  font-style: italic;
  font-size: 2.2rem;
  color: var(--white);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  text-align: center;
}

.btn-gold {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
  outline: 4px solid white;
  outline-offset: 3px;
}

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

.btn-green {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-green:hover { background: var(--green-light); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

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

.btn.full { width: 100%; }

/* ---- SECTION TITLES ---- */
.section-title {
  font-family: 'Bullina', sans-serif;
  font-size: 2rem;
  font-weight: 400;
  font-style: italic;
  color: var(--green);
  text-align: center;
  margin-bottom: 8px;
}

.section-title.white { color: var(--white); }

.section-sub {
  text-align: center;
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 48px;
}

/* ---- PRODUCTOS ---- */
.productos {
  padding: 80px 0;
}

.categoria-section {
  background: var(--green-tint);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.categoria-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.categoria-icon { font-size: 2.5rem; }

.categoria-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--green);
  margin-bottom: 4px;
}

.categoria-desc {
  font-size: 0.85rem;
  color: var(--gray);
}

.grid-loading, .grid-empty {
  color: var(--gray);
  font-size: 0.95rem;
  padding: 24px 0;
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.producto-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.producto-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
}

.producto-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  overflow: hidden;
}

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

.producto-img.placeholder {
  background: var(--green-pale);
}

.producto-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.producto-nombre {
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--dark);
  margin-bottom: 4px;
}

.producto-desc {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 12px;
}

.producto-variante {
  margin-bottom: 14px;
}

.producto-variante label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
  display: block;
  margin-bottom: 6px;
}

.variante-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.variante-btn {
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--dark);
}

.variante-btn.selected {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.producto-precio {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 16px;
  margin-top: auto;
}

.precio-mayoreo {
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--terra);
}

.precio-label {
  font-size: 0.75rem;
  color: var(--gray);
}

.precio-pvp {
  font-size: 0.8rem;
  color: var(--gray);
  margin-left: auto;
}

.stock-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.stock-badge.disponible { background: #e8f5e9; color: #2D6B2F; }
.stock-badge.pocas { background: #fff8e1; color: #A8893A; }
.stock-badge.agotado { background: #fdecea; color: #C0392B; }

.producto-add {
  width: 100%;
  padding: 12px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.producto-add:hover { background: var(--green-light); }

.producto-add.disabled {
  background: var(--border);
  color: var(--gray);
  cursor: not-allowed;
}

/* ---- PUNTOS ---- */
.puntos {
  background: var(--cream);
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.puntos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 700px;
  margin: 48px auto 0;
}

.punto-card {
  background: var(--green-pale);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  border: 2px solid var(--border);
}

.punto-icon { font-size: 2.5rem; margin-bottom: 12px; }

.punto-card h3 {
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  color: var(--green);
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.punto-card p { color: var(--gray); font-size: 0.95rem; }

.punto-horario {
  font-size: 0.8rem !important;
  color: var(--gold-dark) !important;
  font-weight: 700;
  margin-top: 8px !important;
}

/* ---- CONTACTO ---- */
.contacto {
  background: var(--green);
  padding: 80px 0;
}

.contacto-inner { text-align: center; }

.contacto-sub {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  margin-bottom: 32px;
}

.contacto-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- FOOTER ---- */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
}

/* ---- CART SIDEBAR ---- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100vh;
  background: var(--white);
  z-index: 201;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,0.15);
  transition: right 0.3s ease;
}

.cart-sidebar.open { right: 0; }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 2px solid var(--gold);
}

.cart-header h3 {
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  color: var(--green);
  font-size: 1.2rem;
}

.cart-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--gray);
  padding: 4px 8px;
  border-radius: 4px;
}

.cart-close:hover { background: var(--cream); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-clear {
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--terra);
  cursor: pointer;
  margin-bottom: 12px;
  transition: background 0.15s;
}

.cart-clear:hover { background: #fdecea; }

.delete-btn {
  color: var(--terra) !important;
  margin-left: 4px;
}

.cart-empty {
  text-align: center;
  color: var(--gray);
  margin-top: 40px;
  font-size: 0.95rem;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-info { flex: 1; }

.cart-item-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--dark);
}

.cart-item-variant {
  font-size: 0.8rem;
  color: var(--gray);
}

.cart-item-price {
  font-weight: 700;
  color: var(--terra);
  font-size: 0.95rem;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.qty-btn:hover { background: var(--border); }

.qty-num {
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.cart-footer {
  padding: 20px 24px;
  border-top: 2px solid var(--border);
  background: var(--cream);
}

.cart-customer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.cart-customer input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--white);
  color: var(--dark);
  box-sizing: border-box;
}

.cart-customer input:focus {
  outline: none;
  border-color: var(--green);
}

.cart-location {
  margin-bottom: 16px;
}

.cart-location label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
  display: block;
  margin-bottom: 6px;
}

.cart-location select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--white);
  color: var(--dark);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--dark);
}

#cartTotal { color: var(--terra); }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  max-width: 480px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--cream);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--gray);
}

/* ---- POWERED BY ---- */
.footer-powered {
  display: block;
  margin-top: 12px;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-powered:hover { color: rgba(255,255,255,0.8); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav { display: none; }

  .hero-inner { flex-direction: column; text-align: center; }
  .hero-text h1 { font-size: 2.4rem; }
  .hero-trust { justify-content: center; }
  .hero-ctas { justify-content: center; }
  .hero-logo-ring { width: 200px; height: 200px; }
  .hero-eyebrow { font-size: 0.78rem; }

  .puntos-grid { grid-template-columns: 1fr; }

  .cart-sidebar { width: 100%; right: -100%; }

  .contacto-links { flex-direction: column; align-items: center; }
}
