/* ============================================================
 *  淘淘惠 商城 - 全局样式
 * ============================================================ */

:root {
  --brand: #FF5A2D;
  --brand-2: #FF8A3D;
  --brand-dark: #E8410F;
  --ink: #1D2129;
  --ink-2: #4E5969;
  --ink-3: #86909C;
  --line: #E5E6EB;
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(29, 33, 41, .06);
  --shadow-hover: 0 8px 24px rgba(29, 33, 41, .12);
  --wrap: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

a { color: inherit; text-decoration: none; }
ul, li { list-style: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---------------- 顶部 ---------------- */
.header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-top { display: flex; align-items: center; gap: 28px; height: 76px; }

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0; overflow: hidden;
}
.logo-mark svg { width: 26px; height: 26px; }
.logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-size: 21px; font-weight: 700; letter-spacing: 1px; color: var(--brand); }
.logo-slogan { font-size: 11px; color: var(--ink-3); letter-spacing: .5px; }

.search { flex: 1; display: flex; max-width: 520px; }
.search form { display: flex; width: 100%; }
.search input {
  flex: 1; height: 42px; padding: 0 16px;
  border: 2px solid var(--brand); border-right: none;
  border-radius: 21px 0 0 21px; outline: none; font-size: 14px; background: #fff;
}
.search button {
  height: 42px; padding: 0 26px; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  border-radius: 0 21px 21px 0; transition: filter .2s;
}
.search button:hover { filter: brightness(1.06); }

.header-links { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.header-links a { font-size: 14px; color: var(--ink-2); transition: color .2s; }
.header-links a:hover, .header-links a.on { color: var(--brand); }

.nav { display: flex; align-items: center; gap: 8px; height: 46px; }
.nav a {
  padding: 6px 14px; border-radius: 18px; font-size: 14px; color: var(--ink-2);
  transition: all .2s; white-space: nowrap;
}
.nav a:hover { color: var(--brand); background: #FFF3EE; }
.nav a.on { color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand)); }

