/* ds-product-cards.css */

/* --- Grid Layout --- */
.ds-product-editorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: calc(var(--ds-spacing-unit) * 8) calc(var(--ds-spacing-unit) * 6);
  padding: calc(var(--ds-spacing-unit) * 4) 0;
}

/* On very large screens, ensure 4 columns */
@media (min-width: 1400px) {
  .ds-product-editorial-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- Premium Product Card --- */
.ds-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.ds-product-card__link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

/* Media Container - Strict Portrait Aspect Ratio */
.ds-product-card__media {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--ds-color-surface);
  /* Fallback */
  border-radius: calc(var(--ds-border-radius) - 4px);
  margin-bottom: calc(var(--ds-spacing-unit) * 3);
}

.ds-product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Hover Zoom Effect */
.ds-product-card__link:hover .ds-product-card__image {
  transform: scale(1.05);
}

/* Placeholder */
.ds-product-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--ds-color-text) 3%, transparent);
  color: var(--ds-color-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Overlay & Quick View */
.ds-product-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.02);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--ds-spacing-unit) * 3);
}

.ds-product-card__link:hover .ds-product-card__overlay {
  opacity: 1;
}

.ds-product-card__quick-view {
  width: 100%;
  padding: calc(var(--ds-spacing-unit) * 3);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  color: #000;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transform: translateY(10px);
  transition: transform 0.3s ease;
}

.ds-product-card__link:hover .ds-product-card__quick-view {
  transform: translateY(0);
}

/* --- Details --- */
.ds-product-card__details {
  display: flex;
  flex-direction: column;
  gap: calc(var(--ds-spacing-unit) * 1);
}

.ds-product-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.75rem;
  line-height: 1.4;
}

.ds-product-card__brand {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--ds-color-secondary);
}

.ds-product-card__price {
  font-weight: 400;
  color: var(--ds-color-text);
  letter-spacing: 0.02em;
}

.ds-product-card__title {
  margin: 0;
  font-family: var(--ds-font-family);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ds-color-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive */
@media (max-width: 600px) {
  .ds-product-editorial-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: calc(var(--ds-spacing-unit) * 4);
  }

  .ds-product-card__quick-view {
    display: none;
    /* Hide hover effect on mobile */
  }
}