/* =========================================================
   YiwuPets Product Catalog V5.4.2 Production Candidate
   Direction: Alibaba information efficiency + modern B2B brand simplicity
   ========================================================= */

.yp-catalog-v54 {
  --yp-catalog-line: #e7eaf0;
  --yp-catalog-soft: #f7f8fa;
  --yp-catalog-soft-2: #fbfbfc;
  --yp-catalog-blue: #1d4ed8;
  --yp-catalog-navy: #17213a;
  --yp-catalog-muted: #667085;
  --yp-catalog-orange: #f06414;
  background: #fff;
}

.yp-catalog-v54 .yp-product-container {
  width: min(1440px, calc(100% - 48px));
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
}

/* ---------- Compact catalog header ---------- */
.yp-catalog-intro {
  padding: 34px 0 26px;
  border-bottom: 1px solid #eef0f3;
}

.yp-catalog-intro-copy {
  max-width: 760px;
}

.yp-catalog-eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--yp-catalog-orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.yp-catalog-intro h1 {
  margin: 7px 0 5px;
  color: var(--yp-catalog-navy);
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.yp-catalog-intro-copy > p {
  margin: 0;
  color: var(--yp-catalog-muted);
  font-size: 15px;
}

.yp-catalog-search {
  position: relative;
  display: flex;
  width: min(820px, 100%);
  height: 54px;
  margin-top: 22px;
  border: 1px solid #d9dee7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .04);
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.yp-catalog-search:focus-within {
  border-color: #f6a56e;
  box-shadow: 0 0 0 3px rgba(240, 100, 20, .10);
}

.yp-search-icon {
  display: grid;
  place-items: center;
  width: 48px;
  flex: 0 0 48px;
  color: #7a8495;
}

.yp-catalog-search input[name="catalog_search"] {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0 12px 0 0;
  border: 0 !important;
  outline: 0;
  background: transparent;
  color: var(--yp-catalog-navy);
  font: inherit;
  font-size: 15px;
  box-shadow: none !important;
}

.yp-catalog-search input::placeholder {
  color: #98a2b3;
}

.yp-catalog-search button {
  min-width: 104px;
  height: 100%;
  padding: 0 24px;
  border: 0;
  border-radius: 0;
  background: var(--yp-catalog-orange);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: background .18s ease;
}

.yp-catalog-search button:hover,
.yp-catalog-search button:focus-visible {
  background: #df5510;
}

.yp-category-chips {
  display: flex;
  gap: 9px;
  margin-top: 18px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.yp-category-chips::-webkit-scrollbar { display: none; }

.yp-category-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #e2e6ec;
  border-radius: 999px;
  background: #fff;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.yp-category-chip:hover {
  border-color: #f7b58a;
  color: #c74f0c;
}

.yp-category-chip.is-active {
  border-color: #fed7aa;
  background: #fff5eb;
  color: #d5540c;
}

/* ---------- Popular products ---------- */
.yp-popular-wrapper {
  margin: 30px 0 34px;
  padding-bottom: 32px;
  border-bottom: 1px solid #eef0f3;
}

.yp-popular-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.yp-popular-heading h2 {
  margin: 4px 0 0;
  color: var(--yp-catalog-navy);
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.yp-popular-link {
  color: var(--yp-catalog-blue);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.yp-popular-link:hover { text-decoration: underline; }

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

/* ---------- Catalog layout ---------- */
.yp-shop-layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 2px 0 56px;
}

.yp-catalog-sidebar {
  position: sticky;
  top: calc(var(--yp-header-height, 86px) + 18px);
  max-height: calc(100vh - var(--yp-header-height, 86px) - 36px);
  padding: 20px 18px;
  overflow: auto;
  border: 1px solid var(--yp-catalog-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.yp-sidebar-heading span {
  color: #98a2b3;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.yp-sidebar-heading h2 {
  margin: 2px 0 13px;
  color: var(--yp-catalog-navy);
  font-size: 18px;
  line-height: 1.2;
}

.yp-catalog-sidebar .yp-all-products-link,
.yp-mobile-category-tree .yp-all-products-link {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
}

.yp-catalog-sidebar .yp-all-products-link a,
.yp-mobile-category-tree .yp-all-products-link a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--yp-catalog-orange);
  font-size: 13px;
  font-weight: 900;
}

.yp-catalog-sidebar .yp-category-item {
  margin: 1px 0;
}

.yp-catalog-sidebar .yp-category-item a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  color: #475467;
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.32;
  white-space: normal;
}

.yp-catalog-sidebar .yp-depth-0 > a {
  color: #27364d;
  font-size: 13px;
  font-weight: 850;
}

.yp-catalog-sidebar .yp-depth-0 > a::before { content: none; }

.yp-catalog-sidebar .yp-category-item a:hover,
.yp-catalog-sidebar .yp-category-item.is-current > a {
  background: #fff4e9;
  color: #d4540d;
}

.yp-catalog-sidebar .yp-category-sublist {
  margin: 1px 0 4px 9px;
  padding-left: 9px;
  border-left: 1px solid #eceff3;
}

.yp-shop-main { min-width: 0; }

.yp-shop-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.yp-shop-toolbar .yp-kicker {
  display: block;
  margin: 0 0 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.yp-shop-toolbar h2 {
  margin: 0;
  color: var(--yp-catalog-navy);
  font-size: 25px;
  line-height: 1.18;
  letter-spacing: -.025em;
}

.yp-results-summary {
  margin: 5px 0 0;
  color: #7a8495;
  font-size: 12.5px;
}

.yp-catalog-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.yp-catalog-sort label {
  color: #7a8495;
  font-size: 12px;
  font-weight: 750;
}

.yp-catalog-sort select {
  min-width: 142px;
  height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid #dfe3e9;
  border-radius: 9px;
  background-color: #fff;
  color: #344054;
  font-size: 12.5px;
  font-weight: 750;
  cursor: pointer;
}

.yp-reference-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid #ffead7;
  border-radius: 10px;
  background: #fffaf5;
}

.yp-reference-note-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: #ffe7d2;
  color: #c44b08;
  font-size: 11px;
  font-weight: 950;
}

.yp-reference-note p {
  margin: 0;
  color: #667085;
  font-size: 11.5px;
  line-height: 1.55;
}

.yp-reference-note strong { color: #344054; }

.yp-mobile-categories { display: none; }

/* ---------- Product cards ---------- */
.yp-product-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.yp-product-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--yp-catalog-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.yp-product-card:hover {
  transform: translateY(-2px);
  border-color: #d8dde5;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

.yp-product-image {
  position: relative;
  display: flex;
  aspect-ratio: 1 / 1;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: hidden;
  border-bottom: 1px solid #eff1f4;
  background: var(--yp-catalog-soft-2);
}

.yp-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .22s ease;
}

.yp-product-card:hover .yp-product-image img { transform: scale(1.025); }

.yp-product-card .yp-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #a3aab7;
  font-size: 13px;
  font-weight: 850;
}

.yp-product-card-body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  padding: 14px 15px 15px;
}

