/* ============================================================
   Product card (website/dekoshopping/partials/product-variation-card).
   Loaded once per page by the partial itself, so every page that
   shows the card gets the same look:

   photo on a soft panel with one status badge (top left) and the
   wishlist heart (top right); then brand, name, stars, and price with
   the old price and an "% OFF" pill. The buttons under it keep their
   original look (.dekole-pcard-actions in the older sheets).

   The root selector carries the old card classes plus `article`, so it
   outranks the older .dekole-pcard / --v3 rules in the other sheets.
   The inner parts use their own dkpc-* classes, which nothing else styles.
   ============================================================ */

article.dekole-pcard.dekole-pcard--v3.dekole-pcard--v4 {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 8px;
  overflow: hidden;
  border: 1px solid #e6ebf3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
article.dekole-pcard.dekole-pcard--v3.dekole-pcard--v4:hover {
  transform: translateY(-2px);
  border-color: #d6e0ee;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
}
article.dekole-pcard--v4,
article.dekole-pcard--v4 * {
  box-sizing: border-box;
}

/* ---- photo panel ---- */
article.dekole-pcard--v4 .dkpc-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: #f2f5f9;
}
article.dekole-pcard--v4 .dkpc-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 14px;
}
article.dekole-pcard--v4 .dkpc-image img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  /* White product backgrounds melt into the panel. */
  mix-blend-mode: multiply;
  transition: transform .3s ease;
}
article.dekole-pcard--v4:hover .dkpc-image img { transform: scale(1.04); }

article.dekole-pcard--v4 .dkpc-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .4px;
  text-transform: uppercase;
  white-space: nowrap;
}
article.dekole-pcard--v4 .dkpc-badge.is-hot  { background: #ef4444; }
article.dekole-pcard--v4 .dkpc-badge.is-best { background: #1d4ed8; }
article.dekole-pcard--v4 .dkpc-badge.is-new  { background: #2563eb; }

article.dekole-pcard--v4 .dkpc-save {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .10);
  color: #2563eb;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
article.dekole-pcard--v4 .dkpc-save:hover { background: #2563eb; border-color: #2563eb; color: #fff; }

/* ---- text ---- */
article.dekole-pcard--v4 .dkpc-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 10px 6px 4px;
}

article.dekole-pcard--v4 .dkpc-brand {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}
article.dekole-pcard--v4 .dkpc-brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
article.dekole-pcard--v4 .dkpc-verified { flex: 0 0 auto; color: #2563eb; font-size: 12px; }

article.dekole-pcard--v4 .dkpc-title {
  display: -webkit-box;
  min-height: 2.7em;            /* two lines, so rows of cards line up */
  overflow: hidden;
  color: #1e293b;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
article.dekole-pcard--v4 .dkpc-title:hover { color: #2563eb; }

article.dekole-pcard--v4 .dkpc-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1;
}
article.dekole-pcard--v4 .dkpc-stars { display: inline-flex; gap: 1px; color: #f59e0b; }
article.dekole-pcard--v4 .dkpc-rating-text { color: #64748b; }

article.dekole-pcard--v4 .dkpc-price {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 4px;
}
article.dekole-pcard--v4 .dkpc-price-now {
  color: #0f172a;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.1;
}
article.dekole-pcard--v4 .dkpc-price-was {
  color: #94a3b8;
  font-size: 13px;
  text-decoration: line-through;
}
article.dekole-pcard--v4 .dkpc-off {
  padding: 3px 7px;
  border-radius: 6px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  article.dekole-pcard.dekole-pcard--v3.dekole-pcard--v4 { padding: 6px; border-radius: 12px; }
  article.dekole-pcard--v4 .dkpc-body { padding: 8px 4px 2px; }
  article.dekole-pcard--v4 .dkpc-title { font-size: 12.5px; }
  article.dekole-pcard--v4 .dkpc-price-now { font-size: 16px; }
}
