/* === Reset b谩sico === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #fff;
  color: #333;
  text-align: center;
  line-height: 1.6;
}

/* === Cabecera / Hero === */
.hero {
  padding: 60px 20px 30px;
  background-color: #fff;
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}
.logo img {
  max-height: 200px;
  max-width: 400px;
  width: auto;
  object-fit: contain;
}

.slogan {
  font-size: 16px;
  color: #777;
  margin-bottom: 40px;
}

/* === Buscador === */
.search-bar {
  margin: 20px auto;
}
.search-bar input {
  width: 80%;
  max-width: 500px;
  padding: 14px 20px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 30px;
  outline: none;
  transition: box-shadow 0.2s;
}
.search-bar input:focus {
  box-shadow: 0 0 4px rgba(255, 87, 34, 0.4);
  border-color: #ff5722;
}

/* === Filtros === */
.filtros-avanzados {
  padding: 1rem 2rem;
  background-color: #f9f9f9;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}
.contenedor-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.contenedor-filtros .grupo {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}
.contenedor-filtros label {
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.contenedor-filtros select {
  padding: 0.5rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  min-width: 150px;
}

/* === Bot贸n Premium === */
.premium-button {
  margin-left: auto;
}
.premium-button a {
  display: inline-block;
  padding: 10px 25px;
  background: linear-gradient(to right, #ffd700, #ffcc00);
  color: #000;
  text-decoration: none;
  font-weight: bold;
  border-radius: 50px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  font-size: 16px;
  transition: all 0.3s ease;
}
.premium-button a:hover {
  background: linear-gradient(to right, #ffcc00, #e6b800);
  transform: scale(1.07);
  color: #222;
}

/* === Productos === */
main.product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 40px 20px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border: 1px solid #eee;
  padding: 20px;
  width: 280px;
  min-height: 420px; /* 馃斀 reducido desde 480px */
  border-radius: 10px;
  background: #fafafa;
  text-align: left;
  transition: box-shadow 0.2s ease;
  overflow: hidden;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-card h3 {
  margin: 10px 0 5px;
  font-size: 18px;
  color: #ff5722;
}

.marca-producto {
  color: #666;
  font-size: 14px;
  margin-bottom: 10px;
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  margin-bottom: 10px;
}

/* Contenido sin bot贸n */
.contenido-producto {
  flex: 1;
}

/* === Bot贸n lupa === */
.btn-lupa {
  display: inline-block;
  margin: 10px 0;
  padding: 8px 16px;
  background-color: #ff5722;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}
.btn-lupa:hover {
  background-color: #e64a19;
}

/* === Enlace externo (bot贸n "Ver en") === */
.enlace-producto {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background-color: transparent;
  color: #007bff;
  border: 2px solid #007bff;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}
.enlace-producto:hover {
  background-color: #007bff;
  color: white;
}

.boton-ver-en {
  position: absolute;
  bottom: 20px;
  right: 20px;
}

/* === Favoritos === */
.product-card form {
  margin-top: 10px;
}
.product-card button[type="submit"]:not(.btn-fav) {
  background-color: #ff4081;
  color: #fff;
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 14px;
}

.product-card button[type="submit"]:not(.btn-fav):hover {
  background-color: #e91e63;
}

/* === Popup galer铆a === */
.popup {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.popup-contenido {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 95vw;
  max-height: 95vh;
  overflow-y: auto;
  box-sizing: border-box;
}
.imagenes-galeria {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.imagenes-galeria img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.imagenes-galeria img:hover {
  transform: scale(1.05);
}
.cerrar-popup {
  font-size: 24px;
  float: right;
  cursor: pointer;
  margin-bottom: 10px;
}
.oculto {
  display: none !important;
}

/* === Paginaci贸n === */
.paginacion {
  text-align: center;
  margin-top: 1em;
  margin-bottom: 4em;
}

.paginacion ul {
  list-style: none;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3em;
  padding: 0;
}

.paginacion li {
  display: inline-block;
}

.paginacion li a,
.paginacion li span {
  display: block;
  padding: 0.5em 0.8em;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  background-color: #fff;
  color: #333;
}

.paginacion li a:hover {
  background-color: #f0f0f0;
}

.paginacion li a.activa {
  font-weight: bold;
  background-color: #ddd;
  pointer-events: none;
}

/* Responsive ajustes */
@media (max-width: 600px) {
  .paginacion ul {
    gap: 0.2em;
  }

  .paginacion li a,
  .paginacion li span {
    font-size: 13px;
    padding: 0.4em 0.6em;
  }

  .product-card {
    width: 90%;
    max-width: 320px;
  }
}
.product-card.anuncio-adsense {
  border: 2px dashed #ccc;
  background-color: #f9f9f9;
}
.product-card.anuncio-adsense .marca-producto {
  color: #999;
}
.menu-tabs ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding: 1rem;
  justify-content: center;
}

.menu-tabs a {
  text-decoration: none;
  color: #555;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background 0.2s;
}
.filtros-superiores select {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f5f5f5;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.filtros-superiores select:hover,
.filtros-superiores select:focus {
  border-color: #ff5722;
  background-color: #fff;
  outline: none;
 } 
.menu-tabs a.activo {
  background-color: #222;
  color: #fff;
  font-weight: bold;
}
.filtros-superiores {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin: 1rem 0;
}

.filtros-superiores button {
  padding: 0.5rem 1rem;
  border: none;
  background: #eee;
  cursor: pointer;
  border-radius: 6px;
  font-weight: bold;
}

.filtros-superiores button.activo {
  background: #222;
  color: #fff;
}
.usuario-paisanin {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: 'Inter', sans-serif;
}

.paisanin-enlace {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  gap: 0.4rem;
}

.icono-usuario {
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
  display: inline-block;
  opacity: 0.6;
  transition: all 0.3s ease;
  vertical-align: middle;
}

.icono-usuario.activo {
  opacity: 1;
  background-color: #007bff;
  border-radius: 50%;
  padding: 4px;
}
.nombre-usuario {
  font-size: 1rem;
}

.logout-link {
  font-size: 0.85rem;
  color: #ff5722;
  margin-left: 0.6rem;
  text-decoration: none;
  font-weight: 500;
}
/* --- Botón sin aspecto de botón --- */
.sin-estilo{
    background:none;border:none;padding:0;margin:0;
    font:inherit;color:inherit;cursor:pointer;
}

/* --- Menú desplegable --- */
.menu-usuario{
    position:absolute;
    top:120%;              /* debajo del icono */
    right:0;
    background:#fff;
    border:1px solid #ddd;
    border-radius:8px;
    list-style:none;
    box-shadow:0 4px 10px rgba(0,0,0,.08);
    padding:.3rem 0;
    width:140px;
    z-index:999;
}
.menu-usuario li a{
    display:block;
    padding:.5rem 1rem;
    text-decoration:none;
    color:#333;
    font-size:.9rem;
    transition:background .2s;
}
.menu-usuario li a:hover{
    background:#f5f5f5;
}
.oculto{ display:none !important; }

.enlace-fav-menu{
    display:flex;
    align-items:center;
    gap:6px;            /* espacio entre icono y palabra */
    text-decoration:none;
    color:#333;
    font-size:.9rem;
    padding:.5rem 1rem;
}

/* Mismo estilo de corazón que en las tarjetas, pero más peque?o */
.menu-corazon{
    width:18px;
    height:18px;
    stroke:#e53935;
    fill:none;          /* sin rellenar; pon fill:#e53935 si lo quieres sólido */
}

/* Hover coherente con tu menú */
.menu-usuario li a:hover{
    background:#f5f5f5;
}
/* tama?o del svg */
.menu-corazon{
    width:18px;
    height:18px;
}

/* aplica color y grosor al trazado interno */
.menu-corazon path{
    fill:none;
    stroke:#e53935;
    stroke-width:2px;
}

.premium-section {
  padding: 2rem 1rem;
  margin: 2rem auto;
  max-width: 1200px;
}

.premium-section .titulo-premium {
  font-size: 1.8rem;
  color: #d4a017;
  text-align: center;
  margin-bottom: 1rem;
  font-weight: bold;
}

.premium-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.product-card.premium {
  border: 2px solid gold;
  background: #fff8dc;
  box-shadow: 0 0 10px rgba(218, 165, 32, 0.5);
  transition: transform 0.3s ease;
}

.product-card.premium:hover {
  transform: scale(1.02);
}

.imagen-premium {
  max-width: 100%;
  border-radius: 8px;
}
.etiqueta-premium {
  display: inline-block;
  background: gold;
  color: #000;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 30px;
  margin-bottom: 8px;
  align-self: flex-start;
}
.filtros-superiores button.activo {
  background: #ff5722;
  color: #fff;
}