: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-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--pn-line);
  border-radius: 10px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.pn-product-real-table {
  width: 100%;
  min-width: 760px;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: auto;
  color: #344054;
  background: #fff;
}

.pn-product-real-table thead th {
  height: 48px;
  min-width: 120px;
  padding: 12px 18px;
  border: 0;
  border-bottom: 1px solid #dde3ec;
  color: #172033;
  background: #eef2f7;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.pn-product-real-table thead th.pn-price-head {
  width: 160px;
  min-width: 160px;
  text-align: right;
}

.pn-product-real-table thead th.pn-action-head {
  width: 120px;
  min-width: 120px;
  text-align: center;
}

.pn-product-real-table tbody tr {
  min-height: 72px;
  border: 0;
  border-bottom: 1px solid var(--pn-line);
  background: #fff;
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease;
}

.pn-product-real-table tbody tr:last-child { border-bottom: 0; }
.pn-product-real-table tbody tr:hover,
.pn-product-real-table tbody tr:focus {
  outline: 0;
  background: #f8fbff;
  box-shadow: inset 3px 0 0 #60a5fa;
}

.pn-product-real-table tbody tr.is-soldout {
  cursor: not-allowed;
  opacity: .66;
  background: #fafafa;
}

.pn-product-real-table tbody tr.is-soldout:hover,
.pn-product-real-table tbody tr.is-soldout:focus { box-shadow: none; }

.pn-product-real-table td.pn-product-cell {
  height: 72px;
  min-width: 120px;
  padding: 14px 18px;
  border: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
  vertical-align: middle;
}

.pn-product-real-table td.pn-price-cell {
  width: 160px;
  min-width: 160px;
  text-align: right;
}

.pn-product-real-table td.pn-action-cell {
  width: 120px;
  min-width: 120px;
  text-align: center;
}

.pn-dynamic-inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 280px;
}

