/* ============================================
   Home Page Template - 1688 Style
   Uses --pp-* variables from main plugin
   ============================================ */

.pph-home-wrapper {
  width: 100%;
  max-width: var(--pp-container, 1370px);
  margin: 0 auto;
  padding: 0 20px;
  font-family: var(--pp-font);
  color: var(--pp-main-text);
  box-sizing: border-box;
}
.pph-home-wrapper *,
.pph-home-wrapper *::before,
.pph-home-wrapper *::after {
  box-sizing: border-box;
}

/* ======================
   TOP SECTION: Sidebar + Banner + Sub-banners
   ====================== */
.pph-top-section {
  display: flex;
  gap: 12px;
  margin-bottom: var(--partMarginBottom, 12px);
  align-items: stretch;
}

/* Category Sidebar */
.pph-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: var(--pp-bg-white);
  border-radius: var(--pp-radius);
  overflow: hidden;
  border: 1px solid var(--pp-border-light);
}
.pph-sidebar__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--pp-brand);
}
.pph-sidebar__icon { display: flex; align-items: center; }
.pph-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 360px;
  overflow-y: auto;
}
.pph-sidebar__list::-webkit-scrollbar { width: 5px; }
.pph-sidebar__list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
.pph-sidebar__item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 14px;
  min-height: 44px;
  color: var(--pp-main-text);
  text-decoration: none;
  transition: all 0.15s;
}
.pph-sidebar__item a:hover {
  background: var(--pp-brand-light);
  color: var(--pp-brand);
  padding-inline-start: 20px;
}
.pph-sidebar__item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pph-sidebar__item-arrow {
  color: var(--pp-tip-text);
  font-size: 16px;
}

/* Main Banner Carousel */
.pph-banner {
  flex: 1;
  min-width: 0;
  position: relative;
  border-radius: var(--pp-radius);
  overflow: hidden;
  background: var(--pp-bg-gray);
  min-height: var(--home-banner-height, 360px);
}
.pph-banner__track {
  width: 100%;
  height: 100%;
  position: relative;
}
.pph-banner__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.pph-banner__slide.active { opacity: 1; }
.pph-banner__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pph-banner__slide--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}
.pph-banner__placeholder {
  text-align: center;
  color: var(--pp-tip-text);
}
.pph-banner__placeholder svg { display: block; margin: 0 auto 12px; }
.pph-banner__placeholder p { font-size: 14px; margin: 0; }

.pph-banner__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.4);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, opacity 0.2s;
  opacity: 0;
  z-index: 3;
}
.pph-banner:hover .pph-banner__nav { opacity: 1; }
.pph-banner__nav:hover { background: var(--pp-brand); }
.pph-banner__prev { inset-inline-start: 16px; }
.pph-banner__next { inset-inline-end: 16px; }

.pph-banner__dots {
  position: absolute;
  bottom: 16px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}
.pph-banner__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}
.pph-banner__dot.active {
  background: var(--pp-brand);
  width: 20px;
  border-radius: 4px;
}
/* ======================
   SHANGJI (Products Section in Banner Area)
   1688-style grouped product cards by category
   ====================== */
.pph-shangji {
  background: var(--pp-bg-white);
  border-radius: var(--pp-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: var(--home-banner-height, 360px);
}

.pph-shangji__head {
  border-bottom: 1px solid var(--pp-border-light);
  padding: 14px 20px;
  flex-shrink: 0;
}
.pph-shangji__head-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
}
.pph-shangji__head-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--pp-main-text);
}
.pph-shangji__head-more {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--pp-brand);
  font-weight: 500;
  transition: opacity 0.2s;
}
.pph-shangji__head-more:hover { opacity: 0.8; }

.pph-shangji__container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 12px;
  flex: 1;
  overflow-y: auto;
}