/* ---------------- 通用区块 ---------------- */
.section { margin: 28px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.section-title small { font-size: 13px; font-weight: 400; color: var(--ink-3); margin-left: 10px; letter-spacing: 0; }
.section-more { font-size: 13px; color: var(--ink-3); transition: color .2s; }
.section-more:hover { color: var(--brand); }

.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 22px; border-radius: 20px; font-size: 14px;
  transition: all .2s; border: 1px solid transparent;
}
.btn-primary { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff; }
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 4px 14px rgba(255, 90, 45, .32); }
.btn-ghost { border-color: var(--brand); color: var(--brand); }
.btn-ghost:hover { background: #FFF3EE; }
.btn-lg { height: 48px; padding: 0 34px; font-size: 16px; border-radius: 24px; }

/* ---------------- 轮播 ---------------- */
.slider { position: relative; height: 320px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.slide {
  position: absolute; inset: 0; display: flex; align-items: center;
  padding: 0 56px; opacity: 0; transition: opacity .6s ease; color: #fff;
}
.slide.on { opacity: 1; }
.slide-inner { max-width: 520px; }
.slide-tag {
  display: inline-block; padding: 4px 14px; border-radius: 14px; font-size: 13px;
  background: rgba(255, 255, 255, .22); backdrop-filter: blur(4px); margin-bottom: 14px;
}
.slide-title { font-size: 38px; font-weight: 700; line-height: 1.25; margin-bottom: 10px; }
.slide-sub { font-size: 15px; opacity: .92; margin-bottom: 22px; }
.slide-btn {
  display: inline-block; padding: 10px 30px; border-radius: 22px; font-size: 15px;
  background: #fff; color: var(--ink); font-weight: 500; transition: transform .2s;
}
.slide-btn:hover { transform: translateY(-2px); }
.slide-art { position: absolute; right: 60px; top: 50%; transform: translateY(-50%); width: 240px; height: 240px; opacity: .9; }
.slide-art svg { width: 100%; height: 100%; }
.slider-dots { position: absolute; left: 56px; bottom: 28px; display: flex; gap: 8px; z-index: 2; }
.slider-dots i {
  width: 22px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .45);
  cursor: pointer; transition: background .3s;
}
.slider-dots i.on { background: #fff; }

/* ---------------- 分类九宫格 ---------------- */
.cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cat-item {
  background: #fff; border-radius: var(--radius); padding: 20px 8px; text-align: center;
  box-shadow: var(--shadow); transition: all .25s; cursor: pointer;
}
.cat-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.cat-ico {
  width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.cat-ico svg { width: 30px; height: 30px; }
.cat-name { font-size: 14px; font-weight: 500; }
.cat-count { font-size: 12px; color: var(--ink-3); }

/* ---------------- 秒杀 ---------------- */
.seckill { display: flex; align-items: center; gap: 20px; padding: 18px 24px; margin-bottom: 16px; }
.seckill-title { font-size: 19px; font-weight: 700; color: var(--brand); }
.countdown { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.countdown b {
  display: inline-block; min-width: 30px; padding: 3px 0; text-align: center;
  background: var(--ink); color: #fff; border-radius: 4px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------------- 商品网格 ---------------- */
.goods-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.goods-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow); transition: all .25s; display: flex; flex-direction: column;
}
.goods-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.goods-thumb { position: relative; width: 100%; padding-top: 100%; background: #f2f3f5; overflow: hidden; }
.goods-thumb .art { position: absolute; inset: 0; }
.goods-thumb .art svg { width: 100%; height: 100%; display: block; }
.goods-thumb .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.goods-badge {
  position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 4px;
  font-size: 12px; color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand));
}
.goods-body { padding: 12px; display: flex; flex-direction: column; flex: 1; }
.goods-name {
  font-size: 14px; line-height: 1.45; height: 40px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  transition: color .2s;
}
.goods-card:hover .goods-name { color: var(--brand); }
.goods-sub { font-size: 12px; color: var(--ink-3); margin-top: 5px; height: 19px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.goods-price { margin-top: 8px; display: flex; align-items: baseline; gap: 8px; }
.price-now { color: var(--brand); font-size: 19px; font-weight: 700; }
.price-now i { font-size: 13px; font-style: normal; font-weight: 500; }
.price-old { color: var(--ink-3); font-size: 12px; text-decoration: line-through; }
.goods-meta { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.goods-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  padding: 1px 7px; border-radius: 3px; font-size: 11px;
  color: var(--brand); background: #FFF1EC; border: 1px solid #FFD9CC;
}
.stars { color: #FF9A2E; letter-spacing: -1px; }

/* ---------------- 列表页 ---------------- */
.breadcrumb { padding: 16px 0; font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span { color: var(--ink-2); }

.filter-bar { padding: 14px 20px; margin-bottom: 16px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-label { font-size: 13px; color: var(--ink-3); flex-shrink: 0; }
.chip {
  padding: 5px 14px; border-radius: 16px; font-size: 13px; color: var(--ink-2);
  background: #F5F6F8; transition: all .2s; cursor: pointer; white-space: nowrap;
}
.chip:hover { background: #FFE6DC; color: var(--brand); }
.chip.on { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff; }
.filter-result { margin-left: auto; font-size: 13px; color: var(--ink-3); }

.empty { padding: 80px 20px; text-align: center; color: var(--ink-3); }
.empty-title { font-size: 17px; margin-bottom: 8px; color: var(--ink-2); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 32px 0 8px; }
.pagination button {
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 13px; transition: all .2s;
}
.pagination button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pagination button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------- 详情页 ---------------- */
.detail-main { display: grid; grid-template-columns: 420px 1fr; gap: 36px; padding: 24px; }

.gallery { }
.gallery-main {
  width: 100%; padding-top: 100%; position: relative; border-radius: var(--radius);
  overflow: hidden; background: #f2f3f5;
}
.gallery-main .art { position: absolute; inset: 0; }
.gallery-main .art svg { width: 100%; height: 100%; display: block; }
.gallery-main .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.gallery-thumbs i {
  width: 74px; height: 74px; border-radius: var(--radius-sm); overflow: hidden;
  background: #f2f3f5; cursor: pointer; border: 2px solid transparent; transition: border-color .2s;
}
.gallery-thumbs i.on { border-color: var(--brand); }
.gallery-thumbs i svg { width: 100%; height: 100%; display: block; }

.info-title { font-size: 22px; font-weight: 700; line-height: 1.45; }
.info-sub { color: var(--ink-3); font-size: 14px; margin-top: 6px; }
.info-price-box {
  margin: 16px 0; padding: 16px 20px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #FFF6F3, #FFEFE8);
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.info-price { font-size: 32px; font-weight: 700; color: var(--brand); }
.info-price i { font-size: 18px; font-style: normal; }
.info-origin { color: var(--ink-3); text-decoration: line-through; }
.info-discount {
  padding: 3px 10px; border-radius: 4px; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
}
.info-sales { margin-left: auto; font-size: 13px; color: var(--ink-3); }

.info-row { display: flex; gap: 14px; padding: 10px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.info-row .k { width: 62px; flex-shrink: 0; color: var(--ink-3); }
.info-row .v { flex: 1; color: var(--ink-2); }

.spec-list { display: flex; flex-wrap: wrap; gap: 10px; }
.spec-item {
  padding: 7px 18px; border-radius: 6px; border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2); transition: all .2s; cursor: pointer; background: #fff;
}
.spec-item:hover { border-color: var(--brand); color: var(--brand); }
.spec-item.on { border-color: var(--brand); color: var(--brand); background: #FFF3EE; font-weight: 500; }

.buy-box { display: flex; gap: 14px; margin-top: 22px; }
.demo-note { margin-top: 12px; font-size: 12px; color: var(--ink-3); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 24px; }
.tabs button {
  padding: 14px 22px; font-size: 15px; color: var(--ink-2); position: relative; transition: color .2s;
}
.tabs button:hover { color: var(--brand); }
.tabs button.on { color: var(--brand); font-weight: 600; }
.tabs button.on::after {
  content: ''; position: absolute; left: 22px; right: 22px; bottom: -1px; height: 2px;
  background: var(--brand); border-radius: 2px;
}
.tab-panel { padding: 24px; display: none; font-size: 14px; color: var(--ink-2); line-height: 1.9; }
.tab-panel.on { display: block; }
.tab-panel p { margin-bottom: 12px; }
.detail-art { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 8px; }
.detail-art div { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16 / 10; }
.detail-art svg, .detail-art img { width: 100%; height: 100%; display: block; object-fit: cover; }

.spec-table { width: 100%; border-collapse: collapse; }
.spec-table td { padding: 12px 16px; border: 1px solid var(--line); font-size: 13px; }
.spec-table td:first-child { width: 160px; background: #FAFBFC; color: var(--ink-3); }

.review-item { padding: 16px 0; border-bottom: 1px dashed var(--line); }
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.review-user { font-weight: 500; color: var(--ink); }
.review-item:last-child { border-bottom: none; }

/* ---------------- 页脚 ---------------- */
.footer { background: #fff; border-top: 1px solid var(--line); margin-top: 48px; padding: 40px 0 28px; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr) 1.4fr; gap: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.footer-col h4 { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--ink); }
.footer-col li { font-size: 13px; color: var(--ink-3); padding: 4px 0; transition: color .2s; }
.footer-col li:hover { color: var(--brand); }
.footer-contact { font-size: 13px; color: var(--ink-3); line-height: 2; }
.footer-contact strong { display: block; font-size: 20px; color: var(--brand); font-weight: 700; letter-spacing: .5px; }

.footer-legal { padding: 22px 0 0; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.footer-links a { display: inline-flex; align-items: center; gap: 5px; transition: color .2s; }
.footer-links a:hover { color: var(--brand); text-decoration: underline; }
.footer-links svg { width: 14px; height: 14px; flex-shrink: 0; }
.footer-copy { font-size: 13px; color: var(--ink-3); }
.footer-note { font-size: 12px; color: var(--ink-3); opacity: .8; margin-top: 8px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 60px; transform: translate(-50%, 20px);
  background: rgba(29, 33, 41, .92); color: #fff; padding: 12px 24px; border-radius: 24px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .28s; z-index: 999; max-width: 80vw; text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 演示站点提示弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(17, 20, 24, .55);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  opacity: 0; animation: maskIn .22s ease forwards; padding: 20px;
}
@keyframes maskIn { to { opacity: 1; } }
.modal {
  width: 440px; max-width: 100%; background: #fff; border-radius: 14px;
  padding: 30px 28px 24px; text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .24);
  animation: modalIn .26s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes modalIn { from { transform: translateY(18px) scale(.96); opacity: .4; } }
.modal-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px;
  border-radius: 15px; font-size: 13px; color: #C4370B; background: #FFF1E8; margin-bottom: 16px;
}
.modal-badge svg { width: 15px; height: 15px; }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.modal-text { font-size: 14px; color: var(--ink-2); line-height: 1.85; text-align: left; }
.modal-text b { color: var(--ink); font-weight: 600; }
.modal-list { margin: 12px 0 0; padding-left: 2px; }
.modal-list li { position: relative; padding-left: 16px; font-size: 13px; color: var(--ink-2); line-height: 1.9; }
.modal-list li::before {
  content: ''; position: absolute; left: 2px; top: 10px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand);
}
.modal-btn {
  margin-top: 24px; width: 100%; height: 44px; border-radius: 22px; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand)); transition: filter .2s;
}
.modal-btn:hover { filter: brightness(1.07); }
.modal-tip { margin-top: 12px; font-size: 12px; color: var(--ink-3); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1100px) {
  .goods-grid { grid-template-columns: repeat(4, 1fr); }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .detail-main { grid-template-columns: 360px 1fr; gap: 24px; }
}
@media (max-width: 820px) {
  .header-top { flex-wrap: wrap; height: auto; padding: 14px 0; gap: 14px; }
  .search { order: 3; max-width: 100%; flex-basis: 100%; }
  .nav { overflow-x: auto; }
  .goods-grid { grid-template-columns: repeat(2, 1fr); }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .slider { height: 220px; }
  .slide { padding: 0 28px; }
  .slide-title { font-size: 26px; }
  .slide-art { display: none; }
  .slider-dots { left: 28px; bottom: 18px; }
  .detail-main { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .detail-art { grid-template-columns: 1fr; }
}
