/* Shared product cards for front page and catalog. */

/* Product Card */
.dv-product-card {
  background-color: var(--surface-dark);
  border: 1px solid var(--border-raw);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dv-product-card:hover {
  border-color: var(--primary-container);
  box-shadow: 0 0 20px rgba(255, 0, 85, 0.15);
}

.dv-card-media {
  position: relative;
  overflow: hidden;
  background: #fff;
  padding: 1.25rem;
  isolation: isolate;
}

.dv-product-card--dark-media .dv-card-media {
  background: #101116;
}

.dv-card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(10, 10, 13, .1);
  background: linear-gradient(#ff0055, #ff0055) left 12px bottom 12px / 44px 3px no-repeat,
              linear-gradient(#101116, #101116) left 12px bottom 12px / 3px 44px no-repeat;
}

.dv-product-card--dark-media .dv-card-media::before {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
  background: linear-gradient(#ff0055, #ff0055) left 12px bottom 12px / 44px 3px no-repeat,
              linear-gradient(#fff, #fff) left 12px bottom 12px / 3px 44px no-repeat;
}

.dv-card-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dv-badge-bestseller {
  background: var(--primary-container);
  color: var(--pure-black);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.dv-badge-category {
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid var(--primary-container);
  color: var(--primary-container);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 0.15rem 0.45rem;
  font-weight: 700;
}

.dv-card-wishlist {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 20;
}

.dv-card-wishlist button,
.dv-card-wishlist a {
  padding: 0.4rem;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-raw);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.dv-card-wishlist button:hover,
.dv-card-wishlist a:hover {
  color: var(--primary-container);
  border-color: var(--primary-container);
}

.dv-card-thumb-wrap {
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dv-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.dv-card-thumb-wrap > a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.dv-product-card:hover .dv-card-thumb-wrap img {
  transform: scale(1.05);
}

.dv-card-body {
  padding: 1.25rem;
  border-top: 1px solid var(--border-raw);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.dv-card-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.dv-card-product-title {
  font-family: var(--font-headline);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-stark);
  text-transform: uppercase;
  line-height: 1.25;
  transition: color 0.15s ease;
}

.dv-product-card:hover .dv-card-product-title {
  color: var(--primary-container);
}

.dv-card-price-block {
  display: flex;
  flex-direction: column;
  margin-top: 0.35rem;
}

.dv-card-price {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-stark);
}

.dv-card-legal-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 0.2rem;
}

.dv-card-cart-btn {
  width: 100%;
  background: var(--pure-black);
  border: 1px solid var(--primary-container);
  color: var(--text-stark);
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.dv-card-cart-btn:hover {
  background: var(--primary-container);
  color: var(--pure-black);
  box-shadow: 0 0 20px var(--primary-glow);
}

.dv-card-sizes {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.dv-card-sizes-label {
  flex-basis: 100%;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  margin-right: 0.25rem;
}

.dv-card-size {
  min-width: 2rem;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--border-raw);
  color: var(--text-stark);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.dv-card-size:hover,
.dv-card-size:focus-visible {
  border-color: var(--primary-container);
  color: var(--primary-container);
  outline: none;
}

.dv-card-size[aria-pressed="true"] {
  border-color: var(--primary-container);
  background: var(--primary-container);
  color: var(--pure-black);
  font-weight: 700;
}
