/**
 * Product cards — grid, shell, meta, buybar, pills, sale pricing.
 * Loaded after store_full.css + store_full_extras.css.
 */

/* ── Grid ── */
.shop-page--v2 .product-grid--shop,
.page-home .section--home-popular .product-grid--shop {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr));
  gap: 1.15rem;
}

@media (min-width: 1400px) {
  .shop-page--v2 .shop-layout .product-grid--shop,
  .page-home .section--home-popular .product-grid--shop {
    gap: 1.2rem;
  }
}

/* ── Card shell ── */
.product-card--store {
  position: relative;
  border-radius: calc(var(--radius) + 10px);
  border: 1px solid color-mix(in srgb, var(--accent-2) 18%, var(--glass-border));
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 55%),
    linear-gradient(
      168deg,
      color-mix(in srgb, var(--glass-bg-strong) 98%, transparent),
      color-mix(in srgb, var(--text) 6%, rgba(6, 8, 14, 0.82))
    );
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 color-mix(in srgb, #fff 10%, transparent);
}

.product-card--store::before {
  opacity: 0.55;
}

.product-card--store:hover {
  transform: translateY(-7px);
  border-color: color-mix(in srgb, var(--accent-2) 48%, var(--glass-border));
  box-shadow:
    0 24px 52px color-mix(in srgb, var(--accent) 24%, transparent),
    0 14px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
}

.product-card--store .product-card__frame {
  border-radius: inherit;
  opacity: 0.35;
  transition: opacity 0.3s ease;
}

.product-card--store:hover .product-card__frame {
  opacity: 0.75;
}

/* ── Visual ── */
.product-card--store .product-card__visual {
  margin: 0.62rem 0.62rem 0;
  border-radius: calc(var(--radius) + 2px);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.32),
    inset 0 0 0 1px color-mix(in srgb, #fff 8%, transparent);
}

.product-card--store .product-image-wrap {
  aspect-ratio: 1 / 0.92;
  border-radius: calc(var(--radius) + 1px);
}

.product-card--store .product-image-wrap img,
.product-card--store .product-image-placeholder--animated {
  transition:
    transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.35s ease;
}

.product-card--store:hover .product-image-wrap img,
.product-card--store:hover .product-image-placeholder--animated {
  transform: scale(1.045);
  filter: saturate(1.08) brightness(1.04);
}

.product-card--store .product-image-shade {
  opacity: 0.5;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 42%,
    rgba(0, 0, 0, 0.28) 68%,
    rgba(0, 0, 0, 0.82) 100%
  );
}

/* Overlay — category on image; title lives in meta row */
.product-card--store .product-card__overlay {
  padding: 1.35rem 0.65rem 0.55rem;
  gap: 0.22rem;
}

.product-card--store .product-card__overlay .product-card__title,
.product-card--store .product-card__overlay-desc {
  display: none;
}

/* ── Meta row (name + tags) ── */
.product-card--store .product-card__meta {
  display: grid;
  gap: 0.42rem;
  padding: 0.72rem 0.85rem 0.15rem;
  min-width: 0;
}

.product-card--store .product-card__meta-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.22s ease;
}

.product-card--store:hover .product-card__meta-title {
  color: color-mix(in srgb, var(--accent-2) 72%, var(--text));
}

.product-card--store .product-card__meta-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.32rem;
  min-height: 1.2rem;
}

.product-card--store .product-card__meta-cat {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.16rem 0.44rem;
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(4, 6, 12, 0.78);
  border: 1px solid color-mix(in srgb, var(--pill-color, var(--accent-2)) 38%, rgba(255, 255, 255, 0.1));
  box-shadow: inset 2px 0 0 var(--pill-color, var(--accent-2));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card--store .product-card__meta-delivery {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.14rem 0.4rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--accent-2) 88%, var(--text-muted));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-2) 20%, var(--glass-border));
}

