/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  256-pcard-system.css                                                ║
   ║  Sprint 11 — единая premium-система карточек товара.                 ║
   ║  Заменяет: legacy 197-pcard.css фрагменты + 255-pcard-parity.css.    ║
   ║                                                                       ║
   ║  Принципы:                                                           ║
   ║    · CSS Custom Properties для всех tokens                           ║
   ║    · CSS Grid + aspect-ratio (никаких float / position-hacks)        ║
   ║    · Container queries (адаптация по ширине КАРТОЧКИ, не viewport)   ║
   ║    · clamp() для fluid type                                          ║
   ║    · logical properties (inline/block)                               ║
   ║    · Один источник hover-FX (.pc:hover) — никаких per-variant дублей ║
   ║    · prefers-reduced-motion / forced-colors / focus-visible          ║
   ║    · BEM strict: .pc для всего, .pc-a/.pc-b/.pc-c/.pc-d/.pc-mini     ║
   ║    · Ноль !important. Ноль каскадов. Ноль inline-стилей.             ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* ─── 1. Tokens ─────────────────────────────────────────────────────── */

.pc {
  /* surface */
  --pc-radius: 20px;
  --pc-radius-sm: 12px;
  --pc-bg: #fcfaf6;
  --pc-bg-soft: #f6f0e3;
  --pc-border: 1px solid rgba(212, 184, 150, 0.20);
  --pc-divider: 0.5px solid rgba(212, 184, 150, 0.28);
  --pc-shadow-rest: 0 1px 2px rgba(40, 30, 15, 0.03), 0 12px 28px -22px rgba(40, 30, 15, 0.12);
  --pc-shadow-hover: 0 2px 6px rgba(40, 30, 15, 0.05), 0 32px 64px -28px rgba(40, 30, 15, 0.24);

  /* spacing */
  --pc-pad: clamp(16px, 1.7vw, 22px);
  --pc-gap: clamp(8px, 0.9vw, 12px);
  --pc-gap-lg: clamp(12px, 1.3vw, 18px);

  /* type */
  --pc-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --pc-sans: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --pc-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;

  --pc-fs-meta: 11px;
  --pc-fs-sku: 11.5px;
  --pc-fs-stock: 12px;
  --pc-fs-name: clamp(15px, 1.2vw, 18px);
  --pc-fs-name-a: clamp(28px, 3.2vw, 40px);
  --pc-fs-price: clamp(18px, 1.6vw, 22px);
  --pc-fs-cta: 13.5px;

  /* color */
  --pc-c-ink: #1a1714;
  --pc-c-ink-soft: rgba(26, 23, 20, 0.62);
  --pc-c-ink-mute: rgba(26, 23, 20, 0.40);
  --pc-c-accent: #7a6548;
  --pc-c-accent-soft: rgba(212, 184, 150, 0.42);
  --pc-c-gold: #d4b896;
  --pc-c-paper: #ffffff;
  --pc-c-stock-ok: #3d6b4f;
  --pc-c-stock-low: #a67426;
  --pc-c-stock-out: rgba(26, 23, 20, 0.36);
  --pc-c-sale: #c9433a;
  --pc-c-hit: #1a1714;
  --pc-c-new: #3a6a8a;

  /* motion */
  --pc-dur: 320ms;
  --pc-ease: cubic-bezier(0.2, 0.84, 0.3, 1);
  --pc-zoom: 1.045;
  --pc-lift: -4px;

  /* image */
  --pc-img-ratio: 4 / 3;
  --pc-img-bg: linear-gradient(180deg, var(--pc-bg) 0%, var(--pc-bg-soft) 100%);
}

/* ─── 2. Base card surface ─────────────────────────────────────────── */

.pc {
  container-type: inline-size;
  container-name: pcard;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--pc-c-paper);
  border: var(--pc-border);
  border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow-rest);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform var(--pc-dur) var(--pc-ease),
    border-color var(--pc-dur) var(--pc-ease),
    box-shadow var(--pc-dur) var(--pc-ease);
  color: var(--pc-c-ink);
  font-family: var(--pc-sans);
}

/* Body fills remaining space below media */
.pc-c__body,
.pc-b__body {
  flex: 1 1 auto;
}

.pc:hover {
  transform: translateY(var(--pc-lift));
  border-color: var(--pc-c-accent-soft);
  box-shadow: var(--pc-shadow-hover);
}

.pc:focus-within {
  outline: 2px solid var(--pc-c-accent);
  outline-offset: 4px;
}

