/* ChuYang Theme - 初阳主题 */
:root {
    --primary: #2ECC71;
    --primary-dark: #27AE60;
    --primary-light: #e8f5e9;
    --bg-gradient-start: #e8f5e9;
    --bg-gradient-end: #c8e6c9;
    --text-dark: #2c3e50;
    --text-gray: #7f8c8d;
    --text-light: #95a5a6;
    --white: #ffffff;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 6px 20px rgba(0,0,0,0.12);
    --radius: 12px;
    --price-red: #e74c3c;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    color: var(--text-dark);
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 800px; }
.text-center { text-align: center; }
.hide { display: none !important; }

/* Navbar */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky; top: 0; z-index: 100;
    padding: 0 20px;
}
.nav-container {
    display: flex; align-items: center; justify-content: space-between;
    height: 60px; max-width: 1200px; margin: 0 auto;
}
.nav-brand {
    display: flex; align-items: center; gap: 10px;
}
.nav-logo { height: 36px; width: 36px; border-radius: 50%; object-fit: cover; }
.nav-title { font-size: 18px; font-weight: 700; color: var(--text-dark); }
.site-name-red { color: #e74c3c !important; }
.nav-links {
    display: flex; gap: 20px;
}
.nav-links a {
    font-size: 14px; color: var(--text-gray);
    transition: color .2s; font-weight: 500;
}
.nav-links a:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-search {
    display: flex; align-items: center;
    background: #f0f0f0; border-radius: 20px;
    padding: 6px 14px;
}
.nav-search input {
    border: none; background: transparent; outline: none;
    font-size: 13px; width: 160px; color: var(--text-dark);
}
.nav-search button {
    border: none; background: none; cursor: pointer;
    color: var(--text-gray); display: flex;
}
.nav-btn-login {
    padding: 6px 16px; border: 1px solid #ddd; border-radius: 20px;
    font-size: 13px; color: var(--text-gray); background: var(--white);
    transition: all .2s;
}
.nav-btn-register {
    padding: 7px 18px; background: var(--primary); border-radius: 20px;
    font-size: 13px; color: var(--white) !important;
    transition: all .2s;
}
.nav-user {
    font-size: 13px; color: var(--primary-dark); font-weight: 500;
}
.nav-btn-login:hover { border-color: var(--primary); color: var(--primary); }
@media (max-width: 768px) {
    .nav-links, .nav-btn-login, .nav-btn-register { display: none; }
    .nav-search input { width: 100px; }
}

/* Auth Pages */
.auth-error {
    background: #fef2f2; color: #dc2626; padding: 10px 14px;
    border-radius: 8px; font-size: 14px; margin-bottom: 16px;
    border: 1px solid #fecaca;
}
.auth-link {
    text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-gray);
}
.auth-link a { color: var(--primary); font-weight: 500; }

/* Dual Pricing */
.card-price-original {
    font-size: 13px; font-weight: 400; color: var(--text-light); margin-left: 6px;
}

