/**
 * Competition card (Components/cards/CompetitionCard/template.twig).
 * Light card on the cream canvas: framed image, gold-ink eyebrow, serif title,
 * thin champagne-to-gold progress, outline call to action. Hover, focus and press
 * colours for the call to action live with the shared interaction layer in child-brand.css;
 * the focus and press rules are repeated here so they beat the card hover fill.
 */

.ncs-product-card {
  --ncs-product-card-bg: var(--pl-surface);
  --ncs-product-card-border: var(--pl-line);
  --ncs-product-card-border-hover: var(--pl-line);
  --ncs-product-card-title: var(--pl-black);
  --ncs-product-card-price: var(--pl-black);
  --ncs-product-card-media-bg: var(--pl-tint-deep);
  --ncs-product-card-progress-track: var(--pl-tint);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--ncs-product-card-border);
  border-radius: 18px;
  overflow: hidden;
  color: var(--pl-black);
  transition: box-shadow 400ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .ncs-product-card:hover {
    box-shadow: 0 22px 44px -28px color-mix(in srgb, var(--pl-gold-ink) 50%, transparent);
  }
}

.pl-card__inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

/* Media */
.pl-card__media {
  position: relative;
  margin: 10px 10px 0;
  border: 1px solid var(--pl-champagne);
  border-radius: 14px;
  overflow: hidden;
}

.pl-card__image-link,
.pl-card__image {
  position: absolute;
  inset: 0;
  display: block;
}

.pl-card__image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.pl-card__image--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pl-line-strong);
}

.pl-card__tags {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.pl-card__chip,
.pl-card__badge {
  padding: 6px 10px;
  border: 1px solid var(--pl-champagne);
  border-radius: 18px;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pl-card__chip {
  background: var(--pl-ground);
  color: var(--pl-black);
}

.pl-card__badge {
  margin-left: auto;
  border-color: var(--pl-black);
  background: var(--pl-black);
  color: var(--pl-ground);
}

.pl-card__badge--highlight {
  border-color: var(--pl-gold);
  background: var(--pl-gold);
  color: var(--pl-black);
}

/* Sold out: veil over the image, label between two gold rules */
.pl-card__soldout {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--pl-ground) 72%, transparent);
  pointer-events: none;
}

.pl-card__soldout-label {
  padding: 10px 24px;
  border-top: 1px solid var(--pl-gold);
  border-bottom: 1px solid var(--pl-gold);
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pl-black);
}

/* Body */
.pl-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 20px 22px 24px;
}

.pl-card__eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pl-gold-ink);
}

.pl-card__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.pl-card__title a {
  color: inherit;
  text-decoration: none;
}

.pl-card__price-row,
.pl-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  font-family: var(--font-body);
  color: var(--pl-ink);
}

.pl-card__price-row {
  align-items: baseline;
  font-size: 14px;
}

.pl-card__meta {
  font-size: 13px;
}

.pl-card__price {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--ncs-product-card-price);
}

.pl-card__price .woocommerce-Price-amount {
  color: inherit;
}

/* Progress */
.ncs-product-card .pl-card__track {
  position: relative;
  background-color: var(--ncs-product-card-progress-track);
  height: 4px;
  border-radius: 999px;
  overflow: visible;
  box-shadow: none;
}

.ncs-product-card .pl-card__fill {
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--pl-champagne), var(--pl-gold));
  box-shadow: 0 0 10px -1px color-mix(in srgb, var(--pl-gold) 65%, transparent);
}

.ncs-product-card .pl-card__fill::after {
  content: none;
}

/* Call to action: outline at rest; card hover fills it warm gold (child-brand.css) */
.pl-card__cta {
  --color-white: var(--pl-black);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: auto;
  padding: 0 20px;
  border: 1px solid var(--pl-black);
  border-radius: 12px;
  background-color: transparent;
  color: var(--pl-black);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.ncs-product-card .pl-card__cta:focus-visible,
.ncs-product-card .pl-card__cta:active {
  --color-white: var(--pl-black);
  background-color: var(--pl-champagne);
  border-color: var(--pl-gold);
  color: var(--pl-black);
}

@media (prefers-reduced-motion: reduce) {
  .ncs-product-card,
  .pl-card__cta {
    transition: none;
  }
}
