/* ===============================
   VARIABLES DE COLOR Y TIPOGRAFÍA
   Definición de colores y fuentes globales para el sitio
================================= */
:root {
  /* Colores */
  --color-base: #f5e6d3; /* Alabastro Cálido - fondo principal */
  --color-primario: #a0522d; /* Siena Tostado - títulos, CTA */
  --color-acento: #87a96b; /* Verde Salvia - detalles secundarios */
  --color-premium: #d4a437; /* Vara de Oro - acentos premium */
  --color-suave: #c47a6d; /* Rosa Polvoriento - acentos suaves */

  /* Tipografía */
  --font-body: "Inter", sans-serif;
  --font-title: "Playfair Display", serif;
}

/* ===============================
   ESTILOS GENERALES (MÓVIL)
   Reset y estilos base para todos los elementos
================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-base);
  color: var(--color-primario);
  line-height: 1.6;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-primario);
  text-align: center;
}

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

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

/* ===============================
   BOTONES DE COMPRA
   Estilos para botones principales de acción
================================= */
.btn__comprar {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  border-radius: 30px;
  text-decoration: none;
  color: rgb(0, 0, 0);
  font-weight: bold;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
  outline: none;
  background-color: transparent;
  border: 1px solid var(--color-primario);
  cursor: pointer;
}

.btn__comprar:hover {
  background-color: black;
  color: white;
  box-shadow: 0 4px 24px rgba(160, 82, 45, 0.18);
  transform: translateY(-3px) scale(1.04);
}

/* ===============================
   HEADER Y NAVBAR (MÓVIL)
   Encabezado y barra de navegación principal
================================= */
.header {
  background-color: var(--color-base);
  padding: 0.5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header__container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.header__logo {
  width: 100px;
  margin: auto;
}

.navbar {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.navbar__list {
  display: flex;
  flex-direction: row;
  gap: 0.8rem;
  align-items: center;
}

.navbar__list a {
  color: var(--color-primario);
  font-size: 0.9rem;
  font-weight: bold;
}

.navbar__link {
  color: black;
  font-weight: 500;
}

.navbar__list a.navbar__link--active {
  color: var(--color-acento);
}

.navbar__carrito {
  margin: 1rem;
}

/* ===============================
   HERO / BANNER (MÓVIL)
   Sección principal de bienvenida y promoción
================================= */
.hero {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  flex-direction: column;
  background: linear-gradient(90deg, #f5e6d3 60%, #fffbe9 100%);
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
  padding: 1rem 0 0.5rem 0;
}

.hero__container {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
  text-align: center;
  width: 100%;
  height: auto;
  margin-top: 2.6rem;
}

.hero__content {
  max-width: 100%;
  z-index: 2;
  padding: 1rem 0.5rem 1rem 0.5rem;
}

.hero__title {
  font-size: 2rem;
  font-family: var(--font-title);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-primario);
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 8px #fffbe9;
  text-align: center;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--color-suave);
  margin-bottom: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hero__btn {
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--color-premium) 0%,
    var(--color-acento) 100%
  );
  color: #fff;
  padding: 0.9rem 1.5rem;
  border-radius: 40px;
  font-size: 1.05rem;
  font-weight: bold;
  box-shadow: 0 6px 24px rgba(160, 82, 45, 0.18);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
  text-decoration: none;
  letter-spacing: 0.08em;
  outline: none;
  margin-top: 0.7rem;
  border: none;
  cursor: pointer;
  text-shadow: 0 1px 8px #fffbe9;
  box-sizing: border-box;
  animation: cta-pulse 1.5s infinite alternate;
}

.hero__btn:hover,
.hero__btn:focus {
  background: linear-gradient(
    90deg,
    var(--color-acento) 0%,
    var(--color-premium) 100%
  );
  color: var(--color-primario);
  box-shadow: 0 12px 32px rgba(160, 82, 45, 0.22);
  transform: translateY(-4px) scale(1.08);
  animation: none;
}

@keyframes cta-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(160, 82, 45, 0.1);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(160, 82, 45, 0.04);
    transform: scale(1.04);
  }
}

.hero__image {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 0.1rem;
  height: auto;
}

