/* ==========================================================================
   EL JARDÍN DE TORIBIA — Hoja de estilos principal
   ========================================================================== */


/* ==========================================================================
   1. VARIABLES Y RESET
   ========================================================================== */

:root {
  --verde-principal: #5F7358;
  --verde-oscuro: #344936;
  --verde-suave: #DCE5D5;
  --beige: #F3EDE1;
  --crema: #FAF8F2;
  --blanco: #FFFFFF;
  --texto: #30352F;
  --texto-suave: #5B6157;

  --acento: #B98860;

  --whatsapp: #3E6B52;
  --whatsapp-hover: #2F5540;

  --fuente-titulos: 'Cormorant Garamond', serif;
  --fuente-texto: 'Montserrat', sans-serif;

  --radio: 6px;
  --radio-suave: 2px;
  --sombra: 0 12px 30px rgba(52, 73, 54, 0.12);
  --transicion: 0.35s ease;
  --ancho-maximo: 1180px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  font-family: var(--fuente-texto);
  color: var(--texto);
  background-color: var(--crema);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul,
ol {
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--fuente-titulos);
  color: var(--verde-oscuro);
  font-weight: 600;
  line-height: 1.15;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

h3 {
  font-size: 1.4rem;
}

p {
  color: var(--texto-suave);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--verde-principal);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}


/* ==========================================================================
   2. UTILIDADES GENERALES
   ========================================================================== */

.section-inner {
  max-width: var(--ancho-maximo);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-heading {
  max-width: 560px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-heading p {
  margin-top: 10px;
  font-size: 1.05rem;
}

.section-tag {
  font-family: var(--fuente-titulos);
  font-style: italic;
  color: var(--verde-principal);
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: var(--radio);
  font-family: var(--fuente-texto);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition:
    transform var(--transicion),
    box-shadow var(--transicion),
    background-color var(--transicion);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background-color: var(--verde-oscuro);
  color: var(--crema);
}

.btn-primary:hover {
  background-color: var(--verde-principal);
  box-shadow: var(--sombra);
}

.btn-whatsapp {
  background-color: var(--whatsapp);
  color: var(--blanco);
}

.btn-whatsapp:hover {
  background-color: var(--whatsapp-hover);
  box-shadow: 0 12px 24px rgba(62, 107, 82, 0.28);
}

.btn-outline {
  background-color: transparent;
  color: var(--verde-oscuro);
  border: 1px solid var(--verde-principal);
}

.btn-outline:hover {
  background-color: var(--verde-suave);
}


/* ==========================================================================
   3. HEADER Y NAVEGACIÓN
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 248, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(95, 115, 88, 0.15);
}

.header-inner {
  max-width: var(--ancho-maximo);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: var(--fuente-titulos);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--verde-oscuro);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

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

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--texto);
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background-color: var(--verde-principal);
  transition: width var(--transicion);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-whatsapp {
  padding: 10px 22px;
  font-size: 0.88rem;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
}

.menu-toggle .bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--verde-oscuro);
  border-radius: 2px;
  transition:
    transform var(--transicion),
    opacity var(--transicion);
}

.menu-toggle.abierto .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.abierto .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.abierto .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ==========================================================================
   4. HERO
   ========================================================================== */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;

  background: linear-gradient(
    180deg,
    rgba(52, 73, 54, 0.15) 0%,
    rgba(48, 53, 47, 0.35) 65%,
    rgba(48, 53, 47, 0.55) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;

  max-width: 620px;

  margin: 0 24px 64px;

  padding: 44px 40px;

  background-color: rgba(250, 248, 242, 0.94);

  backdrop-filter: blur(4px);

  border-radius: var(--radio);

  box-shadow: var(--sombra);
}

.hero-eyebrow {
  font-family: var(--fuente-titulos);
  font-style: italic;
  color: var(--verde-principal);
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  margin-bottom: 10px;
}

.hero-subtitle {
  font-family: var(--fuente-titulos);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--verde-oscuro);
  margin-bottom: 16px;
}

.hero-text {
  font-size: 1rem;
  margin-bottom: 28px;
  max-width: 46ch;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}


/* ==========================================================================
   5. CATÁLOGO
   ========================================================================== */

.catalogo {
  background-color: var(--crema);
}

.catalogo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}


/* Última fila: centrar las dos tarjetas */

.producto-card:nth-child(7) {
  grid-column: 1 / 2;
  justify-self: end;
  width: calc(100% - 16px);
}

.producto-card:nth-child(8) {
  grid-column: 2 / 3;
  justify-self: start;
  width: calc(100% - 16px);
}


.producto-card {
  background-color: var(--blanco);

  border-radius: var(--radio);

  overflow: hidden;

  box-shadow:
    0 6px 18px rgba(52, 73, 54, 0.08);

  transition:
    transform var(--transicion),
    box-shadow var(--transicion);

  display: flex;
  flex-direction: column;
}

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


/* --------------------------------------------------------------------------
   CONTENEDOR DE IMAGEN
   -------------------------------------------------------------------------- */

.producto-imagen {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: var(--verde-suave);
  position: relative;
}


