/* =========================================================
   YiwuPets V5.13 Buyer Selection System
   Homepage first-order confidence + Products discovery paths.
   This remains the single scoped CSS source for V5.12+ buyer-selection UI;
   do not duplicate these component rules in legacy/theme-legacy.css or design-system.css.
   Loads after design-system.css.
   ========================================================= */

/* ---------- Homepage: positioning ---------- */
.yp-home-intro .yp-home-intro-compact {
  max-width: 900px;
}

.yp-home-intro .yp-home-intro-compact h1,
.yp-home-intro .yp-home-intro-compact .yp-lead,
.yp-home-intro .yp-home-intro-compact .yp-buyer-entry-help {
  margin-inline: 0;
  text-align: left;
}

.yp-home-intro .yp-home-cta {
  justify-content: flex-start;
}

/* ---------- Homepage: first-order advantage ---------- */
.yp-home-first-order {
  background: #f8fafc;
  border-top: 1px solid #eef0f3;
  border-bottom: 1px solid #eef0f3;
}

.yp-first-order-head {
  align-items: end;
}

.yp-first-order-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.yp-first-order-card {
  position: relative;
  min-height: 220px;
  padding: 26px 24px 24px;
  border: 1px solid var(--yp-border);
  border-radius: var(--yp-radius-card);
  background: #fff;
}

