/* ============================================================================
   card-premium.css
   Polish pass for product grid cards (.card--product). Affects:
   - Category / Subcategory listings
   - Search results
   - Best sellers / New arrivals
   - Home "También podrías necesitar" and recommendations
   Scoped under .card--product — no global side effects.
   ============================================================================ */

/* --- Card container: refined shadow, border, hover lift ------------------ */
.card.card--product {
  border: 1px solid #eef2f6;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}
.card.card--product:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px -8px rgba(15, 23, 42, 0.12), 0 4px 10px -4px rgba(15, 23, 42, 0.05);
  border-color: rgba(37, 99, 235, 0.22);
}

/* --- Image: subtle slate bg, inner hairline, compact padding ------------- */
.card--product .card__image {
  background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
  min-height: 180px;
}
.card--product .card__image img {
  max-width: 90%;
  max-height: 85%;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.card--product:hover .card__image img {
  transform: scale(1.06);
}

/* --- Body: breathing, tighter hierarchy --------------------------------- */
.card--product .card__body {
  padding: 14px 14px 12px;
  gap: 6px;
}

/* Brand pill — smaller, more elegant */
.card--product .card__brand {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  background: rgba(37, 99, 235, 0.09);
  border-radius: 999px;
  align-self: flex-start;
}

/* Title — weight up, tighter tracking */
.card--product .card__title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.15px;
  line-height: 1.35;
}

/* Description — more muted */
.card--product .card__desc {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

/* --- Price block: bold, branded ----------------------------------------- */
.card--product .card__price {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
}
.card--product .card__price-note {
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 600;
  margin-left: 2px;
}

/* --- Stock chip: refined --------------------------------------------------- */
.card--product .card__stock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.1px;
}
.card--product .card__stock--in {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #166534;
}
.card--product .card__stock--low {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
}
.card--product .card__stock--out {
  background: #fee2e2;
  color: #991b1b;
}

/* --- Badges (Nuevo, Variantes, etc.) -------------------------------------- */
.card--product .card__badge {
  padding: 5px 10px;
  font-size: 10px;
  letter-spacing: 0.6px;
  border-radius: 999px;
  top: 10px;
  right: 10px;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.15);
}
.card--product .card__badge--var {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
}

/* --- Delivery date chip --------------------------------------------------- */
.card--product .card__delivery {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  margin-top: 4px;
}
.card--product .card__delivery svg {
  color: #94a3b8;
  flex-shrink: 0;
}

/* --- Actions row (Añadir al pedido + favs) -------------------------------- */
.card--product .card__actions {
  padding: 0 14px 14px;
  gap: 8px;
  display: flex;
  flex-direction: column;
}
/* Add-to-cart button stays outline-green by design (site.css !important).
   Just refine shape + typography.                                          */
.card--product .card__add-btn {
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
  padding: 10px 14px !important;
  border-width: 1.5px !important;
}
.card--product .card__actions .btn--ghost {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  color: #334155;
  font-weight: 600;
  border-radius: 10px;
  padding: 8px 14px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.card--product .card__actions .btn--ghost:hover {
  background: #ffffff;
  border-color: var(--primary, #2563eb);
  color: var(--primary, #2563eb);
}

/* Secondary icons row (fav / compare) */
.card--product .card__actions-secondary {
  display: flex;
  gap: 6px;
  align-items: center;
}
.card--product .btn--icon-only {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.card--product .btn--icon-only:hover {
  background: #ffffff;
  border-color: var(--primary, #2563eb);
  color: var(--primary, #2563eb);
}
.card--product .btn--icon-only[aria-pressed="true"] {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.35);
  color: #dc2626;
}

/* --- Card footer layout: price + stock stacked better -------------------- */
.card--product .card__footer {
  padding-top: 6px;
  flex-wrap: wrap;
  gap: 4px 8px;
}

/* --- Volume badge (if present) -------------------------------------------- */
.card--product .volume-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
  color: #6b21a8;
  border-radius: 999px;
  letter-spacing: 0.1px;
}

/* --- Grid spacing: tighter gutter ----------------------------------------- */
.grid--products {
  gap: 18px;
}

@media (max-width: 767px) {
  .card.card--product {
    border-radius: 12px;
  }
  .card--product .card__image {
    padding: 10px;
    min-height: 140px;
  }
  .card--product .card__body {
    padding: 12px;
  }
  .card--product .card__title {
    font-size: 13px;
  }
  .card--product .card__price {
    font-size: 16px;
  }
}

/* --- PVP fabricante tachado + savings pill (T452) ---------------------- */
.card--product .card__pvp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 11.5px;
}
.card--product .card__pvp s {
  color: #94a3b8;
  font-weight: 500;
  text-decoration: line-through;
  text-decoration-color: rgba(148, 163, 184, 0.5);
}
.card--product .card__pvp-save {
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 3px -1px rgba(16, 185, 129, 0.4);
}