.pn-dynamic-value {
  display: inline-block;
  max-width: 260px;
  color: #344054;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.pn-dynamic-badge,
.pn-dynamic-alert {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.pn-dynamic-badge {
  color: #9a6700;
  background: #fff3b0;
  border: 1px solid #ffd24d;
  box-shadow: 0 2px 6px rgba(255, 184, 0, .16);
}

.pn-dynamic-alert {
  color: #b54708;
  background: #fffaeb;
  border: 1px solid #fedf89;
}

.pn-product-source { display: none !important; }

.pn-table-price {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  color: #f04438;
  white-space: nowrap;
}

.pn-table-price .pn-currency { margin-right: 3px; font-size: 13px; }
.pn-table-price strong { font-size: 20px; font-weight: 750; line-height: 1; }
.pn-table-price .pn-cycle { margin-left: 4px; color: #344054; font-size: 12px; font-weight: 400; }
.pn-table-original-price,
.pn-table-trial { margin-top: 5px; color: #98a2b3; font-size: 11px; }

.pn-table-buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 92px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  color: #1d4ed8 !important;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.pn-table-buy-button:hover {
  color: #1d4ed8 !important;
  border-color: #60a5fa;
  background: #dbeafe;
  transform: translateY(-1px);
}

button.pn-table-buy-button:disabled {
  cursor: not-allowed;
  color: #98a2b3 !important;
  border-color: #e4e7ec;
  background: #f2f4f7;
  transform: 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 {
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
  background: #eff6ff !important;
}


/* 浅色筛选状态：固定维护本文件，不新增版本 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;
}

@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-real-table thead th,
  .pn-product-real-table td.pn-product-cell {
    min-width: 112px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .pn-product-real-table thead th.pn-price-head,
  .pn-product-real-table td.pn-price-cell { min-width: 150px; }
  .pn-product-real-table thead th.pn-action-head,
  .pn-product-real-table td.pn-action-cell { min-width: 112px; }
}

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

/* 商品横向表格视觉精修：收窄内容、放大文字、亮色标签 */
.pn-filter-panel,
.pn-product-panel {
  width: calc(100% - 48px);
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}

.pn-product-panel {
  padding: 24px 28px;
}

.pn-product-table-wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.pn-product-real-table thead th {
  padding: 14px 16px;
  font-size: 14px;
}

.pn-product-real-table td.pn-product-cell {
  height: 72px;
  padding: 16px;
  font-size: 14px;
}

.pn-product-real-table thead th.pn-dynamic-head,
.pn-product-real-table td.pn-dynamic-cell {
  text-align: center;
}

.pn-dynamic-inline {
  justify-content: center;
  gap: 8px;
  max-width: 320px;
  margin: 0 auto;
}

.pn-dynamic-value {
  max-width: 290px;
  font-size: 14px;
  font-weight: 550;
}

.pn-dynamic-badge {
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid #ffd24a;
  border-radius: 6px;
  color: #b45309;
  background: #fff4b8;
  box-shadow: 0 3px 8px rgba(245, 158, 11, .16);
  font-size: 12px;
  font-weight: 700;
}

.pn-table-price .pn-currency {
  font-size: 14px;
}

.pn-table-price strong {
  font-size: 21px;
}

.pn-table-price .pn-cycle {
  font-size: 13px;
}

.pn-table-buy-button {
  min-width: 100px;
  min-height: 40px;
  font-size: 14px;
}

@media (max-width: 1368px) {
  .pn-filter-panel,
  .pn-product-panel {
    width: calc(100% - 32px);
  }
}

@media (max-width: 767.98px) {
  .pn-filter-panel,
  .pn-product-panel {
    width: calc(100% - 20px);
  }
  .pn-product-panel {
    padding: 16px;
  }
  .pn-product-real-table thead th,
  .pn-product-real-table td.pn-product-cell {
    font-size: 13px;
  }
}

/* 仅收紧内部表格；外层筛选和产品面板保持父容器原有宽度 */
.pn-filter-panel,
.pn-product-panel {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.pn-product-table-wrap {
  width: calc(100% - 96px) !important;
  max-width: 1160px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* 没有使用 pn-table-source 的商品继续使用原来的卡片布局 */
.pn-fallback-product-grid {
  margin-top: 0;
}

.pn-product-table-wrap + .pn-fallback-product-grid {
  margin-top: 20px;
}

.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 #93c5fd;
  border-radius: 10px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 14px;
  font-weight: 600;
  transition: .18s ease;
}
.pn-buy-button:hover {
  color: #1d4ed8;
  border-color: #60a5fa;
  background: #dbeafe;
  box-shadow: 0 7px 16px rgba(37, 99, 235, .12);
  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;
}

@media (max-width: 1199.98px) {
  .pn-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pn-product-table-wrap { width: calc(100% - 64px) !important; }
}
@media (max-width: 991.98px) {
  .pn-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pn-product-table-wrap { width: calc(100% - 32px) !important; }
}
@media (max-width: 767.98px) {
  .pn-product-grid { grid-template-columns: 1fr; }
  .pn-product-table-wrap { width: 100% !important; }
}

/* pn-table-balanced-width-v1 */
.pn-product-table-wrap {
  width: 80% !important;
  max-width: 1320px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.pn-product-real-table {
  width: 100% !important;
  table-layout: auto;
}

.pn-product-real-table thead th,
.pn-product-real-table td.pn-product-cell {
  padding: 18px 20px !important;
  text-align: center !important;
  vertical-align: middle !important;
}

.pn-product-real-table thead th {
  height: 54px !important;
  font-size: 14px !important;
}

.pn-product-real-table td.pn-product-cell {
  height: 76px !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

.pn-product-real-table thead th.pn-price-head,
.pn-product-real-table thead th.pn-action-head,
.pn-product-real-table td.pn-price-cell,
.pn-product-real-table td.pn-action-cell,
.pn-product-real-table thead th.pn-dynamic-head,
.pn-product-real-table td.pn-dynamic-cell {
  text-align: center !important;
}

.pn-dynamic-inline {
  justify-content: center !important;
  max-width: none !important;
  margin: 0 auto !important;
}

.pn-dynamic-value {
  max-width: none !important;
  text-align: center !important;
}

.pn-table-price {
  justify-content: center !important;
}

@media (max-width: 1199.98px) {
  .pn-product-table-wrap { width: 88% !important; }
}

@media (max-width: 991.98px) {
  .pn-product-table-wrap { width: 94% !important; }
}

@media (max-width: 767.98px) {
  .pn-product-table-wrap { width: 100% !important; }
  .pn-product-real-table thead th,
  .pn-product-real-table td.pn-product-cell {
    padding: 14px 16px !important;
  }
}


/* 商品表格恢复宽铺布局；标签使用亮红色 */
.pn-product-table-wrap {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.pn-product-real-table thead th,
.pn-product-real-table td.pn-product-cell {
  text-align: center !important;
  vertical-align: middle !important;
}

.pn-dynamic-inline,
.pn-table-price {
  justify-content: center !important;
}

.pn-dynamic-value {
  text-align: center !important;
}

.pn-dynamic-badge {
  min-height: 24px !important;
  padding: 4px 8px !important;
  border: 1px solid #ff4d4f !important;
  border-radius: 6px !important;
  color: #ffffff !important;
  background: #ff4d4f !important;
  box-shadow: 0 4px 10px rgba(255, 77, 79, .22) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

@media (max-width: 1199.98px) {
  .pn-product-table-wrap { width: 100% !important; }
}

@media (max-width: 991.98px) {
  .pn-product-table-wrap { width: 100% !important; }
}


/* 表格仅购买按钮可点击；动态字段恢复左对齐并统一起始位置 */
.pn-product-real-table tbody tr,
.pn-product-real-table tbody tr:hover,
.pn-product-real-table tbody tr:focus {
  cursor: default !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.pn-product-real-table tbody tr:hover {
  background: #fbfcfe !important;
}

.pn-product-real-table thead th.pn-dynamic-head,
.pn-product-real-table td.pn-dynamic-cell {
  text-align: left !important;
}

.pn-dynamic-inline {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

.pn-dynamic-value {
  max-width: none !important;
  text-align: left !important;
}

.pn-product-real-table thead th.pn-price-head,
.pn-product-real-table td.pn-price-cell {
  text-align: right !important;
}

.pn-product-real-table thead th.pn-action-head,
.pn-product-real-table td.pn-action-cell {
  text-align: center !important;
}


/* 2026-08-01 pn-table-source exact schema + trial amount */
.pn-product-real-table + .pn-product-real-table{margin-top:18px}
.pn-table-trial{display:flex;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;white-space:nowrap;font-size:11px}
.pn-table-trial-price{color:#f04438;font-weight:800}
.pn-table-trial-cycle{color:#7f8da3}
@media (max-width:767.98px){.pn-table-trial{justify-content:flex-start;white-space:normal}}

/* 2026-08-01 产品列表选择状态增强 */
.pn-filter-option.active,
.pn-filter-option.active * {
  color: #1746b8 !important;
  border-color: #4f7ff1 !important;
  background: linear-gradient(180deg, #edf4ff 0%, #dfeaff 100%) !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .10), 0 6px 14px rgba(37, 99, 235, .12) !important;
  font-weight: 700 !important;
}
.pn-pagination-wrap .page-item.active .page-link {
  color: #fff !important;
  border-color: #2563eb !important;
  background: #2563eb !important;
  box-shadow: 0 5px 12px rgba(37, 99, 235, .20) !important;
  font-weight: 700;
}
