/* SheBag 女包商城 全站样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
  background: #faf7f9; color: #333; line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* 顶部导航 */
.site-header { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.logo { font-size: 22px; font-weight: bold; color: #b0406b; letter-spacing: 1px; }
.logo span { font-size: 13px; color: #999; font-weight: normal; }
.main-nav { display: flex; gap: 18px; flex: 1; }
.main-nav a { padding: 4px 2px; color: #555; font-size: 15px; }
.main-nav a:hover { color: #b0406b; border-bottom: 2px solid #b0406b; }
.user-area { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.cart-link { position: relative; }
.badge {
  background: #e0567f; color: #fff; border-radius: 10px;
  padding: 0 6px; font-size: 12px; margin-left: 2px;
}

/* 按钮 */
.btn { display: inline-block; border: 1px solid #ddd; background: #fff; color: #444;
  padding: 8px 20px; border-radius: 4px; cursor: pointer; font-size: 14px; }
.btn:hover { border-color: #b0406b; color: #b0406b; }
.btn-primary { background: #b0406b; color: #fff !important; border-color: #b0406b; }
.btn-primary:hover { background: #96355a; }
.btn-sm { padding: 4px 14px; font-size: 13px; }
.btn-danger { color: #c0392b; border-color: #e5b4ad; }
.btn-mini { padding: 2px 10px; font-size: 12px; }
.optional { color: #999; font-size: 13px; }

/* 提示条 */
.alert { margin: 12px 0; padding: 10px 16px; border-radius: 4px; font-size: 14px; }
.alert-success { background: #eaf7ee; color: #276737; border: 1px solid #bfe3c8; }
.alert-info { background: #e8f1fb; color: #1d5c9e; border: 1px solid #bcd7f0; }
.alert-warning { background: #fdf3e0; color: #96601a; border: 1px solid #f0dcae; }
.alert-error, .alert-danger { background: #fbeae8; color: #a33225; border: 1px solid #efc4bd; }

/* 首页栏目 */
.section { margin: 28px 0; }
.section-title { font-size: 20px; margin-bottom: 14px; padding-left: 10px;
  border-left: 4px solid #b0406b; }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.product-card { background: #fff; border-radius: 8px; overflow: hidden;
  transition: box-shadow .2s, transform .2s; }
.product-card:hover { box-shadow: 0 6px 18px rgba(176,64,107,.15); transform: translateY(-3px); }
.product-card .pic { aspect-ratio: 1; background: #f6edf1; display: flex;
  align-items: center; justify-content: center; overflow: hidden; }
.product-card .pic svg { width: 100%; height: 100%; }
.product-card .info { padding: 12px 14px 14px; }
.product-card .name { font-size: 14px; height: 42px; overflow: hidden; }
.product-card .brand { color: #999; font-size: 12px; }
/* 价格区：优惠价（左，红色大字） + 定制价 / 特惠价（灰色背景+删除线） */
.price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.price { font-size: 17px; font-weight: bold; }
.price-primary { color: #d6336c; }
.price-strike { color: #999; font-size: 13px; text-decoration: line-through; margin-left: 4px; }
.tags { display: flex; gap: 6px; }
.tag { font-size: 11px; padding: 1px 8px; border-radius: 3px; }
.tag-new { background: #fdeef4; color: #b0406b; }
.tag-hot { background: #fdeeee; color: #c0392b; }
/* 卡片底部：左侧新品/人气标签，右下角复购率 */
.card-foot { display: flex; justify-content: space-between; align-items: center;
  gap: 8px; margin-top: 8px; }
.repurchase { color: #b0406b; font-size: 12px; white-space: nowrap; margin-left: auto; }

/* 详情页 */
.detail-wrap { display: grid; grid-template-columns: 420px 1fr; gap: 32px;
  background: #fff; padding: 28px; border-radius: 10px; margin-top: 24px; }

/* 右栏隐藏时：白底左起容器左边 0，右至图片右缘+28px（476px），图片左右各留白 28px；上下边距维持 28px */
.detail-wrap.detail-no-right {
    background: linear-gradient(90deg, #fff 0px, #fff 476px, transparent 476px);
}
.detail-pic { aspect-ratio: 1; background: #f6edf1; border-radius: 8px; overflow: hidden; }
.detail-pic svg { width: 100%; height: 100%; }
.detail-name { font-size: 22px; margin-bottom: 8px; }
.detail-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 14px 0; }
.detail-price .price-primary { font-size: 28px; color: #d6336c; font-weight: bold; }
.detail-price .price-strike { font-size: 14px; }
.detail-meta { color: #777; font-size: 14px; margin: 4px 0; }
.detail-spec { margin: 12px 0; font-size: 14px; color: #555; }
.detail-spec dt { color: #999; margin-bottom: 6px; font-size: 13px; }
.detail-spec .spec-item { display: inline-block; margin: 0 8px 6px 0; padding: 3px 12px;
  background: #faf0f4; border: 1px solid #f0dce4; border-radius: 12px; color: #8a4a63;
  font-size: 13px; }
.detail-repurchase { display: inline-block; margin: 6px 0 2px; padding: 4px 12px;
  background: linear-gradient(90deg, #b0406b, #d6668f); color: #fff;
  border-radius: 12px; font-size: 13px; }
.qty-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.qty-input { width: 78px; text-align: center; padding: 6px; border: 1px solid #b0406b; border-right: none; border-radius: 4px 0 0 4px; outline: none; -webkit-appearance: none; -moz-appearance: textfield; appearance: textfield; background: #fff; }
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.qty-input.qty-invalid { border-color: #c0392b; background: #fdf3f2; }
.qty-input:focus, .qty-input:focus-visible { border-color: #b0406b; }
.qty-box { display: inline-flex; align-items: stretch; }
.qty-arrows { display: flex; flex-direction: column; border: 1px solid #b0406b; border-radius: 0 4px 4px 0; background: #fff; }
.qty-arrows button { border: none; background: none; width: 24px; flex: 1; min-height: 15px; cursor: pointer; color: #b0406b; font-size: 11px; line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0; }
.qty-arrows button:first-child { border-bottom: 1px solid #f0dce4; }
.qty-arrows button:hover { background: #fdeef4; }
.qty-hint { font-size: 15px; color: #999; }
.tier-table { border-collapse: collapse; margin: 10px 0 4px; }
.tier-table td { padding: 5px 18px 5px 0; font-size: 13px; color: #888; }
.tier-table td.tier-name { color: #666; }
.tier-table td.tier-price { color: #d6336c; font-weight: bold; }
.tier-table tr.tier-active td { color: #b0406b; font-weight: bold; }
.current-unit-price { font-size: 14px; color: #555; margin: 8px 0 0; }
.current-unit-price .val { color: #d6336c; font-size: 20px; font-weight: bold; }
.action-row { display: flex; gap: 12px; }
.action-row form { display: inline; }

/* 表单页（登录/注册等） */
.auth-card { max-width: 460px; margin: 48px auto; background: #fff;
  padding: 36px 40px; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.05); }
.auth-card h2 { color: #b0406b; margin-bottom: 26px; text-align: center; }

/* 认证表单（form.as_p 渲染：<p><label><input></p>） */
.auth-card form p { margin: 0 0 22px; }
.auth-card form p:last-of-type { margin-bottom: 26px; }
.auth-card form label { display: block; font-size: 14px; color: #555; margin-bottom: 8px; }
.auth-card form input[type=text],
.auth-card form input[type=password],
.auth-card form input[type=email],
.auth-card form input[type=number],
.auth-card form input[type=tel] {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid #aaa; border-radius: 6px;
  font-size: 15px; color: #333; background: #fff; transition: border-color .2s, box-shadow .2s; }
.auth-card form textarea,
.auth-card form select {
  width: 100%; padding: 10px 14px; border: 1px solid #aaa; border-radius: 6px;
  font-size: 15px; color: #333; background: #fff; font-family: inherit; }
.auth-card form input[type=text]:focus,
.auth-card form input[type=password]:focus,
.auth-card form input[type=email]:focus,
.auth-card form input[type=number]:focus,
.auth-card form input[type=tel]:focus,
.auth-card form textarea:focus,
.auth-card form select:focus {
  outline: none; border-color: #b0406b; box-shadow: 0 0 0 3px rgba(176,64,107,.12); }
.auth-card form .errorlist { list-style: none; margin: 6px 0 0; color: #c0392b; font-size: 13px; }
.auth-card form .helptext { display: block; margin: 6px 0 0; color: #999; font-size: 12px; }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 14px; color: #555; margin-bottom: 6px; }
.form-row input, .form-row textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: #b0406b; }
.form-row select {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px;
  font-size: 14px; background: #fff; }
.errorlist { color: #c0392b; font-size: 13px; margin-top: 4px; list-style: none; }
.help-text { font-size: 12px; color: #999; margin-top: 4px; }
.form-group-title { font-size: 15px; color: #b0406b; margin: 22px 0 12px;
  border-left: 3px solid #b0406b; padding-left: 8px; }
.form-group-title small { color: #aaa; font-weight: normal; }
.radio-group, .check-group { display: flex; flex-wrap: wrap; gap: 6px 18px;
  padding: 6px 0; }
.radio-group label, .check-group label { display: inline-flex; align-items: center;
  gap: 4px; font-size: 14px; color: #555; margin-bottom: 0; }
.radio-group input, .check-group input { width: auto; accent-color: #b0406b; }
.notice-warn { margin-bottom: 16px; padding: 12px 16px; background: #fdf0ef;
  border: 1px solid #e5a3a0; border-radius: 6px; font-size: 14px; color: #8a3a35; }
.auth-links { margin-top: 16px; font-size: 13px; color: #888;
  display: flex; justify-content: space-between; }
.auth-links a { color: #b0406b; }
.full-btn { width: 100%; padding: 11px; font-size: 15px; }

/* 演示模式提示 */
.demo-box { margin-top: 16px; padding: 12px 16px; background: #fff8e6;
  border: 1px dashed #e3b96a; border-radius: 6px; font-size: 13px; word-break: break-all; }
.demo-box a { color: #b06d20; }

/* 列表工具条 */
.toolbar { display: flex; justify-content: space-between; align-items: center;
  margin: 20px 0 16px; flex-wrap: wrap; gap: 10px; }
.toolbar .search-form { display: flex; gap: 8px; }
.toolbar input[type=text] { padding: 7px 12px; border: 1px solid #ddd; border-radius: 4px; }
.sort-links a { margin-right: 10px; font-size: 14px; color: #666; }
.sort-links a.active { color: #b0406b; font-weight: bold; }

/* 表格 */
.data-table { width: 100%; background: #fff; border-radius: 8px; overflow: hidden;
  border-collapse: collapse; margin-top: 16px; }
.data-table th, .data-table td { padding: 12px 14px; border-bottom: 1px solid #f2e6eb;
  font-size: 14px; text-align: left; }
.data-table th { background: #faf0f4; color: #666; font-weight: normal; }
.data-table .num { text-align: center; }

/* 购物车 */
.cart-summary { background: #fff; padding: 18px 22px; border-radius: 8px;
  margin-top: 16px; display: flex; justify-content: space-between; align-items: center; }
.cart-summary .total { color: #d6336c; font-size: 22px; font-weight: bold; }
.empty-tip { text-align: center; color: #aaa; padding: 60px 0; font-size: 15px; }

/* 个人中心：资料编辑 + 管理面板 */
.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; }
.profile-sidebar { align-self: start; }
.profile-card { background: #fff; border-radius: 10px; padding: 22px; box-shadow: 0 2px 12px rgba(0,0,0,.05); margin-bottom: 20px; }
.profile-card h3 { font-size: 16px; color: #b0406b; margin-bottom: 14px; }
.profile-card .field-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #f5edf1; font-size: 14px; }
.profile-card .field-row:last-child { border-bottom: none; }
.profile-card .field-row label { color: #777; }
.profile-card .field-row .val { color: #333; }
.profile-nav { display: flex; flex-direction: column; gap: 8px; }
.profile-nav a { padding: 10px 14px; border-radius: 6px; font-size: 14px; color: #555; background: #fff; }
.profile-nav a:hover { background: #fdeef4; color: #b0406b; }
.panel { background: #fff; border-radius: 10px; padding: 22px; box-shadow: 0 2px 12px rgba(0,0,0,.05); margin-bottom: 24px; }
.panel h3 { font-size: 16px; color: #b0406b; margin-bottom: 14px; display: flex; gap: 12px; align-items: center; }
.panel h3 .count { font-size: 12px; color: #999; font-weight: normal; }
.panel .panel-actions { margin-bottom: 12px; text-align: right; }
.mini-thumb { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; background: #f6edf1; }
.panel form { display: inline; }
.panel .btn-mini { padding: 2px 8px; font-size: 12px; }

@media (max-width: 860px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-wrap { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .profile-grid { grid-template-columns: 1fr; }
}

/* 页脚 */
.site-footer { margin-top: 60px; padding: 24px 0; background: #fff;
  border-top: 1px solid #f0e4e9; text-align: center; color: #999; font-size: 13px; }
.muted { color: #bbb; }

@media (max-width: 860px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-wrap { grid-template-columns: 1fr; }
  .main-nav { display: none; }
}

/* 详情页产品相关图片缩略图 + 点击放大 */
.thumb-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.thumb { width: 64px; height: 64px; padding: 0; border: 2px solid #f0e2e8; border-radius: 6px;
  background: #f6edf1; overflow: hidden; cursor: zoom-in; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { border-color: #d68aa8; }
.thumb.is-active { border-color: #b0406b; box-shadow: 0 0 0 2px rgba(176,64,107,.15); }
.thumb-tip { color: #aaa; font-size: 12px; margin-top: 8px; }

.lightbox { position: fixed; inset: 0; z-index: 999; display: none;
  align-items: center; justify-content: center; padding: 40px;
  background: rgba(28,12,20,.82); }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 86vw; max-height: 82vh; border-radius: 8px; background: #fff;
  box-shadow: 0 12px 40px rgba(0,0,0,.45); }
.lightbox-close { position: absolute; top: 18px; right: 26px; width: 38px; height: 38px;
  border: none; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer; }
.lightbox-close:hover { background: rgba(255,255,255,.3); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px;
  height: 46px; border: none; border-radius: 50%; background: rgba(255,255,255,.16);
  color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.lightbox-nav:hover { background: rgba(255,255,255,.3); }
.lightbox-prev { left: 22px; }
.lightbox-next { right: 22px; }
.lightbox-caption { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center;
  color: #f0dde5; font-size: 13px; }

/* 购物车价格档位提示 */
.tier-tip { font-size: 12px; color: #999; }
.tier-badge { display: inline-block; padding: 1px 8px; border-radius: 10px;
  background: #faf0f4; color: #b0406b; font-size: 12px; }

/* 首页宽幅 banner 轮播区（导航菜单下方、新品首发上方） */
.banner-section { margin-top: 20px; }
.banner-carousel { position: relative; width: 100%; aspect-ratio: 1080 / 420;
  background: #f6edf1; border-radius: 10px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(176,64,107,.12); }
.banner-track { position: absolute; inset: 0; }
.banner-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none;
  transition: opacity .5s ease; }
.banner-slide.is-active { opacity: 1; pointer-events: auto; }
.banner-link { display: block; width: 100%; height: 100%; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 26px;
  color: #fff; font-size: 18px; letter-spacing: .5px;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.45)); }
.banner-arrow { position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: none; border-radius: 50%;
  background: rgba(0,0,0,.32); color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s, background .2s; }
.banner-carousel:hover .banner-arrow { opacity: 1; }
.banner-arrow:hover { background: rgba(176,64,107,.85); }
.banner-prev { left: 14px; }
.banner-next { right: 14px; }
.banner-dots { position: absolute; left: 0; right: 0; bottom: 12px;
  display: flex; justify-content: center; gap: 8px; }
.banner-dot { width: 10px; height: 10px; padding: 0; border: none; border-radius: 50%;
  background: rgba(255,255,255,.62); cursor: pointer; transition: background .2s, transform .2s; }
.banner-dot:hover { background: rgba(255,255,255,.85); }

/* 首页人气推荐 - 搜索和排序栏 */
.search-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 8px;
}
.search-label {
  display: inline-flex;
  align-items: center;
  padding-left: 10px;
  border-left: 4px solid #b0406b;
}
.search-label-text {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}
.search-form {
  display: flex;
  gap: 10px;
  flex: 1;
  max-width: 400px;
  margin-left: 24px;
}
.search-form input[type="text"] {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
}
.search-form input[type="text"]:focus {
  border-color: #b0406b;
}
.sort-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #666;
}
.sort-links a {
  color: #666;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all .2s;
}
.sort-links a:hover,
.sort-links a.active {
  color: #b0406b;
  background: #f8f0f4;
}
.banner-dot.is-active { background: #b0406b; transform: scale(1.2); }
