/* ============================================================
   拼多多导购站主题样式
   主色：拼多多红 #e02e24  辅色：橙 #ff7a1a
   移动优先 + 响应式
   ============================================================ */
:root {
    --pdd-red: #e02e24;
    --pdd-red-dark: #c4241b;
    --pdd-orange: #ff7a1a;
    --pdd-orange-light: #fff1e8;
    --pdd-bg: #f5f5f7;
    --pdd-card: #ffffff;
    --pdd-text: #222222;
    --pdd-text-sub: #666666;
    --pdd-text-light: #999999;
    --pdd-border: #ededed;
    --pdd-radius: 12px;
    --pdd-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--pdd-bg);
    color: var(--pdd-text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; border: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }
dl, dd, dt { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 12px; }
.main { padding-bottom: 32px; min-height: 50vh; }
.center { text-align: center; }

/* ---------------- 顶部 ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    box-shadow: 0 1px 0 var(--pdd-border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.logo-badge {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--pdd-red), var(--pdd-orange));
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo-text {
    font-size: 17px;
    font-weight: 800;
    color: var(--pdd-red);
    letter-spacing: -.5px;
    white-space: nowrap;
}

.search-form {
    flex: 1;
    display: flex;
    min-width: 0;
    height: 38px;
    background: #f3f3f5;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid transparent;
    transition: border-color .2s, background .2s;
}

.search-form:focus-within { border-color: var(--pdd-red); background: #fff; }

.search-form input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 14px;
    font-size: 14px;
    color: var(--pdd-text);
}

.search-form button {
    flex-shrink: 0;
    width: 72px;
    border: 0;
    cursor: pointer;
    background: linear-gradient(135deg, var(--pdd-red), #ff4a35);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.cat-nav { background: #fff; border-top: 1px solid #f7f7f7; }

.cat-nav-inner {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-top: 8px;
    padding-bottom: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.cat-nav-inner::-webkit-scrollbar { display: none; }

.cat-nav-inner a {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--pdd-text-sub);
    padding: 2px 0;
    border-bottom: 2px solid transparent;
}

.cat-nav-inner a:hover { color: var(--pdd-red); }

.cat-nav-home { color: var(--pdd-red) !important; font-weight: 600; }

/* ---------------- 演示提示 ---------------- */
.demo-tip {
    margin: 10px 0;
    padding: 9px 14px;
    background: #fff8e6;
    border: 1px solid #ffe1a8;
    border-radius: 10px;
    color: #96620a;
    font-size: 12.5px;
}

.demo-tip code { background: #fff; padding: 1px 5px; border-radius: 4px; }

/* ---------------- 轮播 ---------------- */
.banner {
    position: relative;
    margin: 12px 0 16px;
    border-radius: var(--pdd-radius);
    overflow: hidden;
    box-shadow: var(--pdd-shadow);
    aspect-ratio: 2.6 / 1;
    background: #fff;
}

.banner-track { position: absolute; inset: 0; }

.banner-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4% 5%;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease, visibility .5s;
    color: #fff;
}

.banner-slide.active { opacity: 1; visibility: visible; }

.banner-copy h2 {
    font-size: clamp(17px, 3.4vw, 30px);
    letter-spacing: .5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.banner-copy p {
    margin-top: 6px;
    font-size: clamp(12px, 1.6vw, 15px);
    opacity: .92;
}

.banner-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    color: var(--pdd-red);
    font-size: 13px;
    font-weight: 700;
}

.banner-emoji {
    font-size: clamp(40px, 9vw, 96px);
    line-height: 1;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .18));
}

.banner-dots {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.banner-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    cursor: pointer;
    transition: width .25s, background .25s;
}

.banner-dots button.active { width: 18px; background: #fff; }

/* ---------------- 分类九宫格 ---------------- */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px 4px;
    padding: 14px 8px;
    background: #fff;
    border-radius: var(--pdd-radius);
    box-shadow: var(--pdd-shadow);
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 6px 2px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--pdd-text-sub);
    transition: background .2s, color .2s;
}

.cat-item:hover { background: var(--pdd-orange-light); color: var(--pdd-red); }

