body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.5;
  background-color: #F5E9D8;
}

header {
  background-color: white;
  color: #333;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav {
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  top: 0;
  color: #daa520;
  border-bottom: 2px solid #daa520;
  background-color: white;
  z-index: 1000;
}

.menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0px;
}

.menu a {
  margin: 0 15px;
  color: rgb(0, 0, 0);
  text-decoration: none;
  font-weight: bold;
}
.acciones {
  display: flex;
  align-items: center; 
  justify-content: center; 
  gap: 1px; 
}

.icon-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 40px;
  height: 40px;
  cursor: pointer;
}


.count-product {
  position: absolute;
  top: 7px;
  right: 1px;
  background-color: red;
  color: white;
  border-radius: 50%;
  width: 15px;
  height: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
}
.cart-svg {
  width: 24px;
  height: 24px;
  stroke: rgb(0, 0, 0);
  
}
.login-svg {
  width: 24px;
  height: 24px;
  stroke: rgb(0, 0, 0);
}

section {
  padding: 2rem;
  align-items: center;
}

footer {
  background: #eee;
  text-align: center;
  padding: 1rem;
}



h2 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.2;
  color: #ffffff;
}


/* search */

.icon-search {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  cursor: pointer;
}

.search-svg {
  width: 24px;
  height: 24px;
  stroke: rgb(0, 0, 0);
}

/* Boton */

.btn-comprar {
  position: absolute;
  top: 285px;
  left: -170px;            /* para que empiece desde el borde izquierdo */
  width: 600px;        /* que ocupe todo el ancho */
  padding: 10px 0;    /* arriba y abajo para que quede cómodo */
  background-color: rgba(191, 161, 77, 0.7);
  color: white;
  font-weight: 600;
  cursor: pointer;

  opacity: 0;
  pointer-events: none;

  z-index: 10;

  transition: opacity 0.3s ease;
}


.contenedor-imagen {
  position: relative; /* importante para posicionar el botón */
  overflow: hidden;
  border-radius: 10px;
}

.contenedor-imagen:hover .btn-comprar {
  opacity: 1;           /* visible al pasar el mouse */
  pointer-events: auto; /* habilita interacción */
}

.btn-comprar:hover {
  background-color: #444;
}


/* Productos */

.pro-nav {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  background-color: white;
}

.productos{
  text-align: center;
  background-color: white;
  line-height: 0.5;
}

.img-producto{
  width: 500px;
  height: 500px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #ccc;
  align-items: center;
}

.img-producto:hover{
  background-color: #daa520;
}
/* Login */
.icon-login {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  cursor: pointer;
}

/* SLOGAN */

.hero {
  height: 496px;
  display: flex;
  justify-content: center;
  padding: 4rem 6rem;
  gap: 40px;
  background-image: url(fonfo.jpg);
  background-repeat: no-repeat;
  background-size: cover; /* o contain según lo que busques */
  background-position: right center; /* Pega la imagen al lado derecho verticalmente centrada */
}

.hero-text {
  max-width: 600px;
  color: white;
  position: relative;
  right: 500px;
  
}

.hero img {
  width: 300px;
  border-radius: 20px;
}

/* Contenedor galeria*/


.texto-encima {
  width: 100%;
  opacity: 0;
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translate(-50%, -50%); /* centra el contenido */
  background-color: rgba(0, 0, 0, 0.349);
  text-align: center;
  color: rgb(255, 255, 255);
  z-index: 2;
}

.contenedor-imagen:hover .texto-encima {
  opacity: 1;
  pointer-events: auto;
  z-index: 5;
}
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.5); /* blanco con transparencia */
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.contenedor-imagen:hover .overlay {
  opacity: 0.2;
}


.carrito-slide {
  position: fixed;
  top: 0;
  right: -100%;
  width: 350px;
  height: 100%;
  background-color: #fff;
  box-shadow: -2px 0 10px rgba(0,0,0,0.3);
  transition: right 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.carrito-slide.visible {
  right: 0;
}

.carrito-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #ddd;
}

.carrito-header h3 {
  margin: 0;
}

#cerrar-carrito {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.carrito-contenido {
  padding: 1rem;
  overflow-y: auto;
  flex-grow: 1;
}

.item-carrito {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.usuario {
  display: flex;
  align-items: center;
  gap: 10px; /* espacio entre íconos y texto */
}



.nombre-usuario-contenedor {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 500;
  color: #333;
}

.bienvenida {
  margin-top: 20px !important;
  font-size: 0.85rem;
  font-weight: 400;
  color: #555;
  margin-bottom: 1px !important; 
}
.user-bnv{
  color: black;
  margin-top: 2px;
}

.menu-desplegable {
  display: none;
  position: absolute;
  top: 60px;
  right: 60px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  flex-direction: column;
  padding: 10px 0;
  min-width: 150px;
}

.menu-desplegable a {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.menu-desplegable a:hover {
  background-color: #f0f0f0;
}

.usuario {
  position: relative; /* Necesario para posicionar el menú */
}








@media (max-width: 768px) {
  /* Header compacto */
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
  }

  .marca {
    flex: 1;
  }

  /* Menú en una sola línea scrollable si no entra */
  .menu {
    position: static;
    transform: none;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    width: 100%;
  }

  .acciones {
    flex: 1;
    justify-content: flex-end;
    gap: 10px;
  }

  /* Ajustar iconos */
  .icon-cart, .icon-login, .icon-search {
    width: 30px;
    height: 30px;
  }

  .cart-svg, .login-svg {
    width: 20px;
    height: 20px;
  }

  /* Hero */
  .hero {
    width: 300px;
    height: 150px;
    padding: 3rem;
    gap: 20px;
    background-image: url(fonfo.jpg);
    background-repeat: no-repeat;

  }

  .hero img {
    width: 100%;
    max-width: 280px;
  }

  .hero-text {
  font-size: 10px;
  max-width: 170px;
  color: white;
  position: absolute;
  right: 200px;
}
.hero-text p{
  display: none;
}

  /* Productos */
  .img-producto {
    width: 100%;
    max-width: 220px;
    height: auto;
  }

  /* Carrito en móvil ocupa todo */
  .carrito-slide {
    width: 100%;
  }
}


@media (max-width: 480px) {
  .menu a {
    font-size: 14px;
    margin: 5px 0;
  }

  h2 {
    font-size: 28px;
  }

  .btn-comprar {
    padding: 10px 16px;
    font-size: 14px;
  }
}







@media (max-width: 768px) {
  section {
    padding-left: 10px;
    padding-right: 10px;
  }

@media (max-width: 768px) {
  .pro-nav {
    flex-direction: column !important;
    gap: 5px !important;
    background-color: transparent !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0px !important;
  }

  .contenedor-imagen {

    width: 100% !important;
    max-width: 100% !important;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
    border: none;
    overflow: hidden;
  }

  .contenedor-imagen a {
    display: block;
    color: inherit;
    text-decoration: none;
  }

  .img-producto {
    width: 100% !important;
    max-width: 100% !important;
    height: 150px !important;
    border-radius: 10px;
    border: 1px solid #ccc;
    object-fit: cover;
    transition: background-color 0.3s ease;
  }

  /* Texto arriba a la izquierda, encima de la imagen */
  .texto-encima {
    opacity: 1;
    display: block;
    background-color: rgba(255, 255, 255, 0.178);
  }
 
  .contenedor-imagen:hover .texto-encima {
    display: block !important;
}
}
}