/* 前台样式 */
:root {
    --accent: #ff4d00;
    --accent-dark: #e64500;
    --text: #222;
    --text-light: #999;
    --border: #ececec;
    --bg: #f6f6f4;
    --card: #fff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.text-link { color: var(--accent); }

/* 顶部导航 */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; color: var(--accent); }
.site-nav a { margin-left: 24px; color: #555; font-size: 15px; }
.site-nav a:hover { color: var(--accent); }

/* 公告条 */
.notice-bar { background: #fff7f0; border-bottom: 1px solid #ffe3cc; color: #b34700; font-size: 13px; }
.notice-inner { display: flex; gap: 8px; align-items: center; padding: 8px 16px; }
.notice-inner svg { flex: none; }

/* 首页横幅 */
.hero { background: #fff; padding: 44px 0 36px; text-align: center; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: 26px; letter-spacing: 1px; }
.hero p { color: var(--text-light); margin-top: 8px; font-size: 14px; }

/* 商品列表 */
.goods { padding: 32px 0 48px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.section-head h2 { font-size: 20px; }
.section-sub { color: var(--text-light); font-size: 13px; }
.goods-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.goods-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.goods-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-2px); }
.goods-cover { position: relative; aspect-ratio: 1 / 1; background: #fafafa; overflow: hidden; }
.goods-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #d8d8d8; }
.tag-discount {
    position: absolute; top: 10px; left: 10px;
    background: var(--accent); color: #fff;
    font-size: 12px; padding: 2px 8px; border-radius: 4px;
}
.goods-info { padding: 12px 14px 14px; }
.goods-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goods-desc {
    color: var(--text-light); font-size: 13px; margin-top: 4px; height: 20px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.goods-price-row { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.price-now { color: var(--accent); font-weight: 700; font-size: 18px; }
.price-now.big { font-size: 30px; }
.price-original { color: #b0b0b0; font-size: 13px; }
.goods-sales { margin-left: auto; color: var(--text-light); font-size: 12px; }

.empty { text-align: center; color: var(--text-light); padding: 60px 0; }
.empty svg { margin: 0 auto 12px; color: #ccc; }

/* 面包屑 */
.breadcrumb { padding: 16px 0; font-size: 13px; color: var(--text-light); }
.breadcrumb span { margin: 0 6px; }
.breadcrumb em { font-style: normal; color: var(--text); }

/* 详情页主体 */
.product-main {
    display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
    background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px;
}
.gallery-main {
    position: relative; aspect-ratio: 1 / 1;
    border-radius: 8px; overflow: hidden; background: #fafafa; border: 1px solid var(--border);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbs img {
    width: 64px; height: 64px; object-fit: cover;
    border-radius: 6px; border: 2px solid transparent;
    cursor: pointer; opacity: .85;
}
.gallery-thumbs img.active { border-color: var(--accent); opacity: 1; }

.product-name { font-size: 22px; line-height: 1.4; }
.product-desc { color: #666; margin-top: 8px; font-size: 14px; }

.price-box { background: #fff7f0; border-radius: 10px; padding: 16px; margin-top: 16px; }
.price-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-label { font-size: 13px; color: #b34700; }
.price-box .price-original { font-size: 14px; }
.price-tags { margin-top: 8px; display: flex; gap: 8px; }
.tag-save { background: var(--accent); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.tag-discount2 { border: 1px solid var(--accent); color: var(--accent); font-size: 12px; padding: 1px 8px; border-radius: 4px; }
.price-meta { margin-top: 10px; display: flex; gap: 16px; color: #a06a3f; font-size: 13px; flex-wrap: wrap; }

.buy-box {
    margin-top: 18px; border: 1px dashed #e0c9b0; border-radius: 10px;
    padding: 16px; font-size: 14px; color: #555;
}
.buy-title { font-weight: 700; display: flex; gap: 6px; align-items: center; margin-bottom: 8px; color: var(--text); }
.contact-line { color: var(--accent); font-weight: 600; margin-top: 6px; }

/* 详情板块 */
.detail-section { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-top: 20px; }
.detail-section h2 { font-size: 18px; margin-bottom: 12px; padding-left: 10px; border-left: 4px solid var(--accent); }
.section-tip { color: var(--text-light); font-size: 13px; margin-bottom: 12px; }
.detail-content { font-size: 14px; color: #444; }
.shots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.shot-item { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fafafa; }
.shot-item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.shot-item figcaption { font-size: 12px; color: var(--text-light); padding: 6px 10px; background: #fff; }

/* 页脚 */
.site-footer { margin-top: 48px; background: #222; color: #bbb; padding: 36px 0 24px; }
.footer-title { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.footer-box p { font-size: 14px; margin-top: 4px; }
.footer-slogan { color: #888; }
.copyright { margin-top: 24px; padding-top: 16px; border-top: 1px solid #333; font-size: 12px; color: #777; }

@media (max-width: 760px) {
    .product-main { grid-template-columns: 1fr; }
    .site-nav a { margin-left: 14px; font-size: 14px; }
    .hero h1 { font-size: 20px; }
    .price-now.big { font-size: 24px; }
}

/* 访问密码页 */
.gate-body { display: flex; align-items: center; justify-content: center; min-height: 90vh; padding: 16px; }
.gate-card {
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    padding: 36px 32px; width: 340px; text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,.05);
}
.gate-lock { color: var(--accent); display: flex; justify-content: center; margin-bottom: 12px; }
.gate-card h1 { font-size: 18px; margin-bottom: 6px; }
.gate-card p { color: #999; font-size: 13px; margin-bottom: 18px; }
.gate-input {
    width: 100%; padding: 12px; border: 1px solid #dcdcdc; border-radius: 8px;
    font-size: 24px; letter-spacing: 14px; text-align: center; font-family: inherit;
}
.gate-input:focus { outline: none; border-color: var(--accent); }
.gate-btn {
    width: 100%; margin-top: 16px; padding: 11px;
    background: var(--accent); color: #fff;
    border: none; border-radius: 8px; font-size: 15px; cursor: pointer;
}
.gate-btn:hover { background: var(--accent-dark); }
.gate-error {
    background: #fff1f0; border: 1px solid #ffccc7; color: #cf1322;
    font-size: 13px; padding: 8px 10px; border-radius: 6px; margin-bottom: 12px;
}
