/**
 * Shared product card — ProductCardRenderer (BEM: tgwv-product-card).
 * Scope: .tgwv-product-list--pbc-cards and section PBC homepage.
 */
.tgwv-product-list--pbc-cards,
.tgwv-products-by-category {
  --tgwv-pbc-thumb-ratio: 1 / 1;
  --tgwv-pbc-thumb-fit: contain;
  --tgwv-pbc-thumb-bg: #f8f9fa;
  --tgwv-pbc-text: var(--tgwv-color-dark, #000000);
  --tgwv-pbc-card-cat-color: color-mix(in srgb, var(--tgwv-pbc-text, var(--tgwv-color-dark, #000000)) 55%, transparent);
  --tgwv-pbc-card-title-color: var(--tgwv-pbc-text, var(--tgwv-color-dark, #000000));
  --tgwv-pbc-btn-text: var(--tgwv-color-light, #ffffff);
  /* Theme settings → Primary (--tgwv-brand) */
  --tgwv-pbc-btn-bg: var(--tgwv-brand, #000000);
  --tgwv-pbc-btn-border: var(--tgwv-brand, #000000);
  --tgwv-pbc-accent: var(--tgwv-brand, #000000);
}

.tgwv-product-list--pbc-cards .tgwv-product-card,
.tgwv-products-by-category .tgwv-product-card {
  background-color: var(--tgwv-color-light);
  border-radius: 12px;
  border: none;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tgwv-product-list--pbc-cards .tgwv-product-card:hover,
.tgwv-products-by-category .tgwv-product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__media,
.tgwv-products-by-category .tgwv-product-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: var(--tgwv-pbc-thumb-ratio);
  background-color: var(--tgwv-pbc-thumb-bg);
  display: block;
  padding: 0;
  overflow: hidden;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__media-link,
.tgwv-products-by-category .tgwv-product-card__media-link {
  position: absolute;
  inset: 0;
  display: block;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__media img,
.tgwv-products-by-category .tgwv-product-card__media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: var(--tgwv-pbc-thumb-fit, cover);
  transition: transform 0.5s ease;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__badges,
.tgwv-products-by-category .tgwv-product-card__badges {
  position: absolute;
  z-index: 2;
  top: 0.55rem;
  left: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  max-width: calc(100% - 3.2rem);
  pointer-events: none;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__badges--body,
.tgwv-products-by-category .tgwv-product-card__badges--body {
  position: static;
  max-width: none;
  padding: 0.5rem 0.75rem 0;
  justify-content: center;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__badge,
.tgwv-products-by-category .tgwv-product-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #fff;
  background: #364a85;
  text-transform: uppercase;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__badge--new,
.tgwv-products-by-category .tgwv-product-card__badge--new {
  background: #0d9488;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__badge--hot,
.tgwv-products-by-category .tgwv-product-card__badge--hot {
  background: #ea580c;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__badge--sale,
.tgwv-products-by-category .tgwv-product-card__badge--sale {
  background: #dc2626;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__quick-view,
.tgwv-products-by-category .tgwv-product-card__quick-view {
  position: absolute;
  z-index: 2;
  top: 0.55rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  color: var(--tgwv-pbc-accent, var(--tgwv-brand, #111));
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.1);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.18s ease, transform 0.18s ease, color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__quick-view-icon,
.tgwv-products-by-category .tgwv-product-card__quick-view-icon {
  display: block;
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

.tgwv-product-list--pbc-cards .tgwv-product-card:hover .tgwv-product-card__quick-view,
.tgwv-products-by-category .tgwv-product-card:hover .tgwv-product-card__quick-view,
.tgwv-product-list--pbc-cards .tgwv-product-card__quick-view:focus-visible,
.tgwv-products-by-category .tgwv-product-card__quick-view:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.tgwv-product-list--pbc-cards .tgwv-product-card__quick-view:hover,
.tgwv-products-by-category .tgwv-product-card__quick-view:hover {
  color: var(--tgwv-pbc-accent, var(--tgwv-brand, #111));
  background: #fff;
  border-color: color-mix(in srgb, var(--tgwv-pbc-accent, var(--tgwv-brand, #111)) 35%, #fff);
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.14);
}

.tgwv-product-list--pbc-cards .tgwv-product-card__quick-view:focus-visible,
.tgwv-products-by-category .tgwv-product-card__quick-view:focus-visible {
  outline: 2px solid var(--tgwv-pbc-accent, var(--tgwv-brand, #111));
  outline-offset: 2px;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__quick-view.is-loading,
.tgwv-products-by-category .tgwv-product-card__quick-view.is-loading {
  pointer-events: none;
  opacity: 0.75;
}

@media (hover: none), (max-width: 991px) {
  .tgwv-product-list--pbc-cards .tgwv-product-card__quick-view,
  .tgwv-products-by-category .tgwv-product-card__quick-view {
    opacity: 1;
    transform: none;
  }
}

.tgwv-product-list--pbc-cards:not(.tgwv-product-list--no-hover-zoom)
  .tgwv-product-card:hover
  .tgwv-product-card__media img,
.tgwv-products-by-category:not(.tgwv-products-by-category--no-hover-zoom)
  .tgwv-product-card:hover
  .tgwv-product-card__media img {
  transform: scale(1.08);
}

.tgwv-product-list--pbc-cards .tgwv-product-card__cat,
.tgwv-products-by-category .tgwv-product-card__cat {
  display: block;
  font-size: 11px;
  color: var(--tgwv-pbc-card-cat-color);
  margin-bottom: 5px;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__title,
.tgwv-products-by-category .tgwv-product-card__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--tgwv-pbc-card-title-color);
  margin-bottom: 10px;
  min-height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__pricing,
.tgwv-products-by-category .tgwv-product-card__pricing {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-bottom: 4px;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__price,
.tgwv-products-by-category .tgwv-product-card__price {
  font-size: 16px;
  font-weight: 700;
  color: var(--tgwv-brand);
  line-height: 1.3;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__compare-price,
.tgwv-products-by-category .tgwv-product-card__compare-price {
  font-size: 14px;
  color: #9ca3af;
  text-decoration: line-through;
  line-height: 1.3;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__btn,
.tgwv-products-by-category .tgwv-product-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 25px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tgwv-pbc-btn-text);
  background-color: var(--tgwv-pbc-btn-bg);
  border: 1px solid var(--tgwv-pbc-btn-border);
  border-radius: 20px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__btn i,
.tgwv-products-by-category .tgwv-product-card__btn i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__btn:hover i,
.tgwv-products-by-category .tgwv-product-card__btn:hover i {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .tgwv-product-list--pbc-cards .tgwv-product-card__btn i,
  .tgwv-products-by-category .tgwv-product-card__btn i {
    transition: none;
  }

  .tgwv-product-list--pbc-cards .tgwv-product-card__btn:hover i,
  .tgwv-products-by-category .tgwv-product-card__btn:hover i {
    transform: none;
  }
}

.tgwv-product-list--pbc-cards:not(.tgwv-product-list--no-btn-hover)
  .tgwv-product-card:hover
  .tgwv-product-card__btn,
.tgwv-products-by-category:not(.tgwv-products-by-category--no-btn-hover)
  .tgwv-product-card:hover
  .tgwv-product-card__btn {
  background-color: color-mix(in srgb, var(--tgwv-pbc-btn-bg, var(--tgwv-brand)) 88%, #000000);
  color: var(--tgwv-color-light, #ffffff) !important;
  border-color: color-mix(in srgb, var(--tgwv-pbc-btn-border, var(--tgwv-brand)) 88%, #000000);
}

@media (max-width: 991px) {
  .tgwv-product-list--pbc-cards .tgwv-product-card__title,
  .tgwv-products-by-category .tgwv-product-card__title {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .tgwv-product-list--pbc-cards .tgwv-product-card__btn,
  .tgwv-products-by-category .tgwv-product-card__btn {
    padding: 5px 15px;
    font-size: 11px;
  }
}

.tgwv-product-list--pbc-cards .tgwv-product-card__sold,
.tgwv-products-by-category .tgwv-product-card__sold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  margin: 2px auto 0;
  padding: 5px 10px;
  border: 1px solid #e8ddd0;
  border-radius: 999px;
  background-color: #fbf5eb;
  color: #ea7200;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.tgwv-product-list--pbc-cards .tgwv-product-card__sold-icon,
.tgwv-products-by-category .tgwv-product-card__sold-icon {
  display: inline-flex;
  font-size: 11px;
  line-height: 1;
}