.cat-icon { font-size: 23px; line-height: 1; }
.cat-name { white-space: nowrap; }

/* ---------------- 区块 ---------------- */
.section {
    margin-top: 16px;
    padding: 14px 12px 16px;
    background: #fff;
    border-radius: var(--pdd-radius);
    box-shadow: var(--pdd-shadow);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.section-head h2, .section > h2 {
    position: relative;
    padding-left: 11px;
    font-size: 17px;
    letter-spacing: -.2px;
}

.section-head h2::before, .section > h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--pdd-red), var(--pdd-orange));
}

/* 频道 tab */
.channel-tabs { display: flex; gap: 6px; flex-wrap: wrap; }

.channel-tab {
    padding: 5px 14px;
    border-radius: 999px;
    background: #f5f5f7;
    color: var(--pdd-text-sub);
    font-size: 13px;
    transition: all .2s;
}

.channel-tab:hover { color: var(--pdd-red); }

.channel-tab.active {
    background: linear-gradient(135deg, var(--pdd-red), #ff4a35);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(224, 46, 36, .28);
}

/* ---------------- 商品卡片 ---------------- */
.goods-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.goods-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #f4f4f6;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.goods-card:hover {
    transform: translateY(-3px);
    border-color: #ffd9d4;
    box-shadow: 0 8px 20px rgba(224, 46, 36, .1);
}