/* --------------------------------------------------------------------------
   CARRUSEL
   -------------------------------------------------------------------------- */

.producto-carrusel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}


/* Imágenes del carrusel */

.producto-carrusel > img {
  position: absolute;

  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;

  opacity: 0;

  transform: translateX(100%);

  transition:
    transform 0.8s ease-in-out,
    opacity 0.8s ease-in-out;

  pointer-events: none;
}


/* Imagen activa */

.producto-carrusel > img.imagen-activa {
  opacity: 1;
  transform: translateX(0);
}


/* Imagen que sale */

.producto-carrusel > img:not(.imagen-activa) {
  transform: translateX(-100%);
}


/* Indicadores inferiores */

.carrusel-indicadores {
  position: absolute;

  z-index: 10;

  left: 50%;
  bottom: 14px;

  transform: translateX(-50%);

  display: flex;
  align-items: center;
  gap: 7px;

  pointer-events: none;
}


/* Cada punto */

.carrusel-indicador {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background-color: rgba(255, 255, 255, 0.65);

  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.25);

  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
}


/* Punto activo */

.carrusel-indicador.activo {
  background-color: var(--blanco);
  transform: scale(1.25);
}


.producto-info {
  padding: 24px;

  display: flex;
  flex-direction: column;

  flex-grow: 1;
}

.producto-info h3 {
  margin-bottom: 8px;
}

.producto-info p {
  font-size: 0.92rem;
  margin-bottom: 18px;
  flex-grow: 1;
}

.producto-precio {
  font-family: var(--fuente-titulos);
  font-size: 1.3rem;
  color: var(--acento);
  font-weight: 600;
  margin-bottom: 18px;
}

.producto-info .btn {
  width: 100%;
  padding: 12px 20px;
  font-size: 0.85rem;
}


/* ==========================================================================
   6. SOBRE NOSOTROS
   ========================================================================== */

.nosotros {
  background-color: var(--verde-suave);
}

.nosotros-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.nosotros-imagen img {
  border-radius: var(--radio);
  box-shadow: var(--sombra);
}

.nosotros-texto h2 {
  margin-bottom: 20px;
}

.nosotros-texto p {
  margin-bottom: 16px;
  font-size: 1.02rem;
}

.nosotros-texto p:last-child {
  margin-bottom: 0;
}


/* ==========================================================================
   7. CÓMO PEDIR
   ========================================================================== */

.como-pedir {
  background-color: var(--crema);
}

.pasos-lista {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.paso {
  text-align: center;
  padding: 12px;
}

.paso-numero {
  display: inline-block;

  font-family: var(--fuente-titulos);

  font-size: 1.3rem;

  color: var(--verde-principal);

  border: 1px solid var(--verde-principal);

  width: 52px;
  height: 52px;

  line-height: 50px;

  border-radius: 50%;

  margin-bottom: 18px;
}

.paso h3 {
  margin-bottom: 10px;
}

.paso p {
  font-size: 0.95rem;
  max-width: 30ch;
  margin: 0 auto;
}


/* ==========================================================================
   8. CONTACTO
   ========================================================================== */

.contacto {
  background-color: var(--verde-oscuro);
}

.contacto h2,
.contacto h3 {
  color: var(--crema);
}

.contacto-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}

