/*
Theme Name: LumiDestiny
Theme URI: https://lumidestiny.example.com/
Author: LumiDestiny
Author URI: https://lumidestiny.example.com/
Description: LumiDestiny — 手工合香珠、水晶饰品与八字能量咨询的品牌主题。暖米色 + 古金色调，Cormorant 衬线字体，包含首页轮播、分类、产品、咨询等模板。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: themes-s
Tags: e-commerce, custom-menu, featured-images, translation-ready, one-column, two-columns, right-sidebar

主样式在 assets/css/style.css（含 @import fonts.css）。
本文件仅承载主题头信息 + WordPress 专属补充样式（移动端菜单、后台条、核心区块类）。
*/

/* ---------- WordPress 后台工具条适配 ---------- */
.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

/* ---------- 无障碍：屏幕阅读器专用文本 ---------- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  position: absolute !important;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background: var(--cream-soft);
  border-radius: 2px;
  box-shadow: 0 0 2px 2px rgba(61, 46, 25, 0.18);
  clip: auto !important;
  clip-path: none;
  color: var(--ink);
  display: block;
  font-size: 0.9rem;
  height: auto;
  left: 12px;
  line-height: normal;
  padding: 14px 20px;
  text-decoration: none;
  top: 12px;
  width: auto;
  z-index: 100000;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

/* Elementor story widget: let the media wrapper fill the grid row. */
@media (min-width: 769px) {
  .elementor-widget-lumi-about-story .about-story__media {
    height: 100%;
  }

  .elementor-widget-lumi-about-story .about-story__media img {
    height: 100% !important;
    object-fit: cover;
  }
}

/* Value-card icons are inline SVG and need explicit sizing in Elementor. */
.elementor-widget-lumi-about-values .value-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 1.3rem;
  border-radius: 50%;
  background: var(--cream-deep, #eee4d2);
  color: var(--ink, #2b241b);
}

.elementor-widget-lumi-about-values .value-card__icon svg {
  display: block;
  width: 38px;
  height: 38px;
  margin: 0;
  color: inherit;
  stroke: currentColor;
}

/* ---------- 移动端导航（静态站缺失的汉堡展开行为） ---------- */
@media (max-width: 860px) {
  .nav {
    position: relative;
  }

  /* 汉堡展开后的下拉面板 */
  .nav__menu--left.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 40;
    padding: 0.6rem 0 1.2rem;
    background: var(--cream-soft);
    border-top: 1px solid var(--gold-line);
    border-bottom: 1px solid var(--gold-line);
    box-shadow: 0 14px 30px var(--shadow);
    max-height: calc(100vh - 100%);
    overflow-y: auto;
  }

  .nav__menu--left.is-open > li {
    width: 100%;
  }

  .nav__menu--left.is-open > li > a {
    display: block;
    width: 100%;
    padding: 0.9rem 6%;
  }

  /* 移动端子菜单：常驻文档流，跟随父项展开 */
  .nav__menu--left.is-open .nav__sub {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    border: 0;
    padding: 0 0 0.4rem;
    min-width: 0;
  }

  .nav__menu--left.is-open .nav__has-sub.is-open > .nav__sub {
    display: block;
  }

  .nav__menu--left.is-open .nav__sub a {
    padding: 0.7rem 10%;
    font-size: 0.82rem;
    color: var(--ink-soft);
  }

  .nav__menu--left.is-open .nav__caret {
    transition: transform 0.3s ease;
  }

  .nav__menu--left.is-open .nav__has-sub.is-open > .nav__parent .nav__caret {
    transform: rotate(180deg);
  }
}

/* ---------- Elementor 重置的反制 ---------- */
/*
 * Elementor 前端样式里有一条：
 *   .elementor .elementor-widget:not(...):not(...) figure { margin: 0 }
 * 特异度 (0,3,1)，会压掉主题 .jcard 的 margin: 0 0 20px，
 * 导致瀑布流卡片上下贴在一起。
 * 这里用同等以上的特异度把静态站的间距还原。
 * 间距值仍可被小部件的「卡片纵向间距」控件覆盖。
 */
.elementor .elementor-widget .journeys__grid figure.jcard {
  margin: 0 0 20px;
}

@media (max-width: 760px) {
  .elementor .elementor-widget .journeys__grid figure.jcard {
    margin-bottom: 14px;
  }
}

/*
 * .elementor hr { margin: 0 } 会压掉分隔线的上下留白。
 * 静态站是 margin: 1rem auto 3rem。
 */
.elementor .elementor-widget hr.journeys__divider {
  margin: 1rem auto 3rem;
}

/*
 * .elementor img { border-radius: 0 } 会抹掉圆角。
 * 卡片圆角靠 .jcard 的 overflow:hidden 裁切，这里恢复图片自身圆角继承。
 */
.elementor .elementor-widget .jcard img {
  border-radius: inherit;
}

/* ---------- 品牌理念：遮罩层 ---------- */
/*
 * 静态站把米色半透明遮罩做成 background-image 的第一个渐变层。
 * Elementor 小部件需要用控件单独调遮罩色，若仍写 background-image
 * 会覆盖掉该渐变层，所以这里改用独立的 ::before 遮罩层。
 * 颜色由小部件的「遮罩颜色」控件写入 background。
 */
.ethos--has-overlay {
  position: relative;
}

.ethos--has-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* 兜底色与静态站一致，控件未设值时也有遮罩 */
  background: rgba(250, 246, 238, 0.82);
}

/* 遮罩之上，保证文字可读 */
.ethos--has-overlay .ethos__inner {
  position: relative;
  z-index: 1;
}

/* ---------- WordPress 核心内容区块 ---------- */
.entry-content > * {
  margin-bottom: 1.4rem;
}

.entry-content a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content a:hover {
  color: var(--gold-bright);
}

.entry-content blockquote {
  border-left: 2px solid var(--gold-line);
  padding-left: 1.4rem;
  color: var(--ink-soft);
  font-style: italic;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.4rem;
}

.entry-content ul {
  list-style: disc;
}

.entry-content ol {
  list-style: decimal;
}

.entry-content img,
.wp-block-image img {
  height: auto;
}

.alignleft {
  float: left;
  margin: 0.4rem 1.6rem 1.2rem 0;
}

.alignright {
  float: right;
  margin: 0.4rem 0 1.2rem 1.6rem;
}

.aligncenter {
  display: block;
  margin-inline: auto;
}

.alignwide {
  width: min(1400px, 96vw);
  margin-inline: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

.wp-caption-text,
.wp-element-caption,
figcaption {
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding-top: 0.6rem;
}

.sticky,
.bypostauthor {
  /* 主题不使用置顶徽标，保留选择器以通过主题检查 */
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  padding: 3rem 0;
}

.pagination .page-numbers {
  min-width: 42px;
  padding: 0.5rem 0.8rem;
  text-align: center;
  border: 1px solid var(--gold-line);
  letter-spacing: var(--tracking-mid);
  font-size: 0.85rem;
  transition: background 0.3s ease, color 0.3s ease;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--cream-soft);
}
