/* =========================================================
   RESET GLOBAL
========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #121212;
  color: #e0e0e0;
  padding: 20px;
}

/* =========================================================
   ESTILOS PÚBLICOS (INDEX)
========================================================= */
h1 {
  margin-bottom: 20px;
  font-size: 2rem;
  text-align: center;
  color: #e0f7fa;
  text-shadow: 0 0 5px #00bcd4;
}

a {
  display: inline-block;
  margin-bottom: 20px;
  color: #f5c542;
  text-decoration: none;
  transition: color 0.3s, text-shadow 0.3s;
}

a:hover {
  color: #f5c542;
  text-shadow: 0 0 5px #1de9b6;
}

.logo {
  width: 10rem;
  display: block;
  margin: 0 auto 20px auto;
  max-width: 100%;
  height: auto;
}

.subtitulo, .titulo {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.5rem;
  color: #fff;
}

#search {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 30px auto;
  display: block;
  padding: 10px;
  border: 1px solid #444;
  border-radius: 8px;
  background: #1e1e1e;
  color: #fff;
  box-shadow: 0 0 5px #00bcd4 inset;
}

/* Contenedor de productos */
#products, #productosContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

/* ==== Card de productos ==== */
.card {
  background: #1e1e1e;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(245, 197, 66, 0.4);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 380px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(245, 197, 66, 0.7);
}

.card .img-wrapper {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: zoom-in;
  border-bottom: 2px solid #f5c542;
  box-shadow: 0 0 5px rgba(245, 197, 66, 0.4);
  border-radius: 10px;
}

.card img.zoomed {
  transform: scale(1.8);
  cursor: zoom-out;
  z-index: 10;
  position: relative;
}

/* ✅ Título fijo debajo de la imagen */
.card-body h3 {
  font-size: 1.2rem;
  margin: 10px 0;
  color: #f5c542;
  text-shadow: 0 0 4px rgba(245, 197, 66, 0.5);
  min-height: 40px;
  text-align: center;
  display: block;   /* ya no es flex */
}

.card-body {
  padding: 15px;
  text-align: center;
}

.card-body p {
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #bbb;
}

/* ==== Selector de talles ==== */
.talles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.talles label {
  background: #333;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s;
}

.talles input {
  display: none;
}

.talles input:checked + span {
  background: #f5c542;
  color: #121212;
  box-shadow: 0 0 6px rgba(245, 197, 66, 0.6);
}

/* ==== Botones ==== */
.btn-whatsapp,
.btn-admin {
  display: inline-block;
  width: 100%;
  padding: 10px;
  text-align: center;
  background: #00e676;
  color: #121212;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s, box-shadow 0.3s;
  font-size: 1rem;
  box-shadow: 0 0 5px rgba(0, 230, 118, 0.5);
}

.btn-whatsapp:hover,
.btn-admin:hover {
  background: #f5c542;
  box-shadow: 0 0 10px rgba(245, 197, 66, 0.7);
}

/* =========================================================
   ESTILOS ADMIN (ADMIN.HTML)
========================================================= */
.admin-body {
  background: #121212;
  padding: 30px;
  color: #e0e0e0;
}

form {
  max-width: 400px;
  background: #1e1e1e;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 188, 212, 0.4);
}

form input, form button {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #444;
  border-radius: 6px;
  background: #121212;
  color: #fff;
}

form input:focus {
  border-color: #f5c542;
  box-shadow: 0 0 5px rgba(245, 197, 66, 0.7);
  outline: none;
}

form button {
  background: #f5c542;
  color: #121212;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 5px  rgba(245, 197, 66, 0.7);
}

form button:hover {
  background: #f5c542;
  box-shadow: 0 0 10px rgba(245, 197, 66, 0.7);
}

/* ==== Lista de productos en Admin ==== */
.producto-admin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e1e1e;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  box-shadow: 0 0 8px #f5c542;
  transition: box-shadow 0.3s;
}

.producto-admin:hover {
  box-shadow: 0 0 12px rgba(245, 197, 66, 0.6);
}

.producto-admin img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 15px;
}

