/* =========================
   AMATI — Estilos globales
   Inspira tu día, expresa tu fe
   ========================= */

/* Tipografías */
@font-face {
  font-family: 'Matcha Latte Script';
  src: url('fonts/Matcha Latte Script.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* Paleta de colores */
:root {
  --amati-azul: #0f2e5f;        /* azul profundo */
  --amati-fucsia: #b0006d;      /* fucsia oscuro */
  --amati-blanco: #ffffff;       /* blanco */
  --amati-gris: #eef0f3;         /* gris suave */
  --amati-beige: #f6efe7;        /* beige cálido */
  --amati-texto: #1f2430;        /* texto principal */
  --amati-texto-sec: #5a6473;    /* texto secundario */
  --amati-shadow: 0 8px 28px rgba(15,46,95,.12);
  --amati-radius: 16px;
  --amati-radius-xl: 24px;
  --amati-gap: 1.25rem;
  --amati-max: 1080px;

  /* Variables para carrito */
  --cart-bg: #49382f;            /* café oscuro */
  --cart-bg-light: #f9f0e8;      /* beige claro para detalles */
  --cart-color-light: #3e2c23;   /* texto café */
  --cart-color-dark: #49382f;    /* café oscuro */
  --cart-radius: 10px;
}

/* Reset suave + base tipográfica */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--amati-texto);
  background:
    radial-gradient(1200px 800px at 10% -20%, rgba(176,0,109,.06), transparent 60%),
    radial-gradient(1000px 700px at 110% 10%, rgba(15,46,95,.06), transparent 60%),
    var(--amati-beige);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Contenedor */
.container {
  width: min(100% - 2rem, var(--amati-max));
  margin-inline: auto;
}

/* Cabecera/Hero */
h1 {
  font-family: 'Matcha Latte Script', serif;
  font-weight: normal;
  font-size: clamp(3rem, 2rem + 4vw, 4rem);
  line-height: 1.1;
  text-align: center;
  color: var(--amati-azul);
  margin: 2.4rem auto .5rem;
}
h1 + p, h1 + div, h1 + span {
  display: block;
  text-align: center;
  color: var(--amati-texto-sec);
  font-size: clamp(1rem, .9rem + .3vw, 1.125rem);
  margin-bottom: 1.5rem;
}

/* Navegación */
nav, .top-links {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem auto 2rem;
}
nav a, .top-links a {
  text-decoration: none;
  font-weight: 600;
  padding: .65rem 1rem;
  border-radius: 999px;
  background: var(--amati-blanco);
  color: var(--amati-azul);
  box-shadow: var(--amati-shadow);
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
  border: 1px solid rgba(15,46,95,.08);
}
nav a:hover, .top-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(15,46,95,.18);
}

 /* Botón WhatsApp 
a[href*="wa.me"], a[href*="whatsapp"] {
  
 /* background: linear-gradient(90deg, #25D366, #128C7E);*/
  
 /* color: #fff !important;*/
  
 /* border: none;*/
}

.social-icon {
  background: none !important;
  padding: 0;
  border: none;
}

/* Secciones */
section, .section {
  padding: 2rem 0;
}
section > h2, .section > h2, h2 {
  font-family: 'Matcha Latte Script', serif;
  color: var(--amati-azul);
  font-size: clamp(2.5rem, 1.8rem + 3vw, 3rem);
  margin: 1.5rem 0 .75rem;
  text-align: center;
}

/* Texto general */
p { margin: .5rem 0 1rem; color: var(--amati-texto); }
small, .muted { color: var(--amati-texto-sec); }

/* =========================
   Nuestros productos: Grid de 3 columnas
   ========================= */
#nuestros-productos, section:has(h2:contains("Nuestros productos")) {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Cada producto como tarjeta invisible */
#nuestros-productos > div,
section:has(h2:contains("Nuestros productos")) > div {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#nuestros-productos img,
section:has(h2:contains("Nuestros productos")) img {
  width: 100%;
  max-width: 600px;
  border-radius: var(--amati-radius);
  box-shadow: var(--amati-shadow);
  object-fit: cover;
  margin-bottom: .6rem;
}

.product-card {
  overflow: visible; /* permite que la imagen salga de la caja */
  position: relative; /* para que el z-index funcione */
}

img {
  transition: transform 0.3s ease; /* Suaviza la transición */
  cursor: pointer; /* Cambia el cursor para indicar interactividad */
  position: relative;
  z-index: 1;  /* Base para la imagen */
  display: block; /* Para eliminar espacios extra debajo de la imagen */
  margin: 0 auto; /* Centra la imagen */
}

img:hover {
  transform: scale(3.0); /* Aumenta la imagen al 120% */
  z-index: 10; /* Opcional: para que se superponga sobre otros elementos */
}

.product-card img {
  transition: transform 0.3s ease;
  cursor: pointer;
  position: relative; /* para usar z-index */
  z-index: 1; /* para que esté arriba de otros elementos */
}

.product-card img:hover {
  transform: scale(1.8); /* la amplías al 180% o más */
  z-index: 10; /* más arriba cuando está hover */
}

img.no-zoom:hover,
.product-card img.no-zoom:hover,
#nuestros-productos img.no-zoom:hover {
  transform: none !important;
  z-index: 1 !important;
  cursor: default;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* relación 16:9 */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 2rem auto; /* centra en la página */
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 70%;
  border: none;
  border-radius: var(--amati-radius); /* opcional: borde redondeado si usas variables */
  box-shadow: var(--amati-shadow);    /* opcional: sombra suave si usas variables */
}


#nuestros-productos h3,
section:has(h2:contains("Nuestros productos")) h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--amati-azul);
  margin: .2rem 0;
}

