/* Ajuste de separación entre botones de productos */
.product-card .btn {
  margin-top: 10px;
  display: block;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

/* Separación adicional para el botón Añadir al carrito */
.product-card .btn-cart {
  margin-bottom: 12px;
}

.price {
  display: flex;
  align-items: center;
  gap: 8px;
}

.old-price {
  color: #999;
  text-decoration: line-through;
  font-size: 14px;
}

.new-price {
  color: #ffc107;
  font-weight: bold;
  font-size: 18px;
}

.discount {
  background: #e53935;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 6px;
}

.filter-label span {
  cursor: pointer;
}

/* =========================
   FILTRO DE PRECIO - ESTILO
========================= */
.filter-panel input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #111;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border 0.3s, box-shadow 0.3s;
}

.filter-panel input[type="number"]::placeholder {
  color: #888;
}

.filter-panel input[type="number"]:focus {
  border-color: #ff9800;
  box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
}

/* =========================
   BOTÓN APLICAR FILTROS
========================= */
#applyFilters {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff9800, #ff6a00);
  color: #000;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
}

#applyFilters:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 152, 0, 0.4);
  background: linear-gradient(135deg, #ffad33, #ff7b00);
}

#applyFilters:active {
  transform: scale(0.98);
}

/* =========================
   CONTENEDOR IMAGEN + BADGES
========================= */
.product-img-wrap {
  position: relative !important;
  width: 100%;
  overflow: visible !important;
}

/* la imagen */
.product-img-wrap img {
  width: 100%;
  display: block;
}

/* === BADGE ROJO POR CANTIDAD (sticker) === */
.price-badge {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;

  background: #e11d48 !important;
  color: #fff !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;

  z-index: 9999 !important;
  box-shadow: 0 10px 25px rgba(0,0,0,.35) !important;
  max-width: 180px !important;
  text-align: left !important;
  pointer-events: none !important;
}

