/* === ESTILOS BASE === */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f7f1eb;
  color: #3c2f2f;
}
 header {
      background-color: #1c1c1c;
      color: white;
      position: relative;
      height: 190px;
    }

    .header-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      height: auto;
      position: relative;
      padding-top: 10px;
    }

    .logo img {
      width: 180px;
      height: auto;
    }

    .product-img {
      width: 220px;
      height: 220px;
      object-fit: contain;
      margin: 0 auto 0.5rem auto;
      border-radius: 0.5rem;
    }

    .nav {
      width: 100%;
      height: 60px;
      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: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      max-width: 1200px;
      position: relative;
    }

    .menu {
      list-style: none;
      display: flex;
      padding: 0;
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
    }

    .menu li {
      margin: 0 15px;
    }

    .menu li a {
      color: white;
      text-decoration: none;
      font-weight: bold;
      font-size: 16px;
    }

    .menu li a:hover {
      color: #00ff00;
    }

    .search_bar {
      display: flex;
      align-items: center;
      position: absolute;
      right: 20px;
      top: 50%;
      transform: translateY(-50%);
      width: 200px;
      height: 30px;
      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;
      height: 25px;
      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;
    }

    @keyframes fadeInScale {
    0% {
      opacity: 0;
      transform: scale(0.9);
    }
    100% {
      opacity: 1;
      transform: scale(1);
    }
  }
  .animate-fadeInScale {
    animation: fadeInScale 0.3s ease-out;
  }
/* === CABECERA / TÍTULO === */
.cabecera {
  text-align: center;
  padding: 2rem 1rem;
  background-color: black;
  border-bottom: 2px solid #d4c4b5;
}

.cabecera h1 {
  font-size: 2rem;
  margin: 0;
  color: white;
  font-family: 'Lobster', cursive;
}

/* === SECCIÓN DETALLE DEL PRODUCTO === */
.producto-detalle {
  padding: 2rem;
  max-width: 1200px;
  margin: auto;
}

/* === LAYOUT PRINCIPAL === */
.contenedor-principal {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

/* === IMAGEN DEL PRODUCTO === */
.imagen-producto img {
  max-width: 300px;
  height: auto;
  margin-left: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

/* === HISTORIA DEL CAFÉ === */
.historia-cafe {
  flex: 1;
  max-width: 600px;
}

.historia-cafe h2 {
  margin-top: 0;
  font-size: 1.5rem;
  color: #5d3a00;
}

.historia-cafe p {
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
}
/* === TARJETAS DEL CATÁLOGO === */
#products > div {
  border: 2px solid #ddd;   /* grosor y color del borde */
  border-radius: 12px;      /* esquinas redondeadas */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Efecto hover */
#products > div:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  border-color: #bbb;
}

/* === BOTÓN DE COMPRA === */
.btn-comprar {
  display: inline-block;
  padding: 10px 20px;
  background-color: black;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
}

/* === MINIATURAS (GRID DE INFO) === */
.miniaturas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  background-color: black;
}

/* === MINI TARJETAS === */
.mini-item {
  background-color: white;
  border: 1px solid #d4c4b5;
  border-radius: 10px;
  text-align: center;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: 
    transform 0.25s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    border 0.3s ease;
}

.mini-item:hover {
  transform: scale(1.05);
  background-color: white;
  box-shadow:
    0 0 8px rgba(255, 209, 154, 0.5),
    0 12px 24px rgba(0, 0, 0, 0.15);
  border: 2px solid green;
}

.mini-item img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.mini-item h3 {
  font-size: 0.9rem;
  margin: 0;
  color: #4b2f1d;
  font-weight: 600;
}

/* === BOTÓN DE CIERRE (✕ del modal) === */
.btn-cerrar {
  position: absolute;
  top: 10px;
  right: 15px;
  background-color: transparent;
  border: none;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  z-index: 999;
}

.btn-cerrar:hover {
  color: #c00;
}

/* === MODAL === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex; 
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-contenido {
  background-color: #fff;
  padding: 20px;
  border-radius: 12px;
  max-width: 1000px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}


label {
  display: block;
  margin-top: 5px;
  color: #6d4c41;
}

select, input[type="number"] {
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #ffffff;
  margin-top: 3px;
}

button {
  background-color: #6d4c41;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: normal;
  transition: background 0.3s;
}

button:hover {
  background-color: #4e342e;
}

/* === ESTILOS BASE (ya existentes) === */
/* ...tu CSS anterior sin cambios... */

/* === AJUSTES RESPONSIVOS === */

/* Pantallas pequeñas (móviles) */
@media (max-width: 768px) {

  /* ---- CABECERA ---- */
  header {
    flex-direction: column;
    height: auto;
    text-align: center;
    padding: 1rem;
  }

  header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  header .logo img {
    height: 70px;
    width: auto;
  }

  #openCartBtn {
    width: 48px;
    height: 48px;
    margin-top: 0.5rem;
  }

  /* ---- GRID DE PRODUCTOS ---- */
  main#products {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  #products > div {
    padding: 1rem;
    width: 100%;
  }

  #products img {
    width: 120px;
    height: 120px;
  }

  #products h2 {
    font-size: 1rem;
  }

  #products p {
    font-size: 0.9rem;
  }

  #products button,
  #products a {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }

  /* ---- CARRITO LATERAL ---- */
  #cartDrawer {
    width: 100%;
    max-width: none;
  }

  #cartItemsContainer {
    max-height: 55vh;
  }

  /* ---- MODAL ---- */
  #pedidoModal .bg-white {
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
  }

  #pedidoModal input {
    font-size: 0.9rem;
    padding: 0.6rem;
  }

  #pedidoModal button {
    font-size: 0.9rem;
    padding: 0.75rem;
  }

  /* ---- FOOTER ---- */
  footer {
    font-size: 0.8rem;
    padding: 1rem;
    line-height: 1.4;
  }
}

/* Pantallas muy pequeñas (teléfonos compactos) */
@media (max-width: 480px) {

  header h1 {
    font-size: 1.25rem;
  }

  header .logo img {
    height: 60px;
  }

  #products img {
    width: 100px;
    height: 100px;
  }

  #cartDrawer {
    width: 100%;
  }

  .flex.gap-2.mb-3 button {
    padding: 0.3rem 0.6rem;
  }

  #pedidoModal .bg-white {
    padding: 1rem;
  }

  #pedidoModal h2 {
    font-size: 1.25rem;
  }

  #pedidoContenido {
    font-size: 0.8rem;
  }

  footer p {
    font-size: 0.75rem;
  }
}
