/* ===== VARIABLES ===== */
:root {
  --color-principal: #13eb1e;
  --color-secundario: #16a34a;
  --color-fondo: #000;
  --color-texto: #1f2937;
  --color-gris: #000;
}

/* ===== GENERAL ===== */
body {
  background: var(--color-fondo);
  font-family: Arial;
  margin: 0;
}

/* ===== HEADER ===== */
.topbar {
  background: #00ff2a;
  height: 80px; /* 👈 altura fija */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  padding-left: 250px;
  position: relative; /* 👈 clave */
}

/* ===== BUSCADOR ===== */
.contenedor-busqueda {
  position: relative;
  width: 300px;
  flex: 1;
  display: flex;
  justify-content: center;
}

.buscador {
  width: 60%;
  padding: 10px 40px 10px 15px;
  border-radius: 20px;
  max-width: 400px;
  border: none;
  outline: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-buscar {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);

  background: transparent; /* 🔥 clave */
  border: none;

  font-size: 16px;
  cursor: pointer;

  padding: 0;
  width: auto; /* 🔥 evita que se estire */
}

.btn-buscar:hover {
  transform: translateY(-50%) scale(1.2);
}

/* ===== HEADER ICONOS ===== */
.acciones-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.icono-header {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-weight: bold;
  color: white;
}

.icono-header:hover {
  transform: scale(1.1);
  transition: 0.2s;
}

.icono-carrito {
  position: relative;
}

.badge-carrito {
  position: absolute;
  top: -6px;
  right: -8px;
  background: red;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
  margin-left: 5px;
}

#total-header {
  margin-left: 10px;
  font-weight: bold;
}

/* ===== CATEGORIAS ===== */
.categorias {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: black;
  overflow-x: auto;
}

.categorias button {
  border: none;
  background: #e5e7eb;
  color: #111;
  padding: 10px 16px;
  border-radius: 20px;
  cursor: pointer;
}

.categorias button.activo {
  background: var(--color-principal);
  color: white;
}

/* ===== SLIDER ===== */
#inicio {
  height: 60vh;
  overflow: hidden;
}

.slider {
  background: #000; /* fondo elegante */
  padding: 10px 0;
  width: 100%;
  height: auto;
  overflow: hidden;
}

.slide {
  width: 100%;
  height: auto;
  display: none;
  object-fit: contain; /* 🔥 NO CORTA */
}

.slide.activo {
  display: block;
}

/* ===== PRODUCTOS ===== */
.productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px,1fr));
  gap: 15px;
  padding: 15px;
}

.producto {
  background: #fff;
  border-radius: 14px;
  padding: 15px;
  text-align: center;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.producto:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.img-producto {
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 10px;
}

.producto p {
  margin: 5px 0;
  color: var(--color-principal);
  font-weight: bold;
}

.precio {
  color: #e11d48; /* rojo elegante */
  font-weight: bold;
  font-size: 18px;
}

.precio-antiguo {
  text-decoration: line-through;
  color: #777;
  font-size: 14px;
}

.producto button {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  margin-top: 6px;
  cursor: pointer;
  font-weight: 600;
}

.producto button:first-of-type {
  background: #000;
  color: white;
}

.producto button:last-of-type {
  background: #16a34a;
  color: white;
}

/* ===== OFERTA ===== */
.badge-oferta {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-principal);
  color: white;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
}

/* ===== FAVORITO ===== */
.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: 0.3s;
}

.producto:hover .fav-btn {
  opacity: 1;
}

.fav-btn.activo {
  color: red;
  opacity: 1;
}

/* ===== BOTONES ===== */
button {
  background: var(--color-principal);
  color: white;
  border: none;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.producto button:hover {
  background: var(--color-secundario);
}

/* ===== BUSQUEDA DROPDOWN ===== */
.dropdown-busqueda {
  position: absolute;
  top: 110%;
  width: 100%;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  display: none;
  z-index: 999;
}

.item-busqueda {
  display: flex;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
}

.item-busqueda:hover {
  background: #f0fdf4;
}

.item-busqueda img {
  width: 45px;
  height: 45px;
  border-radius: 6px;
}

/* ===== CARRITO ===== */
#carrito-panel {
  width: 380px;
  max-width: 90%;
  height: 100vh;
  background: #f9fafb;
  position: fixed;
  right: -100%;
  top: 0;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

#carrito-panel.active {
  right: 0;
  transform: translateX(0);
}

