/* AnF Shoes MALL — 移动端优先样式 */
:root {
  --red: #d92332;
  --red-dark: #b01c29;
  --dark: #14161a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f5f6f8;
  --card: #ffffff;
  --gold: #a97b1f;
  --green: #15803d;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(20, 22, 26, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--dark);
  font-size: 15px;
  line-height: 1.5;
  padding-bottom: 64px; /* 底部导航空间 */
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; }
img { display: block; max-width: 100%; }
input, select, textarea {
  font-family: var(--font); font-size: 15px; width: 100%;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--dark);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(217, 35, 50, .35); border-color: var(--red);
}
label { font-size: 13px; font-weight: 600; color: #374151; display: block;
        margin-bottom: 4px; }

/* ---------- 顶部栏 ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
}
.logo { font-weight: 800; font-size: 17px; letter-spacing: -.3px; }
.logo .anf { color: var(--red); }
.logo .mall { background: var(--dark); color: #fff; border-radius: 6px;
              padding: 1px 6px; font-size: 12px; margin-left: 4px;
              vertical-align: 2px; }
.header .spacer { flex: 1; }
.icon-btn {
  background: #f3f4f6; border-radius: 10px; width: 38px; height: 38px;
  display: grid; place-items: center; font-size: 17px; position: relative;
}
.cart-badge {
  position: absolute; top: -5px; right: -5px; background: var(--red);
  color: #fff; font-size: 11px; font-weight: 700; min-width: 18px;
  height: 18px; border-radius: 9px; display: grid; place-items: center;
  padding: 0 4px;
}
.search-row { padding: 10px 14px; background: #fff; }
.search-row input { background: #f3f4f6; border: none; }

/* ----------  Hero / 卖点 ---------- */
.hero {
  background: linear-gradient(135deg, #14161a 0%, #2b1216 60%, #4a1420 100%);
  color: #fff; padding: 26px 16px 24px; text-align: center;
}
.hero .authic {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255, 215, 120, .5); color: #ffd678;
  font-size: 12px; font-weight: 700; letter-spacing: .8px;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
  text-transform: uppercase;
}
.hero h1 { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.hero p { color: #d1d5db; font-size: 13px; margin-top: 6px; }
.deal-row { display: flex; gap: 8px; justify-content: center; margin-top: 16px;
            flex-wrap: wrap; }
.deal-pill {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px; padding: 8px 12px; min-width: 104px;
}
.deal-pill b { display: block; font-size: 17px; color: #ff6b76; }
.deal-pill span { font-size: 11px; color: #d1d5db; }

/* ----------  分类 chips / 排序 ---------- */
.filter-bar {
  display: flex; gap: 8px; padding: 12px 14px 4px; overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; font-size: 13px;
  font-weight: 600; color: #374151;
}
.chip.active { background: var(--dark); color: #fff; border-color: var(--dark); }
.tool-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px 12px;
}
.tool-row .count { font-size: 13px; color: var(--muted); }
.tool-row select { width: auto; padding: 7px 10px; font-size: 13px; }

/* ----------  商品网格 ---------- */
.grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  padding: 0 14px;
}
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  position: relative;
}
.card .thumb {
  aspect-ratio: 1 / 1; background: #eef0f3; position: relative;
  display: grid; place-items: center; overflow: hidden;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .thumb .noimg { font-size: 40px; color: #c3c8d0; }
.hot-flag {
  position: absolute; top: 8px; left: 8px; background: var(--red);
  color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px;
  border-radius: 6px; letter-spacing: .3px;
}
.card .body { padding: 10px; display: flex; flex-direction: column; gap: 4px;
              flex: 1; }
.card .brand { font-size: 11px; color: var(--muted); font-weight: 700;
               text-transform: uppercase; letter-spacing: .4px; }
.card .name {
  font-size: 13px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 36px;
}
.card .price-row { margin-top: auto; display: flex; align-items: baseline;
                   gap: 6px; }
.price-now { color: var(--red); font-weight: 800; font-size: 16px; }
.price-was { color: #9ca3af; font-size: 12px; text-decoration: line-through; }
.off-tag {
  background: #fde8ea; color: var(--red); font-size: 10px; font-weight: 800;
  padding: 2px 5px; border-radius: 4px;
}
.card .stars { font-size: 11px; color: #f59e0b; }

/* ----------  区块标题 ---------- */
.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 800; padding: 18px 14px 10px;
}
.section-title .more { margin-left: auto; font-size: 12px; color: var(--red);
                       font-weight: 700; }

/* ----------  商品详情 ---------- */
.overlay {
  position: fixed; inset: 0; background: #fff; z-index: 100;
  overflow-y: auto; display: none;
}
.overlay.show { display: block; }
.detail-hero {
  position: relative; background: #eef0f3; aspect-ratio: 4 / 3;
  display: grid; place-items: center;
}
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.back-btn {
  position: absolute; top: 12px; left: 12px; width: 38px; height: 38px;
  background: rgba(255,255,255,.92); border-radius: 50%; display: grid;
  place-items: center; font-size: 18px; box-shadow: var(--shadow);
}
.detail-body { padding: 14px; }
.detail-brand { font-size: 12px; color: var(--muted); font-weight: 700;
                text-transform: uppercase; letter-spacing: .5px; }
.detail-name { font-size: 19px; font-weight: 800; margin: 4px 0 8px; }
.detail-price {
  display: flex; align-items: baseline; gap: 10px; margin: 10px 0;
}
.detail-price .now { font-size: 26px; font-weight: 800; color: var(--red); }
.detail-price .was { font-size: 14px; color: #9ca3af;
                     text-decoration: line-through; }
.detail-price .off { background: var(--red); color: #fff; font-size: 12px;
                     font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.bundle-hint {
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
  font-size: 12px; font-weight: 600; border-radius: 10px;
  padding: 8px 10px; margin: 8px 0 12px;
}
.size-label { font-size: 13px; font-weight: 700; margin: 12px 0 6px; }
.size-row { display: flex; flex-wrap: wrap; gap: 8px; }
.size-btn {
  min-width: 52px; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; font-weight: 600; font-size: 14px;
  text-align: center;
}
.size-btn.active { border-color: var(--dark); background: var(--dark);
                   color: #fff; }
.qty-row { display: flex; align-items: center; gap: 14px; margin: 16px 0; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--line);
               border-radius: 10px; overflow: hidden; }
.qty-stepper button { width: 40px; height: 40px; background: #f9fafb;
                      font-size: 18px; font-weight: 700; }
.qty-stepper .q { width: 44px; text-align: center; font-weight: 700; }
.buy-row { display: flex; gap: 10px; margin: 18px 0 8px; }
.btn {
  flex: 1; padding: 14px 10px; border-radius: 12px; font-size: 15px;
  font-weight: 800; text-align: center;
}
.btn-cart { background: #fff; color: var(--dark); border: 2px solid var(--dark); }
.btn-buy { background: var(--red); color: #fff; }
.btn-buy:disabled, .btn-cart:disabled { opacity: .5; }
.detail-desc { color: #374151; font-size: 14px; white-space: pre-line;
               margin: 14px 0; }
.policy-box {
  background: #f9fafb; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin: 12px 0; font-size: 13px; color: #374151;
}
.policy-box b { display: block; margin-bottom: 4px; }
.policy-box ul { padding-left: 18px; }

/* ----------  评价 ---------- */
.review-summary {
  display: flex; align-items: center; gap: 10px; margin: 16px 0 8px;
}
.review-summary .big { font-size: 26px; font-weight: 800; }
.review {
  border-top: 1px solid var(--line); padding: 12px 0;
}
.review .head { display: flex; justify-content: space-between; font-size: 12px;
                color: var(--muted); }
.review .title { font-weight: 700; font-size: 14px; margin: 4px 0 2px; }
.review .content { font-size: 13px; color: #374151; }
.stars { color: #f59e0b; letter-spacing: 1px; }

/* ----------  购物车 ---------- */
.cart-item {
  display: flex; gap: 12px; background: #fff; border-radius: var(--radius);
  padding: 10px; margin: 0 14px 10px; box-shadow: var(--shadow);
}
.cart-item .thumb {
  width: 84px; height: 84px; border-radius: 10px; background: #eef0f3;
  overflow: hidden; flex-shrink: 0; display: grid; place-items: center;
}
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .name { font-size: 13px; font-weight: 700;
                   display: -webkit-box; -webkit-line-clamp: 2;
                   -webkit-box-orient: vertical; overflow: hidden; }
.cart-item .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cart-item .price { color: var(--red); font-weight: 800; font-size: 15px;
                    margin-top: 4px; }
.cart-item .ops { display: flex; align-items: center; gap: 10px;
                  margin-top: 6px; }
.link-btn { background: none; color: var(--muted); font-size: 12px;
            text-decoration: underline; }
.summary {
  background: #fff; border-radius: var(--radius); padding: 14px;
  margin: 4px 14px 16px; box-shadow: var(--shadow); font-size: 14px;
}
.summary .row { display: flex; justify-content: space-between; padding: 5px 0; }
.summary .row.total { border-top: 1px solid var(--line); margin-top: 6px;
                      padding-top: 10px; font-size: 17px; font-weight: 800; }
.summary .row.total .amount { color: var(--red); }
.free-ship-hint { color: var(--green); font-size: 12px; font-weight: 600; }

/* ----------  表单 / 结算 ---------- */
.form-card {
  background: #fff; border-radius: var(--radius); padding: 14px;
  margin: 0 14px 16px; box-shadow: var(--shadow);
}
.form-card h3 { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.form-grid { display: grid; gap: 10px; }
.form-grid .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-note { font-size: 12px; color: var(--muted); margin: 6px 0 12px; }

/* ----------  订单 ---------- */
.order-card {
  background: #fff; border-radius: var(--radius); padding: 14px;
  margin: 0 14px 12px; box-shadow: var(--shadow);
}
.order-card .head { display: flex; justify-content: space-between;
                    align-items: center; }
.order-no { font-size: 12px; color: var(--muted); font-weight: 600; }
.status-chip {
  font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .3px;
}
.st-pending_payment { background: #fef3c7; color: #92400e; }
.st-paid { background: #dbeafe; color: #1e40af; }
.st-shipped { background: #dcfce7; color: #166534; }
.st-completed { background: #f3f4f6; color: #374151; }
.st-cancelled { background: #fee2e2; color: #991b1b; }
.order-items { margin: 10px 0; }
.order-line { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.order-line .thumb {
  width: 52px; height: 52px; border-radius: 8px; background: #eef0f3;
  overflow: hidden; display: grid; place-items: center; flex-shrink: 0;
}
.order-line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-line .t { font-size: 13px; font-weight: 600; }
.order-line .s { font-size: 12px; color: var(--muted); }
.order-foot { display: flex; justify-content: space-between; align-items: center;
              border-top: 1px solid var(--line); padding-top: 10px;
              font-size: 13px; }
.order-foot .total { font-weight: 800; color: var(--red); font-size: 16px; }
.tracking-box {
  background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534;
  border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-top: 10px;
}
.btn-sm {
  padding: 9px 16px; border-radius: 10px; font-size: 13px; font-weight: 800;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-ghost { background: #fff; border: 1.5px solid var(--line); color: #374151; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-block { width: calc(100% - 28px); margin: 4px 14px 16px; }

/* ----------  我的 / 账户 ---------- */
.profile-card {
  background: #fff; border-radius: var(--radius); padding: 16px;
  margin: 14px; box-shadow: var(--shadow);
}
.profile-card .who { font-size: 17px; font-weight: 800; }
.profile-card .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.guest-banner {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: 10px; padding: 10px 12px; font-size: 12px; margin-top: 12px;
}
.menu-list { background: #fff; border-radius: var(--radius); margin: 0 14px 16px;
             box-shadow: var(--shadow); overflow: hidden; }
.menu-list button {
  display: flex; width: 100%; align-items: center; gap: 10px;
  padding: 14px; background: none; font-size: 14px; font-weight: 600;
  border-bottom: 1px solid var(--line); text-align: left;
}
.menu-list button:last-child { border-bottom: none; }
.menu-list .arrow { margin-left: auto; color: #9ca3af; }

/* ----------  底部导航（移动端） ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.tabbar button {
  flex: 1; background: none; display: grid; place-items: center; gap: 2px;
  font-size: 10px; font-weight: 700; color: var(--muted); position: relative;
}
.tabbar button .ic { font-size: 20px; }
.tabbar button.active { color: var(--red); }
.tabbar .cart-badge { top: -2px; right: calc(50% - 20px); }

/* ----------  WhatsApp 悬浮窗 ---------- */
.wa-fab {
  position: fixed; right: 14px; bottom: 78px; z-index: 70;
  background: #25d366; color: #fff; border-radius: 999px;
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; font-size: 14px; font-weight: 800;
  box-shadow: 0 6px 18px rgba(37, 211, 102, .4);
}
.wa-fab svg { width: 22px; height: 22px; fill: currentColor; }

/* ----------  Toast ---------- */
#toast-wrap {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: grid; gap: 8px; width: min(92vw, 420px);
}
.toast {
  background: var(--dark); color: #fff; border-radius: 12px;
  padding: 12px 14px; font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: drop .25s ease;
}
.toast.err { background: var(--red); }
.toast.ok { background: var(--green); }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } }

/* ----------  杂项 ---------- */
.empty {
  text-align: center; color: var(--muted); padding: 48px 20px;
  font-size: 14px;
}
.empty .ic { font-size: 44px; display: block; margin-bottom: 10px; }
.loader { text-align: center; padding: 30px; color: var(--muted); }
.skeleton {
  background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 50%, #eef0f3 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite;
  border-radius: var(--radius); height: 240px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.page-pad { padding: 14px 0 20px; }
.footer {
  background: #fff; border-top: 1px solid var(--line); padding: 20px 14px 30px;
  font-size: 12px; color: var(--muted); text-align: center;
}
.footer b { color: var(--dark); }
.footer .links { display: flex; gap: 14px; justify-content: center;
                 margin: 10px 0; flex-wrap: wrap; }
.footer .links a { font-weight: 700; color: #374151; }
.hidden { display: none !important; }

/* ----------  桌面端适配 ---------- */
@media (min-width: 768px) {
  body { padding-bottom: 0; font-size: 15px; }
  .header, .search-row, .filter-bar, .tool-row, .grid, .section-title {
    max-width: 1200px; margin: 0 auto;
  }
  .hero { padding: 54px 20px 48px; }
  .hero h1 { font-size: 40px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0 20px; }
  .tabbar { display: none; }
  .desk-nav { display: flex !important; gap: 4px; }
  .desk-nav button {
    background: none; font-size: 14px; font-weight: 700; color: #374151;
    padding: 8px 12px; border-radius: 8px;
  }
  .desk-nav button.active { color: var(--red); background: #fde8ea; }
  .wa-fab { bottom: 20px; }
  .overlay .detail-body, .overlay .detail-hero { max-width: 760px;
    margin: 0 auto; }
  .form-card, .summary, .order-card, .profile-card, .menu-list, .cart-item,
  .btn-block { max-width: 760px; margin-left: auto; margin-right: auto; }
  .footer { max-width: 1200px; margin: 0 auto; }
  .buy-row { max-width: 420px; }
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 767px) {
  .desk-nav { display: none; }
}