/* Notice */
.notice-section { padding: 20px 0 0; }
.notice-card {
    background: rgba(232, 245, 233, 0.7); border-radius: var(--radius);
    padding: 20px 24px; box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(4px);
}
.notice-title {
    font-size: 16px; font-weight: 700; margin-bottom: 10px;
    color: var(--text-dark);
}
.notice-body { font-size: 14px; color: #333; line-height: 1.8; }
.notice-body ul { list-style: none; padding-left: 0; }
.notice-body li { position: relative; padding-left: 18px; margin-bottom: 6px; }
.notice-body li::before {
    content: ""; position: absolute; left: 4px; top: 9px;
    width: 6px; height: 6px; border-radius: 50%;
    background: #e74c3c;
}
.notice-body p { margin: 4px 0; }
.notice-body a { color: #3498db; }

/* Main Section */
.main-section { padding: 24px 0 40px; }
.section-header {
    text-align: left; margin-bottom: 20px;
}
.section-header h2 {
    font-size: 24px; font-weight: 700; color: var(--text-dark);
}

/* Category Pills */
.category-pills {
    display: flex; flex-wrap: wrap; gap: 10px;
    justify-content: flex-start; margin-bottom: 24px;
}
.pill {
    padding: 6px 18px; border-radius: 20px;
    border: 1px solid #e0e0e0; background: var(--white);
    font-size: 14px; cursor: pointer;
    transition: all .2s; color: var(--text-gray);
    display: flex; align-items: center; gap: 4px;
}
.pill:hover { border-color: var(--primary); color: var(--primary); }
.pill.active {
    background: var(--primary); color: var(--white);
    border-color: var(--primary);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 1024px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .product-grid { grid-template-columns: 1fr; } }

/* Product Card */
.product-card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
    transition: all .3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; flex-direction: column;
    position: relative;
}
.product-card:hover {
    transform: translateY(-8px); box-shadow: var(--shadow-hover);
}
.product-card.sold-out { opacity: 0.7; }
.card-image-box { position: relative; width: 100%; height: 180px; overflow: hidden; }
.card-image {
    width: 100%; height: 100%;
    background: #f8f9fa; display: flex; align-items: center; justify-content: center;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.promo-tag {
    position: absolute; top: 10px; left: -30px;
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    color: white; font-size: 10px; font-weight: 700;
    padding: 4px 35px; transform: rotate(-45deg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}
.card-image-placeholder {
    background: linear-gradient(135deg, var(--primary-light), var(--bg-gradient-end));
}
.card-image-placeholder span {
    font-size: 28px; font-weight: 700; color: var(--primary-dark); opacity: 0.6;
}
.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.card-title {
    font-size: 15px; font-weight: 700; color: #333;
    margin: 8px 0 6px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 42px;
}
.card-price {
    font-size: 20px; font-weight: 700; color: #e74c3c;
    margin-bottom: 10px;
}
.card-meta {
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--text-light);
}
.card-action { margin-top: auto; }
.btn-order {
    display: block; text-align: center;
    padding: 8px; background: var(--primary);
    color: var(--white); border-radius: 8px;
    font-size: 14px; font-weight: 500;
    transition: background .2s;
}
.btn-order:hover { background: var(--primary-dark); }
.btn-disabled { background: #bdc3c7 !important; cursor: not-allowed; }

/* Badges */
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 12px; font-weight: 500;
}
.badge-auto { background: #e8f5e9; color: #27ae60; }
.badge-manual { background: #fff3e0; color: #e67e22; }
.badge-stock { background: #e3f2fd; color: #2196f3; }
.badge-limit { background: #fce4ec; color: #e91e63; }
.badge-discount { background: #fff0f0; color: #e74c3c; }
.badge-gray { background: #eceff1; color: #607d8b; }
.badge-blue { background: #e3f2fd; color: #1976d2; }
.badge-red { background: #fce4ec; color: #c62828; }

/* Cards (general) */
.card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
}
.card-header {
    padding: 16px 24px; font-size: 18px; font-weight: 600;
    border-bottom: 1px solid #f0f0f0; color: var(--text-dark);
}
.card-content { padding: 24px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 14px; font-weight: 500;
    margin-bottom: 6px; color: var(--text-dark);
}
.form-input {
    width: 100%; padding: 10px 14px; border: 1.5px solid #ddd;
    border-radius: 8px; font-size: 14px; outline: none;
    transition: border-color .2s;
}
.form-input:focus { border-color: var(--primary); }
select.form-input { appearance: auto; }

/* Quantity Control */
.qty-control {
    display: flex; align-items: center; gap: 0;
}
.qty-btn {
    width: 36px; height: 36px; border: 1.5px solid #ddd;
    background: #f9f9f9; font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.qty-btn:hover { background: #eee; }
.qty-btn:first-child { border-radius: 8px 0 0 8px; }
.qty-btn:last-child { border-radius: 0 8px 8px 0; }
.qty-input {
    width: 60px; height: 36px; text-align: center;
    border: 1.5px solid #ddd; border-left: none; border-right: none;
    font-size: 16px; outline: none;
    -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Payment Methods */
.pay-methods {
    display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0;
}
.pay-type {
    padding: 10px 20px; border: 2px solid #ddd; border-radius: 8px;
    cursor: pointer; font-size: 14px; transition: all .2s;
}
.pay-type:hover { border-color: var(--primary); }
.pay-select { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }

/* Buttons */
.btn-submit {
    display: block; width: 100%; padding: 12px;
    background: var(--primary); color: var(--white);
    border: none; border-radius: 8px; font-size: 16px;
    font-weight: 600; cursor: pointer; transition: background .2s;
    text-align: center;
}
.btn-submit:hover { background: var(--primary-dark); }
.btn-copy {
    padding: 6px 16px; background: var(--primary); color: white;
    border: none; border-radius: 6px; cursor: pointer; font-size: 13px;
    margin-top: 8px;
}

/* Buy Page */
.buy-page { display: flex; gap: 30px; margin-bottom: 30px; }
.buy-left { flex: 0 0 360px; }
.buy-right { flex: 1; }
.product-image-box {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; padding: 10px;
}
.product-image-box img { width: 100%; border-radius: 8px; cursor: zoom-in; }
.buy-title { font-size: 22px; margin-bottom: 10px; }
.buy-price { margin: 12px 0 16px; }
.price-current { font-size: 28px; font-weight: 700; color: var(--price-red); }
.price-original { font-size: 16px; color: var(--text-light); margin-left: 8px; }
.price-highlight { font-size: 18px; font-weight: 700; color: var(--price-red); }
.wholesale-info { margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row .form-input { flex: 1; }
.captcha-img { height: 40px; border-radius: 6px; cursor: pointer; }
@media (max-width: 768px) {
    .buy-page { flex-direction: column; }
    .buy-left { flex: none; }
}

/* Description */
.description-section {
    margin-top: 24px; overflow: hidden;
}
.description-header {
    background: linear-gradient(135deg, #e8edf3, #dfe6ee);
    padding: 14px 24px; font-size: 16px; font-weight: 600;
    color: var(--text-dark); display: flex; align-items: center; gap: 6px;
    border-radius: var(--radius) var(--radius) 0 0;
}
.description-card {
    background: var(--white); border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow); padding: 30px 24px;
}
.description-body { font-size: 14px; line-height: 1.8; color: #444; }
.description-body img { max-width: 100%; border-radius: 8px; margin: 10px 0; }

/* Description section blocks */
.description-body h2 {
    font-size: 18px; font-weight: 700; color: var(--text-dark);
    text-align: center; margin: 24px 0 20px;
}
.description-body h3 {
    font-size: 16px; font-weight: 700; color: var(--text-dark);
    margin: 28px 0 12px; padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    display: flex; align-items: center; justify-content: space-between;
}
.description-body h4 {
    font-size: 15px; font-weight: 600; color: var(--text-dark);
    margin: 20px 0 10px;
}
.description-body blockquote {
    margin: 10px 0 16px; padding: 16px 20px;
    border-radius: 0 10px 10px 0; background: #f7f8fa;
    border-left: 3px solid #6c7bff;
}
.description-body blockquote p { margin: 6px 0; }
.description-body ul, .description-body ol {
    padding-left: 8px; margin: 8px 0;
}
.description-body ul li {
    list-style: none; position: relative; padding-left: 22px; margin-bottom: 8px;
}
.description-body ul li::before {
    content: "◆"; position: absolute; left: 0; top: 0;
    color: #6c7bff; font-size: 10px;
}
.description-body ol li { margin-bottom: 8px; padding-left: 4px; }
.description-body a {
    color: #3b82f6; text-decoration: underline;
    text-decoration-color: rgba(59,130,246,0.3);
}
.description-body a:hover { text-decoration-color: #3b82f6; }
.description-body p { margin: 8px 0; }
.description-body strong { color: #333; }
.description-body hr {
    border: none; border-top: 1px solid #f0f0f0; margin: 20px 0;
}
/* Badge-like spans inside headers */
.description-body span.tag, .description-body h3 span {
    font-size: 12px; font-weight: 500; padding: 2px 10px;
    border-radius: 4px; background: #fff0f0; color: #e74c3c;
}

/* Info Table */
.info-table { width: 100%; border-collapse: collapse; }
.info-table td { padding: 10px 12px; border-bottom: 1px solid #f5f5f5; font-size: 14px; }
.info-table .label { text-align: right; color: var(--text-gray); width: 40%; }
.warning-text {
    text-align: center; color: var(--primary-dark);
    font-size: 16px; font-weight: 600; margin: 16px 0;
}
.info-text { color: var(--primary-dark); font-size: 16px; font-weight: 600; margin-bottom: 20px; }

/* Order Info */
.order-item {
    border: 1px solid #f0f0f0; border-radius: var(--radius);
    padding: 20px; margin-bottom: 16px;
}
.order-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.order-col p { font-size: 13px; margin-bottom: 6px; line-height: 1.6; }
.order-info-text {
    width: 100%; min-height: 120px; border: 1px solid #eee;
    border-radius: 8px; padding: 10px; font-size: 13px;
    resize: none; background: #fafafa;
}
@media (max-width: 768px) {
    .order-grid { grid-template-columns: 1fr; }
}

/* Tabs */
.tabs { margin-top: 16px; }
.tab-nav { display: flex; border-bottom: 2px solid #f0f0f0; margin-bottom: 20px; }
.tab-btn {
    padding: 10px 20px; border: none; background: none;
    font-size: 14px; cursor: pointer; color: var(--text-gray);
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all .2s;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* QR Code */
.qrcode-box {
    display: inline-block; border: 3px solid var(--primary);
    border-radius: var(--radius); padding: 20px; margin: 20px 0;
}
.qr-amount { font-size: 16px; color: var(--text-gray); margin-bottom: 15px; }

/* Empty State */
.empty-state { padding: 40px 20px; text-align: center; }
.empty-title { font-size: 18px; font-weight: 600; color: var(--text-dark); margin-bottom: 8px; }
.empty-desc { font-size: 14px; color: var(--text-gray); margin-bottom: 20px; }

/* Footer */
.footer {
    text-align: center; padding: 24px 20px;
    color: var(--text-light); font-size: 13px;
}
.footer a { color: var(--primary); }
.footer-content { margin-bottom: 8px; }

/* Mobile FAB */
.mobile-fab {
    display: none;
    position: fixed; bottom: 20px; right: 20px;
    z-index: 99;
}
.mobile-fab a {
    display: flex; align-items: center; gap: 6px;
    background: var(--primary); color: var(--white);
    padding: 10px 16px; border-radius: 24px;
    box-shadow: 0 4px 12px rgba(46,204,113,.4);
    font-size: 14px;
}
@media (max-width: 768px) {
    .mobile-fab { display: block; }
}

/* Layui form overrides */
.layui-form-select { width: 100%; }
.layui-form-pane .layui-input { border-radius: 8px; }
