/* DLCPrice hero (homepage Phase 1). See docs/superpowers/specs/2026-05-31-homepage-redesign-design.md. */

/* ---------- Container ---------- */
.dlc-hero {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dlc-hero-section {
  /* per-widget section wrapper. No baseline rules — visual chrome lives on the
     specific widget classes below (e.g. .dlc-hero-summary, .dlc-hero-about). */
}

/* ---------- Widget header ---------- */
.dlc-widget-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 600;
}
.dlc-widget-more {
  margin-left: auto;
  font-size: 0.82rem;
  color: #007bff;
  text-decoration: none;
  font-weight: 400;
}
.dlc-widget-updated {
  margin-left: auto;
  font-size: 0.76rem;
  color: #86868b;
  font-weight: 400;
}
.dlc-widget-note {
  margin-top: 8px;
  font-size: 0.72rem;
  color: #86868b;
  line-height: 1.4;
  font-weight: 400;
}

/* ---------- Widget A: personal banner ---------- */
.dlc-hero-personal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dlc-hero-pcard {
  background: #fff;
  border: 1px solid #e5e5e7;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.dlc-hero-pcard h3 {
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dlc-hero-pcard .count {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1d1d1f;
}
.dlc-hero-pcard .count .sub {
  font-size: 0.78rem;
  color: #86868b;
  font-weight: 400;
  margin-left: 4px;
}
.dlc-hero-pcard.gold h3 { color: #b8860b; }
.dlc-hero-pcard.red h3 { color: #dc3545; }
.dlc-hero-thumbrow {
  display: flex;
  gap: 5px;
}
.dlc-hero-thumb {
  width: 42px;
  height: 56px;
  border-radius: 4px;
  background: linear-gradient(135deg, #e0e0e7 30%, #c8c8d0);
  flex-shrink: 0;
  object-fit: cover;
}
.dlc-hero-pcard a.cta {
  color: #007bff;
  font-size: 0.85rem;
  text-decoration: none;
  margin-top: auto;
}

/* ---------- Widget A: empty-state CTA ---------- */
.dlc-hero-cta {
  background: linear-gradient(135deg, #fff8e7, #fff3d3);
  border: 1px solid #f6d97a;
  border-radius: 10px;
  padding: 18px;
}
.dlc-hero-cta-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}
.dlc-hero-cta-icon { font-size: 2rem; }
.dlc-hero-cta-msg {
  flex: 1;
  font-size: 0.92rem;
  color: #8a5d00;
}
.dlc-hero-cta-msg strong {
  display: block;
  font-size: 1.02rem;
  margin-bottom: 2px;
  color: #6c4500;
}
.dlc-hero-cta-btn {
  background: #f6c84a;
  color: #4a3000;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Widget B: today's site activity ---------- */
.dlc-hero-summary {
  background: #fff;
  border: 1px solid #e5e5e7;
  border-radius: 10px;
  padding: 14px 16px;
}
.dlc-metric-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.dlc-metric-pill {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  background: #f0f0f3;
  border-radius: 8px;
  min-width: 130px;
}
.dlc-metric-pill .label {
  font-size: 0.78rem;
  color: #555;
}
.dlc-metric-pill .val {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1d1d1f;
}
.dlc-metric-pill.dlc-metric-drop .val { color: #dc3545; }
.dlc-metric-pill.dlc-metric-new .val { color: #198754; }
.dlc-metric-pill.dc .val { color: #fd7e14; }

/* ---------- Carousel + product card (widgets C/D/E) ---------- */
.dlc-hero-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
}
.dlc-hero-carousel::-webkit-scrollbar { height: 6px; }
.dlc-hero-carousel::-webkit-scrollbar-thumb {
  background: #c8c8d0;
  border-radius: 3px;
}

.dlc-card-product {
  flex: 0 0 160px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #e5e5e7;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.dlc-card-ph {
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #d8d8e0 30%, #b8b8c0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  position: relative;
  overflow: hidden;
}
.dlc-card-ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dlc-card-meta {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dlc-card-title {
  font-size: 0.78rem;
  line-height: 1.3;
  color: #1d1d1f;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.05em;
}
.dlc-card-source {
  font-size: 0.7rem;
  color: #86868b;
}
.dlc-card-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 2px;
}
.dlc-card-price .now {
  font-size: 0.92rem;
  font-weight: 700;
  color: #dc3545;
}
.dlc-card-price .was {
  font-size: 0.72rem;
  color: #999;
  text-decoration: line-through;
}

/* ---------- Widget C: ranking groups + rank pill ---------- */
.dlc-rank-group {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 12px;
  margin-right: 4px;
  border-right: 1px dashed #d1d1d6;
}
.dlc-rank-group:last-child {
  border-right: none;
  padding-right: 0;
  margin-right: 0;
}
.dlc-rank-group-title {
  font-size: 0.82rem;
  color: #1d1d1f;
  font-weight: 600;
  padding: 0 4px;
  white-space: nowrap;
  text-decoration: none;
}
.dlc-rank-group-title:hover {
  color: #007bff;
  text-decoration: underline;
}
.dlc-rank-group-items {
  display: flex;
  gap: 8px;
}

.dlc-rank-pill {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.dlc-rank-pill.rank-1 { background: #d4a017; }
.dlc-rank-pill.rank-2 { background: #9c9c9c; }
.dlc-rank-pill.rank-3 { background: #cd7f32; }

/* ---------- Widget D: discount badge ---------- */
.dlc-drop-pill {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #dc3545;
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* ---------- Widget E: new arrival badge ---------- */
.dlc-new-pill {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #198754;
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* ---------- Widget F: about / usage / affiliate / data accuracy ---------- */
.dlc-hero-about {
  background: #fff;
  border: 1px solid #e5e5e7;
  border-radius: 10px;
  padding: 18px 22px;
}
.dlc-hero-about h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1d1d1f;
  border-bottom: 2px solid #007bff;
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.dlc-hero-about h3:not(:first-child) {
  margin-top: 22px;
}
.dlc-hero-about p {
  font-size: 0.92rem;
  color: #333;
  margin-bottom: 6px;
}
.dlc-disclaimer {
  background: #fff3cd;
  border-left: 3px solid #f6c84a;
  padding: 8px 12px;
  margin-top: 6px;
  font-size: 0.86rem;
  color: #6c4500;
  border-radius: 3px;
}
.dlc-disclaimer a {
  color: #856404;
  font-weight: 600;
}
.dlc-disclaimer strong {
  color: #6c4500;
}

/* ---------- Empty / fallback message ---------- */
.dlc-empty {
  padding: 16px;
  font-size: 0.88rem;
  color: #86868b;
  text-align: center;
  background: #fafafa;
  border: 1px dashed #e5e5e7;
  border-radius: 8px;
}

/* ---------- Mobile (≤640px) ---------- */
@media (max-width: 640px) {
  .dlc-hero {
    padding: 12px;
    gap: 14px;
  }
  .dlc-hero-personal {
    grid-template-columns: 1fr;
  }
  .dlc-metric-pill {
    flex: 1 1 calc(50% - 7px);
    min-width: 0;
  }
  .dlc-card-product {
    flex-basis: 140px;
  }
  .dlc-widget-title {
    font-size: 0.98rem;
  }
}
