/* ============================================================
   HX 商城 · PC 端 — 中东奢华风设计系统
   沙金 / 深咖 / 拱形 / 衬线 — 淘宝式信息架构
   ============================================================ */
:root {
  --bg: #f6f2ea;
  --surface: #fffdf9;
  --ink: #26201a;
  --muted: #94897a;
  --gold: #b98d3a;
  --gold-light: #d9b96a;
  --gold-deep: #8a6520;
  --dark: #221a12;
  --dark-2: #2f2418;
  --line: #e6ddcc;
  --price: #b3402a;
  --radius: 10px;
  --serif: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", SimSun, serif;
  --sans: -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --shadow: 0 6px 24px rgba(60, 42, 12, .08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- 顶部工具条 ---------- */
.topbar { background: var(--dark); color: #cfc4b0; font-size: 12.5px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar a { color: #cfc4b0; transition: color .2s; }
.topbar a:hover { color: var(--gold-light); }
.topbar-sep { margin: 0 8px; opacity: .4; }

/* ---------- 头部 ---------- */
.header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 34px; padding: 18px 16px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-star { filter: drop-shadow(0 1px 2px rgba(138,101,32,.35)); }
.logo-text { font-family: var(--serif); font-size: 30px; letter-spacing: 1px; color: var(--ink); }
.logo-text em { font-style: normal; color: var(--gold); }

.search-box { flex: 1; display: flex; max-width: 640px; height: 44px;
  border: 2px solid var(--gold); border-radius: 8px; overflow: hidden; background: #fff; }
.search-cat { border: none; outline: none; background: #f3ede1; color: var(--ink);
  padding: 0 12px; font-size: 13px; border-right: 1px solid var(--line); max-width: 130px; }
.search-box input { flex: 1; border: none; outline: none; padding: 0 14px; font-size: 14px; }
.btn-search { border: none; background: linear-gradient(135deg, var(--gold-light), var(--gold) 60%, var(--gold-deep));
  color: #fff; font-size: 15px; letter-spacing: 2px; padding: 0 30px; transition: filter .2s; }
.btn-search:hover { filter: brightness(1.08); }

.cart-entry { display: flex; align-items: center; gap: 8px; color: var(--ink); position: relative; padding: 6px 10px; border-radius: 8px; }
.cart-entry:hover { background: #f7f0e2; color: var(--gold-deep); }
.cart-count { position: absolute; top: -4px; left: 26px; background: var(--price); color: #fff;
  min-width: 18px; height: 18px; border-radius: 9px; font-size: 11px; line-height: 18px; text-align: center; padding: 0 4px; }
.cart-label { font-size: 15px; }

/* ---------- 分类导航 ---------- */
.catnav { background: var(--surface); border-bottom: 1px solid var(--line); }
.catnav-inner { display: flex; align-items: center; height: 46px; gap: 6px; }
.catnav-all { background: var(--dark); color: var(--gold-light); font-size: 15px;
  padding: 12px 22px; border-radius: 0 0 10px 10px; margin-right: 10px; letter-spacing: 2px; }
.catnav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.catnav-links a { padding: 6px 14px; border-radius: 20px; font-size: 14.5px; color: #4a4134; transition: all .2s; }
.catnav-links a:hover { color: var(--gold-deep); background: #f7f0e2; }

/* ---------- 通用区块 ---------- */
.section { margin: 26px 0 10px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-family: var(--serif); font-size: 24px; letter-spacing: 1px; display: flex; align-items: center; gap: 12px; }
.section-title::before { content: ""; width: 6px; height: 26px; background: linear-gradient(var(--gold-light), var(--gold-deep)); border-radius: 3px; }
.section-title .sub { font-family: var(--sans); font-size: 12.5px; color: var(--muted); letter-spacing: 2px; }
.section-more { color: var(--muted); font-size: 13px; }
.section-more:hover { color: var(--gold-deep); }

/* ---------- 轮播 ---------- */
.hero { position: relative; border-radius: 14px; overflow: hidden; margin-top: 20px;
  box-shadow: var(--shadow); background: #e9dfcb; }
.hero-slide { display: none; }
.hero-slide.active { display: block; }
.hero-slide img { width: 100%; height: 380px; object-fit: cover; }
.hero-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.hero-dots span { width: 26px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.5); cursor: pointer; transition: background .2s; }
.hero-dots span.active { background: var(--gold-light); }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px;
  border-radius: 50%; border: none; background: rgba(34,26,18,.45); color: #fff; font-size: 20px;
  display: none; align-items: center; justify-content: center; transition: background .2s; }
.hero:hover .hero-arrow { display: flex; }
.hero-arrow:hover { background: var(--gold); }
.hero-arrow.prev { left: 14px; }
.hero-arrow.next { right: 14px; }

/* ---------- 商品网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .22s, box-shadow .22s, border-color .22s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.card-img { position: relative; overflow: hidden; background: #f2ecdf; }
.card-img img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.06); }
.card-tag { position: absolute; top: 10px; left: 10px; background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  color: #fff; font-size: 11px; padding: 2px 9px; border-radius: 10px; letter-spacing: 1px; }
.card-body { padding: 12px 14px 14px; }
.card-name { font-size: 14px; color: #3d3529; height: 42px; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.5; }
.card-name:hover { color: var(--gold-deep); }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: 10px; }
.card-price { color: var(--price); font-size: 19px; font-weight: 600; }
.card-price small { font-size: 12px; font-weight: 400; }
.card-price .orig { color: var(--muted); font-size: 12px; text-decoration: line-through; margin-left: 6px; font-weight: 400; }
.card-sale { color: var(--muted); font-size: 12px; }

/* ---------- 品牌条 ---------- */
.brand-strip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.brand-strip .brands { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.brand-item { text-align: center; padding: 12px 6px; border-radius: 8px; transition: background .2s; }
.brand-item:hover { background: #f7f0e2; }
.brand-item img { width: 100%; height: 72px; object-fit: contain; margin-bottom: 8px; }
.brand-item .bname { font-size: 13px; color: #4a4134; }

/* ---------- 列表页 ---------- */
.list-toolbar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; display: flex; align-items: center; gap: 20px; margin: 20px 0 16px; }
.list-toolbar .lt-title { font-size: 15px; font-weight: 600; }
.list-toolbar .sort a { color: #4a4134; padding: 4px 10px; border-radius: 4px; }
.list-toolbar .sort a.active, .list-toolbar .sort a:hover { color: #fff; background: var(--gold); }
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 26px 0 40px; }
.pager button, .pager .pg { min-width: 36px; height: 36px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 6px; padding: 0 10px; font-size: 14px; transition: all .2s; }
.pager button:hover:not(:disabled), .pager .pg:hover { border-color: var(--gold); color: var(--gold-deep); }
.pager .pg.active { background: var(--gold); color: #fff; border-color: var(--gold); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- 详情页 ---------- */
.detail { display: grid; grid-template-columns: 460px 1fr; gap: 34px; margin: 22px 0 10px; }
.detail-gallery { position: sticky; top: 16px; align-self: start; }
.detail-main-img { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.detail-main-img img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.detail-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.detail-thumbs img { width: 72px; height: 72px; object-fit: cover; border: 2px solid var(--line); border-radius: 8px; cursor: pointer; }
.detail-thumbs img.active { border-color: var(--gold); }
.detail-info h1 { font-family: var(--serif); font-size: 24px; line-height: 1.4; }
.detail-info .sub { color: var(--muted); margin-top: 8px; }
.price-panel { background: linear-gradient(135deg, #faf3e4, #f3e8d0); border-radius: 12px; padding: 16px 18px; margin: 16px 0; }
.price-now { color: var(--price); font-size: 30px; font-weight: 700; }
.price-now small { font-size: 14px; }
.price-now .orig { color: var(--muted); font-size: 14px; text-decoration: line-through; margin-left: 12px; font-weight: 400; }
.price-extra { margin-top: 8px; color: var(--muted); font-size: 13px; }
.attrs { display: grid; gap: 14px; margin: 18px 0; }
.attr-row { display: flex; align-items: center; gap: 14px; }
.attr-row .alabel { color: var(--muted); min-width: 56px; }
.attr-row .aval { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 14px; cursor: pointer; font-size: 13px; }
.attr-row .aval.active { border-color: var(--gold); color: var(--gold-deep); background: #faf3e4; }
.qty-row { display: flex; align-items: center; gap: 10px; margin: 18px 0; }
.qty-row .qty-box { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.qty-row .qty-box button { width: 34px; height: 36px; border: none; background: #f6f2ea; font-size: 16px; }
.qty-row .qty-box input { width: 56px; height: 36px; border: none; text-align: center; outline: none; font-size: 15px; }
.btn-row { display: flex; gap: 14px; margin-top: 8px; }
.btn { border: none; border-radius: 8px; height: 46px; padding: 0 34px; font-size: 16px; letter-spacing: 2px; transition: filter .2s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold) 60%, var(--gold-deep)); color: #fff; }
.btn-dark { background: var(--dark); color: var(--gold-light); }
.btn:hover { filter: brightness(1.08); }
.detail-desc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin: 20px 0 30px; }
.detail-desc h2 { font-family: var(--serif); font-size: 20px; margin-bottom: 14px; }
.detail-desc .rich { line-height: 1.9; color: #3d3529; }
.detail-desc .rich img { display: inline-block; margin: 6px auto; }

/* ---------- 购物车 ---------- */
.cart-page { margin: 22px 0 40px; }
.cart-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cart-table th { background: #f3ede1; padding: 13px 14px; text-align: left; font-size: 13.5px; color: #5c5244; }
.cart-table td { padding: 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.cart-table .ct-prod { display: flex; align-items: center; gap: 12px; }
.cart-table .ct-prod img { width: 66px; height: 66px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.cart-table .ct-prod a:hover { color: var(--gold-deep); }
.cart-total { text-align: right; margin-top: 18px; font-size: 15px; }
.cart-total .total-price { color: var(--price); font-size: 26px; font-weight: 700; }
.cart-empty { text-align: center; padding: 70px 0; color: var(--muted); }
.cart-empty .big { font-family: var(--serif); font-size: 22px; margin-bottom: 10px; color: #7d715f; }

/* ---------- 登录 ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 46px 0 60px; }
.auth-card { width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 34px 38px; box-shadow: var(--shadow); }
.auth-card h2 { font-family: var(--serif); text-align: center; margin-bottom: 6px; font-size: 24px; }
.auth-card .auth-sub { text-align: center; color: var(--muted); margin-bottom: 24px; font-size: 13px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 13px; color: #5c5244; margin-bottom: 6px; }
.form-field input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font-size: 14px; outline: none; transition: border-color .2s; }
.form-field input:focus { border-color: var(--gold); }
.auth-msg { color: var(--price); font-size: 13px; min-height: 20px; margin-bottom: 8px; }
.btn-block { width: 100%; height: 46px; }

/* ---------- 加载与状态 ---------- */
.loading { text-align: center; padding: 60px 0; color: var(--muted); }
.error-box { text-align: center; padding: 50px 0; color: var(--muted); }

/* ---------- 页脚 ---------- */
.footer { background: var(--dark); color: #b9ac97; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding: 40px 16px 26px; }
.footer-col h4 { color: var(--gold-light); font-size: 15px; margin-bottom: 14px; letter-spacing: 1px; }
.footer-col a { display: block; color: #b9ac97; font-size: 13.5px; margin-bottom: 9px; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-brand { text-align: right; }
.footer-logo { font-family: var(--serif); font-size: 26px; color: #fff; margin-bottom: 8px; }
.footer-logo em { font-style: normal; color: var(--gold); }
.footer-copy { border-top: 1px solid rgba(217,185,106,.18); padding: 16px; text-align: center; font-size: 12.5px; color: #8d8170; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .detail { grid-template-columns: 360px 1fr; }
}
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .header-inner { flex-wrap: wrap; gap: 14px; }
  .search-box { order: 3; max-width: 100%; flex-basis: 100%; }
  .detail { grid-template-columns: 1fr; }
  .detail-gallery { position: static; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-strip .brands { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .catnav-links { display: none; }
  .hero-slide img { height: 200px; }
}

/* ============ 多语言 / RTL ============ */
.lang-switch { display: inline-flex; align-items: center; gap: 4px; color: inherit; cursor: pointer; }
.lang-switch select {
  background: transparent; border: 1px solid rgba(255,255,255,.35); color: inherit;
  border-radius: 6px; padding: 2px 6px; font-size: 12px; cursor: pointer; outline: none;
}
.lang-switch select option { color: #222; }
html[dir="rtl"] .topbar-inner, html[dir="rtl"] .header-inner, html[dir="rtl"] .catnav-inner { direction: rtl; }
html[dir="rtl"] .topbar-left { margin-inline-start: 0; }
html[dir="rtl"] .search-box select.search-cat { border-radius: 0 8px 8px 0; border-right: 1px solid var(--line); border-left: 0; }
html[dir="rtl"] .search-box .btn-search { border-radius: 8px 0 0 8px; }
html[dir="rtl"] .hero-arrow.prev { left: auto; right: 14px; }
html[dir="rtl"] .hero-arrow.next { right: auto; left: 14px; }
html[dir="rtl"] .card-tag { left: auto; right: 10px; }
html[dir="rtl"] .cart-table th { text-align: right; }
html[dir="rtl"] .cart-total { text-align: left; }
html[dir="rtl"] .footer-brand { text-align: left; }
html[dir="rtl"] .detail-info { text-align: right; }
html[dir="rtl"] .btn-row { flex-direction: row-reverse; }
html[dir="rtl"] .auth-card { text-align: right; }
html[dir="rtl"] body, html[dir="rtl"] input, html[dir="rtl"] button, html[dir="rtl"] select, html[dir="rtl"] a { letter-spacing: 0; }
.rich img { max-width: 100%; height: auto; display: block; margin: 12px auto; border-radius: 8px; }
.rich p { line-height: 1.9; color: #4a4133; margin: 10px 0; }

/* ============ SEO 内容页 / 注册 / 社媒 ============ */
.static-page { max-width: 860px; margin: 30px auto 60px; background:#fff; border:1px solid var(--line); border-radius: 14px; padding: 34px 38px; }
.static-page h1 { color: var(--brand-deep, #2a211a); font-size: 26px; margin-bottom: 12px; }
.static-page .static-intro { font-size: 15px; color: #6b5d49; margin-bottom: 16px; line-height: 1.9; }
.static-page p { line-height: 1.95; color: #4a4133; margin: 10px 0; }
.auth-hint { font-size: 12px; color: var(--muted, #a89068); margin-top: 4px; min-height: 16px; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-btn { white-space: nowrap; font-size: 12.5px; padding: 10px 14px; }
.social-row { display: flex; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.social-link { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-deep, #8a6a24); font-weight: 600; text-decoration: none; font-size: 13.5px; }
.social-link:hover { color: var(--brand-deep, #2a211a); }
.contact-line { display: block; margin-top: 12px; font-size: 13px; color: var(--muted, #8a7652); text-decoration: underline; }
.wa-fab { position: fixed; bottom: 26px; inset-inline-end: 26px; width: 54px; height: 54px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,.28);
  z-index: 9998; transition: transform .15s; }
.wa-fab:hover { transform: scale(1.08); }
html[dir="rtl"] .code-row { flex-direction: row-reverse; }
html[dir="rtl"] .static-page h1 { text-align: right; }
