:root {
  --mint: #39cdbb;
  --mint-dark: #159f91;
  --mint-deep: #087f78;
  --ink: #183b3b;
  --muted: #789391;
  --line: #e2f1ee;
  --paper: #f7fcfb;
  --white: #fff;
  --shadow: 0 12px 34px rgba(32, 119, 110, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--paper);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.topbar {
  height: 76px; padding: 0 max(5vw, 22px); display: flex; align-items: center;
  justify-content: space-between; background: rgba(255,255,255,.88);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  color: white; background: linear-gradient(145deg, #64e4d4, #20b8a9);
  font-size: 25px; font-weight: 800; box-shadow: 0 5px 14px #39cdbb55;
}
.brand-name { font-size: 17px; font-weight: 500; letter-spacing: -.4px; }
.brand-name strong { color: var(--mint-dark); }
.brand-name small { display: block; color: #8ca9a6; font-size: 8px; letter-spacing: 1.8px; margin-top: 3px; }
.topbar-right { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #37c9a8; box-shadow: 0 0 0 4px #37c9a81c; }
.page-shell { width: min(1180px, 90%); margin: 0 auto; }
.hero {
  min-height: 390px; margin: 34px 0 26px; padding: 55px 7%;
  border-radius: 28px; overflow: hidden; position: relative; display: flex; align-items: center;
  background: linear-gradient(112deg, #e1faf5 0%, #d4f5ef 52%, #bceee7 100%);
}
.hero-copy { position: relative; z-index: 2; max-width: 520px; }
.eyebrow { color: var(--mint-dark); font-size: 10px; font-weight: 800; letter-spacing: 2.2px; margin: 0 0 15px; }
.hero h1 { margin: 0; font-size: clamp(35px, 5vw, 57px); line-height: 1.2; letter-spacing: -2px; font-weight: 800; }
.hero h1 span { color: var(--mint-dark); }
.hero-description { color: #648985; font-size: 14px; line-height: 1.8; margin: 19px 0 25px; }
.hero-link { display: inline-flex; gap: 24px; align-items: center; color: white; background: var(--mint-dark); padding: 12px 19px; border-radius: 99px; text-decoration: none; font-size: 12px; font-weight: 700; box-shadow: 0 7px 18px #159f9133; }
.hero-link:hover { background: var(--mint-deep); transform: translateY(-1px); }
.hero-art { position: absolute; right: 8%; top: 50%; width: 310px; height: 310px; transform: translateY(-50%); }
.hero-disc { position: absolute; inset: 53px; border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; font-size: 94px; font-weight: 900; letter-spacing: -9px; background: linear-gradient(145deg, #6ce7d6, #20b7a9); box-shadow: 0 25px 60px #159f9140, inset -12px -12px 30px #078d8030; transform: rotate(-12deg); }
.hero-disc span { font-size: 12px; letter-spacing: 8px; margin-left: 8px; margin-top: -5px; }
.orbit { position: absolute; border: 1px solid #36bcae66; border-radius: 50%; transform: rotate(-25deg); }
.orbit-one { inset: 20px 0; }
.orbit-two { inset: 0 35px; transform: rotate(48deg); }
.float-tag { position: absolute; color: #318f86; font-size: 9px; letter-spacing: 2px; font-weight: 800; }
.tag-top { top: 25px; right: -4px; }.tag-bottom { bottom: 27px; left: -18px; }
.sparkle { position: absolute; color: white; text-shadow: 0 2px 10px #159f9188; }
.sparkle-one { right: 15px; top: 72px; font-size: 31px; }.sparkle-two { left: 15px; bottom: 73px; font-size: 25px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 22px 0 72px; }
.stat-card { background: white; border: 1px solid var(--line); border-radius: 17px; padding: 20px 23px; box-shadow: var(--shadow); }
.stat-label, .stat-foot { display: block; color: var(--muted); font-size: 11px; }
.stat-card strong { display: block; color: var(--mint-deep); font-size: 29px; letter-spacing: -.8px; margin: 7px 0 4px; }
.catalog { scroll-margin-top: 100px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 22px; }
.section-heading .eyebrow { margin-bottom: 8px; }
.section-heading h2 { margin: 0; font-size: 28px; letter-spacing: -1px; }
.heading-dot { color: var(--mint); }
.result-count { color: var(--muted); font-size: 12px; padding-bottom: 5px; }
.toolbar { display: flex; gap: 12px; margin-bottom: 18px; }
.search-box { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; height: 48px; }
.search-icon { color: var(--mint-dark); font-size: 23px; transform: rotate(-20deg); }
.search-box input { border: 0; outline: 0; flex: 1; min-width: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search-box kbd { color: #a4bfbb; font-size: 12px; }
.sort-control { height: 48px; display: flex; align-items: center; gap: 9px; padding: 0 13px; background: white; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 11px; }
.sort-control select { border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; max-width: 145px; }
.filter-tabs { display: flex; gap: 7px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.filter-tab { white-space: nowrap; padding: 12px 15px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #829d99; font-size: 12px; }
.filter-tab span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 5px; padding: 0 5px; border-radius: 20px; background: #edf7f5; font-size: 10px; }
.filter-tab.active { color: var(--mint-deep); border-bottom-color: var(--mint); font-weight: 800; }
.filter-tab.active span { color: white; background: var(--mint); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product-card { overflow: hidden; border-radius: 16px; background: white; border: 1px solid var(--line); box-shadow: 0 5px 20px #1b6e6410; transition: transform .2s, box-shadow .2s; min-width: 0; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 13px 30px #1b6e641b; }
.product-image-wrap { aspect-ratio: 1 / 1; background: #eff8f6; position: relative; overflow: hidden; }
.product-image { width: 100%; height: 100%; object-fit: contain; display: block; mix-blend-mode: multiply; }
.product-tag { position: absolute; top: 10px; left: 10px; padding: 5px 8px; color: #138f83; background: #e1faf5eF; border: 1px solid #c8f0e9; border-radius: 30px; font-size: 9px; font-weight: 800; }
.product-info { padding: 13px 14px 15px; }
.product-title { min-height: 40px; margin: 0 0 11px; color: #315654; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; word-break: break-word; }

/* 多图角标 */
.product-image-count {
    position: absolute;
    right: 7px;
    bottom: 7px;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(41, 155, 130, 0.85);
    color: #fff;
    font-size: 10px;
    line-height: 1.6;
    pointer-events: none;
}
.product-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.product-price { color: var(--mint-deep); font-size: 16px; font-weight: 800; white-space: nowrap; }
.product-date { color: #9bb0ad; font-size: 9px; white-space: nowrap; }
.product-open { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid #edf5f3; color: #77a6a0; text-decoration: none; font-size: 10px; }
.product-open:hover { color: var(--mint-dark); }
.status-panel, .empty-state { text-align: center; padding: 65px 20px; color: var(--muted); }
.status-panel p, .empty-state p { font-size: 12px; }
.loading-spinner { width: 25px; height: 25px; border: 2px solid #d5f1ec; border-top-color: var(--mint-dark); border-radius: 50%; margin: 0 auto; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-symbol { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 15px; border-radius: 18px; background: #e5f8f4; color: var(--mint-dark); font-size: 30px; font-weight: 800; }
.empty-state h3 { margin: 0; color: var(--ink); font-size: 16px; }
.button-secondary { padding: 11px 18px; border: 1px solid #ccebe5; border-radius: 99px; color: var(--mint-deep); background: white; font-size: 11px; font-weight: 700; }
.button-secondary:hover { background: #edfbf8; }
.load-more-wrap { text-align: center; padding: 28px 0 5px; }
.footer { margin-top: 85px; padding: 28px 0 35px; border-top: 1px solid var(--line); text-align: center; color: #91aaa6; font-size: 10px; line-height: 1.8; }
.footer-brand { color: var(--mint-deep); text-decoration: none; font-size: 14px; font-weight: 800; }
.footer-brand span { color: #f0c96c; }.footer p { margin: 7px 0 0; }.footer-note { color: #b0c1be; }
@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }.hero-art { right: 3%; opacity: .75; }.hero-copy { max-width: 58%; } }
@media (max-width: 640px) {
  .topbar { height: 64px; }.page-shell { width: 92%; }.hero { min-height: 330px; margin-top: 18px; padding: 34px 7%; border-radius: 20px; }.hero-copy { max-width: 100%; }.hero h1 { font-size: 39px; }.hero-description { max-width: 250px; font-size: 12px; }.hero-art { width: 190px; height: 190px; right: -48px; top: 75%; opacity: .34; }.hero-disc { inset: 34px; font-size: 60px; }.hero-disc span { font-size: 8px; }.float-tag, .sparkle { display: none; }
  .stats { gap: 8px; margin-bottom: 52px; }.stat-card { padding: 14px 12px; border-radius: 13px; }.stat-card strong { font-size: 22px; }.stat-label, .stat-foot { font-size: 9px; }
  .section-heading h2 { font-size: 24px; }.result-count { font-size: 10px; }.toolbar { flex-direction: column; }.sort-control { justify-content: space-between; }.sort-control select { max-width: none; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.product-info { padding: 10px; }.product-title { font-size: 11px; min-height: 37px; }.product-price { font-size: 14px; }.product-date { font-size: 8px; }.product-tag { top: 7px; left: 7px; font-size: 8px; }

/* ========================================
   Mercari 采集控制面板
======================================== */

.crawler-panel {
    margin: 28px 0;
    padding: 26px;
    background: linear-gradient(
        135deg,
        #f0fffb 0%,
        #ffffff 55%,
        #edfffa 100%
    );
    border: 1px solid rgba(54, 191, 168, 0.25);
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(30, 160, 140, 0.07);
}

/* 面板顶部 */

.crawler-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.crawler-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #36a995;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.crawler-header h2 {
    margin: 0;
    color: #243d3a;
    font-size: 22px;
    font-weight: 800;
}

.crawler-header p {
    margin: 7px 0 0;
    color: #7b9993;
    font-size: 13px;
    line-height: 1.6;
}

/* 采集状态 */

.crawler-status {
    flex-shrink: 0;
    padding: 7px 13px;
    color: #55988b;
    background: #e1f8f1;
    border: 1px solid #c6eee2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

/* 采集表单 */

.crawler-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.crawler-input-group {
    flex: 1;
    min-width: 0;
}

.crawler-input-group label {
    display: block;
    margin-bottom: 8px;
    color: #42645e;
    font-size: 13px;
    font-weight: 700;
}

.crawler-input-group input {
    width: 100%;
    height: 46px;
    padding: 0 15px;
    color: #29443f;
    background: #ffffff;
    border: 1px solid #cce9e1;
    border-radius: 11px;
    outline: none;
    font: inherit;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.crawler-input-group input:focus {
    border-color: #36bfa8;
    box-shadow: 0 0 0 3px rgba(54, 191, 168, 0.12);
}

.crawler-input-group input::placeholder {
    color: #afc5bf;
}

/* 启动按钮 */

.crawler-submit {
    flex-shrink: 0;
    height: 46px;
    padding: 0 25px;
    color: #ffffff;
    background: linear-gradient(135deg, #42cdb5, #20aa98);
    border: none;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 5px 13px rgba(32, 170, 152, 0.2);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.crawler-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(32, 170, 152, 0.28);
}

.crawler-submit:active:not(:disabled) {
    transform: translateY(0);
}

.crawler-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

/* 进度区域 */

.crawler-progress {
    margin-top: 23px;
}

.crawler-progress-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
    color: #66847d;
    font-size: 12px;
}

.crawler-progress-header span:last-child {
    color: #24a995;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.crawler-progress-track {
    height: 8px;
    overflow: hidden;
    background: #dcefe9;
    border-radius: 999px;
}

.crawler-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #48d2b9, #1da995);
    border-radius: inherit;
    transition: width 0.35s ease;
}

/* 采集统计 */

.crawler-statistics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 21px;
}

.crawler-stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 13px 15px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(54, 191, 168, 0.14);
    border-radius: 12px;
}

.crawler-stat-item span {
    color: #88a49c;
    font-size: 12px;
}

.crawler-stat-item strong {
    color: #2a7166;
    font-size: 22px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* 采集日志 */

.crawler-log {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 125px;
    overflow-y: auto;
    margin-top: 16px;
    padding: 12px 14px;
    color: #77958d;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(54, 191, 168, 0.12);
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.6;
}

.crawler-log:empty {
    display: none;
}

/* 状态颜色 */

.crawler-status.is-running {
    color: #168b78;
    background: #d9f8ef;
    border-color: #b8eddf;
}

.crawler-status.is-error {
    color: #bd5656;
    background: #fff0f0;
    border-color: #f5d2d2;
}

.crawler-status.is-complete {
    color: #298c61;
    background: #e3f8eb;
    border-color: #c7edd4;
}

/* 手机适配 */

@media (max-width: 640px) {
    .crawler-panel {
        margin: 20px 0;
        padding: 19px;
        border-radius: 16px;
    }

    .crawler-header {
        align-items: flex-start;
    }

    .crawler-header h2 {
        font-size: 19px;
    }

    .crawler-header p {
        font-size: 12px;
    }

    .crawler-form {
        flex-direction: column;
        align-items: stretch;
    }

    .crawler-submit {
        width: 100%;
    }

    .crawler-statistics {
        gap: 8px;
    }

    .crawler-stat-item {
        padding: 11px 9px;
    }

    .crawler-stat-item strong {
        font-size: 19px;
    }

    .crawler-stat-item span {
        font-size: 11px;
    }
}

}
/* 商品详情弹窗 */

.product-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 35, 33, 0.72);
    backdrop-filter: blur(5px);
}

.product-detail-modal.active {
    display: flex;
}

.product-detail-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    width: min(850px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    border-radius: 20px;
    background: #fff;
}

.product-detail-close {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #e8f6f2;
    color: #315e57;
    font-size: 25px;
    cursor: pointer;
}

.product-detail-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    border-radius: 14px;
    background: #f2f8f6;
}

.product-detail-image {
    display: block;
    max-width: 100%;
    max-height: 55vh;
    object-fit: contain;
}

.product-detail-info {
    align-self: center;
    overflow-wrap: anywhere;
}

.product-detail-tag {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    background: #e2f6ef;
    color: #278b75;
    font-size: 12px;
}

.product-detail-title {
    margin: 18px 0;
    color: #315654;
    font-size: 20px;
    line-height: 1.6;
}

.product-detail-price {
    display: block;
    color: #299b82;
    font-size: 25px;
}

.product-detail-date {
    color: #899b98;
    font-size: 13px;
}

.product-detail-link {
    display: inline-block;
    margin-top: 18px;
    color: #239b83;
    text-decoration: none;
}

@media (max-width: 640px) {
    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px;
    }

    .product-detail-image-wrap {
        min-height: 200px;
    }
}
/* ========================================
   商品详情多图画廊
   ======================================== */

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.product-gallery-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    border-radius: 14px;
    background: #f2f8f6;
    overflow: hidden;
}

.product-gallery-stage .product-detail-image {
    cursor: zoom-in;
    -webkit-tap-highlight-color: transparent;
}

.product-gallery-counter {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(32, 70, 64, 0.72);
    color: #fff;
    font-size: 12px;
    line-height: 1.6;
    pointer-events: none;
}

.product-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.86);
    color: #2b7f6c;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(46, 120, 104, 0.18);
}

.product-gallery-nav:active {
    background: #d8f1e9;
}

.product-gallery-nav.prev { left: 8px; }
.product-gallery-nav.next { right: 8px; }

.product-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.product-gallery-thumb {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #eef7f4;
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.product-gallery-thumb.active {
    border-color: #299b82;
}

.product-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 大图查看层 */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    /* 必须高于 .product-detail-modal（z-index: 9999），
       否则大图层会被详情弹窗遮住，点击事件也落在弹窗上。 */
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 40, 37, 0.92);
}

.gallery-lightbox.active {
    display: flex;
}

/* 图片舞台：承载缩放和拖动，超出部分裁剪 */
.gallery-lightbox-stage {
    position: relative;
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
    cursor: zoom-in;
}

.gallery-lightbox.zoomed .gallery-lightbox-stage {
    cursor: grab;
}

.gallery-lightbox-stage.dragging {
    cursor: grabbing;
}

.gallery-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
    transition: opacity 0.12s linear;
}

/* 工具栏浮在大图上方 */
.gallery-lightbox-toolbar {
    position: absolute;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    border-radius: 999px;
    background: rgba(12, 46, 43, 0.82);
    border: 1px solid rgba(94, 226, 205, 0.35);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(10px);
}

.gallery-lightbox-button {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    border: none;
    border-radius: 999px;
    color: #eafffb;
    background: rgba(255, 255, 255, 0.12);
    font-size: 19px;
    font-weight: 700;
    line-height: 1;
    transition: background 0.15s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.gallery-lightbox-button:hover {
    background: rgba(94, 226, 205, 0.32);
}

.gallery-lightbox-button:active {
    transform: scale(0.94);
}

.gallery-lightbox-button.fit {
    font-size: 13px;
    padding: 0 13px;
}

.gallery-lightbox-button.close {
    margin-left: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.gallery-lightbox-scale {
    min-width: 44px;
    color: #b8f3e9;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.gallery-lightbox-hint {
    position: absolute;
    top: max(12px, env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    color: rgba(226, 255, 250, 0.72);
    font-size: 11px;
    letter-spacing: 0.2px;
    pointer-events: none;
    text-align: center;
}

@media (max-width: 640px) {
    .product-gallery-stage {
        min-height: 240px;
    }

    .product-gallery-nav {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }

    .product-gallery-thumb {
        width: 52px;
        height: 52px;
    }

    .gallery-lightbox {
        padding: 8px;
    }

    .gallery-lightbox-button {
        min-width: 42px;
        height: 42px;
    }

    .gallery-lightbox-hint {
        display: none;
    }
}

/* 商品标题复制 */

.product-copy-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.product-copy-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #a9ded0;
    border-radius: 10px;
    background: #e9f8f3;
    color: #278b75;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.product-copy-title:active {
    transform: scale(0.97);
    background: #d8f1e9;
}

.product-copy-message {
    color: #299b82;
    font-size: 12px;
}

/* 汇率换算 */

.product-currency-box {
    margin-top: 18px;
    padding: 15px;
    border: 1px solid #d5ebe4;
    border-radius: 12px;
    background: #f1faf7;
}

.product-currency-heading {
    color: #64827b;
    font-size: 13px;
    font-weight: 600;
}

.product-currency-result {
    margin-top: 8px;
}

.product-cny-price {
    color: #218b72;
    font-size: 25px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.product-currency-rate {
    margin-top: 7px;
    color: #8a9e98;
    font-size: 11px;
    line-height: 1.6;
}
/* ========================================
   Stage H：无限滚动提示与返回顶部
======================================== */

.loading-indicator {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
}

.loading-indicator[hidden] {
    display: none;
}

.loading-indicator .loading-spinner {
    width: 18px;
    height: 18px;
    margin: 0;
    border-width: 2px;
}

.list-end {
    margin: 4px 0 0;
    color: #9ab4b0;
    font-size: 12px;
    letter-spacing: 0.2px;
}

.list-end[hidden],
.load-more-wrap #load-more[hidden] {
    display: none;
}

/* 滚动哨兵：本身不可见，仅用于触发加载 */
.scroll-sentinel {
    width: 100%;
    height: 1px;
}

/* 返回页面顶部 */
.back-to-top {
    position: fixed;
    right: 18px;
    /* 抬离底部：确保按钮不与最后一行商品卡片的标题、价格、标签重叠 */
    bottom: max(96px, calc(env(safe-area-inset-bottom, 0px) + 96px));
    z-index: 40;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #ffffff;
    background: linear-gradient(145deg, #4dd8c3, #159f91);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    box-shadow: 0 10px 22px rgba(21, 159, 145, 0.32);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    -webkit-tap-highlight-color: transparent;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    box-shadow: 0 12px 26px rgba(21, 159, 145, 0.42);
}

.back-to-top:active {
    transform: scale(0.94);
}

@media (max-width: 640px) {
    .back-to-top {
        right: 12px;
        bottom: max(92px, calc(env(safe-area-inset-bottom, 0px) + 92px));
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: none;
    }
}
