/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base */
body {
  font-family: 'Raleway', sans-serif;
  background-color: #f8f5f2;
  color: #333;
}

/* --- Header --- */
header {
  background-color: #1c1c1c;
  color: white;
  min-height: 120px;
}

.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
}

.logo img {
  width: 180px;
  height: auto;
}

/* --- Nav --- */
.nav {
  width: 100%;
  border-bottom: 1px solid #555;
  background: linear-gradient(to bottom, #8b8b8b 0%, #6a6a6a 50%, #5e5e5e 52%, #717171 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
  gap: 10px;
}

.menu {
  list-style: none;
  display: flex;
  gap: 30px;
  justify-content: center;
  grid-column: 2;
  align-items: center;
  flex-wrap: wrap;
}

.menu li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  padding: 10px 6px;
  display: inline-flex;
  align-items: center;
  height: 40px;
}
.menu li a:hover { color: #00ff00; }

/* Barra de búsqueda */
.search_bar {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  width: 220px;
  height: 35px;
  background: linear-gradient(to right, #7e7e7e, #767676);
  border-radius: 50px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7);
  padding: 0 10px;
}

.search_bar input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: white;
  padding-left: 10px;
  font-size: 14px;
}
.search_bar input::placeholder { color: #ccc; }
.icon-search { color: white; font-size: 16px; }

/* --- Productos --- */
#productos {
  text-align: center;
  padding: 20px;
}

#productos h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

.productos .grid {
  display: grid;
  gap: 20px;
  padding: 1rem;
  justify-items: center;
}

/* Producto */
.producto {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.producto:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}
.producto img {
  width: 100%;
  max-width: 180px;
  height: 180px;
  object-fit: cover;
  margin: auto;
  display: block;
  border-radius: 10px;
}
.producto h3 { font-size: 16px; margin: 10px 0; }
.precio {
  font-size: 18px;
  font-weight: 900;
}
.botones {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.botones button {
  display: inline-block;
  padding: 10px 20px;
  background-color: black;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
}

.botones button:hover {
  background: #e6c200;
  transform: scale(1.05);
}

/* --- Nosotros --- */
.nosotros {
  text-align: center;
  padding: 40px 20px;
}
.nosotros h2 {
  font-size: 40px;
  margin-bottom: 20px;
  font-family: 'Dancing Script', cursive;
}
.nosotros p {
  font-size: 16px;
  line-height: 1.5;
}

/* --- WhatsApp --- */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.2s;
}
.whatsapp-float:hover { transform: scale(1.1); }
.whatsapp-chatbox {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 260px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  padding: 15px;
  font-family: Arial, sans-serif;
  display: none;
  z-index: 1001;
  animation: fadeIn 0.4s ease-in-out;
}
.whatsapp-chatbox header { font-weight: bold; margin-bottom: 10px; color: #075e54; font-size: 16px; }
.whatsapp-chatbox p { font-size: 14px; margin-bottom: 10px; color: #333; }
.whatsapp-chatbox a { display: inline-block; background: #25d366; color: white; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-size: 14px; }
.close-chat { position: absolute; top: 8px; right: 10px; font-size: 16px; color: #666; cursor: pointer; }

/* --- Footer --- */
footer {
  background-color: #000;
  color: white;
  text-align: center;
  padding: 30px 20px;
  font-size: 14px;
}

/* --- Responsive --- */

/* Desktop: 4 productos */
@media (min-width: 992px) {
  .productos .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tablets: 2 productos */
@media (min-width: 600px) and (max-width: 991px) {
  .productos .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Móviles: 1 producto */
@media (max-width: 599px) {
  .productos .grid {
    grid-template-columns: 1fr;
  }
}

/* Ajustes generales */
@media (max-width: 992px) {
  .menu { gap: 18px; }
  .logo img { width: 150px; }
  .nosotros h2 { font-size: 32px; }
}
@media (max-width: 768px) {
  .nav-content { grid-template-columns: 1fr; gap: 8px; text-align: center; }
  .menu { grid-column: 1; justify-content: center; gap: 14px; }
  .search_bar { grid-column: 1; justify-self: center; width: 90%; }
  .producto { width: 100%; max-width: 240px; }
  .nosotros h2 { font-size: 28px; }
  .nosotros p { font-size: 14px; }
}
@media (max-width: 480px) {
  .logo img { width: 120px; }
  .menu { flex-direction: column; gap: 10px; }
  .search_bar { width: 100%; }
  .producto img { max-width: 150px; height: 150px; }
  .botones { flex-direction: column; gap: 6px; }
  .nosotros h2 { font-size: 24px; }
  .nosotros p { font-size: 13px; }
  footer { font-size: 12px; padding: 20px 10px; }
}
