/* ============================================================
   Journal 目录页（参考 vegogarden.com/pages/academy）
    hero 搜索 / 快捷入口 / 品类封面网格 / 三轴标签 /
    Latest / 按品类分栏 / 账户 CTA
   ============================================================ */

/* ---------- Hero + 搜索 ---------- */
.ws-jr-hero {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 60px 0 64px;
}
.ws-jr-hero h1 {
  font-size: 40px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.ws-jr-hero p {
  color: #c7d2e0;
  margin: 0 0 26px;
  max-width: 640px;
  font-size: 16px;
  line-height: 1.6;
}
.ws-jr-search {
  display: flex;
  gap: 10px;
  max-width: 640px;
}
.ws-jr-search input[type="search"] {
  flex: 1;
  height: 52px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  box-shadow: var(--shadow);
}
.ws-jr-search input[type="search"]::placeholder { color: var(--muted); }
.ws-jr-search input[type="search"]:focus {
  outline: none;
  border-color: var(--brand-red-bright);
}
.ws-jr-search .ws-btn {
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- 区块标题 ---------- */
.ws-jr-h2 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}

/* ---------- 快捷入口（3 张带图卡） ---------- */
.ws-jr-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 36px 0 52px;
}
.ws-jr-quick-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.ws-jr-quick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #d6dbe4;
}
.ws-jr-quick-card .img {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.ws-jr-quick-card .img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ws-jr-quick-card .body { display: flex; flex-direction: column; gap: 3px; }
.ws-jr-quick-card .body strong { font-size: 16px; font-weight: 700; }
.ws-jr-quick-card .body span { font-size: 13px; color: var(--muted); }

/* ---------- 品类封面网格 ---------- */
.ws-jr-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.ws-jr-cat {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.ws-jr-cat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #d6dbe4;
}
.ws-jr-cat > .img {
  display: block;
  aspect-ratio: 16 / 10;
  background: #fff;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
}
.ws-jr-cat > .img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ws-jr-cat > .body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
}
.ws-jr-cat > .body strong { font-size: 15px; font-weight: 700; }
.ws-jr-cat > .body span { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ---------- 三轴标签体系 ---------- */
.ws-jr-tags {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 26px;
}
.ws-jr-tags .tg { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ws-jr-tags .tg-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  min-width: 96px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}
.chip:hover { border-color: var(--brand-red); color: var(--brand-red); }
.chip--cat { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip--cat:hover { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.chip--lg { padding: 9px 16px; font-size: 14px; }
.chip em { font-style: normal; color: var(--muted); font-weight: 700; }
.chip--cat em { color: rgba(255,255,255,.7); }

/* ---------- 首屏 hero 内的标签筛选（凌总 2026-11-07） ----------
   原位置在 8 张分类卡下方，要滚一屏才看得到；现移到 hero 搜索框正下方。
   hero 是深蓝底：白底 chip 保留高对比，只把分组标签调成浅色、边框调柔。 */
.ws-jr-tags--hero {
  margin-top: 22px;
  gap: 10px;
  max-width: 900px;
}
.ws-jr-tags--hero .tg-label { color: rgba(255, 255, 255, .72); }
.ws-jr-tags--hero .chip { border-color: rgba(255, 255, 255, .22); }

/* ---------- 文章卡（无图，文字前向） ---------- */
.ws-jr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.ws-jcard {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.ws-jcard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #d6dbe4;
}
.ws-jcard .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ws-jcard h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 10px;
}
.ws-jcard h3 a { color: var(--ink); text-decoration: none; }
.ws-jcard h3 a:hover { color: var(--brand-red); }
.ws-jcard p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}
.ws-jcard .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* ---------- 按品类分栏 ---------- */
.ws-jr-catrow-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.ws-jr-catrow-head .ws-jr-h2 { margin: 0; }
.ws-jr-more {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-red);
  text-decoration: none;
  white-space: nowrap;
}
.ws-jr-more:hover { text-decoration: underline; }

/* ---------- 账户 CTA band ---------- */
.ws-jr-account {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 32px;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  overflow: hidden;
}
.ws-jr-account .txt h2 { font-size: 26px; font-weight: 800; margin: 0 0 12px; }
.ws-jr-account .txt p { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 0 0 22px; max-width: 520px; }
.ws-jr-account .acts { display: flex; flex-wrap: wrap; gap: 12px; }
.ws-jr-account .pic img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
}

/* ---------- 搜索结果页（白底内联搜索） ---------- */
.ws-jr-search--inline {
  max-width: 560px;
  margin-bottom: 22px;
}
.ws-jr-search--inline input[type="search"] {
  border: 1px solid var(--line);
  box-shadow: none;
}
.ws-jr-search--inline input[type="search"]:focus { border-color: var(--brand-red); }
.ws-jr-tags--inline { margin-top: 0; }