/* ─── 3. Universal primitives ──────────────────────────────────────── */

/* Media — image holder with aspect-ratio. */
.pc-media {
  position: relative;
  display: grid;
  place-items: center;
  inline-size: 100%;
  aspect-ratio: var(--pc-img-ratio);
  background: var(--pc-img-bg);
  overflow: hidden;
  isolation: isolate;
}

/* Lazy-load shimmer skeleton — animated gradient behind image.
   When image loads, opaque img covers shimmer naturally via z-index. */
.pc-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      100deg,
      rgba(212, 184, 150, 0) 30%,
      rgba(212, 184, 150, 0.22) 50%,
      rgba(212, 184, 150, 0) 70%
    ),
    var(--pc-img-bg);
  background-size: 200% 100%, 100% 100%;
  background-repeat: no-repeat;
  animation: pc-shimmer 1.8s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes pc-shimmer {
  0% { background-position: 200% 0, 0 0; }
  100% { background-position: -200% 0, 0 0; }
}

.pc-media__img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  object-position: center;
  padding: clamp(12px, 1.6vw, 24px);
  transition: transform var(--pc-dur) var(--pc-ease);
  position: relative;
  z-index: 1;
}

.pc:hover .pc-media__img {
  transform: scale(var(--pc-zoom));
}

/* Subtle radial glow at media center on hover. */
.pc-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 55%, rgba(212, 184, 150, 0.22), rgba(212, 184, 150, 0) 55%);
  opacity: 0;
  transition: opacity var(--pc-dur) var(--pc-ease);
  pointer-events: none;
  z-index: 0;
}

.pc:hover .pc-media::after {
  opacity: 1;
}

.pc-media__img,
.pc-media__placeholder {
  position: relative;
  z-index: 1;
}

.pc-media__placeholder {
  display: grid;
  place-items: center;
  inline-size: 60%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(212, 184, 150, 0.12), rgba(184, 154, 111, 0.06));
  border-radius: 50%;
  font-family: var(--pc-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pc-c-accent);
  opacity: 0.55;
}

/* Single badge — sale / hit / new / out-of-stock. */
.pc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  background: var(--pc-c-hit);
  color: var(--pc-c-paper);
  font-family: var(--pc-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  white-space: nowrap;
}

.pc-badge--sale { background: var(--pc-c-sale); }
.pc-badge--hit { background: var(--pc-c-hit); }
.pc-badge--new { background: var(--pc-c-new); }
.pc-badge--out {
  background: rgba(26, 23, 20, 0.08);
  color: var(--pc-c-ink-soft);
}

/* Action button — heart / cart / quickview (36×36 circular). */
.pc-action {
  inline-size: 36px;
  block-size: 36px;
  display: inline-grid;
  place-items: center;
  background: var(--pc-c-paper);
  border: 0.5px solid rgba(26, 23, 20, 0.08);
  border-radius: 50%;
  color: var(--pc-c-ink-soft);
  cursor: pointer;
  transition:
    background var(--pc-dur) var(--pc-ease),
    color var(--pc-dur) var(--pc-ease),
    transform var(--pc-dur) var(--pc-ease);
}

.pc-action:hover {
  background: var(--pc-c-ink);
  color: var(--pc-c-paper);
  transform: scale(1.06);
}

.pc-action:focus-visible {
  outline: 2px solid var(--pc-c-accent);
  outline-offset: 2px;
}

.pc-action[aria-pressed="true"] {
  background: var(--pc-c-sale);
  color: var(--pc-c-paper);
  border-color: transparent;
}

.pc-action svg {
  inline-size: 16px;
  block-size: 16px;
}

/* Meta-row: series · sku */
.pc-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--pc-mono);
  font-size: var(--pc-fs-meta);
  letter-spacing: 0.06em;
  color: var(--pc-c-ink-soft);
}

.pc-meta__series {
  font-weight: 600;
  color: var(--pc-c-accent);
  text-transform: uppercase;
}

.pc-meta__sku {
  color: var(--pc-c-ink-mute);
}

/* Title */
.pc-title {
  margin: 0;
  font-family: var(--pc-serif);
  font-weight: 500;
  font-size: var(--pc-fs-name);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--pc-c-ink);
  font-feature-settings: "kern" 1, "liga" 1, "clig" 1, "calt" 1;
  text-rendering: geometricPrecision;
}

.pc-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--pc-dur) var(--pc-ease);
}

.pc:hover .pc-title a {
  color: var(--pc-c-accent);
}