.pph-shangji__card {
  background: var(--pp-bg-gray);
  border-radius: var(--pp-radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pph-shangji__card-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--pp-main-text);
  background: var(--pp-bg-white);
  border-bottom: 1px solid var(--pp-border-light);
  transition: color 0.2s;
}
.pph-shangji__card-head:hover { color: var(--pp-brand); }
.pph-shangji__card-icon { color: var(--pp-brand); display: flex; }
.pph-shangji__card-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pph-shangji__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  padding: 4px;
  flex: 1;
}

.pph-shangji__item {
  position: relative;
  display: block;
  border-radius: var(--pp-radius-sm);
  overflow: hidden;
  text-decoration: none;
  aspect-ratio: 1/1;
  background: var(--pp-bg-white);
}
.pph-shangji__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.pph-shangji__item:hover img { transform: scale(1.05); }

.pph-shangji__price {
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 16px 8px 6px;
  font-family: var(--pp-font-price);
  text-align: start;
}
.pph-shangji__price del {
  color: rgba(255,255,255,0.6);
  font-weight: 400;
  font-size: 11px;
  margin-inline-start: 4px;
}

/* Responsive shangji */
@media (max-width: 1200px) {
  .pph-shangji__container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .pph-shangji__container { grid-template-columns: 1fr; }
  .pph-shangji__list { grid-template-columns: repeat(4, 1fr); }
}

/* Sub-banners */
.pph-subbanners {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pph-subbanner {
  flex: 1;
  border-radius: var(--pp-radius);
  overflow: hidden;
  display: block;
  background: var(--pp-bg-gray);
  transition: transform 0.2s;
}
.pph-subbanner:hover { transform: translateY(-2px); }
.pph-subbanner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* ======================
   SECTIONS (shared)
   ====================== */
.pph-section {
  background: var(--pp-bg-white);
  border-radius: var(--pp-radius-lg);
  padding: 20px 24px;
  margin-bottom: var(--partMarginBottom, 12px);
}
.pph-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.pph-section__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--pp-main-text);
  margin: 0;
  position: relative;
  padding-inline-start: 12px;
}
.pph-section__title::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--pp-brand);
  border-radius: 2px;
}
.pph-section__more {
  font-size: 14px;
  color: var(--pp-brand);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 8px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s;
}
.pph-section__more:hover { opacity: 0.8; }

/* ======================
   CATEGORY GRID
   ====================== */
.pph-catgrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.pph-catgrid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: var(--pp-radius);
  text-decoration: none;
  color: var(--pp-main-text);
  min-width: 0;
  overflow: hidden;
  transition: all 0.2s;
}
.pph-catgrid__item:hover {
  background: var(--pp-brand-light);
  transform: translateY(-2px);
}
.pph-catgrid__img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--pp-bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pph-catgrid__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pph-catgrid__placeholder {
  font-size: 24px;
  font-weight: 700;
  color: var(--pp-brand);
}
.pph-catgrid__name {
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ======================
   HOME PROMO BANNER
   ====================== */
.pph-home-promo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: var(--pp-radius);
  margin-bottom: var(--partMarginBottom, 12px);
}
.pph-home-promo__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pp-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pph-home-promo__text {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--pp-main-text);
}
.pph-home-promo__link {
  color: var(--pp-brand);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.pph-home-promo__link:hover { opacity: 0.8; text-decoration: underline; }

/* ======================
   PRODUCTS GRID
   ====================== */
.pph-products-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.pph-product-card {
  display: flex;
  flex-direction: column;
  background: var(--pp-bg-white);
  border: 1px solid var(--pp-border-light);
  border-radius: var(--pp-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}
.pph-product-card:hover {
  border-color: var(--pp-brand);
  box-shadow: var(--pp-shadow-hover);
  transform: translateY(-2px);
}
.pph-product-card__img {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  position: relative;
  background: var(--pp-bg-gray);
}
.pph-product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.pph-product-card:hover .pph-product-card__img img {
  transform: scale(1.05);
}
.pph-product-card__badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  background: var(--pp-brand);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 2px;
}
.pph-product-card__body {
  padding: 10px 12px;
}
.pph-product-card__title {
  font-size: 13px;
  font-weight: 400;
  color: var(--pp-main-text);
  margin: 0 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}
.pph-product-card__price {
  font-size: 16px;
  font-weight: 700;
  color: var(--pp-brand);
  font-family: var(--pp-font-price);
}
.pph-product-card__price del {
  font-size: 12px;
  color: var(--pp-tip-text);
  font-weight: 400;
  margin-inline-start: 6px;
}
/* ======================
   SERVICES BAR
   ====================== */
.pph-services-bar {
  background: var(--pp-bg-white);
  border-radius: var(--pp-radius-lg);
  padding: 20px 24px;
  margin-bottom: var(--partMarginBottom, 12px);
}
.pph-services-bar__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.pph-services-bar__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--pp-main-text);
  padding: 12px;
  border-radius: var(--pp-radius);
  background: var(--pp-bg-gray);
  transition: all 0.2s;
}
.pph-services-bar__item:hover {
  background: var(--pp-brand-light);
}
.pph-services-bar__item svg {
  color: var(--pp-brand);
  flex-shrink: 0;
}