.product-card--store .product-card__meta-delivery svg {
  width: 0.62rem;
  height: 0.62rem;
  flex-shrink: 0;
}

/* ── Buy bar ── */
.product-card--store .product-card__buybar {
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem 0.78rem;
  background: transparent;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
}

.product-card--store:hover .product-card__buybar {
  border-top-color: color-mix(in srgb, var(--accent-2) 28%, var(--glass-border));
  background: linear-gradient(
    180deg,
    transparent,
    color-mix(in srgb, var(--accent) 5%, transparent)
  );
}

.product-card--store .product-card__buybar-lead {
  flex: 1;
  min-width: 0;
}

.product-card--store .product-card__buybar-btn {
  min-width: 2.65rem;
  padding: 0.52rem 0.85rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow:
    0 8px 22px color-mix(in srgb, var(--accent) 34%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent);
}

.product-card--store .product-card__buybar-btn-label {
  display: inline;
}

.product-card--store .product-card__buybar-hint {
  display: none;
}

/* Catalog header */
.shop-catalog-head {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background: color-mix(in srgb, var(--text) 4%, rgba(0, 0, 0, 0.14));
}

.shop-catalog-head__title {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.shop-catalog-head__count {
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-2) 22%, var(--glass-border));
}

/* ── Shared dark blur pill base ── */
.product-card--store .product-card__pill,
.product-card--store .product-card__corner-badges .hub-badge,
.product-card--store .product-category,
.product-card--store .product-group,
.product-card--store .product-card__overlay-chip,
.product-card--store .product-card__hover-tag,
.product-card--store .product-card__hover-stat,
.product-card--store .product-image-wrap .product-gallery-count {
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
}

