/* ── PRODUCTOS.CSS ─────────────────────────────────────────────────────────────
   Sección "Todos los productos" / productos de categoría: grid + tarjetas + estado vacío.
────────────────────────────────────────────────────────────────────────────── */

.productos-section {
  padding: 16px 0 64px;
  background: var(--bg-white);
}

.productos-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.productos-header {
  margin-bottom: 22px;
}

.productos-title {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
  padding-bottom: 10px;
  position: relative;
  display: inline-block;
}

.productos-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46px;
  height: 3px;
  background: var(--accent);
}

/* ── GRID DE PRODUCTOS ── */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  min-height: 220px;
}

/* ── ESTADO VACÍO ── */
.productos-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
  background: var(--bg);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
}

.productos-empty svg {
  width: 44px;
  height: 44px;
  color: var(--accent);
  opacity: 0.55;
  margin-bottom: 14px;
}

.productos-empty p {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink3);
}

/* ── SPINNER DE CARGA ── */
.productos-cargando {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 20px;
  min-height: 220px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.productos-cargando p {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink3);
  font-family: var(--font-body, 'Inter', sans-serif);
}

/* ── TARJETA DE PRODUCTO ── */
.producto-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--fast), box-shadow var(--fast), border-color var(--fast);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.producto-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(200, 16, 46, 0.15);
  cursor: pointer;
}

.producto-card-img-wrap {
  position: relative;
  aspect-ratio: 1/1;
  background: #fff;
  overflow: hidden;
  padding: 8px;
  flex-shrink: 0;
}

.producto-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform .4s var(--ease);
}

.producto-card:hover .producto-card-img {
  transform: scale(1.06);
}

.producto-card-noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--ink4);
}

/* ── BADGE DE ESTADO (arriba a la derecha) — estilo píldora clara ── */
.producto-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 50px;
  border: 1.5px solid transparent;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 2;
}

.producto-badge .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.producto-badge.badge-disponible {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}
.producto-badge.badge-disponible .status-dot {
  background: #16a34a;
  animation: pulse-green 1.5s infinite;
}

.producto-badge.badge-pocas {
  background: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
}
.producto-badge.badge-pocas .status-dot {
  background: #d97706;
  animation: pulse-yellow 1.5s infinite;
}

.producto-badge.badge-agotado {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}
.producto-badge.badge-agotado .status-dot {
  background: #dc2626;
}

.producto-badge.badge-proximamente {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}
.producto-badge.badge-proximamente .status-dot {
  background: #2563eb;
  animation: pulse-blue 1.5s infinite;
}

/* ── BADGE DE MARCA (arriba a la izquierda) ── */
.producto-badge-marca {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .2px;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 2;
}

/* ── CUERPO ── */
.producto-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.producto-card-brand {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 4px;
}

/* ── NOMBRE DEL PRODUCTO — siempre 2 líneas con … ── */
.producto-card-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  height: calc(1.35em * 2);   /* altura fija = siempre 2 líneas */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.producto-card-divider {
  width: 28px;
  height: 3px;
  background: var(--accent);
  margin: 10px 0 12px;
}

.producto-card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.producto-card-price {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.producto-card-stripes {
  width: 22px;
  height: 16px;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--accent),
    var(--accent) 2.5px,
    transparent 2.5px,
    transparent 6px
  );
  opacity: 0.5;
}

.producto-card-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--fast);
  margin-top: auto;
}

.producto-card-btn:hover { background: var(--accent-dark); }

.producto-card-btn svg {
  width: 15px;
  height: 15px;
}

/* ── BOTÓN "VER MÁS" — minimalista con flecha ── */
.ver-mas-wrap {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 32px 0 8px;
}

.ver-mas-btn {
  background: transparent;
  color: var(--accent);
  border: none;
  padding: 10px 20px;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: all .15s ease;
}

.ver-mas-btn::after {
  content: '↓';
  margin-left: 6px;
  display: inline-block;
  transition: transform .2s ease;
  text-decoration: none;
}

.ver-mas-btn:hover {
  color: var(--accent-dark);
  text-underline-offset: 6px;
}

.ver-mas-btn:hover::after {
  transform: translateY(3px);
}

@media (max-width: 480px) {
  .ver-mas-btn {
    font-size: 13px;
    padding: 8px 16px;
  }
}