/* ======================
   FOOTER
   ====================== */
.pph-footer {
  background: #1a1a2e;
  color: #fff;
  border-radius: var(--pp-radius-lg) var(--pp-radius-lg) 0 0;
  padding: 40px 24px 0;
  margin-top: 24px;
}
.pph-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.pph-footer__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px;
  color: #fff;
}
.pph-footer__about {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
  margin: 0;
}
.pph-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pph-footer__links li {
  margin-bottom: 10px;
}
.pph-footer__links a {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  display: inline-block;
  padding: 4px 0;
  min-height: 36px;
  transition: color 0.2s;
}
.pph-footer__links a:hover {
  color: var(--pp-brand);
}
.pph-footer__social {
  display: flex;
  gap: 12px;
}
.pph-footer__social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.2s;
}
.pph-footer__social-link:hover {
  background: var(--pp-brand);
  transform: translateY(-2px);
}
.pph-footer__bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.pph-footer__bottom p { margin: 0; }

/* ======================
   RESPONSIVE
   Breakpoints:
     1400px  -> wide screen adjustment
     1200px  -> normal desktop / large laptop
     1024px  -> laptop / small desktop (iPad landscape)
      768px  -> tablet portrait
      480px  -> phone
   ====================== */

/* --- Wide screen (>1400px): keep 1370px container, comfortable spacing --- */

/* --- Normal desktop / large laptop (<=1200px) --- */
@media (max-width: 1200px) {
  .pph-catgrid { grid-template-columns: repeat(4, 1fr); }
  .pph-products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pph-sidebar { width: 180px; }
  .pph-subbanners { width: 180px; }
  .pph-shangji__container { grid-template-columns: repeat(2, 1fr); }
  .pph-section { padding: 18px 20px; }
}

