/* ============================================================
   PayUSDT 前台 UI · 靛蓝渐变卡片风
   浅蓝渐变底 / 白色卡片 + 柔和阴影 / 靛蓝→紫渐变点缀
   只改外观，不触碰模板变量/表单/接口/JS 钩子
   ============================================================ */

:root {
    --bg: #f5f7fc;
    --text: #1e293b;
    --text2: #64748b;
    --text3: #94a3b8;
    --line: #e7eaf1;
    --line2: #e0e5ef;
    --bd: #4f46e5;
    --bd-dark: #4338ca;
    --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --price: #e11d48;
    --radius: 14px;
    --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
    --shadow: 0 6px 18px rgba(79,70,229,.08), 0 2px 6px rgba(15,23,42,.05);
    --shadow-lg: 0 16px 40px rgba(79,70,229,.16);
}

html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    background-image: linear-gradient(180deg, #eef1fb 0%, #f8f9fd 55%, #f5f7fc 100%);
    background-attachment: fixed;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--bd); }
img { max-width: 100%; }
h1,h2,h3,h4,h5,h6 { color: var(--text); font-weight: 600; }

.container { max-width: 1120px !important; width: 100% !important; padding-left: 18px !important; padding-right: 18px !important; }
@media (min-width: 1200px){ .container { width: 100%; max-width: 1120px; } }