.product-card--store .product-card__pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(4, 6, 12, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Corner rail — no overlap when all pills present ── */
.product-card--store .product-card__visual-rail {
  position: absolute;
  inset: 0.45rem 0.45rem auto;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.product-card--store .product-card__visual-rail-left,
.product-card--store .product-card__visual-rail-right {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}

.product-card--store .product-card__visual-rail-left {
  align-items: flex-start;
  flex: 0 1 44%;
  max-width: 44%;
}

.product-card--store .product-card__visual-rail-right {
  align-items: flex-end;
  flex: 0 1 54%;
  max-width: 54%;
  margin-left: auto;
}

.product-card--store .product-card__ribbon.product-card__pill {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  clip-path: none;
  color: #0a0c12;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 1px solid color-mix(in srgb, #fff 24%, transparent);
  box-shadow:
    0 6px 16px color-mix(in srgb, var(--accent) 42%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 28%, transparent);
}

.product-card--store .product-card__metric-pill {
  position: static;
  top: auto;
  right: auto;
  left: auto;
  bottom: auto;
  z-index: auto;
  max-width: 100%;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
}

/* Corner rail metrics (e.g. Video preview) — match hub-badge pills */
.product-card--store .product-card__visual-rail-right .product-card__metric-pill.product-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.2rem 0.46rem;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(4, 6, 12, 0.84);
  border: 1px solid color-mix(in srgb, var(--accent-2) 38%, rgba(255, 255, 255, 0.12));
  box-shadow:
    0 5px 14px rgba(0, 0, 0, 0.34),
    inset 2px 0 0 var(--accent-2);
}

.product-card--store .product-card__badges {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 0.26rem;
  max-width: 100%;
  pointer-events: none;
}

.product-card--store .product-card__corner-badges .hub-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  max-width: 100%;
  margin: 0;
  padding: 0.2rem 0.46rem;
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(4, 6, 12, 0.84);
  border: 1px solid color-mix(in srgb, var(--b, var(--accent-2)) 38%, rgba(255, 255, 255, 0.12));
  box-shadow:
    0 5px 14px rgba(0, 0, 0, 0.34),
    inset 2px 0 0 var(--b, var(--accent-2));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card--store .product-card__corner-badges .hub-badge i {
  font-size: 0.62rem;
  opacity: 0.9;
}

/* Gallery count — bottom corner, dark blur */
.product-card--store .product-image-wrap .product-gallery-count {
  z-index: 5;
  padding: 0.22rem 0.44rem;
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(4, 6, 12, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.32);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

/* Overlay category pill — readable on any image */
.product-card--store .product-category,
.product-card--store .product-group {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.18rem 0.48rem 0.18rem 0.42rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(4, 6, 12, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card--store .product-category[style*="--pill-color"] {
  border-color: color-mix(in srgb, var(--pill-color, var(--accent-2)) 42%, rgba(255, 255, 255, 0.12));
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 2px 0 0 var(--pill-color, var(--accent-2));
}

.product-card--store .product-card__overlay-top {
  min-height: 0;
  max-width: 100%;
}

.product-card--store .product-card__overlay-chip,
.product-card--store .product-card__hover-tag,
.product-card--store .product-card__hover-stat {
  background: rgba(4, 6, 12, 0.78);
  border-color: rgba(255, 255, 255, 0.12);
}

.product-card--store .product-card__hover-tag--delivery {
  border-color: color-mix(in srgb, var(--accent-2) 35%, rgba(255, 255, 255, 0.1));
  background: color-mix(in srgb, var(--accent) 18%, rgba(4, 6, 12, 0.82));
}

/* ── Hover — fade corner rail, keep gallery count ── */
@media (hover: hover) {
  .product-card--store:hover .product-card__visual-rail,
  .product-card--store:focus-within .product-card__visual-rail {
    opacity: 0;
    transform: translateY(-5px);
    pointer-events: none;
  }

  .product-card--store:hover .product-card__metric-pill,
  .product-card--store:hover .product-card__stock--corner,
  .product-card--store:focus-within .product-card__metric-pill,
  .product-card--store:focus-within .product-card__stock--corner {
    opacity: 1;
    transform: none;
  }
}

/* ── Sale price — sticks out ── */
.product-card--store.product-card--on-sale .product-card__buybar-price--sale {
  gap: 0.14rem;
}

.product-card--store .product-card__buybar-price .price-was {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.48);
  text-decoration: line-through;
  text-decoration-color: rgba(248, 113, 113, 0.75);
  text-decoration-thickness: 1.5px;
  letter-spacing: 0.01em;
}

.product-card--store .price-current-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.product-card--store.product-card--on-sale .product-card__buybar-price .price-current {
  font-size: 1.24rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #4ade80;
  text-shadow:
    0 0 22px color-mix(in srgb, #4ade80 45%, transparent),
    0 2px 8px rgba(0, 0, 0, 0.35);
}

.product-card--store .price-off-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0a0c12;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border: 1px solid color-mix(in srgb, #fff 22%, transparent);
  box-shadow: 0 4px 14px color-mix(in srgb, #f97316 38%, transparent);
}

.product-card--store.product-card--on-sale .product-card__buybar {
  border-top-color: color-mix(in srgb, #4ade80 22%, var(--glass-border));
}

.product-card--store.product-card--on-sale:hover .product-card__buybar {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, #4ade80 5%, var(--glass-bg-strong)),
    color-mix(in srgb, var(--accent) 6%, var(--glass-bg-strong))
  );
}

/* Default (non-sale) price */
.product-card--store:not(.product-card--on-sale) .product-card__buybar-price .price-current {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-2);
}

/* Light theme */
[data-theme="light"] .product-card--store .product-card__pill,
[data-theme="light"] .product-card--store .product-card__corner-badges .hub-badge,
[data-theme="light"] .product-card--store .product-category,
[data-theme="light"] .product-card--store .product-image-wrap .product-gallery-count,
html[data-mantine-color-scheme="light"] .product-card--store .product-card__pill,
html[data-mantine-color-scheme="light"] .product-card--store .product-card__corner-badges .hub-badge,
html[data-mantine-color-scheme="light"] .product-card--store .product-category,
html[data-mantine-color-scheme="light"] .product-card--store .product-image-wrap .product-gallery-count {
  background: rgba(8, 12, 22, 0.88);
  color: rgba(255, 255, 255, 0.96);
}

[data-theme="light"] .product-card--store.product-card--on-sale .product-card__buybar-price .price-current,
html[data-mantine-color-scheme="light"] .product-card--store.product-card--on-sale .product-card__buybar-price .price-current {
  color: #16a34a;
  text-shadow: none;
}

[data-theme="light"] .product-card--store .product-card__buybar-price .price-was,
html[data-mantine-color-scheme="light"] .product-card--store .product-card__buybar-price .price-was {
  color: rgba(15, 23, 42, 0.45);
}

[data-theme="light"] .product-card--store,
html[data-mantine-color-scheme="light"] .product-card--store {
  background: linear-gradient(168deg, #fff, color-mix(in srgb, var(--accent) 4%, #f8fafc));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .product-card--store .product-card__meta-cat,
html[data-mantine-color-scheme="light"] .product-card--store .product-card__meta-cat {
  background: rgba(8, 12, 22, 0.88);
}

[data-theme="light"] .shop-catalog-head,
html[data-mantine-color-scheme="light"] .shop-catalog-head {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.08);
}

/* Marquee (home carousel) */
.product-card--store.product-card--marquee .product-card__meta {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.product-card--store.product-card--marquee .product-card__buybar {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

/* Mobile — tighter rail */
@media (max-width: 520px) {
  .product-card--store .product-card__meta-title {
    font-size: 0.86rem;
    -webkit-line-clamp: 2;
  }

  .product-card--store .product-card__meta {
    padding: 0.62rem 0.68rem 0.1rem;
  }

  .product-card--store .product-card__buybar-btn-label {
    display: none;
  }

  .product-card--store .product-card__buybar-btn {
    min-width: 2.35rem;
    padding: 0.5rem 0.62rem;
  }
  .product-card--store .product-card__visual-rail {
    inset: 0.38rem 0.38rem auto;
    gap: 0.32rem;
  }

  .product-card--store .product-card__visual-rail-left {
    max-width: 46%;
  }

  .product-card--store .product-card__visual-rail-right {
    max-width: 52%;
  }

  .product-card--store.product-card--on-sale .product-card__buybar-price .price-current {
    font-size: 1.14rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card--store .product-card__visual-rail,
  .product-card--store .product-image-wrap .product-gallery-count {
    transition: none;
  }
}

/* ── Featured carousel slides ── */
.shop-featured-slide__status,
.shop-featured-slide__perk,
.shop-featured-slide__chip {
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
}

.shop-featured-slide__status {
  background: rgba(4, 6, 12, 0.84);
  border: 1px solid color-mix(in srgb, var(--pill-color, #22c55e) 42%, rgba(255, 255, 255, 0.12));
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 2px 0 0 var(--pill-color, #22c55e);
}

.shop-featured-slide__perk {
  background: rgba(4, 6, 12, 0.78);
  border-color: rgba(255, 255, 255, 0.12);
}

.shop-featured-slide--on-sale .shop-featured-slide__price .price-was {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: line-through;
  text-decoration-color: rgba(248, 113, 113, 0.75);
  margin-bottom: 0.12rem;
}

.shop-featured-slide--on-sale .shop-featured-slide__price .price-current {
  font-size: 1.45rem;
  font-weight: 900;
  color: #4ade80;
  text-shadow: 0 0 20px color-mix(in srgb, #4ade80 40%, transparent);
}

.shop-featured-slide--on-sale .shop-featured-slide__price .price-current-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.shop-featured-slide--on-sale .price-off-pill {
  display: inline-flex;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0a0c12;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border: 1px solid color-mix(in srgb, #fff 22%, transparent);
}