/* --- Laptop / small desktop / iPad landscape (<=1024px) --- */
@media (max-width: 1024px) {
  .pph-top-section { flex-direction: column; }
  .pph-sidebar { width: 100%; }
  .pph-sidebar__list { max-height: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
  .pph-sidebar__item { flex: 1 1 auto; }
  .pph-sidebar__item a { padding: 10px 12px; border-radius: 4px; min-height: 44px; }
  .pph-subbanners { width: 100%; flex-direction: row; }
  .pph-banner { min-height: 240px; }
  .pph-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pph-catgrid { grid-template-columns: repeat(4, 1fr); }
  .pph-footer__inner { grid-template-columns: 1fr 1fr; }

  /* Products-in-slide mode: hide categories sidebar + ad images, give full width */
  .pph-top-section--products .pph-sidebar { display: none; }
  .pph-top-section--products .pph-subbanners { display: none; }
  .pph-top-section--products .pph-shangji { min-height: auto; }
  .pph-shangji__container { grid-template-columns: repeat(3, 1fr); }
}

/* --- Tablet portrait (<=768px) --- */
@media (max-width: 768px) {
  .pph-home-wrapper { padding: 0 12px; }
  .pph-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pph-catgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pph-services-bar__inner { grid-template-columns: repeat(2, 1fr); }
  .pph-footer__inner { grid-template-columns: 1fr; gap: 20px; }
  .pph-section__title { font-size: 17px; }
  .pph-subbanners { flex-direction: column; }
  .pph-section { padding: 14px 16px; }
  .pph-banner { min-height: 200px; }

  /* Products-in-slide mode: keep sidebar + ads hidden */
  .pph-top-section--products .pph-sidebar { display: none; }
  .pph-top-section--products .pph-subbanners { display: none; }
  .pph-shangji__container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pph-shangji__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- Phone (<=480px) --- */
@media (max-width: 480px) {
  .pph-home-wrapper { padding: 0 10px; }
  .pph-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pph-catgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pph-services-bar__inner { grid-template-columns: 1fr; gap: 10px; }
  .pph-section { padding: 12px 12px; border-radius: var(--pp-radius); }
  .pph-section__title { font-size: 16px; }
  .pph-banner { min-height: 160px; border-radius: var(--pp-radius); }
  .pph-subbanners { gap: 8px; }
  .pph-shangji__container { grid-template-columns: 1fr; }
  .pph-shangji__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pph-shangji__head { padding: 10px 14px; }
  .pph-shangji__head-title { font-size: 16px; }
  .pph-card-detailed__number { font-size: 16px; }
  .pph-card-detailed__title { font-size: 12px; }
  /* Two-column detailed cards at phone — make them compact */
  .pph-card-detailed { padding-bottom: 8px; }
  .pph-card-detailed__picture { aspect-ratio: 1 / 1; }
  .pph-card-detailed__img { height: 100%; }
  .pph-card-detailed__find-similar { font-size: 10px; padding: 4px 8px; }
  .pph-card-detailed__services { display: none; }
  .pph-card-detailed__company { font-size: 11px; }
  .pph-card-detailed__price-card { padding: 6px; }
}

/* RTL adjustments */
[dir="rtl"] .pph-banner__prev { transform: translateY(-50%) scaleX(-1); }
[dir="rtl"] .pph-banner__next { transform: translateY(-50%) scaleX(-1); }
[dir="rtl"] .pph-banner__nav:hover { transform: translateY(-50%) scaleX(-1); }
/* ======================
   PRODUCT CARD TEMPLATES
   ====================== */

/* --- COMPACT TEMPLATE (shangji style: image + price overlay) --- */
.pph-card-compact {
  position: relative;
  display: block;
  border-radius: var(--pp-radius-sm);
  overflow: hidden;
  text-decoration: none;
  aspect-ratio: 1/1;
  background: var(--pp-bg-white);
  transition: transform 0.2s;
}
.pph-card-compact:hover { transform: translateY(-2px); }
.pph-card-compact img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.pph-card-compact:hover img { transform: scale(1.05); }
.pph-card-compact__price {
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 1px;
  font-family: var(--pp-font-price);
}
.pph-card-compact__currency { font-size: 12px; }
.pph-card-compact__amount { font-size: 15px; }

/* --- DETAILED TEMPLATE (full card: image + title + price + services + store) --- */
.pph-card-detailed {
  background-color: var(--pp-bg-white);
  border-radius: var(--pp-radius);
  cursor: pointer;
  overflow: hidden;
  padding-bottom: 10px;
  position: relative;
  transition: box-shadow 0.3s ease, transform 0.2s;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--pp-border-light);
}
.pph-card-detailed:hover {
  box-shadow: 0 4px 16px 0 rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.pph-card-detailed__picture {
  border-radius: 0 0 var(--pp-radius) var(--pp-radius);
  overflow: hidden;
  padding-top: 100%;
  position: relative;
  transition: all 0.5s ease;
  width: 100%;
}
.pph-card-detailed__picture a {
  position: absolute;
  inset: 0;
  display: block;
}
.pph-card-detailed__img {
  height: 100%;
  left: 0;
  object-fit: cover;
  position: absolute;
  top: 0;
  transition: all 0.5s ease;
  width: 100%;
}
.pph-card-detailed__picture:hover .pph-card-detailed__img {
  transform: scale(1.05);
}

/* Find similar button (shows on hover) */
.pph-card-detailed__find-similar {
  bottom: 12px;
  box-sizing: border-box;
  display: none;
  height: 32px;
  inset-inline-start: 0;
  padding: 0 14px;
  position: absolute;
  width: 100%;
  z-index: 99;
}
.pph-card-detailed__picture:hover .pph-card-detailed__find-similar {
  display: block;
}
.pph-card-detailed__find-similar-link { height: 100%; }
.pph-card-detailed__find-similar-btn {
  align-items: center;
  background: var(--pp-brand);
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  height: 100%;
  justify-content: center;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  width: 100%;
  transition: background 0.2s;
}
.pph-card-detailed__find-similar-btn:hover {
  background: var(--pp-brand-hover);
}

/* Discount badge */
.pph-card-detailed__badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  background: var(--pp-brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  z-index: 2;
}

/* Title */
.pph-card-detailed__title-wrap {
  height: 24px;
  line-height: 24px;
  padding: 0 8px;
  margin-top: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pph-card-detailed__icon-tag {
  background: var(--pp-brand-light);
  color: var(--pp-brand);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 2px;
  flex-shrink: 0;
  line-height: 18px;
}
.pph-card-detailed__title {
  font-size: 14px;
  font-weight: 400;
  color: var(--pp-main-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.pph-card-detailed__title:hover { color: var(--pp-brand); }

/* Price */
.pph-card-detailed__price-card {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  height: 26px;
  line-height: 26px;
  overflow: hidden;
  padding: 0 8px;
  margin-top: 6px;
}
.pph-card-detailed__price {
  display: flex;
  align-items: baseline;
  transform: translateY(1px);
}
.pph-card-detailed__symbol {
  color: var(--pp-brand);
  font-family: var(--pp-font-price);
  font-size: 16px;
  font-weight: 700;
  margin-inline-end: 2px;
}
.pph-card-detailed__number {
  color: var(--pp-brand);
  font-family: var(--pp-font-price);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}
.pph-card-detailed__price-other {
  color: #999;
  font-size: 13px;
  margin-inline-start: 6px;
}
.pph-card-detailed__price-unit {
  color: #999;
  font-size: 13px;
  margin-inline-start: 4px;
}

/* Services */
.pph-card-detailed__services {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  height: 20px;
  overflow: hidden;
  padding: 0 8px;
  margin-top: 6px;
  gap: 4px;
}
.pph-card-detailed__service-item {
  align-items: center;
  display: flex;
  color: #999;
  font-size: 13px;
}
.pph-card-detailed__service-item--brand {
  color: var(--pp-brand);
}

/* Company/Store */
.pph-card-detailed__company {
  align-items: center;
  color: #999;
  display: flex;
  height: 24px;
  overflow: hidden;
  padding: 0 8px;
  text-decoration: none;
  margin-top: 6px;
  transition: color 0.2s;
}
.pph-card-detailed__company:hover { color: var(--pp-brand); }
.pph-card-detailed__company-icon {
  height: 14px;
  margin-inline-end: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.pph-card-detailed__company-name {
  color: #999;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pph-card-detailed__company:hover .pph-card-detailed__company-name {
  color: var(--pp-brand);
}

/* Responsive */
@media (max-width: 768px) {
  .pph-card-detailed__number { font-size: 18px; }
  .pph-card-detailed__title { font-size: 13px; }
  .pph-card-detailed__find-similar { display: block !important; }
}

/* Shangji list adapts to card template */
.pph-shangji__list .pph-card-compact {
  border-radius: var(--pp-radius-sm);
}
.pph-shangji__list .pph-card-detailed {
  margin-bottom: 0;
}
/* When detailed cards are used in shangji, switch to single column */
.pph-shangji__list:has(.pph-card-detailed) {
  grid-template-columns: 1fr;
  gap: 6px;
}