.goods-img { position: relative; background: #f7f7f9; }

.goods-img img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.goods-badge {
    position: absolute;
    left: 6px;
    top: 6px;
    padding: 2px 7px;
    border-radius: 6px 6px 6px 0;
    background: linear-gradient(135deg, var(--pdd-red), #ff5b3f);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}

.goods-body { padding: 8px 9px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }

.goods-name {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.42;
    color: var(--pdd-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

.goods-shop {
    font-size: 11px;
    color: var(--pdd-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.goods-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }

.price-now {
    color: var(--pdd-red);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.5px;
    line-height: 1.1;
}

.price-now i { font-style: normal; font-size: 12px; font-weight: 700; margin-right: 1px; }

.price-old { color: var(--pdd-text-light); font-size: 11px; text-decoration: line-through; }

.goods-sales { font-size: 11px; color: var(--pdd-text-light); }

.btn-more {
    display: inline-block;
    margin-top: 14px;
    padding: 9px 26px;
    border-radius: 999px;
    border: 1px solid #ffd3cc;
    color: var(--pdd-red);
    font-size: 13px;
    font-weight: 600;
    background: #fff;
}

.btn-more:hover { background: var(--pdd-orange-light); }

/* ---------------- 首页说明 ---------------- */
.why-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }

.why-item {
    padding: 12px 14px;
    border-radius: 10px;
    background: #fafafa;
    border: 1px solid #f3f3f5;
}

.why-icon { font-size: 20px; }
.why-item h3 { margin: 4px 0 4px; font-size: 14px; }
.why-item p { font-size: 12.5px; color: var(--pdd-text-sub); }

.hot-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.hot-links a {
    padding: 5px 13px;
    border-radius: 999px;
    background: #f5f5f7;
    color: var(--pdd-text-sub);
    font-size: 12.5px;
}

.hot-links a:hover { background: var(--pdd-orange-light); color: var(--pdd-red); }

/* ---------------- 面包屑 / 列表头 ---------------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 0 10px;
    font-size: 12.5px;
    color: var(--pdd-text-light);
}

.breadcrumb a { color: var(--pdd-text-sub); }
.breadcrumb a:hover { color: var(--pdd-red); }
.breadcrumb .sep { color: #ccc; }

.list-head { padding: 2px 0 12px; }

.list-head h1 { font-size: 19px; letter-spacing: -.3px; }

.list-head p { margin-top: 4px; font-size: 12.5px; color: var(--pdd-text-light); }

.sort-bar {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: var(--pdd-shadow);
    scrollbar-width: none;
}

.sort-bar::-webkit-scrollbar { display: none; }

.sort-item {
    flex-shrink: 0;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--pdd-text-sub);
}

.sort-item.active { background: var(--pdd-orange-light); color: var(--pdd-red); font-weight: 600; }

/* ---------------- 分页 ---------------- */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 18px;
}

.pager-btn, .pager-num {
    min-width: 36px;
    height: 34px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff;
    color: var(--pdd-text-sub);
    font-size: 13px;
    box-shadow: var(--pdd-shadow);
}

.pager-num.cur {
    background: linear-gradient(135deg, var(--pdd-red), #ff4a35);
    color: #fff;
    font-weight: 700;
}

.pager-btn.disabled { color: #c8c8c8; }

.pager-total { margin-left: 6px; font-size: 12px; color: var(--pdd-text-light); }

/* ---------------- 商品详情 ---------------- */
.detail-main { display: grid; grid-template-columns: 1fr; gap: 14px; }

.detail-gallery {
    background: #fff;
    border-radius: var(--pdd-radius);
    padding: 10px;
    box-shadow: var(--pdd-shadow);
}

.main-img-box { border-radius: 10px; overflow: hidden; background: #f7f7f9; }

.main-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }

.thumb {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
    background: #f7f7f9;
}

.thumb.cur { border-color: var(--pdd-red); }

.detail-info {
    background: #fff;
    border-radius: var(--pdd-radius);
    padding: 16px;
    box-shadow: var(--pdd-shadow);
}

.detail-title { font-size: 18px; line-height: 1.45; letter-spacing: -.2px; }

.detail-summary { margin-top: 8px; font-size: 12.5px; color: var(--pdd-text-sub); }

.price-panel {
    margin-top: 14px;
    padding: 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff5f3, #fff9f2);
    border: 1px solid #ffe2db;
}

.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }

.price-label { font-size: 12px; color: var(--pdd-text-sub); }

.price-main {
    color: var(--pdd-red);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}

.price-main i { font-style: normal; font-size: 16px; margin-right: 2px; }

.price-origin { font-size: 12px; color: var(--pdd-text-light); text-decoration: line-through; }

.price-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

.tag { padding: 2px 8px; border-radius: 5px; font-size: 11.5px; line-height: 1.6; }
.tag-red { background: var(--pdd-red); color: #fff; }
.tag-orange { background: #fff0e2; color: #c2560a; }
.tag-gray { background: #f3f3f5; color: var(--pdd-text-sub); }

.detail-attrs {
    margin-top: 14px;
    border-top: 1px dashed var(--pdd-border);
    padding-top: 10px;
}

.detail-attrs > div { display: flex; gap: 12px; padding: 4px 0; font-size: 13px; }

.detail-attrs dt { width: 48px; flex-shrink: 0; color: var(--pdd-text-light); }
.detail-attrs dd { color: var(--pdd-text-sub); }

.buy-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 16px;
    padding: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pdd-red), #ff5b3f);
    color: #fff;
    box-shadow: 0 8px 20px rgba(224, 46, 36, .28);
    transition: transform .15s, box-shadow .2s;
}

.buy-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(224, 46, 36, .34); }

.buy-btn-main { font-size: 17px; font-weight: 800; letter-spacing: 1px; }
.buy-btn-sub { font-size: 11.5px; opacity: .9; }

.buy-tip { margin-top: 8px; font-size: 11.5px; color: var(--pdd-text-light); text-align: center; }

.detail-desc, .detail-faq {
    margin-top: 14px;
    padding: 16px;
    background: #fff;
    border-radius: var(--pdd-radius);
    box-shadow: var(--pdd-shadow);
}

.detail-desc h2, .detail-faq h2 { font-size: 16px; margin-bottom: 10px; }

.detail-desc p { font-size: 13px; color: var(--pdd-text-sub); line-height: 1.8; }

.faq-item {
    border-bottom: 1px solid #f5f5f7;
    padding: 10px 0;
}

.faq-item:last-child { border-bottom: 0; }

.faq-item summary {
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--pdd-text);
    list-style: none;
    position: relative;
    padding-right: 20px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: -1px;
    color: var(--pdd-text-light);
    font-weight: 400;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item p { margin-top: 6px; font-size: 12.5px; color: var(--pdd-text-sub); line-height: 1.75; }

/* ---------------- 空态 / 页脚 ---------------- */
.empty-box {
    padding: 48px 16px;
    text-align: center;
    background: #fff;
    border-radius: var(--pdd-radius);
    color: var(--pdd-text-light);
    box-shadow: var(--pdd-shadow);
}

.btn-ghost {
    display: inline-block;
    margin-top: 12px;
    padding: 7px 20px;
    border-radius: 999px;
    border: 1px solid #ffd3cc;
    color: var(--pdd-red);
    font-size: 13px;
}

.site-footer {
    margin-top: 24px;
    padding: 20px 0 26px;
    background: #fff;
    border-top: 1px solid var(--pdd-border);
    font-size: 12.5px;
    color: var(--pdd-text-sub);
}

.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.footer-links strong { color: var(--pdd-text); font-size: 12.5px; }
.footer-links a { color: var(--pdd-text-sub); }
.footer-links a:hover { color: var(--pdd-red); }
.copyright { color: var(--pdd-text-light); line-height: 1.9; }
.copyright.muted { margin-top: 4px; color: #b5b5b5; }

.seo-text h2 { font-size: 16px; margin-bottom: 8px; }
.seo-text h3 { font-size: 14px; margin: 14px 0 0; }
.seo-text p { font-size: 12.5px; color: var(--pdd-text-sub); line-height: 1.85; }

/* ---------------- 响应式 ---------------- */
@media (min-width: 640px) {
    .goods-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
    .cat-grid { grid-template-columns: repeat(10, 1fr); padding: 16px; }
    .why-grid { grid-template-columns: repeat(3, 1fr); }
    .section { padding: 18px 16px 20px; margin-top: 18px; }
    .banner { aspect-ratio: 3 / 1; margin: 16px 0 18px; }
    .list-head h1 { font-size: 22px; }
    .pager-btn, .pager-num { min-width: 40px; height: 36px; }
}

@media (min-width: 900px) {
    .goods-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .detail-main { grid-template-columns: 420px 1fr; gap: 18px; align-items: start; }
    .detail-title { font-size: 20px; }
    .header-inner { gap: 20px; }
    .logo-text { font-size: 19px; }
}

@media (min-width: 1200px) {
    .goods-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .detail-main { grid-template-columns: 460px 1fr; }
}

/* ---------------- 404 ---------------- */
.notfound { padding: 56px 16px; }
.notfound-code {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #e02e24, #ff7a1a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.notfound h1 { margin-top: 10px; font-size: 18px; }
.notfound-text { margin-top: 6px; font-size: 13px; }

/* ---------------- 细节优化：轮播装饰 / 搜索宽度 ---------------- */
.search-form { max-width: 620px; }

.banner-slide { overflow: hidden; }

.banner-slide::before,
.banner-slide::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    pointer-events: none;
}

.banner-slide::before { width: 320px; height: 320px; right: -60px; top: -120px; }
.banner-slide::after { width: 200px; height: 200px; right: 180px; bottom: -110px; background: rgba(255, 255, 255, .08); }

.banner-copy { position: relative; z-index: 2; }
.banner-emoji { position: relative; z-index: 2; margin-right: 6%; }

@media (min-width: 900px) {
    .banner { aspect-ratio: 3.4 / 1; }
}

/* 轮播文案徽标 + 视觉比重 */
.banner-tag {
    display: inline-block;
    margin-bottom: 10px;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    color: #fff;
    font-size: 11.5px;
    letter-spacing: 1px;
}

.banner-copy h2 { font-size: clamp(19px, 3.8vw, 34px); }

.banner-emoji { font-size: clamp(44px, 10vw, 132px); }

@media (max-width: 639px) {
    .banner-emoji { font-size: 52px; margin-right: 0; }
    .banner-copy p { font-size: 12px; }
    .banner-btn { margin-top: 10px; padding: 5px 12px; font-size: 12px; }
}

/* 仅屏幕阅读器可见（SEO 语义 h1） */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 详情页购买须知 */
.detail-notes {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fafafa;
    border: 1px solid #f2f2f4;
}

.detail-notes li {
    position: relative;
    padding-left: 14px;
    font-size: 12.5px;
    color: var(--pdd-text-sub);
    line-height: 1.9;
}

.detail-notes li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 10px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d9d9de;
}
