:root {
  --bg: #eef3ec;
  --panel: #fffef9;
  --panel-soft: #f7faf5;
  --text: #17211b;
  --muted: #6f7972;
  --green: #0f7a50;
  --green-dark: #075b3a;
  --green-soft: #dff3e8;
  --line: #dbe4dc;
  --price: #a7442d;
  --shadow: 0 12px 34px rgba(31, 54, 41, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: radial-gradient(circle at 20% 0%, #f8fbf4 0, transparent 38%), var(--bg); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
.store-wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 48px; }
.store-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.eyebrow, .modal-kicker { margin: 0 0 8px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.store-header h1 { margin: 0; font-size: clamp(27px, 4vw, 42px); letter-spacing: -.04em; }
.subtitle { margin: 8px 0 0; color: var(--muted); }
.header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; }
.verified-count { padding: 11px 14px; color: var(--muted); background: rgba(255,255,255,.65); border: 1px solid rgba(255,255,255,.9); border-radius: 12px; }
.verified-count strong { color: var(--text); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 17px; border: 0; border-radius: 11px; text-decoration: none; font-weight: 750; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, #14905f, var(--green)); box-shadow: 0 8px 18px rgba(15, 122, 80, .2); }
.btn-ghost { color: #4a3b30; background: #efe7dc; }
.btn-dark { color: #fff; background: #26352d; }
.btn.full { width: 100%; }
.notice { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; padding: 14px 18px; color: #415047; background: rgba(255, 255, 255, .66); border: 1px solid rgba(255,255,255,.9); border-radius: 14px; }
.notice span { flex: none; padding: 3px 8px; color: var(--green-dark); background: var(--green-soft); border-radius: 7px; font-size: 12px; font-weight: 800; }
.notice p { margin: 1px 0 0; }
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  padding: 8px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .94);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(31, 54, 41, .05);
}
.category-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  color: #46564d;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 800;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.category-filter-button:hover {
  color: var(--green-dark);
  background: #eef7f1;
  transform: translateY(-1px);
}
.category-filter-button small {
  display: grid;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  place-items: center;
  color: #647168;
  background: #eef2ee;
  border-radius: 999px;
  font-size: 11px;
}
.category-filter-button.is-active {
  color: #fff;
  background: linear-gradient(135deg, #14905f, var(--green));
  border-color: var(--green);
  box-shadow: 0 7px 16px rgba(15, 122, 80, .18);
}
.category-filter-button.is-active small {
  color: var(--green-dark);
  background: #fff;
}
.product-list { display: grid; gap: 14px; }
.product-card { position: relative; display: grid; grid-template-columns: 130px minmax(0, 1fr) 170px; gap: 22px; align-items: center; min-height: 158px; padding: 24px; overflow: hidden; background: rgba(255,254,249,.94); border: 1px solid rgba(255,255,255,.98); border-radius: 20px; box-shadow: var(--shadow); }
.product-card[hidden], .product-card.is-category-hidden { display: none !important; }
.product-card::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; background: linear-gradient(var(--green-soft), var(--green)); border-radius: 0 4px 4px 0; }
.price-block { display: flex; flex-direction: column; align-items: flex-start; }
.price-block small { color: var(--muted); }
.price-block strong { margin: 2px 0; color: var(--price); font-size: 30px; letter-spacing: -.04em; }
.price-block span { padding: 4px 7px; color: var(--green-dark); background: var(--green-soft); border-radius: 7px; font-size: 11px; }
.product-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.product-title-row h2 { margin: 0; font-size: 20px; }
.product-badge { padding: 4px 7px; color: #4e5c53; background: #edf2ed; border-radius: 7px; font-size: 11px; font-weight: 800; }
.product-category-label { padding: 4px 8px; color: var(--green-dark); background: var(--green-soft); border-radius: 999px; font-size: 11px; font-weight: 850; }
.product-info > p { max-width: 650px; margin: 8px 0 10px; color: var(--muted); line-height: 1.65; }
.period-preview { display: flex; flex-wrap: wrap; gap: 7px; }
.period-preview span { padding: 4px 8px; color: #5a685f; background: #f1f5f1; border-radius: 8px; font-size: 12px; }
.product-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 13px; }
.text-button { padding: 7px 4px; color: #435149; background: none; border: 0; font-weight: 700; }
.mode-note { color: var(--muted); font-size: 12px; }
.stock-block { display: flex; min-height: 90px; flex-direction: column; align-items: flex-end; justify-content: center; text-align: right; }
.stock-pill { padding: 6px 10px; color: var(--green-dark); background: var(--green-soft); border-radius: 999px; font-size: 12px; font-weight: 800; }
.stock-pill.soldout { color: #8a3c2b; background: #f7ded8; }
.stock-block small { margin: 13px 0 4px; color: #88918b; }
.stock-block strong { color: var(--green); font-size: 13px; }
.empty-state, .empty-mini { padding: 40px; color: var(--muted); text-align: center; background: rgba(255,255,255,.65); border-radius: 18px; }
.empty-state h2 { margin-top: 0; color: var(--text); }
.filtered-empty { grid-column: 1 / -1; }
.store-footer { padding: 28px 8px 0; color: #7a847e; text-align: center; font-size: 13px; }
.modal { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 20px; }
.modal.is-open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 27, 20, .56); backdrop-filter: blur(6px); }
.modal-panel { position: relative; z-index: 1; width: min(620px, 100%); max-height: calc(100vh - 40px); padding: 28px; overflow: auto; background: var(--panel); border-radius: 22px; box-shadow: 0 30px 90px rgba(0,0,0,.28); animation: modalIn .2s ease-out; }
.modal-large { width: min(760px, 100%); }
.tutorial-panel { width: min(880px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; color: #5f6962; background: #edf2ee; border: 0; border-radius: 50%; font-size: 25px; line-height: 1; }
.modal-panel h2 { margin: 0; font-size: 28px; }
.modal-desc { margin: 9px 0 22px; color: var(--muted); line-height: 1.65; }
.modal fieldset { margin: 20px 0; padding: 0; border: 0; }
.modal legend { margin-bottom: 10px; font-size: 14px; font-weight: 800; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.period-option input, .payment-options input { position: absolute; opacity: 0; pointer-events: none; }
.period-option > span { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 15px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 13px; }
.period-option small { color: var(--muted); }
.period-option b { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--price); }
.period-option input:checked + span { border-color: var(--green); background: #eef9f2; box-shadow: 0 0 0 2px rgba(15,122,80,.1); }
.payment-options { display: flex; flex-wrap: wrap; gap: 9px; }
.payment-options span { display: block; padding: 10px 16px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 10px; font-weight: 700; }
.payment-options input:checked + span { color: #fff; background: var(--green); border-color: var(--green); }
.contact-first-box { margin: 18px 0; padding: 18px; background: #f3f8f3; border: 1px solid var(--line); border-radius: 14px; }
.contact-first-box h3 { margin: 0 0 6px; }
.contact-first-box p { margin: 0 0 14px; color: var(--muted); }
.confirm-check { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 700; }
.submit-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.submit-row > div { display: flex; flex-direction: column; }
.submit-row span { color: var(--muted); font-size: 12px; }
.submit-row strong { color: var(--price); font-size: 25px; }
.btn-pay { min-width: 190px; }
.form-message { min-height: 22px; margin: 12px 0 0; color: #b23f2a; font-size: 13px; }
.qr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.qr-grid > div { display: flex; flex-direction: column; align-items: center; padding: 16px; text-align: center; background: #f7faf7; border: 1px solid var(--line); border-radius: 15px; }
.qr-grid img { width: min(210px, 100%); aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 10px; }
.qr-grid strong { margin-top: 10px; }
.qr-grid span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.qr-grid.compact img { width: 130px; }
.success-icon { display: grid; width: 56px; height: 56px; margin-bottom: 14px; place-items: center; color: #fff; background: var(--green); border-radius: 50%; font-size: 30px; font-weight: 900; }
.order-summary { position: relative; margin: 15px 0 20px; padding: 15px; background: #f2f7f2; border-radius: 13px; }
.order-summary > span { display: block; color: var(--muted); font-size: 12px; }
.order-summary > strong { display: block; margin-top: 4px; word-break: break-all; }
.order-summary p { margin: 8px 0 0; color: var(--muted); }
.copy-button { position: absolute; top: 14px; right: 14px; padding: 5px 9px; color: var(--green); background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.contact-note { margin: 15px 0 0; color: var(--muted); text-align: center; }
.tutorial-list { display: grid; gap: 14px; }
.tutorial-step { display: grid; grid-template-columns: 46px 1fr; gap: 15px; padding: 18px; background: #f7faf7; border: 1px solid var(--line); border-radius: 16px; }
.step-index { display: grid; width: 42px; height: 42px; place-items: center; color: var(--green-dark); background: var(--green-soft); border-radius: 11px; font-weight: 900; }
.tutorial-step h3 { margin: 2px 0 6px; }
.tutorial-step p { margin: 0; color: var(--muted); white-space: pre-line; line-height: 1.7; }
.tutorial-step img { width: 100%; max-height: 520px; margin-top: 14px; object-fit: contain; background: #fff; border-radius: 12px; }
.modal-open { overflow: hidden; }
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.mock-card, .message-card, .payment-redirect-card { width: min(500px, 100%); padding: 32px; text-align: center; background: var(--panel); border-radius: 22px; box-shadow: var(--shadow); }
.test-badge { display: inline-block; padding: 5px 9px; color: #7a4d00; background: #fff0c7; border-radius: 999px; font-size: 12px; font-weight: 800; }
.mock-card dl { margin: 24px 0; }
.mock-card dl div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.mock-card dt { color: var(--muted); }
.mock-card dd { margin: 0; text-align: right; word-break: break-all; }
.mock-price { color: var(--price); font-size: 22px; font-weight: 900; }
.back-link { display: inline-block; margin-top: 18px; color: var(--muted); }
.message-card > span { display: grid; width: 55px; height: 55px; margin: 0 auto 15px; place-items: center; color: #fff; background: var(--price); border-radius: 50%; font-size: 30px; font-weight: 900; }
.spinner { width: 45px; height: 45px; margin: 0 auto 18px; border: 4px solid #dce7df; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 820px) {
  .store-header { align-items: flex-start; flex-direction: column; }
  .header-actions { justify-content: flex-start; }
  .product-card { grid-template-columns: 100px 1fr; }
  .stock-block { grid-column: 1 / -1; flex-direction: row; min-height: auto; align-items: center; justify-content: flex-start; gap: 10px; text-align: left; }
  .stock-block small { margin: 0; }
}
@media (max-width: 560px) {
  .store-wrap { width: min(100% - 20px, 1180px); padding-top: 22px; }
  .category-filter { flex-wrap: nowrap; overflow-x: auto; padding: 7px; scrollbar-width: thin; }
  .category-filter-button { flex: 0 0 auto; min-height: 40px; padding: 0 13px; }
  .verified-count { width: 100%; }
  .product-card { grid-template-columns: 1fr; gap: 13px; padding: 20px; }
  .price-block { flex-direction: row; align-items: center; gap: 8px; }
  .price-block strong { font-size: 27px; }
  .product-title-row h2 { font-size: 18px; }
  .stock-block { grid-column: auto; }
  .option-grid, .qr-grid { grid-template-columns: 1fr; }
  .submit-row { align-items: stretch; flex-direction: column; }
  .btn-pay { width: 100%; }
  .modal { padding: 10px; }
  .modal-panel { padding: 23px 18px; max-height: calc(100vh - 20px); border-radius: 18px; }
}

/* STRUCTURED-PRODUCT-DESCRIPTION-START */
.product-structured-description {
  display: grid;
  gap: 12px;
  margin: 12px 0 14px;
}
.product-key-values {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbf8;
}
.product-key-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  line-height: 1.55;
}
.product-key-row:last-child { border-bottom: 0; }
.product-key-row > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.product-key-row > strong {
  color: #26382d;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.product-key-row.is-price > strong {
  color: var(--price);
  font-size: 16px;
  font-weight: 900;
}
.product-feature-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.product-feature-list li {
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  color: #425248;
  font-size: 14px;
  line-height: 1.55;
}
.product-feature-list li i {
  display: grid;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 50%;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}
.product-feature-list li span { overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .product-key-row {
    grid-template-columns: 50px minmax(0, 1fr);
    padding: 8px 10px;
  }
  .product-feature-list li { font-size: 13px; }
}
/* STRUCTURED-PRODUCT-DESCRIPTION-END */

/* PRODUCT-SPECIFIC-TUTORIALS-START */
.tutorial-product-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 18px;
}
.tutorial-product-picker button {
  padding: 8px 12px;
  color: #435149;
  background: #f1f5f1;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.tutorial-product-picker button:hover,
.tutorial-product-picker button.is-active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}
.tutorial-empty { margin-top: 12px; }
.order-tutorial-button { width: 100%; margin-top: 13px; }
@media (max-width: 560px) {
  .tutorial-product-picker {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .tutorial-product-picker button { flex: 0 0 auto; }
}
/* PRODUCT-SPECIFIC-TUTORIALS-END */

.category-filter-button { text-decoration: none; }
.category-filter-button:visited { color: inherit; }
