/* ==========================================================================
   JINLOOM v2 — WordPress 通用件
   在 design.css 之后加载：只补设计稿里没有的件（导航图标、正文排版、分页…）
   ========================================================================== */

/* ---------- 导航右侧图标 ---------- */
.hdr-ico {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: #e9e1d3;
  opacity: .9;
  transition: opacity .25s, color .25s;
}
.hdr-ico:hover { opacity: 1; color: #fff; }
.hdr-ico svg { width: 23px; height: 23px; }

/* 顶栏品牌字 24px（页脚与抽屉里的 .brand 保持原尺寸） */
.site-header .brand { font-size: 24px; letter-spacing: .2em; }

/* ---------- 导航下拉（Stories ▾ Heritage） ---------- */
.nav-drop { position: relative; display: flex; align-items: center; }
.nav-drop > a { display: inline-flex; align-items: center; gap: 7px; }
.nav-drop > a::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: .55;
}
.nav-drop__menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  padding: 8px 0;
  background: var(--navy);
  border: 1px solid rgba(244, 236, 224, .14);
  border-radius: 4px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .28);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, top .18s ease, visibility .18s;
  z-index: 45;
}
.nav-drop:hover .nav-drop__menu,
.nav-drop:focus-within .nav-drop__menu { opacity: 1; visibility: visible; top: calc(100% + 8px); }
.nav-drop__menu a {
  display: block;
  padding: 9px 20px;
  font-size: 15.5px;
  font-weight: 400;
  letter-spacing: .02em;
  color: #e9e1d3;
  white-space: nowrap;
}
.nav-drop__menu a:hover { background: rgba(244, 236, 224, .08); color: #fff; }
.nav-drop__menu a.is-active { color: #fff; }
.nav-drop__menu a.is-active::after { display: none; }
/* 父项在子页时也保持高亮底线 */
.nav-drop.is-active > a { color: #fff; }
.nav-drop.is-active > a::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  background: var(--gold-soft);
}

/* 抽屉里的子项缩进 */
.drawer__nav a.is-sub { padding-left: 26px; font-size: 12px; opacity: .82; }
.cart-count {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold);
  color: #2b2820;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 15px;
  text-align: center;
}
.cart-count[hidden] { display: none; }

/* 移动端：币种收进抽屉后，图标别挤出导航 */
@media (max-width: 640px) {
  .header-actions { gap: 10px; }
  .hdr-ico { width: 26px; height: 26px; }
  .hdr-ico svg { width: 20px; height: 20px; }
}

/* ---------- 商品卡（WP 版：整块可点 + 独立按钮） ---------- */
.product__link { display: block; }
.product__name { display: block; }
.product__cta { margin-top: auto; }
.product__price { font-variant-numeric: tabular-nums; }

/* ---------- 面包屑 ---------- */
.crumbs {
  background: var(--cream-3);
  border-bottom: 1px solid var(--line-soft);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--muted);
}
.crumbs .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--gold-deep); }
.crumbs__here { color: var(--ink); }

/* ---------- 正文页（政策 / FAQ / 说明） ---------- */
.page-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 56px;
  padding: 46px 0 76px;
  align-items: start;
}
.page-body--woo { grid-template-columns: minmax(0, 1fr); gap: 0; }
.page-head--tight { padding: 40px 0 22px; }

.prose {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-soft);
  max-width: 760px;
}
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  font-size: 24px;
  margin: 38px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.prose h3 { font-size: 18px; margin: 28px 0 8px; }
.prose h4 { font-family: var(--sans); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 24px 0 6px; color: var(--ink); }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 20px; list-style: revert; }
.prose li { margin-bottom: .35em; }
.prose a { color: var(--gold-deep); border-bottom: 1px solid var(--gold-soft); }
.prose a:hover { color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 500; }
.prose img { border-radius: 4px; margin: 18px 0; height: auto; }
.prose blockquote {
  margin: 22px 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--gold-soft);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
}
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 13.5px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.prose th { background: var(--cream-2); font-weight: 400; color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }

/* 文章页：发表日期与分类 */
.post-meta {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}

.page-aside {
  padding: 22px 22px 24px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold-soft);
  border-radius: 4px;
  background: #fffefb;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 24px;
}
.page-aside h4 { font-family: var(--serif); font-size: 17px; margin-bottom: 8px; color: var(--ink); }
.page-aside p { font-size: 12.8px; line-height: 1.7; color: var(--muted); margin-bottom: 14px; }
.page-aside__mail {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--gold-soft);
  word-break: break-all;
}

