/* =================== pdp-compat.css =================== */
/* PDP compat-suggest widget — "Готовый комплект под этот товар".
 * Driven by /api/bundle/suggest. Strictly .hc-pdp-compat / .hc-pdp-compat__*. */

.hc-pdp-compat {
  margin: clamp(24px, 3vw, 36px) 0;
  padding: clamp(20px, 2.4vw, 28px);
  background: linear-gradient(180deg, var(--hc-paper, #ffffff) 0%, rgba(252, 248, 240, 0.94) 100%);
  border: 0.5px solid var(--hc-gold-border, rgba(212, 184, 150, 0.42));
  border-radius: 18px;
  box-shadow:
    0 1px 2px rgba(40, 30, 15, 0.03),
    0 18px 38px -24px rgba(40, 30, 15, 0.14);
}

.hc-pdp-compat__lead {
  margin: 4px 0 0;
  max-width: 56ch;
}

.hc-pdp-compat__panel {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.hc-pdp-compat__group {
  background: rgba(255, 254, 252, 0.86);
  border: 0.5px solid rgba(212, 184, 150, 0.28);
  border-radius: 14px;
  overflow: hidden;
}

.hc-pdp-compat__group[data-kind="requires"] {
  border-color: rgba(184, 124, 76, 0.42);
  background: linear-gradient(180deg, #fff8ee 0%, rgba(255, 248, 238, 0.7) 100%);
}

.hc-pdp-compat__group-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 0.5px solid rgba(212, 184, 150, 0.28);
  font-family: var(--hc-mono, "JetBrains Mono", monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hc-accent-dark, #7a6548);
}

.hc-pdp-compat__group-h strong {
  font-weight: 600;
}

.hc-pdp-compat__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hc-pdp-compat__row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-top: 0.5px solid rgba(212, 184, 150, 0.18);
}

.hc-pdp-compat__row:first-child {
  border-top: 0;
}

.hc-pdp-compat__check {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.hc-pdp-compat__check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.hc-pdp-compat__check-mark {
  width: 18px;
  height: 18px;
  border: 1.4px solid rgba(122, 101, 72, 0.42);
  border-radius: 5px;
  background: #ffffff;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.hc-pdp-compat__check input:checked + .hc-pdp-compat__check-mark {
  border-color: var(--hc-accent-dark, #7a6548);
  background: var(--hc-accent-dark, #7a6548);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='3 8.5 7 12 13 4'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}

.hc-pdp-compat__name {
  font-family: var(--hc-serif, "Playfair Display", Georgia, serif);
  font-weight: 500;
  font-size: 16px;
  color: var(--hc-ink, #1a1714);
  text-decoration: none;
  line-height: 1.3;
}

.hc-pdp-compat__name:hover {
  color: var(--hc-accent-dark, #7a6548);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hc-pdp-compat__sku {
  font-size: 11px;
  letter-spacing: 0.04em;
}

.hc-pdp-compat__price {
  font-family: var(--hc-mono, "JetBrains Mono", monospace);
  font-weight: 600;
  font-size: 14px;
  color: var(--hc-ink, #1a1714);
  white-space: nowrap;
  text-align: right;
  min-width: 80px;
}

.hc-pdp-compat__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
  padding: 14px 16px;
  background: rgba(255, 252, 246, 0.7);
  border: 0.5px solid rgba(212, 184, 150, 0.28);
  border-radius: 14px;
}

.hc-pdp-compat__total {
  display: grid;
  gap: 2px;
}

.hc-pdp-compat__total strong {
  font-family: var(--hc-serif);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1;
}

.hc-pdp-compat__skel {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.hc-pdp-compat__skel-row {
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(212, 184, 150, 0.10), rgba(212, 184, 150, 0.22), rgba(212, 184, 150, 0.10));
  background-size: 200% 100%;
  animation: hc-pdp-compat-shimmer 1.4s linear infinite;
}

@keyframes hc-pdp-compat-shimmer {
  from { background-position: 0% 50%; }
  to   { background-position: -200% 50%; }
}

.hc-pdp-compat__empty {
  margin-top: 14px;
  padding: 16px;
  border: 1px dashed rgba(122, 101, 72, 0.35);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .hc-pdp-compat__row {
    grid-template-columns: 28px 1fr auto;
    grid-template-areas: 'check name price' 'check sku   price';
    row-gap: 2px;
  }
  .hc-pdp-compat__check { grid-area: check; }
  .hc-pdp-compat__name  { grid-area: name; }
  .hc-pdp-compat__sku   { grid-area: sku; }
  .hc-pdp-compat__price { grid-area: price; align-self: center; }
}
