/* ==========================================================================
   Product page (Figma 5469:3412, mobile 5497:9750)
   Also provides the product card (.pcard), product grid (.pgrid) and
   sprite crops (.crop) reused by product-details.html.
   ========================================================================== */

.page-product, .page-product-details { background: #f9f9f9; }

/* Header sits transparently over the hero background */
.page-product .site-header { background: transparent; }

/* ---------- Hero (5469:3415) ---------- */
.phero {
  margin-top: -90px;
  padding-top: 90px;
  background: linear-gradient(-36.71deg, #fefefe 54.035%, #fef5f6 70.314%, #fefafa 88.998%);
}
.phero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  min-height: 340px;
}
.phero__text { display: flex; flex-direction: column; gap: 40px; max-width: 640px; }
.phero__title { font-size: 64px; line-height: 72px; font-weight: 600; color: var(--c-heading); }
.phero__title .text-primary { display: block; }
.phero__sub { font-size: 18px; line-height: 26px; color: var(--c-text); }
.phero__media { flex: none; width: 550px; }
.phero__media img { width: 100%; height: 310px; object-fit: cover; }

/* ---------- Listing (5469:3422) ---------- */
.plist { padding: 60px 0 100px; }
.plist__inner { display: flex; flex-direction: column; align-items: center; gap: 48px; }

/* Category filter pill bar (5469:3423) */
.pfilter {
  display: flex;
  align-items: flex-start;
  max-width: 100%;
  padding: 2px;
  background: var(--c-white);
  border: 1px solid #e4e4e4;
  border-radius: var(--radius-pill);
  overflow-x: auto;
  scrollbar-width: none;
}
.pfilter::-webkit-scrollbar { display: none; }
.pfilter__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: none;
  height: 48px;
  padding: 0 20px;
  border-radius: 56px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.pfilter__btn img { width: 24px; height: 24px; }
.pfilter__btn img.pfilter__all { width: 32px; height: 32px; }
.pfilter__btn:hover { color: var(--c-primary); }
.pfilter__btn.is-active {
  background: var(--c-primary);
  color: var(--c-white);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-btn);
}
.pfilter__btn.is-active:first-child { padding: 0 24px 0 8px; }
.pfilter__btn.is-active img:not(.pfilter__all) { filter: brightness(0) invert(1); }

/* ---------- Product grid + card (Block 10, 5469:3445) ---------- */
.pgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
}
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: var(--c-white);
  border: 1px solid var(--c-stroke);
  border-radius: 16px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.pcard:hover { box-shadow: 0 14px 30px rgba(0, 0, 0, 0.06); transform: translateY(-2px); }
.pcard__badge {
  position: absolute;
  top: 15px;
  right: 16px;
  z-index: 1;
  padding: 6px 10px;
  border-radius: 1000px;
  background: #edffe4;
  border: 1px solid #30c174;
  font-size: 12px;
  line-height: 20px;
  font-weight: 600;
  color: #41a210;
  white-space: nowrap;
}
.pcard__media {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 224px;
  border-radius: 12px;
  background: #fefefe;
  overflow: hidden;
}
.pcard__body { display: flex; flex-direction: column; gap: 24px; }
.pcard__title {
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
  color: var(--c-heading);
  text-align: center;
}
.pcard__title a:hover { color: var(--c-primary); }
.pcard__feats { display: flex; flex-direction: column; gap: 12px; }
.pcard__feats li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 20px;
  color: var(--c-text);
}
.pcard__feats img { width: 20px; height: 20px; flex: none; }
.pcard__price { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.pcard__now { font-size: 28px; line-height: 30px; font-weight: 600; color: var(--c-heading); }
.pcard__old { font-size: 18px; line-height: 26px; color: var(--c-text); }
.pcard__actions { display: flex; gap: 16px; margin-top: 8px; }
.pcard__more {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 24px;
  border: 1px solid var(--c-stroke);
  border-radius: var(--radius-pill);
  background: var(--c-white);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
  transition: border-color .15s ease, color .15s ease;
}
.pcard__more img { width: 16px; height: 16px; }
.pcard__more:hover { border-color: var(--c-primary); color: var(--c-primary); }
.pcard__cart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 63px;
  height: 44px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--c-primary);
  transition: background-color .15s ease;
}
.pcard__cart:hover { background: #e01f1f; }
.pcard__cart img { width: 24px; height: 24px; }

/* Sprite crops — one photo (product-device-sprite.png) holds 3 device shots.
   Values come from the Figma image fill transforms. */
.crop { position: relative; display: block; overflow: hidden; flex: none; }
.crop img { position: absolute; max-width: none; height: auto; }
.crop--a img { width: 489.17%; height: 170.63%; left: -14.5%;   top: -42.46%; }
.crop--b img { width: 415.14%; height: 181.88%; left: -109.19%; top: -51.69%; }
.crop--c img { width: 373.72%; height: 178.09%; left: -273.72%; top: -49.39%; }

.plist__all { width: 188px; padding-inline: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .phero__title { font-size: 52px; line-height: 60px; }
  .phero__media { width: 44%; }
  .phero__media img { height: auto; aspect-ratio: 550 / 310; }
  .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pfilter { align-self: stretch; }
}
@media (max-width: 1024px) {
  .phero__inner { flex-direction: column; align-items: center; text-align: center; padding: 48px 0 40px; }
  .phero__text { align-items: center; }
  .phero__media { width: 100%; max-width: 640px; }
}
@media (max-width: 900px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .phero { margin-top: -65px; padding-top: 65px; }
  .phero__inner { gap: 40px; padding: 48px 0 0; min-height: 0; }
  .phero__text { gap: 24px; }
  .phero__title { font-size: 40px; line-height: 48px; }
  .phero__media { max-width: none; }
  .phero__media img { height: auto; aspect-ratio: 1670 / 941; }

  .plist { padding: 40px 0; }
  .plist__inner { gap: 24px; }
  .pgrid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .plist__all { margin-top: 0; }
}
.page-product .testimonials { background: #fff; }