/* ---------- 联系页 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 54px;
  padding: 46px 0 78px;
  align-items: start;
}
.contact-item { padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.contact-item:first-child { padding-top: 0; }
.contact-item h5 {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 7px;
}
.contact-item a, .contact-item p { font-size: 14px; line-height: 1.75; color: var(--ink-soft); margin: 0 0 4px; }
.contact-item a { border-bottom: 1px solid var(--gold-soft); }
.contact-item a:hover { color: var(--gold-deep); }
.contact-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.contact-form-wrap { background: #fffefb; border: 1px solid var(--line); border-radius: 6px; padding: 26px 26px 24px; box-shadow: var(--shadow-card); }
.contact-form.inquiry-form { grid-template-columns: 1fr 1fr; gap: 13px; }
.contact-form .field--message { grid-column: 1 / -1; }
.contact-form .form-foot { margin-top: 8px; }
.form-success--error { border-color: #e5c9bf; border-left-color: #bb5f47; background: #fdf5f2; }

/* ---------- 搜索页 ---------- */
.page-search { display: flex; gap: 10px; margin-top: 16px; max-width: 460px; }
.page-search input {
  flex: 1 1 auto;
  min-width: 0;
  background: #fffefb;
  border: 1px solid #cfc4ae;
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 13px;
  outline: none;
}
.page-search input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(192, 160, 113, .12); }
.search-sub { font-size: 20px; margin: 26px 0 16px; }
.search-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 30px; }
.search-item {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fffefb;
  transition: border-color .2s, transform .2s;
}
.search-item:hover { border-color: var(--gold-soft); transform: translateY(-1px); }
.search-item__title { display: block; font-family: var(--serif); font-size: 16px; color: var(--ink); margin-bottom: 3px; }
.search-item__excerpt { display: block; font-size: 12.5px; line-height: 1.65; color: var(--muted); }

/* ---------- 列表分页 ---------- */
.shop-pager { padding: 34px 0 10px; }
.shop-pager .woocommerce-pagination ul {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  border: 0;
  margin: 0;
}
.shop-pager .woocommerce-pagination ul li { border: 0; margin: 0; }
.shop-pager .woocommerce-pagination a,
.shop-pager .woocommerce-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffefb;
  font-size: 12px;
  color: var(--ink-soft);
}
.shop-pager .woocommerce-pagination span.current { background: var(--ink); border-color: var(--ink); color: #fdfaf3; }
.shop-pager .woocommerce-pagination a:hover { border-color: var(--gold); color: var(--gold-deep); }

/* ---------- 页脚政策链接 ---------- */
.footer-legal { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-legal a { color: var(--muted); border-bottom: 1px solid transparent; }
.footer-legal a:hover { color: var(--gold-deep); border-bottom-color: var(--gold-soft); }

/* ---------- WordPress 杂项 ---------- */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* WP 会给图片写死 width/height，这里放开高度以免压掉 aspect-ratio */
.prose img, .card__media img, .product__media img, .factory-grid img, .pdp-gallery__main img { height: 100%; }
.prose img { height: auto; }
.admin-bar .site-header { top: 0; }

@media (max-width: 1024px) {
  .page-body, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .page-aside { position: static; }
}
@media (max-width: 720px) {
  .page-body { padding: 30px 0 52px; }
  .contact-grid { padding: 30px 0 52px; gap: 28px; }
  .contact-form.inquiry-form { grid-template-columns: 1fr; }
  .prose { font-size: 14px; }
  .prose h2 { font-size: 21px; }
  .crumbs { font-size: 10.5px; }
}

/* ---------- 商品列表：搜索框 / 排序 / 筛选计数 ---------- */
.filters__search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.filters__search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #cfc4ae;
  border-radius: 999px;
  background: #fffefb;
  font-size: 12px;
  outline: none;
}
.filters__search input[type="search"]:focus { border-color: var(--gold); }
.filters__search button {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfc4ae;
  border-radius: 50%;
  background: #fffefb;
  color: var(--ink-soft);
  cursor: pointer;
}
.filters__search button:hover { border-color: var(--gold); color: var(--gold-deep); }

.filter-group li a { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.filter-count { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.filters__reset.is-idle { opacity: .45; cursor: default; }

.shop-sort { flex: 0 0 auto; }
.shop-sort select {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 3px 18px 3px 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 7px) 50%, calc(100% - 3px) 50%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.shop-sort select:hover { color: var(--ink); border-bottom-color: var(--gold); }

@media (max-width: 720px) {
  .shop-toolbar { row-gap: 10px; }
  .shop-sort { margin-left: auto; }
  .filters__search { padding-top: 2px; }
}