#lista {
  flex: 1;
  overflow-y: auto;
}

#lista li {
  display: flex;
  gap: 10px;
  background: white;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);

  
  align-items: center;
  border-bottom: 1px solid #eee;
}

.mini-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
}

#lista li div {
  flex: 1;
  font-size: 14px;
}

/* BOTÓN ELIMINAR */
.btn-eliminar {
  background: #ef4444;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
}

#carrito-panel * {
  box-sizing: border-box;
}

.footer-carrito {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 15px;
  border-top: 1px solid #eee;
}

/* HEADER */
.header-carrito {
  background: #000;
  color: white;
  padding: 15px;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
}

/* RESUMEN */
#resumen {
  padding: 10px;
  background: white;
  border-top: 1px solid #eee;
}

.btn-finalizar {
  width: 100%;
  background: #000; /* 🔥 negro */
  color: #fff;
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: none; /* ❌ elimina animaciones */
}

.btn-finalizar:hover {
  opacity: 0.9; /* leve efecto */
}

.cerrar-carrito {
  background: transparent;
  color: white;
  border: none; /* ❌ elimina borde */
  padding: 5px 8px; /* 👈 ajustado al texto */
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.cerrar-carrito:hover {
  background: rgba(255,255,255,0.1);
}

.cerrar-carrito:hover {
  background: #111;
  border-color: #666;
}

.dropdown-busqueda p {
  color: #111; /* 🔥 fuerza color visible */
}

.dropdown-busqueda strong {
  color: #22c55e !important;
}

.item-busqueda {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
}

.item-busqueda div {
  display: flex;
  flex-direction: column;
}

.item-busqueda p {
  margin: 0;
  font-size: 14px;
  color: #111; /* 🔥 nombre visible */
}

.item-busqueda strong {
  color: #22c55e; /* precio verde */
  font-size: 13px;
}
#btn-instagram {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden; /* clave */
  background: none; /* opcional */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

#btn-instagram img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#btn-instagram:hover {
  transform: scale(1.1);
}

.producto button:first-of-type:hover {
  background: #000 !important;
}

.producto button:last-of-type:hover {
  background: #16a34a !important;
}

@media (max-width: 768px) {
  .detalle {
    grid-template-columns: 1fr;
  }
}

.cantidad-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.cantidad-box button {
  width: 30px;
  height: 30px;
  background: #111;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.cantidad-box span {
  font-size: 16px;
}

.badge-detalle {
  background: #16a34a;
  color: white;
  padding: 5px 10px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 10px;
  font-size: 13px;
}

.rating {
  margin: 8px 0;
  font-size: 16px;
}

.detalle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
  max-width: 1000px;
  margin: auto;
  align-items: center;
  color: white; /* 🔥 ESTO ARREGLA TODO */
}

.admin-body {
  background: #0f0f0f;
  color: white;
  font-family: Arial;
  padding: 20px;
}

.admin-grid {
  display: grid;
  gap: 15px;
}

.admin-card {
  background: #1a1a1a;
  border-radius: 10px;
  padding: 15px;
  border: 1px solid #333;
}

.admin-card img {
  width: 80px;
  border-radius: 8px;
}

.admin-card input {
  width: 100%;
  margin: 5px 0;
  padding: 6px;
  border-radius: 6px;
  border: none;
}

.admin-card button {
  background: #00a650;
  color: white;
  border: none;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}

.admin-card select {
  width: 100%;
  margin: 5px 0;
  padding: 6px;
  border-radius: 6px;
  border: none;
}

.btn-reset {
  margin-bottom: 20px;
  padding: 10px 15px;
  background: red;
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

#btn-instagram {
  width: 60px;
  height: 60px;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: #111;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  z-index: 999;
}

.logo-banner {
  cursor: pointer;
  position: absolute; /* 👈 lo saca del flujo */
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: flex-start; /* 👈 izquierda */
  align-items: center;
  padding: 5px 20px; /* 👈 poco espacio */
  background: transparent; /* sin negro */
}

.logo-banner img {
  transition: transform 0.2s ease;
  height: 130px;   /* 👈 clave: controla el tamaño */
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}
.logo-banner:hover img {
  transform: scale(1.05);
}