/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   BODY
========================= */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #c2bebe;
  color: #333;
  padding-top: 170px; /* espacio real para barra fija */
  margin: auto;
  overflow-x: hidden;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* =========================
   BARRA SUPERIOR (FIJA)
========================= */
.barra-superior {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 170px;
  background-color: #f30817;
  z-index: 1000;
}

.contenido-barra {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
}

/* =========================
   LOGO
========================= */
.logo img {
  max-height: 300px;
  width: auto;
  object-fit: contain;
}

/* =========================
   NAVEGACIÓN (DESKTOP)
========================= */
.navegacion {
  display: flex;
  align-items: center;
  gap: 30px;
}

.navegacion a {
  color: white;
  font-weight: 600;
  text-decoration: none;
  font-size: 17px;
}

.navegacion a:hover {
  opacity: 0.8;
}

/* =========================
   MENÚ HAMBURGUESA
========================= */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.menu-toggle div {
  width: 30px;
  height: 4px;
  background: white;
  border-radius: 2px;
  transition: 0.4s;
}

.menu-toggle.active div:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
}
.menu-toggle.active div:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active div:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
}

/* =========================
   DROPDOWN DESKTOP
========================= */
.dropdown {
  position: relative;
}

.dropdown-btn {
  background: none;
  border: none;
  color: white;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background-color: #ff4d5a;
  padding: 8px 0;
  box-shadow: 0 5px 15px rgba(0,0,0,0.25);
  z-index: 1100;
}

.dropdown-content a {
  display: block;
  padding: 12px 20px;
  color: white;
  text-decoration: none;
}

.dropdown-content a:hover {
  background-color: #d93642;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* =========================
   BARRA DE BÚSQUEDA
========================= */
.barra-busqueda {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 20px 10px;
}

.barra-busqueda input {
  width: 70%;
  max-width: 400px;
  padding: 10px;
  border: 2px solid #d32f2f;
  border-radius: 5px;
  font-size: 16px;
}

.barra-busqueda button {
  background: #d32f2f;
  border: none;
  color: white;
  padding: 10px 18px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

/* =========================
   FOOTER
========================= */
.footer {
  background-color: #f30817;
  color: white;
  padding: 30px 0;
  width: 100%;
  margin-top: 40px;
}

.footer-content {
  display: flex;
  gap: 50px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}


.footer-section {
  padding: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-line {
  border-top: 2px solid white;
  width: 200px;
  margin: 8px 0;
}

.footer-section p,
.footer-section a {
  word-break: break-word;
}

.copyright {
  text-align: center;
}

.copyright a {
  text-align: center;
  font-weight: bold;
  font-size: 20px;
  margin-top: 20px;
  color: white;
  text-decoration: none;
}

.copyright a:hover,
.copyright a:visited,
.copyright a:active,
.copyright a:focus {
  color: white;
  text-decoration: none;

}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {

  body {
    padding-top: 70px;
  }

  .barra-superior {
    height: 70px;
  }

  .logo img {
    height: 200px;
  }

  .menu-toggle {
    display: flex;
  }

  /* MENÚ MÓVIL */
  .navegacion {
    position: absolute;
    top: 70px; /* EXACTAMENTE la altura de la barra */
    left: 0;
    width: 100%;
    background-color: #f30817;
    display: none;
    flex-direction: column;
    align-items: center;
    z-index: 999;
  }

  .navegacion.activa {
    display: flex;
  }

  .navegacion a,
  .dropdown-btn {
    padding: 15px 0;
    width: 100%;
    text-align: center;
  }

  .dropdown-content {
    position: relative;
    box-shadow: none;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }

  .dropdown.open .dropdown-content {
    display: block;
  }
  #contenedor-productos {
    grid-template-columns: 1fr;
  }
  footer {
    padding: 25px 15px;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    gap: 25px;
    text-align: center;
  }

  .footer-section {
    padding: 10px 0;
    width: 100%;
  }

  .footer-line {
    margin: 10px auto;
    width: 120px;
  }

  .copyright {
    font-size: 16px;
    margin-top: 15px;
    color: white;
  }
}