/* === CODIGO DE PRODUCTO === */
.product-card .product-code {
  margin-top: 6px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.product-marca {
  margin-top: 4px;
  font-size: 13px;
  color: #9ca3af;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* =========================
   BADGE DESCUENTO ARRIBA EN LA TARJETA
   (más pequeño y color OFERTA)
========================= */
.product-card{
  position: relative !important;
  overflow: visible !important;
}

/* el badge se dibuja como hijo directo de .product-card */
.product-card > .discount-badge{
  position: absolute !important;
  top: 10px !important;
  left: 16px !important;
  z-index: 999999 !important;

  background: #dc2626 !important; /* 👈 rojo tipo oferta */
  color: #fff !important;
  padding: 4px 8px !important;    /* 👈 más compacto */
  font-size: 11px !important;     /* 👈 más pequeño */
  font-weight: 800 !important;
  border-radius: 6px !important;

  text-transform: uppercase !important;
  letter-spacing: .4px !important;
  white-space: nowrap !important;

  box-shadow: 0 6px 16px rgba(0,0,0,.35) !important;
  pointer-events: none !important;
}

/* baja la imagen un poco para dejar espacio arriba */
.product-card .product-img-wrap{
  margin-top: 28px !important;
  position: relative !important;
}

/* Badge descuento arriba en la tarjeta (tipo OFERTA) */
.product-card{
  position: relative !important;
  overflow: visible !important;
}

.product-card > .discount-badge{
  position: absolute !important;
  top: 10px !important;
  left: 16px !important;
  z-index: 999999 !important;

  background: #dc2626 !important; /* rojo oferta */
  color: #fff !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  border-radius: 6px !important;

  text-transform: uppercase !important;
  letter-spacing: .4px !important;
  white-space: nowrap !important;

  box-shadow: 0 6px 16px rgba(0,0,0,.35) !important;
  pointer-events: none !important;
}

/* baja la imagen para dejar espacio al badge */
.product-card .product-img-wrap{
  margin-top: 28px !important;
}


/* ====== FIX DEFINITIVO: BADGE DESCUENTO ====== */

/* Asegura que la tarjeta sea referencia para el absolute */
.product-card{
  position: relative !important;
  overflow: visible !important;
}

/* Estilo del badge (más pequeño y tipo oferta) */
/* ===== BADGE DESCUENTO (AMARILLO TIPO OFERTA) ===== */
.discount-badge{
  position: absolute !important;
  top: 10px !important;
  left: 16px !important;

  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;

  background: linear-gradient(135deg, #facc15, #f59e0b) !important; /* AMARILLO */
  color: #111 !important;

  padding: 4px 10px !important;
  font-size: 11px !important;
  font-weight: 900 !important;

  border-radius: 999px !important;
  letter-spacing: .3px !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;

  z-index: 999999 !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.35) !important;
  pointer-events: none !important;
}


/* Baja un poco la imagen para dejar espacio arriba */
.product-card .product-img-wrap{
  margin-top: 28px !important;
}


/* ===== UNIDADES / PRECIOS POR CANTIDAD (debajo del COD) ===== */
.units-info{
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  color: #f87171;              /* rojo suave tipo oferta */
  background: rgba(225,29,72,.08);
  padding: 6px 10px;
  border-radius: 8px;
  text-align: left;
}

/* === BADGE DE UNIDADES CENTRADO (MISMO DISEÑO ROJO) === */
.price-badge-center{
  display: inline-block;
  margin: 10px auto 0 auto;   /* 👈 centra */
  background: #e11d48;        /* MISMO rojo */
  color: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
  max-width: 180px;
  text-align: left;
}

/* === NOMBRE DEL PRODUCTO (amarillo) === */
.product-card h3{
  color: #facc15;        /* amarillo tipo oferta */
  font-weight: 800;
  text-transform: capitalize;
}

/* === MARCA DEL PRODUCTO EN NEGRITA === */
.product-marca{
  font-weight: 800;      /* más grueso */
  color: #e5e7eb;        /* gris claro elegante */
}


.price-badge-center{
  background:#e11d48;
  color:#fff;
  display:inline-block;
  padding:10px 14px;
  border-radius:12px;
  font-size:12px;
  line-height:1.25;
  font-weight:800;
  text-align:center;
  margin:10px auto 0;
  box-shadow:0 10px 25px rgba(0,0,0,.35);
}


.filtros-acordeon { margin-top: 10px; }
.acc-item { margin-bottom: 10px; border-radius: 10px; overflow: hidden; }
.acc-header {
  width: 100%;
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  border-radius: 10px;
}
.acc-icon { opacity: .8; }
.acc-body {
  display: none;
  padding: 10px 12px;
  background: rgba(0,0,0,0.25);
  border-left: 1px solid rgba(255,255,255,0.06);
  border-right: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.acc-item.open .acc-body { display:block; }
.sub-opt { display:block; margin:6px 0; font-size: 14px; }
.sub-opt input { margin-right: 8px; }
.btn-filtrar{
  width:100%;
  margin-top: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: #ff9900;
  font-weight: 700;
  cursor: pointer;
}


.acc-header{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color:#fff;
  cursor:pointer;
}

.acc-body{ display:none; padding:10px 12px; }
.acc-item.open .acc-body{ display:block; }

.sub-opt{ display:block; margin:8px 0; }
.sub-opt input{ margin-right:8px; }


/* ===== FIX ACORDEÓN (FORZAR) ===== */
.acc-header{
  all: unset;              /* resetea estilos conflictivos */
  box-sizing: border-box;
  width: 100%;
  display:flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 10px 12px !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 10px !important;
  color: #fff !important;
  cursor: pointer !important;
}

.acc-icon{
  display:inline-block !important;
  opacity: .85 !important;
}

.acc-body{
  display:none !important;
  padding: 10px 12px !important;
  margin-top: 6px !important;
  background: rgba(0,0,0,0.25) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 10px !important;
}

.acc-item.open > .acc-body{
  display:block !important;
}

.sub-opt{
  display:block !important;
  margin: 8px 0 !important;
  color:#fff !important;
}

.sub-opt input{
  margin-right: 8px !important;
}
