/* ============================================
   VUELVE AL ORIGEN - Sistema de Diseño Global
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Montserrat:wght@300;400;500;600;700&family=Lato:wght@300;400;700&display=swap');

/* === VARIABLES CSS === */
:root {
  --naranja: #f49c4d;
  --naranja-claro: #f7b87a;
  --naranja-oscuro: #e08535;
  --verde: #2c4c23;
  --verde-claro: #3d6830;
  --verde-muy-claro: #e8f0e5;
  --blanco: #ffffff;
  --gris-claro: #f8f8f6;
  --gris-medio: #e8e8e4;
  --gris-texto: #6b6b6b;
  --negro-suave: #1a1a1a;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Montserrat', sans-serif;
  --font-body: 'Lato', sans-serif;
  --sombra-suave: 0 4px 20px rgba(0,0,0,0.08);
  --sombra-media: 0 8px 40px rgba(0,0,0,0.12);
  --sombra-fuerte: 0 20px 60px rgba(0,0,0,0.18);
  --radio: 12px;
  --radio-grande: 24px;
  --transicion: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* === RESET Y BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--blanco);
  color: var(--negro-suave);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transicion);
}

ul {
  list-style: none;
}

/* === TIPOGRAFÍA === */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p {
  font-size: 1rem;
  color: var(--gris-texto);
  line-height: 1.8;
}

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

.section-padding {
  padding: 100px 0;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--naranja);
  background: rgba(244, 156, 77, 0.1);
  border: 1px solid rgba(244, 156, 77, 0.3);
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}

.section-title {
  color: var(--verde);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--gris-texto);
  max-width: 600px;
  margin: 0 auto 60px;
  text-align: center;
}

.text-center { text-align: center; }
.text-naranja { color: var(--naranja); }
.text-verde { color: var(--verde); }

/* === BOTONES === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transicion);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.btn:hover::before { transform: translateX(0); }

.btn-primary {
  background: var(--naranja);
  color: var(--blanco);
  box-shadow: 0 4px 20px rgba(244, 156, 77, 0.35);
}
.btn-primary:hover {
  background: var(--naranja-oscuro);
  box-shadow: 0 8px 30px rgba(244, 156, 77, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--verde);
  border: 2px solid var(--verde);
}
.btn-secondary:hover {
  background: var(--verde);
  color: var(--blanco);
  transform: translateY(-2px);
}

.btn-verde {
  background: var(--verde);
  color: var(--blanco);
  box-shadow: 0 4px 20px rgba(44, 76, 35, 0.3);
}
.btn-verde:hover {
  background: var(--verde-claro);
  box-shadow: 0 8px 30px rgba(44, 76, 35, 0.45);
  transform: translateY(-2px);
}

.btn-blanco {
  background: var(--blanco);
  color: var(--verde);
}
.btn-blanco:hover {
  background: var(--verde-muy-claro);
  transform: translateY(-2px);
}

/* === NAVBAR === */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s ease;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 0;
  box-shadow: 0 2px 30px rgba(0,0,0,0.08);
}

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

.nav-logo img {
  height: 74px;
  width: auto;
  transition: var(--transicion);
}
#navbar.scrolled .nav-logo img { height: 61px; }

/* Logo claro (blanco) sobre el slider */
.nav-logo .logo-light { display: block; }
.nav-logo .logo-dark  { display: none; }

/* Al hacer scroll → logo de color */
#navbar.scrolled .nav-logo .logo-light { display: none; }
#navbar.scrolled .nav-logo .logo-dark  { display: block; }

/* Mobile → siempre logo de color */
@media (max-width: 768px) {
  .nav-logo .logo-light { display: none !important; }
  .nav-logo .logo-dark  { display: block !important; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blanco);
  position: relative;
  padding-bottom: 4px;
}

#navbar.scrolled .nav-links a { color: var(--verde); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--naranja);
  transition: width 0.3s ease;
}

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

.nav-links a:hover { color: var(--naranja); }
#navbar.scrolled .nav-links a:hover { color: var(--naranja); }

.nav-links a.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--naranja);
  color: var(--blanco) !important;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.75rem !important;
  line-height: 1;
}
.nav-links a.nav-cta:hover { 
  background: var(--naranja-oscuro); 
  color: var(--blanco) !important; 
}
.nav-links a.nav-cta::after { display: none !important; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.nav-hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--blanco);
  border-radius: 2px;
  transition: var(--transicion);
}

#navbar.scrolled .nav-hamburger span { background: var(--verde); }

.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--verde);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.nav-mobile.open {
  display: flex;
  opacity: 1;
  transform: translateX(0);
}