/* Stock indicator: dot + text */
.pc-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--pc-mono);
  font-size: var(--pc-fs-stock);
  letter-spacing: 0.02em;
  color: var(--pc-c-ink-soft);
}

.pc-stock__dot {
  inline-size: 6px;
  block-size: 6px;
  border-radius: 50%;
  background: var(--pc-c-stock-ok);
}

.pc-stock--low .pc-stock__dot { background: var(--pc-c-stock-low); }
.pc-stock--out .pc-stock__dot { background: var(--pc-c-stock-out); }

/* Price row */
.pc-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--pc-serif);
}

.pc-price__current {
  font-size: var(--pc-fs-price);
  font-weight: 500;
  color: var(--pc-c-ink);
  font-variant-numeric: tabular-nums;
}

.pc-price__current--sale {
  color: var(--pc-c-sale);
}

.pc-price__old {
  font-size: 14px;
  color: var(--pc-c-ink-mute);
  text-decoration: line-through;
  text-decoration-thickness: 0.5px;
  font-variant-numeric: tabular-nums;
}

.pc-price__ask {
  font-size: 16px;
  font-style: italic;
  color: var(--pc-c-accent);
}

/* CTA */
.pc-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  inline-size: 100%;
  padding: 12px 18px;
  background: var(--pc-c-ink);
  color: var(--pc-c-paper);
  border: 0;
  border-radius: 12px;
  font-family: var(--pc-sans);
  font-size: var(--pc-fs-cta);
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--pc-dur) var(--pc-ease), transform 120ms var(--pc-ease);
}

.pc-cta:hover {
  background: #2a2018;
}

.pc-cta:active {
  transform: scale(0.985);
}

.pc-cta:focus-visible {
  outline: 2px solid var(--pc-c-accent);
  outline-offset: 2px;
}

.pc-cta--ghost {
  background: transparent;
  color: var(--pc-c-ink);
  border: 1px solid var(--pc-c-ink);
}

.pc-cta--ghost:hover {
  background: var(--pc-c-ink);
  color: var(--pc-c-paper);
}

/* Inline (auto-width) CTA — used in hero/editorial where multiple CTAs sit on one row */
.pc-cta--inline {
  inline-size: auto;
}