.admin-actions button {
  margin-left: 10px;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: box-shadow 0.3s;
}

.btn-edit {
  background: #ff9800;
  color: white;
  box-shadow: 0 0 5px rgba(255, 152, 0, 0.5);
}

.btn-edit:hover {
  background: #e68900;
  box-shadow: 0 0 10px rgba(230, 137, 0, 0.7);
}

.btn-delete {
  background: #f44336;
  color: white;
  box-shadow: 0 0 5px rgba(244, 67, 54, 0.5);
}

.btn-delete:hover {
  background: #d32f2f;
  box-shadow: 0 0 10px rgba(211, 47, 47, 0.7);
}

/* =========================================================
   MEDIA QUERIES RESPONSIVE
========================================================= */
@media (max-width: 768px) {
  h1 {
    font-size: 1.6rem;
  }

  .card-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
  }

  #search {
    max-width: 100%;
  }

  /* ✅ Ahora siempre 2 productos por fila en tablets/celulares medianos */
  #products,
  #productosContainer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .card img {
    height: 160px;
    object-fit: cover; /* para que no se deformen */
  }

  .card-body h3 {
    font-size: 1rem;
    min-height: 35px;
  }

  form {
    max-width: 100%;
    padding: 15px;
  }

  .producto-admin img {
    width: 50px;
    height: 50px;
  }

  .admin-actions button {
    padding: 5px 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .card-body h3 {
    font-size: 0.95rem;
    min-height: 30px;
  }

  .talles label {
    padding: 4px 8px;
    font-size: 0.8rem;
  }

  .btn-whatsapp {
    font-size: 0.9rem;
    margin-top: auto;
    align-self: stretch;
  }
}

/* =========================================================
   FOOTER
========================================================= */
.footer {
  background-color: #222;
  color: white;
  text-align: center;
  padding: 1rem 0;
  margin-top: 3rem;
}

.btn-admin {
  width: 5rem;
  background: #f5c542;
  color: #111;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
}

.btn-admin:hover {
  background: #b8860b;
  box-shadow: 0 0 10px rgba(245,197,66,0.7);
}

/* ==== Icono Configuración ==== */
.logo-config {
  width: 2rem;
  height: 2rem;
  margin-right: 0.5rem;
}

/* ==== Botones ==== */
.btn-whatsapp,
.btn-admin {
  display: inline-block;
  width: 100%;
  padding: 10px;
  text-align: center;
  background: #f5c542;   /* Amarillo de la página */
  color: #121212;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s, box-shadow 0.3s;
  font-size: 1rem;
  box-shadow: 0 0 5px rgba(245, 197, 66, 0.5);
}

.btn-whatsapp:hover,
.btn-admin:hover {
  background: #ffd95a;
  box-shadow: 0 0 10px rgba(245, 197, 66, 0.7);
}

/* ==== Cards alineadas ==== */
.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* reparte espacio */
  height: 100%;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-body .btn-whatsapp {
  margin-top: auto; /* siempre al fondo */
}

/* ==== Carrusel (Modal) ==== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 18, 18, 0.95);
  display: none;  /* oculto por defecto */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: #1e1e1e;
  border-radius: 12px;
  padding: 20px;
  max-width: 600px;
  width: 90%;
  text-align: center;
  position: relative;
}

.modal-content img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  margin-bottom: 15px;
}

.modal .close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  color: #f5c542;
  cursor: pointer;
}

.modal .talles {
  margin: 15px 0;
}
.footer-content {
  padding: 20px;
  background: #1e1e1e;
  color: #fff;
  text-align: center;
}
.social-links {
  margin-top: 10px;
}
.social-links a {
  margin: 0 10px;
  color: #f5c542;
  text-decoration: none;
}
.social-links a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px; /* opcional, para darle aire */
}



.footer-links .icon-admin {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 3rem;
 height: 3rem;
  margin-right: 0.5rem;
  margin: 2rem 2rem;
}
.config-admin {
  margin: 2rem 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 1rem;
  height: 1rem;
}
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease-in-out;
}



.modal-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

@keyframes zoomIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}