.nav-mobile a {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--blanco);
  opacity: 0.85;
  transition: var(--transicion);
}

.nav-mobile a:hover { color: var(--naranja); opacity: 1; }

/* === FOOTER === */
footer {
  background: var(--verde);
  color: rgba(255,255,255,0.85);
  padding: 70px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 50px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-brand img {
  height: 60px;
  margin-bottom: 20px;
}

.footer-brand p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.footer-social a {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transicion);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.footer-social a svg {
  width: 20px;
  height: 20px;
  fill: white;
  transition: var(--transicion);
}

.footer-social a:hover {
  background: var(--naranja);
  transform: translateY(-3px);
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--naranja);
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: var(--transicion);
}

.footer-col ul li a:hover { color: var(--blanco); padding-left: 6px; }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.footer-contact-item span:first-child {
  font-size: 1.1rem;
  margin-top: 2px;
}

.footer-logos {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.footer-logos img {
  height: 65px;
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
}

/* === WHATSAPP FLOTANTE === */
.whatsapp-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  width: 58px;
  height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.45);
  transition: var(--transicion);
  text-decoration: none;
}

.whatsapp-btn:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 10px 35px rgba(37, 211, 102, 0.6);
}

.whatsapp-btn svg {
  width: 30px;
  height: 30px;
  fill: white;
}

.whatsapp-pulse {
  position: absolute;
  inset: 0;
  background: #25D366;
  border-radius: 50%;
  animation: pulse-wa 2s infinite;
}

@keyframes pulse-wa {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* === TARJETAS === */
.card {
  background: var(--blanco);
  border-radius: var(--radio-grande);
  overflow: hidden;
  box-shadow: var(--sombra-suave);
  transition: var(--transicion);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--sombra-fuerte);
}

.card-img-wrap {
  overflow: hidden;
  position: relative;
}

.card-img-wrap img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img-wrap img { transform: scale(1.07); }

.card-body {
  padding: 28px;
}

/* === SKELETON / PLACEHOLDER ANIMADO === */
.skeleton {
  background: linear-gradient(90deg, var(--gris-medio) 25%, var(--gris-claro) 50%, var(--gris-medio) 75%);
  background-size: 200% 100%;
  animation: skeleton-anim 1.5s infinite;
}

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

/* === SCROLL REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.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; }

/* === DIVIDER === */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, var(--naranja), var(--naranja-claro));
  border-radius: 2px;
  margin: 0 auto 30px;
}

/* === BADGE === */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-naranja { background: var(--naranja); color: white; }
.badge-verde { background: var(--verde); color: white; }

/* === HERO BASE === */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* === FORM STYLES === */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--verde);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--gris-medio);
  border-radius: var(--radio);
  background: var(--blanco);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--negro-suave);
  transition: var(--transicion);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--naranja);
  box-shadow: 0 0 0 3px rgba(244, 156, 77, 0.15);
}

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

/* === MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

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

.modal-box {
  background: var(--blanco);
  border-radius: var(--radio-grande);
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(30px) scale(0.97);
  transition: transform 0.35s ease;
  position: relative;
}

.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: sticky;
  top: 16px;
  left: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--verde);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  margin: 16px 16px 0 auto;
  transition: var(--transicion);
  z-index: 10;
}

.modal-close:hover { background: var(--naranja); transform: rotate(90deg); }

/* === CARRITO === */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  background: var(--blanco);
  box-shadow: -10px 0 50px rgba(0,0,0,0.15);
  z-index: 1001;
  transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  display: flex;
  flex-direction: column;
}

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

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--gris-medio);
}

.cart-header h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--verde);
}

.cart-close {
  width: 36px;
  height: 36px;
  background: var(--gris-claro);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transicion);
}

.cart-close:hover { background: var(--naranja); color: white; }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
}

.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--gris-claro);
}

.cart-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
}

.cart-item-name {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--negro-suave);
  margin-bottom: 4px;
}

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

.cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gris-texto);
  font-size: 1.1rem;
  transition: var(--transicion);
  padding: 4px;
}

.cart-item-remove:hover { color: #e55555; }

.cart-footer {
  padding: 24px 28px;
  border-top: 1px solid var(--gris-medio);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.cart-total span:first-child {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gris-texto);
}

.cart-total-price {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--verde);
  font-weight: 600;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gris-texto);
}

.cart-empty span {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .section-padding { padding: 70px 0; }
  
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

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

@media (max-width: 480px) {
  .btn { padding: 12px 24px; font-size: 0.76rem; }
  .whatsapp-btn { bottom: 20px; right: 20px; }
}