.pc-cta__price {
  font-family: var(--pc-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pc-cta__price::before {
  content: "·";
  margin: 0 6px;
  opacity: 0.6;
}

/* Overlay positioning helpers — used inside .pc-media */
.pc-media__overlay {
  position: absolute;
  inset: 12px;
  display: flex;
  justify-content: space-between;
  align-items: start;
  pointer-events: none;
  z-index: 2;
}

.pc-media__overlay > * {
  pointer-events: auto;
}

.pc-media__overlay--bottom {
  align-items: end;
}

.pc-media__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  Variant C — Default Catalog                                          ║
   ║  Размер: ~320×460. Используется на 90% страниц.                       ║
   ║  Image top (4:3) — meta — title — stock — price — CTA.                ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

.pc-c {
  --pc-img-ratio: 4 / 3;
  min-inline-size: 0;
}

.pc-c__body {
  display: flex;
  flex-direction: column;
  gap: var(--pc-gap);
  padding: var(--pc-pad);
  min-inline-size: 0;
}

.pc-c__body > .pc-cta {
  margin-block-start: auto;
}

/* C inside narrow containers (≤300px): tighten padding */
@container pcard (max-width: 300px) {
  .pc-c__body { padding: 16px; gap: 10px; }
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  Variant A — Editorial (hero / landing only)                          ║
   ║  Размер: ~720×420 (two-column at desktop, stack at mobile).           ║
   ║  Used in /promo, landing pages, «Серия месяца».                       ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

.pc-a {
  --pc-img-ratio: 3 / 2;
  --pc-radius: 28px;
  display: grid;
  grid-template-rows: auto auto;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .pc-a {
    grid-template-rows: auto;
    grid-template-columns: 1.1fr 1fr;
    min-block-size: 460px;
  }
  .pc-a .pc-media {
    block-size: 100%;
    aspect-ratio: auto;
  }
  .pc-a .pc-media__img {
    block-size: 100%;
    object-fit: cover;
    padding: 0;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .pc-a:hover .pc-media__img {
    transform: scale(1.06);
  }
  /* Soft vignette overlay for editorial mood */
  .pc-a .pc-media::after {
    background:
      linear-gradient(135deg, rgba(26, 23, 20, 0) 60%, rgba(26, 23, 20, 0.10) 100%),
      radial-gradient(circle at 30% 40%, rgba(212, 184, 150, 0.15), rgba(212, 184, 150, 0) 60%);
    opacity: 1;
  }
}

.pc-a__body {
  display: grid;
  align-content: center;
  gap: var(--pc-gap-lg);
  padding: clamp(28px, 3.2vw, 48px);
}

.pc-a__eyebrow {
  font-family: var(--pc-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pc-c-accent);
}

.pc-a__title {
  font-family: var(--pc-serif);
  font-weight: 500;
  font-size: var(--pc-fs-name-a);
  line-height: 1.04;
  letter-spacing: -0.024em;
  margin: 0;
  color: var(--pc-c-ink);
}

.pc-a__lede {
  font-family: var(--pc-sans);
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.55;
  color: var(--pc-c-ink-soft);
  max-inline-size: 56ch;
  margin: 0;
}

.pc-a__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-block-start: 8px;
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  Variant B — Rail Compact                                             ║
   ║  Размер: ~260×420. Для horizontal rails (related, cross-sell).        ║
   ║  Square image — meta — title — stock — price — CTA (short).           ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

.pc-b {
  --pc-img-ratio: 1 / 1;
  min-inline-size: 0;
}

.pc-b__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
  min-inline-size: 0;
}

.pc-b .pc-title {
  font-size: 15px;
}

.pc-b .pc-cta {
  padding: 10px 14px;
  margin-block-start: auto;
}

.pc-b__hoverband {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(252, 248, 240, 0.96), rgba(248, 244, 235, 1));
  border-block-start: var(--pc-divider);
  transform: translateY(100%);
  transition: transform var(--pc-dur) var(--pc-ease);
  pointer-events: none;
  z-index: 10;
}

.pc-b:hover .pc-b__hoverband {
  transform: translateY(0);
  pointer-events: auto;
}

.pc-b__hoverband-item {
  display: grid;
  gap: 2px;
  min-inline-size: 0;
}

.pc-b__hoverband-item span {
  font-family: var(--pc-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pc-c-ink-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-b__hoverband-item strong {
  font-family: var(--pc-serif);
  font-weight: 500;
  font-size: 12.5px;
  color: var(--pc-c-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  Variant D — Spec Table (B2B engineering)                             ║
   ║  Размер: ~400×360. Image left thumb — spec rows — price+CTA bottom.   ║
   ║  Used: /compare, B2B-heavy categories (выдвижение/AVENTOS).           ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

.pc-d {
  display: grid;
  grid-template-columns: 132px 1fr;
  grid-template-rows: auto;
  grid-template-areas: "media body";
}
.pc-d .pc-media { grid-area: media; aspect-ratio: 1; align-self: start; }
.pc-d__body { grid-area: body; min-inline-size: 0; }

@media (max-width: 480px) {
  .pc-d {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    grid-template-areas: "media" "body";
  }
  .pc-d .pc-media { aspect-ratio: 4 / 3; }
}

.pc-d__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  min-inline-size: 0;
}

.pc-d__body > .pc-d__bottom {
  margin-block-start: auto;
}

.pc-d .pc-title { font-size: 16px; }

.pc-d__specs {
  display: grid;
  gap: 4px;
  margin-block-start: 4px;
  padding-block-start: 8px;
  border-block-start: var(--pc-divider);
}

.pc-d__spec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  font-size: 12.5px;
  line-height: 1.4;
  padding: 4px 6px;
  margin-inline: -6px;
  border-radius: 4px;
  transition: background var(--pc-dur) var(--pc-ease);
}

.pc-d__spec:hover {
  background: rgba(212, 184, 150, 0.10);
}

.pc-d__spec dt {
  font-family: var(--pc-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pc-c-ink-mute);
  margin: 0;
}

.pc-d__spec dd {
  font-family: var(--pc-sans);
  font-weight: 500;
  color: var(--pc-c-ink);
  margin: 0;
  text-align: end;
}

.pc-d__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-start: 6px;
  padding-block-start: 10px;
  border-block-start: var(--pc-divider);
}

.pc-d .pc-cta {
  inline-size: auto;
  padding: 10px 18px;
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  Variant Mini — Pure Visual                                           ║
   ║  Размер: ~180×280. Image-dominant. No CTA (whole card is link).       ║
   ║  Used: recently-viewed, blog widgets, footer suggestions.             ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

.pc-mini {
  --pc-radius: 14px;
  --pc-img-ratio: 1 / 1;
  text-decoration: none;
  color: inherit;
  min-inline-size: 0;
}

.pc-mini__body {
  display: grid;
  gap: 4px;
  padding: 10px 12px 14px;
}

.pc-mini .pc-title {
  font-size: 13.5px;
  font-family: var(--pc-serif);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-mini__sku {
  font-family: var(--pc-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--pc-c-ink-mute);
}

.pc-mini__price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-block-start: 4px;
}

.pc-mini__price {
  font-family: var(--pc-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--pc-c-ink);
  font-variant-numeric: tabular-nums;
}

.pc-mini__price-old {
  font-family: var(--pc-serif);
  font-size: 12px;
  color: var(--pc-c-ink-mute);
  text-decoration: line-through;
}

/* ─── 4. Accessibility & motion ────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .pc,
  .pc *,
  .pc::after,
  .pc::before,
  .pc-media::before {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .pc {
    border: 1px solid CanvasText;
  }
  .pc-cta {
    background: ButtonText;
    color: ButtonFace;
    border: 1px solid ButtonText;
  }
  .pc-badge {
    border: 1px solid CanvasText;
  }
}

@media (hover: none) {
  .pc:hover {
    transform: none;
    box-shadow: var(--pc-shadow-rest);
  }
  .pc:hover .pc-media__img {
    transform: none;
  }
  .pc:hover .pc-media::after {
    opacity: 0;
  }
  .pc-b__hoverband {
    /* Touch: always visible on B variant */
    position: static;
    transform: none;
    pointer-events: auto;
  }
}

/* ─── 5. Card-link variant (whole card clickable) ──────────────────── */

a.pc,
.pc--link {
  text-decoration: none;
  color: inherit;
}

a.pc:visited {
  color: inherit;
}

/* End of file. 530 lines. No !important (except a11y-required). */


/* ─── Sprint13: pcard same-height grid + desc line-clamp ─── */
/* Each pcard fills its grid cell height fully so cards in a row stay equal */
.pcard {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.pcard__body, .pcard-a__body, .pcard-b__body, .pcard-c__body, .pcard-d__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
/* Spacer that pushes price/cta to bottom when body content is short */
.pcard__spacer-flex, .pcard__pre-price {
  flex: 1 0 auto;
}
/* Description: max 2 lines with ellipsis (prevents overflow) */
.pcard__desc, .pcard-a__desc, .pcard-b__desc, .pcard-c__desc, .pcard-d__desc,
[class*="pcard"][class*="__desc"] {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.6em;  /* reserve space so cards align even with 1-line desc */
}
/* Tag chips wrap row never overflows card */
.pcard__tags, .pcard-a__tags, .pcard-b__tags, .pcard-c__tags, .pcard-d__tags,
[class*="pcard"][class*="__tags"] {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  overflow: hidden;
}
[class*="pcard"][class*="__tag"] {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ─── Sprint13.P2: actions overlay polish ─── */
/* Ensure __media-wrap is positioning context for __rail overlay */
.pcard-a__media-wrap,
.pcard-b__media-wrap,
.pcard-d__media-wrap,
[class*="pcard"][class*="__media-wrap"] {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* Rail buttons get subtle backdrop so they're readable over any photo */
.pcard-a__rail .pcard-act,
.pcard-b__rail .pcard-act,
.pcard-d__rail .pcard-act {
  background: rgba(255, 252, 247, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 0.5px solid rgba(141, 109, 71, 0.18);
  box-shadow: 0 4px 12px -4px rgba(40, 30, 15, 0.18);
}
.pcard-a__rail .pcard-act:hover,
.pcard-b__rail .pcard-act:hover,
.pcard-d__rail .pcard-act:hover {
  background: var(--hc-paper, #ffffff);
  border-color: var(--hc-gold, #d4b896);
  transform: translateX(-2px);
}


/* ─── Sprint14.1: chip overflow + cheaper-pill align ─── */
/* Long chip tags must truncate, not overflow card */
[class*="pcard"][class*="__tag"],
[class*="pcard"][class*="__pill"],
[class*="pcard"] .hc-chip {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* "Нашли дешевле?" pill — fixed slot above the gold dot divider */
.hc-found-cheaper,
[class*="found-cheaper"],
[class*="pcard"] [class*="cheaper"] {
  margin-top: auto !important;  /* push to bottom of card body */
  align-self: flex-start;
}
/* Card body: explicit flex column, items have predictable order */
.pcard-a__body,
.pcard-b__body,
.pcard-d__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pcard-a__body > *:last-of-type,
.pcard-b__body > *:last-of-type,
.pcard-d__body > *:last-of-type {
  margin-top: auto;
}
