/* ==========================================================================
   PERFECTOO PROTECTOR — PRODUCT CARD
   A soft "screen" tile with glass chips, then name, description, tags, price.
   The whole card is one link (.product-detail-trigger opens the panel).
   Scoped to .products-page so the home page cards are not affected.
   Inherits tokens from .products-page (see products.css).
   ========================================================================== */

.products-page .product-card {
  margin: 0; padding: 0; min-width: 0;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  transition: transform .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease), background-color .45s var(--ease);
}
.products-page .product-card:hover {
  transform: translateY(-4px); background: var(--surface); border-color: var(--accent);
  box-shadow: 0 40px 60px -40px rgba(6,50,58,.5);
}
.products-page .product-card-link {
  display: flex; flex-direction: column; flex: 1; padding: 10px;
  color: inherit; text-decoration: none; border-radius: inherit;
}
.products-page .product-card-link:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

/* ---------- Media ---------- */
.products-page .product-card-media {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 4 / 3.2; border-radius: calc(var(--r-xl) - 10px);
  background:
    radial-gradient(70% 70% at 70% 15%, #fff 0%, transparent 65%),
    linear-gradient(180deg, var(--bg-tint) 0%, #D3E3EC 100%);
}
.products-page .product-card-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.products-page .product-card:hover .product-card-media img { transform: scale(1.05); }
.products-page .product-card-media::after { /* glass reflection */
  content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.18) 26%, transparent 26.2%);
}
.products-page .product-media-chip {
  position: absolute; z-index: 2; left: 12px; bottom: 12px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.7);
  font-size: .75rem; font-weight: 600; color: var(--ink-2);
}
.products-page .product-media-chip span { color: var(--accent); }

/* Placeholder: a dark screen with the PP mark */
.products-page .media-placeholder {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: rgba(255,255,255,.75); font-size: .8125rem; font-weight: 500;
  background:
    radial-gradient(60% 70% at 70% 20%, rgba(120,220,230,.35) 0%, transparent 60%),
    linear-gradient(160deg, var(--deep-2) 0%, var(--deep) 100%);
}
.products-page .media-placeholder::before {
  content: "PP"; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: #fff; color: var(--accent); font: 800 1.1rem/1 var(--font-display);
  box-shadow: 0 0 0 8px rgba(255,255,255,.14);
}

/* ---------- Body ---------- */
.products-page .product-card-body { display: flex; flex-direction: column; flex: 1; gap: 14px; padding: 20px 14px 14px; }
.products-page .product-card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.products-page .product-card-body h3 {
  margin: 0; min-width: 0;
  font: 800 clamp(1.25rem, 1.6vw, 1.45rem)/1.12 var(--font-display); letter-spacing: -.03em;
  color: var(--ink); overflow-wrap: anywhere;
}
.products-page .product-card-open {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--accent); font-size: .95rem;
  transition: transform .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.products-page .product-card:hover .product-card-open {
  background: var(--accent); border-color: var(--accent); color: #fff; transform: translate(2px, -2px);
}
.products-page .product-card-desc {
  margin: 0; font-size: .9375rem; line-height: 1.65; color: var(--ink-2);
  display: -webkit-box; --webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Tags: neutral chip, colour carried by the dot */
.products-page .product-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.products-page .tag {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: .75rem; font-weight: 600; color: var(--ink-2);
}
.products-page .tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tag-color, var(--accent)); }

/* Price + likes share the footer of the card */
.products-page .product-price {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px;
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--font-display);
}
.products-page .price-old { font-size: .9rem; font-weight: 500; color: var(--ink-3); text-decoration: line-through; }
.products-page .price-new, .products-page .price-current {
  font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; color: var(--accent);
}
.products-page .product-meta { display: flex; align-items: center; }
.products-page .product-price + .product-meta { margin-top: -2px; }
.products-page .product-card-body > .product-meta:last-child { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.products-page .product-price + .product-meta { padding-top: 0; border-top: 0; }
.products-page .like-count {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .8125rem; font-weight: 600; color: var(--ink-3);
}
.products-page .like-count::before { content: "♥"; color: var(--accent); font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  .products-page .product-card { border-radius: 26px; }
  .products-page .product-card-media { border-radius: 18px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .products-page .product-card, .products-page .product-card-media img, .products-page .product-card-open { transition: none; }
  .products-page .product-card:hover, .products-page .product-card:hover .product-card-media img,
  .products-page .product-card:hover .product-card-open { transform: none; }
}