.yp-product-card h3 {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  color: var(--yp-catalog-navy);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.4;
  letter-spacing: -.01em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.yp-product-card h3 a {
  color: inherit;
  text-decoration: none;
}

.yp-product-card h3 a:hover { color: #0f4fb9; }

.yp-catalog-sku {
  min-width: 0;
  margin-top: 7px;
  overflow: hidden;
  color: #7c8798;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yp-catalog-sku span {
  margin-right: 4px;
  color: #98a2b3;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .06em;
}

.yp-catalog-price {
  margin-top: 11px;
  color: var(--yp-catalog-orange);
  font-size: 17px;
  font-weight: 950;
  line-height: 1.2;
  letter-spacing: -.01em;
}

.yp-catalog-price.is-contact {
  color: #475467;
  font-size: 13px;
  font-weight: 850;
}

.yp-catalog-based {
  margin-top: 3px;
  color: #8b95a5;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.35;
}

.yp-product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 13px;
}

.yp-catalog-moq {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 58%;
  padding: 0 8px;
  overflow: hidden;
  border-radius: 7px;
  background: #f3f5f7;
  color: #475467;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yp-card-details-link {
  flex: 0 0 auto;
  margin: 0;
  color: var(--yp-catalog-blue);
  font-size: 10.5px;
  font-weight: 900;
  text-decoration: none;
}

.yp-card-details-link:hover { text-decoration: underline; }

/* ---------- Pagination ---------- */
.yp-catalog-pagination {
  margin: 34px 0 4px;
  text-align: center;
}

.yp-catalog-pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.yp-catalog-pagination a,
.yp-catalog-pagination span {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid #e0e4ea;
  border-radius: 9px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.yp-catalog-pagination a:hover {
  border-color: #f5ad7d;
  color: #c84e0b;
}

.yp-catalog-pagination .current {
  border-color: var(--yp-catalog-orange);
  background: var(--yp-catalog-orange);
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .yp-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yp-shop-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 22px; }
}

@media (max-width: 1024px) {
  .yp-catalog-v54 .yp-product-container { width: min(1120px, calc(100% - 36px)); }
  .yp-shop-layout { display: block; }
  .yp-catalog-sidebar { display: none; }
  .yp-mobile-categories {
    display: block;
    margin: 0 0 16px;
    border: 1px solid var(--yp-catalog-line);
    border-radius: 11px;
    background: #fff;
  }
  .yp-mobile-categories summary {
    padding: 11px 13px;
    color: #344054;
    font-size: 12.5px;
    font-weight: 850;
    cursor: pointer;
  }
  .yp-mobile-category-tree { padding: 0 13px 13px; }
  .yp-mobile-category-tree .yp-category-list,
  .yp-mobile-category-tree .yp-category-sublist { list-style: none; margin: 0; padding: 0; }
  .yp-mobile-category-tree .yp-category-item { margin: 2px 0; }
  .yp-mobile-category-tree .yp-category-item a {
    display: block;
    padding: 7px 9px;
    border-radius: 7px;
    color: #475467;
    font-size: 12px;
    font-weight: 750;
  }
  .yp-mobile-category-tree .yp-category-sublist { margin-left: 13px; padding-left: 9px; border-left: 1px solid #eceff3; }
  .yp-mobile-category-tree .yp-depth-0 > a::before { content: none; }
  .yp-mobile-category-tree .is-current > a { background: #fff4e9; color: #d4540d; }
}

@media (max-width: 900px) {
  .yp-popular-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .yp-catalog-v54 .yp-product-container { width: min(760px, calc(100% - 28px)); }
  .yp-catalog-intro { padding: 24px 0 20px; }
  .yp-catalog-intro h1 { font-size: 31px; }
  .yp-catalog-intro-copy > p { font-size: 13px; }
  .yp-catalog-search { height: 50px; margin-top: 17px; }
  .yp-search-icon { width: 42px; flex-basis: 42px; }
  .yp-catalog-search input[name="catalog_search"] { font-size: 14px; }
  .yp-catalog-search button { min-width: 88px; padding: 0 17px; }
  .yp-category-chips { margin-top: 14px; }
  .yp-category-chip { min-height: 34px; padding: 0 12px; font-size: 12px; }
  .yp-popular-wrapper { margin: 24px 0 28px; padding-bottom: 26px; }
  .yp-popular-heading { align-items: center; }
  .yp-popular-heading h2 { font-size: 20px; }
  .yp-popular-link { font-size: 11.5px; }
  .yp-shop-toolbar { align-items: center; }
  .yp-shop-toolbar h2 { font-size: 22px; }
  .yp-catalog-sort label { display: none; }
  .yp-catalog-sort select { min-width: 126px; }
  .yp-reference-note { margin-bottom: 14px; }
  .yp-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

@media (max-width: 520px) {
  .yp-catalog-v54 .yp-product-container { width: calc(100% - 22px); }
  .yp-catalog-eyebrow { font-size: 10.5px; }
  .yp-catalog-intro h1 { font-size: 27px; }
  .yp-catalog-intro-copy > p { line-height: 1.45; }
  .yp-catalog-search button { min-width: 78px; padding: 0 13px; font-size: 12.5px; }
  .yp-popular-heading { align-items: flex-end; gap: 10px; }
  .yp-popular-link { max-width: 120px; text-align: right; line-height: 1.3; }
  .yp-shop-toolbar { gap: 10px; }
  .yp-shop-toolbar h2 { font-size: 20px; }
  .yp-results-summary { font-size: 11.5px; }
  .yp-catalog-sort select { min-width: 114px; height: 36px; padding-left: 9px; font-size: 11.5px; }
  .yp-reference-note p { font-size: 10.5px; }
  .yp-product-grid,
  .yp-popular-grid { gap: 10px; }
  .yp-product-image { padding: 8px; }
  .yp-product-card-body { padding: 10px 10px 11px; }
  .yp-product-card h3 { min-height: 38px; font-size: 13px; line-height: 1.42; }
  .yp-catalog-sku { margin-top: 5px; font-size: 9.5px; }
  .yp-catalog-sku span { font-size: 8.5px; }
  .yp-catalog-price { margin-top: 8px; font-size: 15px; }
  .yp-catalog-price.is-contact { font-size: 11px; }
  .yp-catalog-based { font-size: 9px; }
  .yp-product-card-footer { align-items: flex-start; flex-direction: column; gap: 7px; padding-top: 10px; }
  .yp-catalog-moq { max-width: 100%; min-height: 24px; font-size: 9.5px; }
  .yp-card-details-link { font-size: 9.5px; }
}

/* V6.0.4: explicit catalog page selection. */
.yp-catalog-pagination-wrap {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:14px 18px;
  margin:34px 0 4px;
}
.yp-catalog-pagination-wrap .yp-catalog-pagination { margin:0; }
.yp-catalog-page-jump {
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#667085;
  font-size:12px;
  font-weight:750;
}
.yp-catalog-page-jump label { color:#475467; }
.yp-catalog-page-jump select {
  min-width:64px;
  height:38px;
  padding:0 28px 0 10px;
  border:1px solid #dfe4ea;
  border-radius:9px;
  background:#fff;
  color:#344054;
  font:inherit;
}
.yp-catalog-page-jump button {
  min-width:44px;
  height:38px;
  padding:0 12px;
  border:1px solid #e76619;
  border-radius:9px;
  background:#fff7f0;
  color:#c84e0b;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
}
.yp-catalog-page-jump button:hover { background:#fff0e5; }
@media (max-width:640px) {
  .yp-catalog-pagination-wrap { gap:12px; }
  .yp-catalog-page-jump { width:100%; justify-content:center; }
}
