/* Product listing (category page) — modern cards */

.pl-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:16px;
}
@media (max-width: 1400px){ .pl-grid{ grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width: 1100px){ .pl-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width: 820px){ .pl-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; } }

/* Mobile: keep 2 cards per row like marketplaces (tight but readable) */
@media (max-width: 520px){
  .pl-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .pl-card{ padding:10px; border-radius:14px; }
  .pl-media{ border-radius:12px; }
  .pl-wish{ top:8px; right:8px; width:34px; height:34px; border-radius:12px; }
  .pl-wish .heart{ font-size:17px; }
  .pl-title{ margin-top:8px; font-size:13px; min-height: calc(13px * 1.25 * 2); }
  .pl-price{ margin-top:6px; font-size:15px; }
  .pl-actions{ padding-top:8px; }
  .pl-add{ padding:9px 10px; border-radius:12px; }
  .pl-qty{ padding:7px; border-radius:12px; }
  .pl-qty button{ width:34px; height:34px; border-radius:10px; }
}

.pl-card{
  background:#fff;
  border:1px solid rgba(15, 23, 42, .08);
  border-radius:16px;
  padding:12px;
  box-shadow:0 1px 2px rgba(15, 23, 42, .04);
  display:flex;
  flex-direction:column;
  min-height: 100%;
}
.pl-card:hover{ box-shadow:0 8px 24px rgba(15, 23, 42, .08); }

.pl-link{ color:inherit; text-decoration:none; display:block; }

.pl-media{
  width:100%;
  aspect-ratio: 1/1;
  background:#f6f7fb;
  border-radius:14px;
  overflow:hidden;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
}
.pl-media img{ width:100%; height:100%; object-fit:contain; display:block; }

/* Heart (wishlist) overlay — like marketplaces */
.pl-wish{
  position:absolute;
  top:10px;
  right:10px;
  z-index:2;
  width:38px;
  height:38px;
  border-radius:14px;
  backdrop-filter: blur(6px);
  background: rgba(255,255,255,.92);
}
.pl-wish:hover{ background: rgba(255,255,255,.98); }
.pl-wish .heart{ font-size:18px; color:#111827; }
.pl-wish.is-active{ border-color: rgba(30,102,245,.35); }
.pl-wish.is-active .heart{ color:#e53935; }

.pl-title{
  margin-top:10px;
  font-weight:700;
  font-size:14px;
  line-height:1.25;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height: calc(14px * 1.25 * 2);
}

.pl-price{ margin-top:8px; font-weight:800; font-size:16px; }

.pl-meta{ margin-top:6px; font-size:13px; opacity:.9; display:flex; gap:8px; align-items:center; }
.pl-rating{ display:flex; align-items:center; gap:4px; }
.pl-star{ font-size:14px; color:#f5a623; }
.pl-reviews{ opacity:.75; }

.pl-actions{ margin-top:auto; padding-top:10px; }

.pl-add{
  width:100%;
  border:0;
  border-radius:12px;
  padding:10px 12px;
  font-weight:800;
  cursor:pointer;
  background:#2563eb;
  color:#fff;
}
.pl-add:hover{ filter:brightness(.95); }

.pl-qty{
  width:100%;
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:space-between;
  background:#f3f4f6;
  border-radius:12px;
  padding:8px;
}
.pl-qty button{
  width:36px;
  height:36px;
  border-radius:10px;
  border:1px solid rgba(15, 23, 42, .10);
  background:#fff;
  cursor:pointer;
  font-size:18px;
  line-height:1;
}
.pl-qty button:active{ transform:translateY(1px); }
.pl-qty span{
  min-width: 26px;
  text-align:center;
  font-weight:800;
}

.pl-actions.is-loading{ opacity:.6; pointer-events:none; }

/* Respect the HTML [hidden] attribute (author CSS overrides UA stylesheet) */
.pl-add[hidden],
.pl-qty[hidden]{
  display:none !important;
}
/* Цвет звезды рейтинга */
.p-card .rating-star,
.product-rating .star,
.rating .star {
    color: #f5a623; /* мягкий маркетплейс-жёлтый */
}

/* ===== Wishlist heart active state ===== */

.wishlist-btn.active,
.wishlist-heart.active {
    color: #e53935 !important;
}

.wishlist-btn.active svg,
.wishlist-heart.active svg {
    fill: #e53935 !important;
    stroke: #e53935 !important;
}

.wishlist-btn:hover,
.wishlist-heart:hover {
    transform: scale(1.08);
    transition: all .2s ease;
}

