/* Vitrina / Tarjeta de Producto B2B (Figma B2B #154:43775) */
.pc {
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--color-surface);
  border: 1px solid #ececec;
  border-radius: var(--radius-md);
  color: #363636;
  font-weight: 700;
  padding: 16px;
  height: 495px;
  box-sizing: border-box;
  scroll-snap-align: start;
  transition: transform var(--duration-fast), box-shadow var(--duration-fast);
}

.pc:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

/* En carruseles (Home) mantiene su ancho fijo de vitrina Figma */
.carousel__track .pc,
.carousel__track [role="listitem"] {
  flex: 0 0 299px;
  width: 299px;
  min-width: 299px;
  max-width: 299px;
}

/* En grilla de categoría se adapta al 100% de la columna de la cuadrícula */
.category-grid .pc {
  width: 100%;
  max-width: 100%;
  height: 495px;
}

/* Media: Imagen, badges y acciones rápidas */
.pc__media {
  position: relative;
  width: 100%;
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  margin-bottom: 12px;
}

.pc__badges {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
  z-index: 2;
}

.pc__badge {
  display: grid;
  place-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 2px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.pc__badge--sale { background: #de5049; }
.pc__badge--new { background: #00c974; min-width: 50px; }

.pc__tools {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}

.pc__tool {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: transform var(--duration-fast), background var(--duration-fast);
}

.pc__tool:hover {
  transform: scale(1.15);
  background: #f1f5f9;
}

.pc__tool img {
  width: 18px;
  height: 18px;
  transition: filter var(--duration-fast);
}

.pc__tool.is-active img {
  filter: drop-shadow(0 0 2px var(--color-brand)) saturate(3);
}

.pc__media > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.pc__img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  transition: transform var(--duration-normal);
}

.pc:hover .pc__img {
  transform: scale(1.04);
}

/* Título de producto */
.pc__name {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc__name a {
  color: inherit;
  text-decoration: none;
}

.pc__name a:hover {
  color: var(--color-brand);
}

/* Divisores horizontales */
.pc__rule {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--color-line-soft);
}

/* Metadatos: REF y Marca */
.pc__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #64748b;
  padding: 6px 0;
  margin: 0;
}

.pc__meta span {
  display: inline-block;
}

.pc__meta b {
  color: var(--color-ink);
}

/* Precios y Cantidad */
.pc__buy {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 0 14px;
  margin-top: auto;
}

.pc__price {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pc__old {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 400;
  text-decoration: line-through;
  white-space: nowrap;
}

.pc__now {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-navy);
  white-space: nowrap;
}

.pc__qty-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.pc__qty-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 400;
}

.pc__qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  height: 30px;
}

.pc__qty button {
  width: 24px;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #475569;
  border: none;
  background: transparent;
  cursor: pointer;
}

.pc__qty button:hover {
  color: var(--color-brand);
}

.pc__qty output,
.pc__qty [data-qty] {
  padding: 0 8px;
  font-size: 13px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

/* Botón CTA Agregar al Carrito (Amarillo de Figma) */
.pc__cta {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-accent);
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  margin-top: 0;
  transition: filter var(--duration-fast), transform var(--duration-fast);
}

.pc__cta:hover {
  filter: brightness(0.92);
}

.pc__cta:active {
  transform: scale(0.98);
}