/* ---------- 账户 登录/注册 页 ---------- */
.ws-account-intro {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 48px 0;
}
.ws-account-intro h1 { font-size: 32px; font-weight: 800; margin: 0 0 10px; }
.ws-account-intro p { color: #c7d2e0; margin: 0; max-width: 680px; font-size: 15px; line-height: 1.6; }

.ws-account-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  max-width: 980px;
  margin: 48px auto;
  padding: 0 20px;
}
.ws-account-cols .col-1,
.ws-account-cols .col-2 { width: auto; float: none; margin: 0; }
.ws-account-cols h2 { font-size: 22px; font-weight: 800; margin: 0 0 18px; }
.ws-account-cols .woocommerce-button.button,
.ws-account-cols button.button {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
  border-radius: 10px;
  padding: 12px 22px;
}
.ws-account-cols .woocommerce-button.button:hover,
.ws-account-cols button.button:hover { background: var(--orange-d); border-color: var(--orange-d); }

.ws-account-benefits {
  list-style: none;
  margin: 22px 0 0;
  padding: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ws-account-benefits li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--ink);
}
.ws-account-benefits li:last-child { margin-bottom: 0; }
.ws-account-benefits li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--brand-red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat;
}

@media (max-width: 760px) {
  .ws-account-cols { grid-template-columns: 1fr; gap: 32px; margin: 32px auto; }
}

/* ---------- 页头账户入口 ---------- */
.ws-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--bg);
  white-space: nowrap;      /* 防止 "Log in" 在窄屏折成两行 */
  flex-shrink: 0;            /* 不被 .ws-actions 挤压，保持自然宽度 */
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.ws-account-btn:hover { border-color: var(--brand-red); color: var(--brand-red); }
.ws-account-btn svg { color: var(--brand-navy); }
.ws-account-btn:hover svg { color: var(--brand-red); }

@media (max-width: 560px) {
  .ws-account-label,
  .ws-cart-label { display: none; }
  .ws-account-btn,
  .ws-cart-btn { padding: 0 11px; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .ws-jr-cats { grid-template-columns: repeat(3, 1fr); }
  .ws-jr-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .ws-jr-hero { padding: 44px 0 48px; }
  .ws-jr-hero h1 { font-size: 30px; }
  .ws-jr-quick { grid-template-columns: 1fr; }
  .ws-jr-cats { grid-template-columns: repeat(2, 1fr); }
  .ws-jr-grid { grid-template-columns: 1fr; }
  .ws-jr-account { grid-template-columns: 1fr; padding: 28px; }
  .ws-jr-account .pic { order: -1; }
}
@media (max-width: 460px) {
  .ws-jr-cats { grid-template-columns: 1fr; }
  .ws-jr-tags .tg-label { min-width: 0; width: 100%; }
}

/* ---------- 登录 / 注册弹窗 ---------- */
.ws-login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.ws-login-overlay[hidden] { display: none; }
body.ws-no-scroll { overflow: hidden; }

.ws-login-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fdfcfa;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
  padding: 34px 32px 28px;
  animation: ws-login-in 0.16s ease-out;
}
@keyframes ws-login-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.ws-login-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border: none; background: transparent;
  color: #64748b; cursor: pointer; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.ws-login-close:hover { background: #f1f5f9; color: #0f172a; }

.ws-login-brand { margin-bottom: 16px; }
.ws-login-brand svg,
.ws-login-brand img { display: block; height: 30px; width: auto; }
.ws-login-card h2 { font-size: 26px; margin: 0 0 4px; color: #0f172a; }
.ws-login-sub { margin: 0 0 18px; color: #64748b; font-size: 14px; }

.ws-login-tabs {
  display: flex; gap: 6px; margin-bottom: 18px;
  border-bottom: 1px solid #e2e8f0;
}
.ws-login-tabs button {
  flex: 1; padding: 10px 0; border: none; background: none; cursor: pointer;
  font-size: 15px; font-weight: 600; color: #94a3b8;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ws-login-tabs button.is-active { color: #0f172a; border-bottom-color: var(--brand-red); }

.ws-login-form label,
.ws-register-form label {
  display: block; font-size: 13px; font-weight: 600;
  color: #334155; margin-bottom: 12px;
}
.ws-login-form input,
.ws-register-form input[type="email"],
.ws-register-form input[type="text"],
.ws-register-form input[type="password"] {
  display: block; width: 100%; margin-top: 6px;
  padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 10px;
  font-size: 15px; color: #0f172a; background: #fff;
}
.ws-login-form input:focus,
.ws-register-form input:focus {
  outline: none; border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(179, 25, 59, 0.15);
}

.ws-login-submit { width: 100%; margin-top: 4px; padding: 13px; font-size: 15px; }
.ws-login-lost {
  display: inline-block; margin-top: 12px;
  font-size: 13px; color: var(--brand-red); text-decoration: none;
}
.ws-login-hint { font-size: 13px; color: #64748b; margin: 0 0 12px; }
.ws-login-news {
  display: flex; align-items: center; gap: 8px;
  font-weight: 400; font-size: 13px; color: #475569;
}
.ws-login-news input { width: auto; margin: 0; }
.ws-login-terms { font-size: 12px; color: #94a3b8; margin: 14px 0 0; }
.ws-login-terms a { color: #475569; }

