:root {
  --pn-primary: #2563eb;
  --pn-primary-dark: #1d4ed8;
  --pn-primary-soft: #eff6ff;
  --pn-success: #16a34a;
  --pn-warning: #d97706;
  --pn-danger: #dc2626;
  --pn-text: #172033;
  --pn-text-secondary: #667085;
  --pn-muted: #98a2b3;
  --pn-line: #e6eaf0;
  --pn-bg: #f5f7fa;
  --pn-card: #fff;
  --pn-radius: 14px;
  --pn-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.pn-filter-panel,
.pn-product-panel {
  background: var(--pn-card);
  border: 1px solid var(--pn-line);
  border-radius: var(--pn-radius);
  box-shadow: var(--pn-shadow);
}

.pn-filter-panel {
  margin-bottom: 18px;
  padding: 5px 20px;
}

.pn-filter-row {
  display: flex;
  align-items: flex-start;
  min-height: 62px;
  padding: 14px 0;
}

.pn-filter-row + .pn-filter-row {
  border-top: 1px solid var(--pn-line);
}

.pn-filter-label {
  display: flex;
  align-items: center;
  flex: 0 0 96px;
  gap: 8px;
  min-height: 34px;
  color: var(--pn-text);
  font-size: 14px;
  font-weight: 600;
}

.pn-filter-label i {
  width: 20px;
  color: var(--pn-primary);
  text-align: center;
}

.pn-filter-options {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 9px;
}

.pn-filter-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid var(--pn-line);
  border-radius: 9px;
  color: #475467;
  background: #fff;
  font-size: 13px;
  line-height: 1.35;
  transition: .18s ease;
}

.pn-filter-option:hover {
  color: var(--pn-primary);
  border-color: #bfdbfe;
  background: var(--pn-primary-soft);
  text-decoration: none;
}

.pn-filter-option.active {
  color: #fff;
  border-color: var(--pn-primary);
  background: var(--pn-primary);
  box-shadow: 0 5px 12px rgba(37, 99, 235, .2);
}

.pn-product-panel {
  padding: 22px;
}

.pn-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.pn-panel-heading h3 {
  margin: 0;
  color: var(--pn-text);
  font-size: 20px;
  font-weight: 700;
}

.pn-panel-heading p {
  margin: 5px 0 0;
  color: var(--pn-muted);
  font-size: 13px;
}

.pn-product-count {
  flex: none;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--pn-primary);
  background: var(--pn-primary-soft);
  font-size: 12px;
  font-weight: 600;
}

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

.pn-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--pn-line);
  border-radius: 13px;
  background: #fff;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.pn-product-card:hover {
  transform: translateY(-3px);
  border-color: #bfdbfe;
  box-shadow: 0 12px 28px rgba(16, 24, 40, .09);
}

.pn-product-card.is-soldout {
  opacity: .76;
}

.pn-card-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.pn-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pn-product-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  color: var(--pn-primary);
  background: var(--pn-primary-soft);
  font-size: 18px;
}

.pn-product-title-wrap {
  min-width: 0;
}

.pn-product-title {
  margin: 1px 0 7px;
  overflow: hidden;
  color: var(--pn-text);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pn-stock {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--pn-success);
  background: #ecfdf3;
  font-size: 11px;
}

.pn-stock.is-empty {
  color: var(--pn-danger);
  background: #fef2f2;
}

.pn-product-description {
  min-height: 66px;
  margin: 16px 0;
  overflow: hidden;
  color: var(--pn-text-secondary);
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.pn-price-box {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--pn-line);
}

.pn-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.pn-price-label {
  padding-bottom: 4px;
  color: var(--pn-muted);
  font-size: 12px;
}

.pn-price {
  display: flex;
  align-items: baseline;
  color: #f04438;
}

.pn-price small {
  margin-right: 2px;
  font-size: 13px;
}

.pn-price strong {
  font-size: 27px;
  font-weight: 750;
  line-height: 1;
}

.pn-price span {
  margin-left: 4px;
  color: var(--pn-text-secondary);
  font-size: 12px;
}

.pn-original-price {
  margin-top: 7px;
  color: var(--pn-muted);
  font-size: 11px;
  text-align: right;
}

.pn-trial-tip {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--pn-warning);
  background: #fff7ed;
  font-size: 11px;
}

.pn-trial-tip i {
  margin-right: 5px;
}

.pn-card-footer {
  padding: 0 20px 20px;
}

.pn-buy-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--pn-primary);
  border-radius: 10px;
  color: #fff;
  background: var(--pn-primary);
  font-size: 14px;
  font-weight: 600;
  transition: .18s ease;
}

.pn-buy-button:hover {
  color: #fff;
  border-color: var(--pn-primary-dark);
  background: var(--pn-primary-dark);
  box-shadow: 0 7px 16px rgba(37, 99, 235, .2);
  text-decoration: none;
}

button.pn-buy-button:disabled {
  cursor: not-allowed;
  color: var(--pn-muted);
  border-color: var(--pn-line);
  background: #f2f4f7;
  box-shadow: none;
}

.pn-pagination-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.pn-pagination-wrap .page-link {
  min-width: 34px;
  min-height: 34px;
  margin: 0 3px;
  border-color: var(--pn-line);
  border-radius: 8px !important;
  color: #475467;
  text-align: center;
}

.pn-pagination-wrap .page-item.active .page-link {
  border-color: var(--pn-primary);
  background: var(--pn-primary);
}

@media (max-width: 1199.98px) {
  .pn-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  .pn-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  .pn-filter-panel { padding: 2px 15px; }
  .pn-filter-row { display: block; padding: 14px 0; }
  .pn-filter-label { margin-bottom: 10px; min-height: auto; }
  .pn-filter-options { gap: 7px; }
  .pn-filter-option { flex: 1 1 calc(50% - 7px); min-width: 0; }
  .pn-product-panel { padding: 16px; }
  .pn-panel-heading { align-items: flex-start; }
  .pn-product-grid { grid-template-columns: 1fr; }
  .pn-product-description { min-height: auto; }
}

@media (max-width: 420px) {
  .pn-panel-heading { display: block; }
  .pn-product-count { display: inline-flex; margin-top: 10px; }
  .pn-filter-option { flex-basis: 100%; }
}

/* 浅色主题：直接维护本文件，不再新增版本 CSS */
.pn-filter-option.active,
.pn-filter-option.active * {
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
  background: #eff6ff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .08) !important;
}
.pn-buy-button {
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
  background: #eaf2ff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .08) !important;
}
.pn-buy-button:hover {
  color: #1d4ed8 !important;
  border-color: #60a5fa !important;
  background: #dbeafe !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .10) !important;
}
.pn-pagination-wrap .page-item.active .page-link {
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
  background: #eff6ff !important;
}
