/* ==========================================================================
   AUREL — Catalog product cards (shop + homepage lists)
   Matches luxury dark mockup: badges, swatches, sizes, ratings, pricing
   ========================================================================== */

.product-card--catalog {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card--catalog.card {
  background: transparent;
  box-shadow: none;
}

.product-card--catalog.card:hover {
  transform: none;
  box-shadow: none;
}

.product-card--catalog .product-card__image-wrap {
  position: relative;
  /* Match square product masters so nothing is cropped */
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ececec;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.3s ease;
}

.product-card--catalog:hover .product-card__image-wrap {
  border-color: rgba(168, 139, 74, 0.35);
}

.product-card--catalog .product-card__image {
  object-fit: contain;
  object-position: center center;
  image-rendering: auto;
  -ms-interpolation-mode: bicubic;
  transform: scale(1);
  transform-origin: center center;
  transition: opacity 0.35s ease, transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

.product-card--catalog .product-card__image--primary {
  opacity: 1;
  z-index: 1;
}

.product-card--catalog .product-card__image--hover {
  opacity: 0;
  z-index: 2;
}

.product-card--catalog:hover .product-card__image--primary {
  opacity: 0;
  transform: scale(1.05);
}

.product-card--catalog:hover .product-card__image--hover {
  opacity: 1;
  transform: scale(1.05);
}

.product-card--catalog.product-card--out-of-stock .product-card__image--primary,
.product-card--catalog.product-card--sold-out .product-card__image--primary {
  opacity: 0.55;
  filter: grayscale(0.4);
}

.product-card--catalog.product-card--out-of-stock .product-card__image--hover,
.product-card--catalog.product-card--sold-out .product-card__image--hover,
.product-card--catalog.product-card--out-of-stock:hover .product-card__image--hover,
.product-card--catalog.product-card--sold-out:hover .product-card__image--hover {
  opacity: 0;
  transform: scale(1);
  pointer-events: none;
}

.product-card--catalog.product-card--out-of-stock:hover .product-card__image--primary,
.product-card--catalog.product-card--sold-out:hover .product-card__image--primary {
  opacity: 0.55;
  transform: scale(1);
}

/* Badge placement on catalog cards */
.product-card--catalog .product-card__badges,
.product-card--catalog .product-tags.product-card__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  max-width: calc(100% - 48px);
  pointer-events: none;
}

.product-card--catalog .product-card__savings-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  color: #fff;
  background: #DC2626;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .product-card--catalog .product-card__savings-badge {
    right: 8px;
    bottom: 8px;
    padding: 5px 8px;
    font-size: 0.625rem;
  }
}

.page-product .pdp__badges.product-tags,
.page-product .product-tags.pdp__badges {
  position: static;
  pointer-events: auto;
}

.product-card--catalog.product-card--sold-out .product-card__image-wrap {
  border-color: rgba(255, 255, 255, 0.06);
}

.product-card--catalog.product-card--sold-out:hover .product-card__image-wrap {
  border-color: rgba(255, 255, 255, 0.08);
}

.product-card--catalog .product-card__sizes-empty--sold-out {
  color: #fff;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.625rem;
  font-weight: 600;
}

/* Wishlist */
.product-card--catalog .product-card__wishlist {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.product-card--catalog .product-card__wishlist svg {
  width: 16px;
  height: 16px;
}

.product-card--catalog .product-card__wishlist:hover,
.product-card--catalog .product-card__wishlist.is-active {
  color: var(--color-primary);
  background: rgba(0, 0, 0, 0.55);
}

.product-card--catalog .product-card__wishlist.is-active svg {
  fill: var(--color-primary);
}

/* Color swatches — premium pill on image (bottom-left) */
.product-card--catalog .product-card__image-swatches {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.38rem 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(10, 15, 26, 0.92) 0%, rgba(20, 27, 45, 0.82) 100%);
  border: 1px solid rgba(168, 139, 74, 0.32);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.product-card--catalog .product-card__swatch {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--swatch, #888);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.2),
    0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Body — title → price → sizes → rating */
.product-card--catalog .product-card__body {
  padding: 0.6rem 0 0;
  text-align: center;
  align-items: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  opacity: 1;
  visibility: visible;
}

.product-card--catalog .product-card__title {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  line-height: 1.3;
  margin: 0;
  min-height: 0;
  width: 100%;
}

.product-card--catalog .product-card__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 0;
}

.product-card--catalog .product-card__price-current {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff;
}

.product-card--catalog .product-card__price--original {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  color: #fff;
  text-decoration: line-through;
}

.product-card--catalog .product-card__sizes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.product-card--catalog .product-card__sizes-empty {
  margin: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: #fff;
  text-align: center;
}

/* Premium SVG rating stars (shop filters + product cards) */
.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  line-height: 1;
}

.rating-stars__icon {
  display: block;
  opacity: 1;
  fill: rgba(255, 255, 255, 0.35);
  stroke: #fff;
  stroke-width: 0.6;
  transition: fill 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
}

.rating-stars__icon.is-filled {
  opacity: 1;
  fill: var(--color-primary);
  stroke: #e8d5a3;
  filter: drop-shadow(0 1px 2px rgba(168, 139, 74, 0.35));
}

.rating-stars--sm .rating-stars__icon {
  width: 13px;
  height: 13px;
}

.rating-stars--md .rating-stars__icon {
  width: 15px;
  height: 15px;
}

.product-card--catalog .rating-stars--card .rating-stars__icon.is-filled {
  fill: var(--color-primary);
  stroke: #e8d5a3;
}

.product-card--catalog .product-card__rating {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.2rem 0.35rem;
  margin: 0;
  padding-top: 0.05rem;
  font-size: 0.6875rem;
  line-height: 1;
  min-height: 0;
  opacity: 1;
  color: #fff;
}

.product-card--catalog .product-card__rating-empty {
  opacity: 1;
  color: #fff;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
}

.product-card--catalog .product-card__title a {
  color: #fff;
  transition: color 0.25s ease;
}

.product-card--catalog .product-card__title a:hover {
  color: var(--color-primary);
}

.product-card--catalog .product-card__stars {
  color: var(--color-primary);
  letter-spacing: 0.05em;
}

.product-card--catalog .product-card__rating-value,
.product-card--catalog .product-card__rating-count {
  opacity: 1;
  color: #fff;
  font-weight: 500;
}

.product-card--catalog .product-card__rating-count {
  font-weight: 400;
}

.product-card--catalog .product-card__size {
  min-width: 32px;
  height: 28px;
  padding: 0 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: var(--font-accent);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

a.product-card__size {
  cursor: pointer;
}

a.product-card__size:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(168, 139, 74, 0.1);
}

.product-card--catalog .product-card__size.is-out-of-stock {
  opacity: 0.45;
  color: #fff;
  pointer-events: none;
  cursor: not-allowed;
}

.product-card--catalog .product-card__size.is-out-of-stock::after {
  content: '';
  position: absolute;
  inset: 5px;
  background: linear-gradient(
    to top right,
    transparent calc(50% - 0.6px),
    rgba(255, 255, 255, 0.45) calc(50% - 0.6px),
    rgba(255, 255, 255, 0.45) calc(50% + 0.6px),
    transparent calc(50% + 0.6px)
  );
  pointer-events: none;
}

/* Homepage grid */
.home-products-grid {
  gap: clamp(1.25rem, 2vw, 1.75rem);
}

@media (max-width: 520px) {
  .product-card--catalog .product-card__title {
    font-size: 0.75rem;
  }
}