#nuestros-productos p.price,
section:has(h2:contains("Nuestros productos")) p.price {
  font-weight: 700;
  color: var(--amati-fucsia);
  margin: .1rem 0 .5rem;
}

/* Responsive productos */
@media (max-width: 900px) {
  #nuestros-productos,
  section:has(h2:contains("Nuestros productos")) {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  #nuestros-productos,
  section:has(h2:contains("Nuestros productos")) {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Botones genéricos
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1rem;
  border-radius: 12px;
  background: var(--amati-azul);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--amati-shadow);
  transition: transform .15s ease, box-shadow .15s ease, opacity .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(15,46,95,.22); }
.btn--alt { background: var(--amati-fucsia); }
.btn--light { background: var(--amati-blanco); color: var(--amati-azul); border: 1px solid rgba(15,46,95,.12); }

/* Acentos de enlaces */
a {
  color: var(--amati-fucsia);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
a:hover { text-decoration: underline; }

/* Imágenes sueltas */
img {
  max-width: 50%;
  border-radius: var(--amati-radius);
  box-shadow: var(--amati-shadow);
}

/* Footer + redes sociales */
footer {
  margin-top: 3rem;
  padding: 1.5rem 0 2.5rem;
  background: linear-gradient(180deg, rgba(15,46,95,.06), transparent);
  text-align: center;
}
.social {
  display: flex;
  gap: .6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: .5rem 0 1rem;
}
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--amati-blanco);
  border: 1px solid rgba(31,36,48,.08);
  box-shadow: var(--amati-shadow);
  text-decoration: none;
  font-size: 0.65rem;
}
.social a[href*="instagram"] { background: radial-gradient(circle at 30% 30%, #feda77, #dd2a7b 45%, #8134af 70%, #515bd4); color: #fff; }
.social a[href*="facebook"] { background: #1877f2; color: #fff; }
.social a[href*="wa.me"] { background: transparent; }

.social-links {
  display: flex;          /* Activa flexbox */
  justify-content: center; /* Centra los íconos horizontalmente */
  gap: 15px;              /* Espacio entre cada ícono */
  margin-bottom: 10px;    /* Separación del texto de abajo */
}

.social-links a img {
  transition: transform 0.2s;
}

.social-links a img:hover {
  transform: scale(1.1); /* Un pequeño efecto al pasar el mouse */
}


/* Titulares con subrayado decorativo */
h2, h3 {
  position: relative;
}
h2::after, h3::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -8px;
  width: 72px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--amati-fucsia), var(--amati-azul));
  opacity: .6;
}

/* Utilidades rápidas */
.grid { display: grid; gap: var(--amati-gap); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.center { text-align: center; }
.max { max-width: var(--amati-max); margin-inline: auto; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: .5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }

/* Responsivo general */
@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  nav, .top-links { gap: .5rem; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}

/* ===================================
   Correcciones para catálogo responsivo
   =================================== */

body {
  overflow-x: hidden; /* evita scroll horizontal */
}

/* Grid limpio para los productos */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
  border-radius: var(--amati-radius);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--amati-shadow);
}

.product-card img {
  width: 100%;
  max-width: 280px;
  height: auto;
  margin-bottom: 1rem;
  border-radius: var(--amati-radius);
  box-shadow: var(--amati-shadow);
}

.product-btn {
  display: inline-block;
  background: var(--amati-azul);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}

.product-btn:hover {
  background: var(--amati-fucsia);
}

/* Video responsive */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 2rem auto;
  max-width: 90%;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--amati-radius);
  box-shadow: var(--amati-shadow);
}

/* Responsive para tablet y móvil */
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  header img {
    width: 50%;
  }

  .tagline {
    font-size: 1rem;
    text-align: center;
  }

  .product-btn {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
}

/* --- Estilos del Carrito Amati --- */
#cart {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--cart-bg);
  color: var(--amati-blanco);
  padding: 15px 20px;
  border-radius: var(--cart-radius);
  cursor: pointer;
  z-index: 1000;
  font-family: Arial, sans-serif;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: background 0.3s ease;
}

#cart:hover {
  background: #6a4f3a; /* tono más claro café al pasar mouse */
}

#cart-details {
  display: none;
  position: fixed;
  bottom: 70px;
  right: 20px;
  background: var(--cart-bg-light);
  color: var(--cart-color-light);
  width: 320px;
  max-height: 450px;
  overflow-y: auto;
  border-radius: var(--cart-radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  padding: 15px;
  z-index: 1000;
  font-family: Arial, sans-serif;
}

#cart-details h3 {
  margin-top: 0;
  font-size: 18px;
}

#cart-items li {
  margin: 5px 0;
}

#cart-details button {
  margin-top: 10px;
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  font-size: 14px;
}

#cart-details button:first-of-type {
  background: var(--cart-bg);
  color: var(--amati-blanco);
  border: none;
}

#cart-details #clear-cart {
  background: transparent;
  color: var(--cart-color-dark);
  border: 1px solid var(--cart-color-dark);
}

/* --- Estilos de los contadores de productos --- */
.counter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.counter button {
  background-color: var(--cart-bg);
  color: var(--amati-blanco);
  border: none;
  padding: 6px 12px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.counter button:hover {
  background-color: #6a4f3a; /* tono más claro al pasar el mouse */
}

.counter .count {
  min-width: 24px;
  text-align: center;
  font-weight: bold;
  color: var(--cart-color-dark);
}

/* Responsive carrito */
@media (max-width: 480px) {
  #cart-details {
    width: 90vw;
    right: 5vw;
    bottom: 70px;
  }

  #cart {
    bottom: 15px;
    right: 15px;
    padding: 12px 16px;
    font-size: 14px;
  }
}