.hero__img {
  max-width: 98vw;
  width: 98vw;
  min-width: 100px;
  height: auto;
  aspect-ratio: 2.2/1;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  border: none;
  transition: transform 0.3s, box-shadow 0.3s;
  background: transparent;
  margin: 0 auto;
  display: block;
}

.hero__image:hover .hero__img,
.hero__image:focus-within .hero__img {
  transform: scale(1.04) rotate(-2deg);
  box-shadow: 0 12px 40px rgba(160, 82, 45, 0.18);
}

/* ===============================
   FORMULARIO DE CONTACTO
   Estilos para el formulario de contacto y validaciones
================================= */
.contact-form {
  padding: 50px 55px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  text-align: center;
  width: 100%;
  max-width: 600px;
  background-color: white;
}

.contact-form__group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.contact-form__title {
  font-size: 35px;
  padding-bottom: 1em;
}

.contact-form__label {
  color: var(--color-suave, #555);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-form__group p {
  visibility: hidden;
  color: red;
  font-size: 0.9em;
  margin-top: -20px;
  margin-bottom: 20px;
}

.falla .contact-form__input,
.falla .contact-form__textarea {
  border-color: red;
}

.correcta .contact-form__input,
.correcta .contact-form__textarea {
  border-color: green;
}

.falla p {
  visibility: visible;
}

.contact-form__input,
.contact-form__textarea,
.contact-form__btn {
  padding: 17px 25px;
  border-radius: 12px;
  margin-bottom: 20px;
  background-color: #f3f4f6;
  border: 2px solid #f0faf1;
  color: #000000;
  outline: none;
}

.contact-form__txt {
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  text-align: center;
}

.contact-form__link {
  color: #76b28e;
  font-size: 10px;
  font-weight: 600;
}

.contact-form-section {
  display: flex;
  justify-content: center;
  padding: 50px 20px;
}

.contact-form__btn {
  cursor: pointer;
  background-color: var(--color-acento, #76b28e);
  border: none;
  color: white;
  font-weight: bold;
}

.contact-form__btn:hover {
  background-color: var(--color-premium, #5e9f7e);
}

.contact-form__textarea {
  resize: none;
}

/* Éxito */
.contact-form__success {
  display: none;
  color: green;
  font-weight: bold;
  text-align: center;
  margin-top: 1em;
}

/* ===============================
   PRODUCTOS DESTACADOS (MÓVIL)
   Tarjetas y grillas para productos destacados
================================= */
.productos__title {
  font-size: 2rem;
  margin-bottom: 2rem;
}
.destacados,
.productos-destacados {
  text-align: center;
  padding: 2.2rem 0 1.2rem 0;
  border-radius: 1.2rem;
}

.destacados__list,
.productos-destacados__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 8rem;
}

.destacado-card,
.producto-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(160, 82, 45, 0.1);
  padding: 1.1rem 0.5rem 1rem 0.5rem;
  display: flex;
  gap: 0.5rem;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.3s, transform 0.2s;
  position: relative;
  overflow: hidden;
  min-height: 220px;
}

.destacado-card:hover,
.destacado-card:focus-within,
.producto-card:hover,
.producto-card:focus-within {
  box-shadow: 0 8px 32px rgba(160, 82, 45, 0.18);
  transform: translateY(-6px) scale(1.03);
  z-index: 2;
}

.destacado-card__img,
.producto-card__img {
  width: 100%;
  max-width: 110px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 1rem;
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(160, 82, 45, 0.07);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.destacado-card:hover .destacado-card__img,
.destacado-card:focus-within .destacado-card__img,
.producto-card:hover .producto-card__img,
.producto-card:focus-within .producto-card__img {
  transform: scale(1.07) rotate(2deg);
  box-shadow: 0 8px 32px rgba(160, 82, 45, 0.18);
}

.destacado-card__nombre,
.producto-card__title {
  font-size: 1.2rem;
  color: var(--color-primario);
  text-align: center;
  margin-bottom: 0.5rem;
}

.destacado-card__desc {
  font-size: 1rem;
  color: var(--color-suave);
  margin-bottom: 0.7rem;
  text-align: center;
  min-height: 48px;
}

.destacado-card__precio,
.producto-card__price {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--color-premium);
  margin-top: 0.5rem;
  letter-spacing: 0.03em;
}

.destacado-card::after,
.producto-card--destacado::after {
  content: "★";
  color: var(--color-premium);
  font-size: 2.2rem;
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  opacity: 0.13;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* ===============================
   MAIN
   Estructura principal y detalle de productos
================================= */
main {
  display: 1;
  margin-bottom: 10rem;
}
/* Contenedor de Producto*/
.container-producto {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 900px;
  margin: auto;
}
/* Los contenedores consiguientes de imagen y descripcion*/
.imagen-producto,
.detalle-producto {
  flex: 1 1 400px;
  min-width: 200px;
  /*background-color: #1a1a1a; Guia de caja */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
}
/* Contenedor final */
.descripcion-producto {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1rem;
}

.imagen-producto img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}
.detalle-producto h2 {
  text-align: center;
  font-size: 1.7em;
  margin: 2rem 0px;
  text-transform: uppercase;
}

.detalle-producto h3 {
  text-align: center;
  color: var(--color-acento);
  font-size: 1.7em;
  text-transform: uppercase;
}

.detalle-producto p {
  text-align: justify;
  margin: 10px 20px 10px;
}
.detalle-producto div {
  text-align: center;
  margin-top: 50px;
  margin-bottom: auto;
}

.detalle-producto .botones {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 1rem;
}

.descripcion-producto__garantia {
  text-align: center;
}

.destacado-card:hover::after,
.destacado-card:focus-within::after,
.producto-card:hover::after,
.producto-card:focus-within::after {
  opacity: 0.28;
}

.producto-card__btn {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  background: linear-gradient(90deg, var(--color-acento), var(--color-premium));
  color: #fff;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
  outline: none;
}

.producto-card__btn:hover,
.producto-card__btn:focus {
  background: linear-gradient(90deg, var(--color-premium), var(--color-acento));
  color: var(--color-primario);
  box-shadow: 0 4px 24px rgba(160, 82, 45, 0.18);
  transform: translateY(-3px) scale(1.04);
}

/* ===============================
   PAGINACIÓN
   Estilos para la barra de paginación de productos
================================= */
.paginacion {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0 1rem 0;
}

.paginacion button {
  font-family: var(--font-body);
  font-size: 1.1rem;
  background: var(--color-base);
  color: var(--color-primario);
  border: 1px solid var(--color-acento);
  border-radius: 18px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  outline: none;
  box-shadow: 0 2px 8px rgba(160, 82, 45, 0.08);
}

.paginacion button.activo {
  background: linear-gradient(90deg, var(--color-premium), var(--color-acento));
  color: #fff;
  font-weight: bold;
  box-shadow: 0 4px 16px rgba(160, 82, 45, 0.18);
  border: 1.5px solid var(--color-premium);
}

.paginacion button:disabled {
  background: #eee;
  color: #bbb;
  cursor: not-allowed;
  border: 1px solid #ddd;
}

.paginacion button:hover:not(:disabled),
.paginacion button:focus:not(:disabled) {
  background: var(--color-acento);
  color: #fff;
  box-shadow: 0 2px 16px rgba(135, 169, 107, 0.18);
  border: 1.5px solid var(--color-acento);
}

/* ===============================
   MODAL BUSCADOR
   Estilos para el modal de búsqueda global
================================= */
.modal-buscador {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-buscador__content {
  background: var(--color-base);
  border-radius: 18px;
  box-shadow: 0 4px 32px rgba(160, 82, 45, 0.18);
  padding: 2.2rem 2.5rem 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.modal-buscador__content input[type="search"] {
  font-family: var(--font-body);
  font-size: 1.2rem;
  padding: 0.7rem 1.2rem;
  border-radius: 12px;
  border: 1.5px solid var(--color-acento);
  outline: none;
  width: 260px;
  background: #fff;
  color: var(--color-primario);
  box-shadow: 0 2px 8px rgba(160, 82, 45, 0.08);
}

.modal-buscador__content input[type="search"]:focus {
  border-color: var(--color-premium);
  box-shadow: 0 4px 16px rgba(212, 164, 55, 0.18);
}

.modal-buscador__cerrar {
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-acento);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.modal-buscador__cerrar:hover,
.modal-buscador__cerrar:focus {
  background: var(--color-premium);
  color: var(--color-primario);
}

/* ===============================
   FOOTER (MÓVIL)
   Pie de página y secciones informativas
================================= */
.footer {
  background-color: var(--color-base);
  text-align: center;
  font-size: 0.9rem;
}

.footer__container {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer__info {
  background-color: #1a1a1a;
  color: white;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer__info input {
  width: 100%;
  margin: 0 auto;
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 5px;
  background-color: transparent;
  color: white;
}

.footer__form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer__form button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  background-color: var(--color-acento);
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.footer__form button:hover {
  color: var(--color-premium);
}

.footer__item .footer__link {
  color: var(--color-acento);
  text-decoration: none;
  transition: color 0.3s;
}

.footer__categorias,
.footer__ayuda,
.footer__contacto {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  flex: 1;
}

.footer__categorias ul,
.footer__ayuda ul,
.footer__contacto ul {
  display: flex;
  flex-direction: column;
  gap: 0.78rem;
}

.footer__derechos-reservados {
  padding: 1rem;
}

.footer__icon-link {
  display: inline-flex;
  align-items: center; /* centra verticalmente */
  gap: 0.5rem; /* espacio entre ícono y texto */
  text-decoration: none;
  color: inherit;
}

/* ===============================
   MEDIA QUERIES (Desktop)
   Adaptaciones para pantallas grandes
================================= */
@media (min-width: 769px) {
  /*HEADER*/
  
  .header__logo{
    margin: 0;
  }
  
  .header__container {
    justify-content: space-between;
  }

  ul.navbar__list {
    height: 100%;
  }

  .navbar__list {
    gap: 0;
  }

.navbar__list a{
  font-size: 1.1rem;
}

  .navbar__item {
    display: flex;
    height: 120px;
    align-items: center;
    padding: 1rem;
  }

  .header__carrito-contador{
    margin-left: 0.5rem;
  }

  .navbar__item a:hover {
    color: var(--color-premium);
  }

  div.navbar__carrito:hover,
  div.navbar__buscador:hover {
    color: var(--color-acento);
    cursor: pointer;
  }

  .footer__redes-sociales {
    display: flex;
    justify-content: center;
  }
}

/* ===============================
   MEDIA QUERIES (Tablet/PC)
   Adaptaciones para pantallas medianas y grandes
================================= */
@media (min-width: 601px) {
  .header__logo {
    width: 120px;
  }

  .hero__title {
    text-align: left;
  }

  .navbar__list {
    flex-direction: row;
    gap: 2rem;
    width: auto;
    text-align: left;
  }

  /* HERO */
  .hero {
    min-height: 70vh;
    flex-direction: row;
    padding: 0;
    margin: 0;
  }
  .hero__container {
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
    height: 100%;
    text-align: left;
    margin-top: 0;
  }
  .hero__content {
    max-width: 520px;
    padding: 2rem 0 2rem 1rem;
    margin-bottom: 0;
    text-align: left;
  }
  .hero__title {
    font-size: clamp(2.1rem, 4vw, 3.2rem);
  }
  .hero__subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
  }
  .hero__btn {
    font-size: 1.35rem;
    padding: 1.2rem 3.2rem;
    margin-top: 1.2rem;
  }
  .hero__image {
    justify-content: flex-end;
    align-items: stretch;
    padding: 0;
    max-width: 100%;
    height: 100%;
  }
  .hero__img {
    max-width: 420px;
    width: 100%;
    min-width: 0;
    height: auto;
    aspect-ratio: 2.2/1;
    border-radius: 0;
    background: none;
  }

  /* PRODUCTOS DESTACADOS */
  .destacados__list,
  .productos-destacados__grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
  }
  .destacado-card,
  .producto-card {
    min-height: 340px;
    padding: 1.7rem 1.1rem 1.3rem 1.1rem;
  }
  .destacado-card__img,
  .producto-card__img {
    max-width: 180px;
    height: 140px;
  }

  .contact-form {
    margin: 1.6rem;
    width: 500px;
  }

  .footer__container {
    flex-direction: row;
  }

  /* Detalle de Producto */

  .detalle-producto .botones {
    flex-direction: row;
  }
}