.yp-first-order-number {
  display: inline-flex;
  margin-bottom: 36px;
  color: var(--yp-orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.yp-first-order-card h3 {
  margin: 0 0 9px;
  color: var(--yp-navy);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.yp-first-order-card p {
  margin: 0;
  color: var(--yp-muted);
  font-size: 13px;
  line-height: 1.6;
}

.yp-first-order-note {
  margin: 17px 0 0;
  color: #667085;
  font-size: 12px;
}

.yp-first-order-note strong {
  color: #475467;
}

/* ---------- Homepage: What We Do ---------- */
.yp-home-services-head {
  margin-bottom: 24px;
}

.yp-home-services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.yp-home-service-card {
  display: flex;
  min-height: 250px;
  padding: 26px 24px 23px;
  flex-direction: column;
  border: 1px solid var(--yp-border);
  border-radius: var(--yp-radius-card);
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.yp-home-service-card:hover {
  border-color: #f0b58f;
  transform: translateY(-2px);
  box-shadow: var(--yp-shadow-hover);
}

.yp-home-service-card > span {
  color: var(--yp-orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.yp-home-service-card h3 {
  margin: 34px 0 9px;
  color: var(--yp-navy);
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.yp-home-service-card p {
  margin: 0 0 22px;
  color: var(--yp-muted);
  font-size: 13px;
  line-height: 1.6;
}

.yp-home-service-card strong {
  margin-top: auto;
  color: #315f9f;
  font-size: 13px;
}

/* ---------- Products: section framework ---------- */
.yp-catalog-v512 .yp-catalog-intro {
  padding-bottom: 30px;
}

.yp-catalog-discovery,
.yp-catalog-all-products {
  padding: 52px 0;
  border-bottom: 1px solid #eef0f3;
}

.yp-catalog-all-products {
  padding-bottom: 0;
  border-bottom: 0;
}

.yp-catalog-section-head {
  max-width: 790px;
  margin-bottom: 26px;
}

.yp-catalog-section-head h2 {
  margin: 7px 0 8px;
  color: var(--yp-catalog-navy, var(--yp-navy));
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -.03em;
}

.yp-catalog-section-head p {
  margin: 0;
  color: var(--yp-catalog-muted, var(--yp-muted));
  font-size: 14px;
  line-height: 1.65;
}


/* ---------- Products: market-led product collections ---------- */
.yp-market-trends-section {
  padding-top: 44px;
}

.yp-market-collection-list {
  display: grid;
  gap: 48px;
}

.yp-market-collection {
  padding-top: 38px;
  border-top: 1px solid #e8ebf0;
}

.yp-market-collection:first-child {
  padding-top: 0;
  border-top: 0;
}

.yp-market-collection-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 20px;
}

.yp-market-collection-copy {
  min-width: 0;
  max-width: 760px;
}

.yp-market-collection-copy .yp-market-trend-signal {
  margin-bottom: 7px;
}

.yp-market-collection-copy h3 {
  margin: 0 0 7px;
  color: var(--yp-catalog-navy, var(--yp-navy));
  font-size: clamp(24px, 2.5vw, 31px);
  line-height: 1.12;
  letter-spacing: -.025em;
}

.yp-market-collection-copy h3 a {
  color: inherit;
  text-decoration: none;
}

.yp-market-collection-copy h3 a:hover {
  color: var(--yp-orange);
}

.yp-market-collection-copy p {
  margin: 0;
  color: var(--yp-catalog-muted, var(--yp-muted));
  font-size: 14px;
  line-height: 1.58;
}

.yp-market-more-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  color: #315f9f;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.yp-market-more-link span {
  transition: transform .16s ease;
}

.yp-market-more-link:hover {
  color: var(--yp-orange);
}

.yp-market-more-link:hover span {
  transform: translateX(3px);
}

.yp-market-collection-products {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
}


/* ---------- Products: all products ---------- */

.yp-all-products-head {
  margin-bottom: 22px;
}

.yp-catalog-v512 .yp-shop-layout {
  padding-top: 0;
}

.yp-catalog-v512 .yp-shop-toolbar {
  min-height: 48px;
}

.yp-sidebar-price-filter {
  margin: 0 0 20px;
  padding: 0 0 18px;
  border-bottom: 1px solid #eef0f3;
}

.yp-sidebar-price-filter > strong,
.yp-sidebar-category-filter > strong {
  display: block;
  margin-bottom: 9px;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
}

.yp-sidebar-price-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.yp-sidebar-price-inputs label span {
  display: block;
  margin-bottom: 4px;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.yp-sidebar-price-inputs input {
  width: 100%;
  height: 38px;
  padding: 0 8px;
  border: 1px solid #dfe3e9;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  box-shadow: none;
}

.yp-sidebar-price-filter button {
  width: 100%;
  min-height: 38px;
  margin-top: 9px;
  border: 0;
  border-radius: 8px;
  background: #17213a;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.yp-sidebar-price-filter > a {
  display: inline-block;
  margin-top: 7px;
  color: #315f9f;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.yp-mobile-price-filter {
  display: block;
  margin-bottom: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .yp-first-order-grid,
  .yp-home-services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 767px) {
  .yp-home-intro .yp-home-intro-compact h1,
  .yp-home-intro .yp-home-intro-compact .yp-lead,
  .yp-home-intro .yp-home-intro-compact .yp-buyer-entry-help {
    text-align: left;
  }

  .yp-first-order-head {
    align-items: flex-start;
  }

  .yp-first-order-grid,
  .yp-home-services-grid {
    grid-template-columns: 1fr;
  }

  .yp-first-order-card,
  .yp-home-service-card {
    min-height: 0;
  }

  .yp-first-order-number,
  .yp-home-service-card h3 {
    margin-top: 0;
  }

  .yp-first-order-number {
    margin-bottom: 22px;
  }

  .yp-home-service-card h3 {
    margin-top: 22px;
  }

  .yp-catalog-discovery,
  .yp-catalog-all-products {
    padding: 38px 0;
  }


}



@media (max-width: 1024px) {
  .yp-market-collection-head {
    align-items: flex-start;
  }

  .yp-market-collection-products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
}

@media (max-width: 640px) {
  .yp-market-trends-section {
    padding-top: 34px;
  }

  .yp-market-collection-list {
    gap: 38px;
  }

  .yp-market-collection {
    padding-top: 30px;
  }

  .yp-market-collection-head {
    display: block;
    margin-bottom: 16px;
  }

  .yp-market-more-link {
    margin-top: 7px;
  }

  .yp-market-collection-copy h3 {
    font-size: 23px;
  }

  .yp-market-collection-copy p {
    font-size: 13px;
  }

  .yp-market-collection-products {
    gap: 10px !important;
  }
}



/* ---------- Market evidence gallery ---------- */
.yp-market-evidence-gallery {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:10px 0 12px;
}
.yp-market-evidence-gallery a { display:block; }
.yp-market-evidence-gallery img {
  display:block;
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  border:1px solid #e4e7ec;
  border-radius:8px;
}
@media (max-width:520px) {
  .yp-market-evidence-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* V6.0 — product-first market trend information */
.yp-market-information {
  margin:4px 0 30px;
  border-top:1px solid #e8ebf0;
  border-bottom:1px solid #e8ebf0;
}
.yp-market-information > summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:13px 0;
  color:#315f9f;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
  list-style:none;
}
.yp-market-information > summary::-webkit-details-marker { display:none; }
.yp-market-information-body { max-width:900px; padding:0 0 18px; color:#657186; font-size:13px; line-height:1.65; }
.yp-market-information-body > p { margin:0 0 10px; }
.yp-market-information-body ul { margin:8px 0 0 18px; }
.yp-market-information-body a { color:#315f9f; }
