:root {
  --ink: #1a1a1a;
  --muted: #767676;
  --line: #e8e8e8;
  --soft: #f7f6f4;
}

body {
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: #fff;
}

a { text-decoration: none; }

/* ---------------------------------------------------------------- 导航 */
.navbar-brand { font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 1.05rem; }
.navbar .nav-link { color: var(--ink); font-size: .92rem; letter-spacing: .04em; }
.navbar .nav-link:hover { color: var(--muted); }

/* -------------------------------------------------------------- 首页主图 */
.hero-slide {
  display: flex;
  align-items: center;
  min-height: 460px;
  background-color: #efeeec;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-slide-plain { background-image: linear-gradient(135deg, #e9e6e1 0%, #d8d3cb 100%); }
.hero-overlay {
  width: 100%;
  /* 左右各预留 15% 给轮播箭头控制区，避免窄屏下文字被箭头遮挡 */
  padding: 60px 15%;
  background: linear-gradient(90deg, rgba(255, 255, 255, .92) 0%, rgba(255, 255, 255, .55) 55%, rgba(255, 255, 255, 0) 100%);
}
.hero-overlay h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 600; letter-spacing: .01em; margin-bottom: .5rem; }
.hero-overlay p { color: #4a4a4a; margin-bottom: 1.1rem; }
.carousel-control-prev-icon,
.carousel-control-next-icon { filter: invert(1) grayscale(1); }

/* ------------------------------------------------------------ 通用区块 */
.section { padding: 56px 0; }
.section-alt { background: var(--soft); }
.section-title { font-size: 1.35rem; font-weight: 600; letter-spacing: .02em; }
.section-subtitle { color: var(--muted); font-size: .95rem; }

.category-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: .95rem;
  letter-spacing: .02em;
  transition: .2s;
}
.category-tile:hover { border-color: var(--ink); background: #fff; color: var(--ink); }

/* ------------------------------------------------------------ 产品卡片 */
.product-card { display: block; color: var(--ink); }
.card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 6px;
  background: var(--soft);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-placeholder,
.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  color: #c9c4bc;
  background: linear-gradient(135deg, #f2f0ec 0%, #e4e0d9 100%);
  text-transform: uppercase;
}
.gallery-placeholder { aspect-ratio: 3 / 4; border-radius: 6px; }

.status-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(26, 26, 26, .85);
  color: #fff;
  font-size: .68rem;
  letter-spacing: .08em;
  padding: 4px 8px;
  border-radius: 3px;
}
.status-badge.status-inline { position: static; display: inline-block; }
.status-sold_out { background: #8a8a8a; }
.status-preorder { background: #a8843c; }

.card-body-custom { padding-top: .6rem; }
.product-name { font-size: .94rem; line-height: 1.35; }
.product-tags { margin-top: .4rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.tag-chip {
  display: inline-block;
  font-size: .7rem;
  letter-spacing: .04em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 9px;
}
a.tag-chip:hover { border-color: var(--ink); color: var(--ink); }

/* -------------------------------------------------------------- 列表页 */
.filter-bar {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}
.filter-label {
  display: block;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .25rem;
}
.result-count { color: var(--muted); font-size: .85rem; margin: 16px 0 12px; }
.empty-state { text-align: center; padding: 60px 0; color: var(--muted); }
.empty-state p { margin-bottom: 16px; }

.breadcrumb-line { font-size: .82rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb-line a { color: var(--muted); }
.breadcrumb-line a:hover { color: var(--ink); }
.breadcrumb-line span { margin: 0 .35rem; }
.breadcrumb-line .current { color: var(--ink); }

/* -------------------------------------------------------------- 详情页 */
.product-carousel { border-radius: 6px; overflow: hidden; background: var(--soft); }
.gallery-image { aspect-ratio: 3 / 4; object-fit: cover; cursor: zoom-in; }
.thumb-strip { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.thumb-item {
  width: 68px;
  height: 88px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: none;
  cursor: pointer;
}
.thumb-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-item.active { border-color: var(--ink); }

.product-title { font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
.sku-text { color: var(--muted); font-size: .8rem; margin-left: .75rem; }

.spec-list { display: grid; grid-template-columns: 92px 1fr; gap: .35rem 1rem; margin-top: 1.25rem; font-size: .9rem; }
.spec-list dt { color: var(--muted); font-weight: 400; }
.spec-list dd { margin: 0; }

.buy-actions { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.5rem; }
.btn-whatsapp { background: #25d366; border-color: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1eb455; border-color: #1eb455; color: #fff; }

.product-description {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-size: .95rem;
  line-height: 1.75;
  color: #3d3d3d;
  white-space: pre-line;
}

/* ---------------------------------------------------------- 联系与页脚 */
.contact-section { background: var(--soft); padding: 56px 0; margin-top: 40px; }
.btn-contact { padding: .6rem 1.5rem; border-radius: 40px; font-size: .92rem; }
.btn-contact.btn-whatsapp:hover { color: #fff; }

.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 28px 0; text-align: center; }
.footer-intro { color: var(--muted); font-size: .88rem; max-width: 560px; margin: 0 auto 10px; }
.footer-copy { color: #9a9a9a; font-size: .8rem; }

/* ---------------------------------------------------------------- 后台 */
.admin-body { background: #f4f5f7; }
.admin-sidebar {
  background: #1f2430;
  min-height: 100vh;
  color: #c8ccd6;
  padding: 20px 0;
}
.admin-sidebar .brand { color: #fff; font-weight: 600; padding: 0 20px 18px; letter-spacing: .06em; display: block; }
.admin-sidebar a {
  display: block;
  color: #c8ccd6;
  padding: 10px 20px;
  font-size: .92rem;
}
.admin-sidebar a:hover { background: #2a3040; color: #fff; }
.admin-sidebar a.active { background: #2f3648; color: #fff; border-left: 3px solid #6c8ae4; padding-left: 17px; }
.admin-main { padding: 24px 28px 60px; }
.admin-title { font-size: 1.3rem; font-weight: 600; margin-bottom: 18px; }
.admin-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 20px; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.table-thumb { width: 48px; height: 64px; object-fit: cover; border-radius: 4px; background: #eee; display: block; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f4f5f7; }
.login-card { width: 100%; max-width: 380px; }
.image-manager { display: flex; flex-wrap: wrap; gap: 12px; }
.image-item { width: 120px; border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; background: #fff; }
.image-item img { width: 100%; height: 150px; object-fit: cover; display: block; }
.image-item .image-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; }
.image-item .image-actions button { font-size: .7rem; padding: 2px 6px; }
.image-item.is-main { border-color: #1f2430; }
.image-item .main-flag { background: #1f2430; color: #fff; font-size: .68rem; padding: 2px 6px; display: block; text-align: center; }
.dropzone {
  border: 1px dashed #c3c8d4;
  border-radius: 8px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  background: #fbfbfc;
  cursor: pointer;
}
.dropzone.dragover { border-color: #6c8ae4; background: #f0f4ff; }