/* ---------- 顶部导航 ---------- */
.navbar.navbar-white { background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: none; border-bottom: 1px solid var(--line); min-height: 58px; box-shadow: 0 1px 10px rgba(15,23,42,.04); }
.navbar.navbar-fixed-top { position: sticky; top: 0; z-index: 1030; }
.navbar .navbar-brand { height: 58px; padding: 0 16px !important; display: flex; align-items: center; }
.navbar .navbar-brand img { height: 36px; width: auto; }
.navbar .navbar-nav > li > a { color: var(--text2); font-size: 14px; font-weight: 500; padding: 19px 14px !important; display: inline-flex; align-items: center; gap: 5px; transition: color .2s; }
.navbar .navbar-nav > li > a:hover { color: var(--bd); background: transparent !important; }
.navbar .dropdown-menu { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; margin-top: 8px; background: #fff; }
.navbar .dropdown-menu > li > a { border-radius: 8px; color: var(--text); padding: 9px 13px; font-size: 14px; }
.navbar .dropdown-menu > li > a:hover { background: #f1f3fb; color: var(--bd); }

/* ---------- 卡片 ---------- */
.panel, .shadow { border-radius: var(--radius) !important; border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: #fff; }
.panel-default > .panel-heading { background: transparent; border-bottom: 1px solid var(--line); padding: 16px 20px; }
.panel-body { padding: 16px 20px; }

/* ---------- 页头 ---------- */
.page-head { padding: 32px 2px 26px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.page-head h1 { font-size: 28px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.4px; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.page-head .tagline { color: var(--text3); font-size: 14px; margin: 0; }
.page-head .head-action { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 8px 16px; font-size: 13px; font-weight: 600; color: #fff; background: var(--grad); border-radius: 999px; box-shadow: 0 6px 16px rgba(79,70,229,.22); transition: all .18s; }
.page-head .head-action:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(79,70,229,.3); }

/* ---------- 公告（始终展开，高度压缩） ---------- */
.page-container.home .announce { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.page-container.home .announce .announce-body { font-size: 12.5px; color: var(--text2); line-height: 1.6; }
.page-container.home .announce .announce-body .title { font-size: 14px !important; font-weight: 700 !important; margin: 0 0 10px !important; padding: 0 0 10px !important; border-bottom: 1px solid var(--line) !important; }
.page-container.home .announce .announce-body .notice-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 0 !important; margin: 0 !important; list-style: none !important; font-size: 12.5px !important; }
.page-container.home .announce .announce-body .notice-item { margin: 0 !important; padding: 7px 9px 7px 12px !important; border-left-width: 3px !important; border-radius: 6px !important; box-shadow: none !important; background: #fafbfe !important; }
.page-container.home .announce .announce-body .contact { margin-top: 12px !important; padding: 9px 12px !important; font-size: 12.5px !important; border-radius: 8px !important; line-height: 1.55 !important; }
@media (max-width: 640px) { .page-container.home .announce .announce-body .notice-list { grid-template-columns: 1fr; } }

/* ---------- 顶部横向分类 ---------- */
.category-bar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.category-bar .side-title { padding: 0 0 12px; }
.side-title { font-size: 14px; font-weight: 700; padding: 12px 14px 10px; color: var(--text); }
.side-title i { color: var(--bd); margin-right: 6px; }
.category-list-h { display: flex; flex-wrap: wrap; gap: 8px; }
.category-list-h .category-item { display: inline-flex; }
.category-list-h .category-btn { display: inline-flex; align-items: center; padding: 7px 16px; border: 1px solid var(--line2); border-radius: 999px; color: var(--text2); font-size: 13px; font-weight: 500; background: #fff; transition: all .16s; }
.category-list-h .category-btn:hover { border-color: var(--bd); color: var(--bd); }
.category-list-h .category-btn.active { border-color: transparent; color: #fff; background: var(--grad); font-weight: 600; box-shadow: 0 4px 12px rgba(79,70,229,.24); }
.category-bar .show-more-btn-container { text-align: center; padding-top: 6px; }
.category-bar #toggleCategoryBtn { display: inline-flex; align-items: center; gap: 4px; color: var(--text3); font-size: 13px; cursor: pointer; }
.category-bar #toggleCategoryBtn:hover { color: var(--bd); }

/* ---------- 商品卡片 ---------- */
.goods-section-title { font-size: 17px; font-weight: 700; margin: 0 0 14px; padding-left: 11px; border-left: 4px solid var(--bd); line-height: 1.2; }
.goods-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 16px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.goods-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #dcd6fb; }
.goods-card .goods-card__img { width: 100%; height: 152px; background: #fafafe; display: block; overflow: hidden; }
.goods-card .goods-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.goods-card:hover .goods-card__img img { transform: scale(1.05); }
.goods-card .goods-card__body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.goods-card .goods-card__title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 8px; }
.goods-card .goods-card__tags { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.goods-card .goods-card__tags .goods-tag { white-space: nowrap; }
.goods-card .goods-card__tags .goods-tag:first-child { flex: none; }
.goods-card .goods-card__tags .goods-tag:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.goods-card .goods-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.goods-card .goods-card__price { color: var(--price); font-size: 20px; font-weight: 800; }
.goods-card .goods-card__price em { font-style: normal; font-size: 12px; font-weight: 600; margin-right: 1px; }
.goods-card__buy { display: inline-flex; align-items: center; color: var(--bd); border: 1px solid #dcd6fb; background: #f5f4ff; padding: 6px 15px; border-radius: 999px; font-size: 13px; font-weight: 600; transition: all .18s; }
.goods-card__buy:hover { background: var(--grad); color: #fff; border-color: transparent; }
@media (max-width: 575.98px) { .goods-card .goods-card__tags .goods-tag { font-size: 10px; padding: 1px 6px; } }

/* 商品标签 */
.goods-tag { border: 1px solid #e2e6ef; color: var(--text2); background: #f7f8fb; font-size: 11px; padding: 1px 8px; border-radius: 6px; line-height: 1.5; }
.goods-tag.text-success { color: #059669; border-color: #d1fae5; background: #ecfdf5; }
.goods-tag.text-info { color: var(--bd); border-color: #e0e7ff; background: #eef2ff; }
.goods-tag.text-danger { color: var(--price); border-color: #ffe4e6; background: #fff1f2; }
.goods-tag.text-warning { color: #d97706; border-color: #fef3c7; background: #fffbeb; }

/* ---------- 博客 ---------- */
.page-section.bestsellers .grid-item .product-grid-item .product { border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.page-section.bestsellers .grid-item .product-grid-item .product:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.product-grid-item .product__image { height: 150px; overflow: hidden; background: #fafafe; }
.product-grid-item .product__image img { height: 100%; width: 100%; object-fit: cover; transition: transform .4s ease; }
.product-grid-item .product:hover .product__image img { transform: scale(1.04); }

/* ---------- 商品详情页 ---------- */
.breadcrumbs .breadcrumb { background: transparent; padding: 12px 0; font-size: 13px; }
.breadcrumbs .breadcrumb > li a { color: var(--text2); }
.breadcrumbs .breadcrumb > li.active { color: var(--text); }
.prod-details-gwrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 26px; }
.page-section.prod-details h1 { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.goods-page-cover img { border-radius: 12px; border: 1px solid var(--line); }

.count { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; background: #fff; }
.count__ctrl { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; background: #fafbfe; border: none; font-size: 18px; color: var(--text); cursor: pointer; transition: background .15s; }
.count__ctrl:hover { background: #eef1fb; }
.count__num { width: 56px; text-align: center; border: none; font-size: 15px; font-weight: 700; height: 40px; }

.select-specs.btn, .pay-type.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); background: #fff; color: var(--text2); border-radius: 10px; padding: 8px 14px; font-size: 14px; font-weight: 500; margin: 0 8px 8px 0; box-shadow: none !important; cursor: pointer; transition: all .16s; }
.select-specs.btn:hover, .pay-type.btn:hover { border-color: var(--bd); color: var(--bd); }
.select-specs.btn.active, .pay-type.btn.active { border: 1px solid var(--bd) !important; color: var(--bd); background: #eef2ff; }
.select-specs.btn.disabled, .pay-type.btn.disabled { opacity: .45; cursor: not-allowed; background: #fafafa; }
.pay-type.btn .pay-dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; }
.pay-type.btn img { width: 20px; height: 20px; object-fit: contain; }

.variations__title, .prod-details__specifications .title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.prod-details__specifications .specifications { display: flex; flex-wrap: wrap; gap: 8px; }
.prod-details__specifications .specifications span { background: #fafbfe; border-radius: 8px; padding: 5px 12px; font-size: 13px; color: var(--text2); }

.prod-details__offering.shadow { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); padding: 22px; }
.prod-offering__rating { margin-bottom: 12px; color: #f59e0b; }
.prod-offering__benefits .precheck-benefits { color: var(--price); font-weight: 600; margin-bottom: 10px; }
.prod-offering__prices { margin-bottom: 14px; }
.prod-offering__prices .sale-price { color: var(--price); font-size: 28px; font-weight: 800; }
.prod-offering__prices .sale-price #sale-price { color: var(--price); }
.prod-offering__prices .reg-price { color: var(--text3); text-decoration: line-through; font-size: 14px; margin-left: 8px; }

.subscribe-tos { margin-bottom: 12px; font-size: 14px; color: var(--text); }
.form-group { margin-bottom: 12px; }
.subscribe-tos input, .form-group input { width: 100%; padding: 10px 13px; border: 1px solid var(--line2); border-radius: 10px; font-size: 14px; background: #fff; }
.subscribe-tos input:focus, .form-group input:focus { border-color: var(--bd); box-shadow: 0 0 0 3px rgba(79,70,229,.12); outline: none; }
.form-hint { display: block; color: var(--text3); font-size: 12px; margin-top: 4px; }

.prod-offering__cart-btn .btn.btn-primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: var(--grad); border: none; border-radius: 12px; padding: 15px 20px; font-size: 16px; font-weight: 800; letter-spacing: .3px; color: #fff; box-shadow: 0 8px 20px rgba(79,70,229,.28); transition: background .18s, transform .12s, box-shadow .18s; }
.prod-offering__cart-btn .btn.btn-primary:hover { background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 12px 26px rgba(79,70,229,.36); transform: translateY(-1px); }
.prod-offering__cart-btn .btn.btn-primary:active { transform: translateY(0); box-shadow: 0 5px 12px rgba(79,70,229,.24); }
.prod-offering__cart-btn .btn.btn-primary.disabled, .prod-offering__cart-btn .btn.btn-primary[disabled] { background: #d1d5db !important; box-shadow: none !important; transform: none !important; }

.prod-offering__delivinfo { padding: 12px; background: #fafbfe; border-radius: 10px; margin-top: 14px; }
.prod-offering__delivinfo .delivinfo__header { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.prod-offering__delivinfo .delivinfo__item { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; color: var(--text2); }
.prod-offering__delivinfo .delivinfo__item .text b { color: var(--text); font-weight: 600; margin-right: 6px; }
.prod-offering__delivinfo .init-stock { color: #059669; font-weight: 700; }
.prod-offering__merchant { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text3); font-size: 13px; }
.goods-detail { line-height: 1.8; }
.goods-detail img { border-radius: 10px; }

#lean_overlay { background: rgba(15,23,42,.4); }
#alert-html { border-radius: var(--radius) !important; box-shadow: var(--shadow-lg); overflow: hidden; }
#alert-html .content { padding: 22px; }
.modal_close { background: var(--text); }

/* ---------- 页脚 ---------- */
.main-footer-section { margin-top: 40px; border-top: 1px solid var(--line); background: #fff; padding: 22px 0; box-shadow: 0 -1px 10px rgba(15,23,42,.03); }
.main-footer-section__midline-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; color: var(--text3); font-size: 13px; }
.main-footer-section__midline-links a { color: var(--text3); }
.main-footer-section__midline-links a:hover { color: var(--bd); }
.main-footer-section__midline-links span.ml-auto { margin-left: auto; }

/* ---------- 工具类 ---------- */
.mobile-hidden { display: block; }
.pc-hidden { display: none; }
@media (max-width: 1199.98px){ .mobile-hidden { display: none; } .pc-hidden { display: block; } }
.goods-page-cover { margin-bottom: 0; }
.mobile-padding { padding-left: 15px !important; padding-right: 15px !important; }
@media (max-width: 1199.98px){ .goods-page-cover { margin-bottom: 20px; } }

/* ---------- 商品详情页：覆盖内联样式 ---------- */
.page-container.product .panel-default > .panel-heading { padding: 16px 20px !important; background: transparent !important; border-bottom: 1px solid var(--line) !important; }
.page-container.product .panel-body { padding: 16px 20px !important; }
.prod-details-gwrap { background: #fff !important; border: 1px solid var(--line) !important; border-radius: var(--radius) !important; padding: 26px !important; box-shadow: var(--shadow-sm) !important; }
.count { border: 1px solid var(--line2) !important; border-radius: 10px !important; }
.count__ctrl { background: #fafbfe !important; color: var(--text) !important; font-size: 18px !important; }
.select-specs, .pay-type, .select-specs.btn, .pay-type.btn { border: 1px solid var(--line2) !important; box-shadow: none !important; background: #fff !important; color: var(--text2) !important; border-radius: 10px !important; padding: 8px 14px !important; margin: 0 8px 8px 0 !important; }
.select-specs.btn.active, .pay-type.btn.active { border: 1px solid var(--bd) !important; color: var(--bd) !important; background: #eef2ff !important; }
.prod-offering__prices .sale-price { color: var(--price) !important; font-size: 28px !important; font-weight: 800 !important; }
.pay-type img { width: 20px !important; height: 20px !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 767.98px) {
    .page-head { padding: 22px 2px 18px; }
    .page-head h1 { font-size: 23px; }
    .goods-card .goods-card__img { height: 140px; }
    .prod-details-gwrap { padding: 18px; }
}


/* ---------- 分类按钮：强制覆盖底层主题色 ---------- */
.category-list-h .category-btn { color: var(--text2) !important; background: #fff !important; border: 1px solid var(--line2) !important; border-radius: 999px !important; padding: 7px 16px !important; margin: 0 !important; box-shadow: none !important; }
.category-list-h .category-btn:hover { border-color: var(--bd) !important; color: var(--bd) !important; }
.category-list-h .category-btn.active { background: var(--grad) !important; border-color: transparent !important; color: #fff !important; box-shadow: 0 4px 12px rgba(79,70,229,.24) !important; }
.category-bar #toggleCategoryBtn { background: var(--grad) !important; color: #fff !important; border: none !important; padding: 6px 16px !important; border-radius: 999px !important; }
.category-bar #toggleCategoryBtn:hover { color: #fff !important; box-shadow: 0 6px 14px rgba(79,70,229,.28) !important; }


/* ---------- 商品卡片「立即购买」：单行不换行，窄屏适配 ---------- */
.goods-card .goods-card__price { white-space: nowrap; flex: none; }
.goods-card .goods-card__buy { white-space: nowrap; flex: none; }
@media (max-width: 575.98px) {
    .goods-card .goods-card__body { padding-left: 12px; padding-right: 12px; }
    .goods-card .goods-card__price { font-size: 17px; }
    .goods-card .goods-card__buy { padding: 5px 9px; font-size: 12px; }
}