.contacto-texto p {
  color: var(--verde-suave);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.contacto-datos {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contacto-datos li {
  color: var(--verde-suave);
  font-size: 0.92rem;
  padding-left: 18px;
  position: relative;
}

.contacto-datos li::before {
  content: "";

  position: absolute;

  left: 0;
  top: 9px;

  width: 6px;
  height: 6px;

  border-radius: 50%;

  background-color: var(--acento);
}

.contacto-datos strong {
  color: var(--crema);
}

.contacto-card {
  background-color: var(--crema);
  border-radius: var(--radio);
  padding: 36px;
  text-align: center;
}

.contacto-card h3 {
  color: var(--verde-oscuro);
  margin-bottom: 8px;
}

.contacto-card p {
  margin-bottom: 22px;
  font-size: 0.92rem;
}

.contacto-card .btn {
  width: 100%;
}


/* ==========================================================================
   9. FOOTER
   ========================================================================== */

.site-footer {
  background-color: var(--verde-oscuro);

  padding-top: 40px;

  border-top:
    1px solid rgba(250, 248, 242, 0.12);
}

.footer-inner {
  display: flex;

  flex-wrap: wrap;

  justify-content: space-between;

  align-items: center;

  gap: 20px;

  padding-bottom: 32px;
}

.footer-logo {
  font-family: var(--fuente-titulos);

  font-size: 1.25rem;

  color: var(--crema);
}

.footer-tagline {
  color: var(--verde-suave);

  font-size: 0.88rem;

  margin-top: 4px;
}


/* --------------------------------------------------------------------------
   INSTAGRAM Y TIKTOK
   -------------------------------------------------------------------------- */

.instagram-link,
.tiktok-link {
  display: inline-flex;

  align-items: center;

  gap: 8px;

  margin-top: 12px;

  color: var(--verde-suave);

  font-size: 0.88rem;

  transition:
    color var(--transicion),
    transform var(--transicion);
}


/* Efecto al pasar el cursor */

.instagram-link:hover,
.tiktok-link:hover {
  color: var(--crema);

  transform: translateY(-2px);
}


/* Tamaño de los iconos */

.instagram-link svg,
.tiktok-link svg {
  width: 22px;
  height: 22px;

  flex-shrink: 0;
}


/* Separación entre Instagram y TikTok */

.tiktok-link {
  margin-top: 8px;
}


/* --------------------------------------------------------------------------
   NAVEGACIÓN DEL FOOTER
   -------------------------------------------------------------------------- */

.footer-nav {
  display: flex;

  gap: 24px;
}

.footer-nav a {
  color: var(--verde-suave);

  font-size: 0.88rem;

  transition:
    color var(--transicion);
}

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

.footer-copy {
  text-align: center;

  color: rgba(250, 248, 242, 0.55);

  font-size: 0.8rem;

  padding: 18px 0;

  border-top:
    1px solid rgba(250, 248, 242, 0.1);
}


/* ==========================================================================
   10. BOTÓN FLOTANTE DE WHATSAPP
   ========================================================================== */

.whatsapp-float {
  position: fixed;

  right: 22px;
  bottom: 22px;

  z-index: 200;

  width: 58px;
  height: 58px;

  border-radius: 50%;

  background-color: var(--whatsapp);

  color: var(--blanco);

  display: flex;

  align-items: center;
  justify-content: center;

  box-shadow:
    0 10px 24px rgba(62, 107, 82, 0.4);

  transition:
    transform var(--transicion),
    background-color var(--transicion);
}

.whatsapp-float:hover {
  transform: scale(1.08);

  background-color: var(--whatsapp-hover);
}


/* ==========================================================================
   11. ANIMACIONES DE APARICIÓN
   ========================================================================== */

.reveal {
  opacity: 0;

  transform: translateY(16px);

  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;

  transform: translateY(0);
}


/* ==========================================================================
   12. RESPONSIVE
   ========================================================================== */


/* --------------------------------------------------------------------------
   TABLETS
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {

  .nosotros-inner {
    grid-template-columns: 1fr;

    gap: 36px;
  }

  .nosotros-imagen {
    order: -1;
  }

  .contacto-inner {
    grid-template-columns: 1fr;

    gap: 36px;
  }

  .pasos-lista {
    grid-template-columns: 1fr;

    gap: 32px;

    max-width: 420px;

    margin: 0 auto;
  }


  .catalogo-grid {
    grid-template-columns: repeat(2, 1fr);
  }


  /*
   * En 2 columnas, las tarjetas 7 y 8
   * ya no deben forzarse a media columna.
   */

  .producto-card:nth-child(7),
  .producto-card:nth-child(8) {

    grid-column: auto;

    justify-self: stretch;

    width: 100%;
  }

}


/* --------------------------------------------------------------------------
   MÓVILES Y MENÚ HAMBURGUESA
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {

  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;

    top: 68px;

    left: 0;
    right: 0;

    flex-direction: column;

    align-items: stretch;

    gap: 0;

    background-color: var(--crema);

    border-bottom:
      1px solid rgba(95, 115, 88, 0.15);

    padding: 8px 24px 24px;

    transform: translateY(-12px);

    opacity: 0;

    pointer-events: none;

    transition:
      opacity var(--transicion),
      transform var(--transicion);
  }

  .main-nav.abierto {

    transform: translateY(0);

    opacity: 1;

    pointer-events: auto;
  }

  .nav-list {

    flex-direction: column;

    gap: 4px;

    margin-bottom: 18px;
  }

  .nav-link {

    display: block;

    padding: 12px 0;

    border-bottom:
      1px solid rgba(95, 115, 88, 0.12);
  }

  .nav-whatsapp {

    width: 100%;

    text-align: center;
  }


  /*
   * El hero ya no se estira a 82vh.
   * Solo ocupa lo necesario para su contenido.
   */

  .hero {

    min-height: auto;

    padding: 32px 0;

    align-items: flex-end;
  }

  .hero-content {

    margin: 0 16px 40px;

    padding: 32px 26px;
  }

  .hero-buttons .btn {

    width: 100%;
  }

  .section {

    padding: 64px 0;
  }

  .section-heading {

    margin-bottom: 40px;
  }

  .whatsapp-float {

    right: 16px;

    bottom: 16px;

    width: 52px;
    height: 52px;
  }


  /*
   * En celular el catálogo pasa a una sola columna.
   */

  .catalogo-grid {

    grid-template-columns: 1fr;
  }

  .producto-card:nth-child(7),
  .producto-card:nth-child(8) {

    grid-column: auto;

    justify-self: stretch;

    width: 100%;
  }


  /*
   * Footer en celular:
   * Instagram y TikTok quedan uno debajo del otro.
   */

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 16px 24px;
  }

}


/* --------------------------------------------------------------------------
   MÓVILES PEQUEÑOS
   -------------------------------------------------------------------------- */

@media (max-width: 420px) {

  .header-inner {

    padding: 14px 18px;
  }

  .section-inner {

    padding: 0 18px;
  }

}
