/**
 * Hermes DNA Recommender Stylesheet
 * Optimized for WooCommerce Razzi Theme and standard clean US E-commerce aesthetics
 */

.dna-rec-wrapper {
  margin: 40px 0 25px 0;
  padding: 20px 0;
  border-top: 1px solid #eaeaea;
  clear: both;
}

.dna-rec-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #111827;
  letter-spacing: -0.02em;
}

.dna-rec-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.dna-rec-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background-color: #f3f4f6;
  color: #374151;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid #e5e7eb;
}

.dna-rec-tag-pill:hover {
  background-color: #111827;
  color: #ffffff;
  border-color: #111827;
}

/* Product Grid */
.dna-rec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .dna-rec-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .dna-rec-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .dna-rec-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* Product Card */
.dna-rec-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.dna-rec-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.dna-rec-thumb-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  background: #f9fafb;
  overflow: hidden;
}

.dna-rec-thumb-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.dna-rec-card:hover .dna-rec-thumb-wrap img {
  transform: scale(1.04);
}

.dna-rec-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(17, 24, 39, 0.85);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 2;
  backdrop-filter: blur(2px);
}

.dna-rec-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.dna-rec-product-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  color: #1f2937;
  margin: 0 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
}

.dna-rec-price-row {
  margin-top: auto;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}

/* Skeleton Loading State to prevent Cumulative Layout Shift */
.dna-rec-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .dna-rec-skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dna-rec-skeleton-card {
  height: 280px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: dna-rec-shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes dna-rec-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
