/* ============================================================
   STONEROOT — 店铺页样式（分类页 / 商品页）
   依赖 main.css 里的设计令牌（:root）
   ============================================================ */

/* ---------- 面包屑 ---------- */
.shop-crumb { padding: 16px 0 4px; font-size: 12.5px; color: var(--ink-mute); }
.shop-crumb .woocommerce-breadcrumb { margin: 0; font-size: 12.5px; color: var(--ink-mute); }
.shop-crumb a { color: var(--ink-mute); }
.shop-crumb a:hover { color: var(--gold-dark); }

/* ---------- 分类页头部 ---------- */
.shop-head { padding: 8px 0 26px; border-bottom: 1px solid var(--stone-2); margin-bottom: 26px; }
.shop-head h1 { margin: 0 0 14px; }
.shop-intro { position: relative; max-width: 78ch; }
.shop-intro__inner { font-size: 14.5px; color: var(--ink-mute); max-height: 96px; overflow: hidden; position: relative; }
.shop-intro__inner::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48px;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff);
}
.shop-intro.is-open .shop-intro__inner { max-height: none; }
.shop-intro.is-open .shop-intro__inner::after { display: none; }
.shop-intro__inner p:last-child { margin-bottom: 0; }
.shop-intro__more {
  margin-top: 8px; background: none; border: 0; padding: 0;
  font-family: var(--font-heading); font-size: 11.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--gold-dark); cursor: pointer;
}
.shop-intro.is-open .shop-intro__more { margin-top: 12px; }

/* ---------- 两栏布局 ---------- */
.shop-layout { display: grid; grid-template-columns: 232px 1fr; gap: 34px; align-items: start; }
@media (max-width: 989px) { .shop-layout { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- 筛选侧栏 ---------- */
.shop-filters { position: sticky; top: calc(var(--header-h) + 16px); }
.shop-filters__title {
  font-family: var(--font-heading); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-mute); margin: 0 0 14px;
}
.filter-group { padding: 14px 0; border-top: 1px solid var(--stone-2); }
.filter-group:first-of-type { border-top: 0; padding-top: 0; }
.filter-group__t {
  font-family: var(--font-heading); font-size: 12px; color: var(--ink);
  margin: 0 0 10px; letter-spacing: .02em;
}
.filter-group ul { list-style: none; margin: 0; padding: 0; }
.filter-group li + li { margin-top: 6px; }
.filter-group a { font-size: 13.5px; color: var(--ink-soft); display: flex; justify-content: space-between; gap: 8px; }
.filter-group a:hover { color: var(--gold-dark); }
.filter-group a.on { color: var(--gold-dark); font-weight: 600; }
.filter-group a span { color: var(--ink-mute); font-size: 12px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chips li + li { margin-top: 0; }
.filter-chips a {
  display: inline-block; padding: 5px 11px; border-radius: 999px;
  background: var(--stone); font-size: 12.5px; color: var(--ink-soft);
}
.filter-chips a:hover { background: var(--stone-2); }
.filter-chips a.on { background: var(--ink); color: #fff; }
.filter-clear { margin-top: 16px; font-size: 13px; }
.filter-clear a { color: var(--gold-dark); border-bottom: 1px solid currentColor; }

/* ---------- 工具条 ---------- */
.shop-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.shop-count { margin: 0; font-size: 13.5px; color: var(--ink-mute); }
.shop-count b { color: var(--ink); }
.woocommerce-ordering select {
  min-height: 40px; padding: 0 34px 0 12px; font: inherit; font-size: 13.5px;
  border: 1px solid var(--stone-2); border-radius: var(--radius); background: #fff;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314110f' stroke-width='1.6'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}

/* ---------- 分页 ---------- */
.woocommerce-pagination { margin: 34px 0 10px; }
.woocommerce-pagination ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; justify-content: center; flex-wrap: wrap; }
.woocommerce-pagination a, .woocommerce-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 10px; border-radius: var(--radius);
  border: 1px solid var(--stone-2); font-family: var(--font-heading); font-size: 12.5px; color: var(--ink-soft);
}
.woocommerce-pagination a:hover { border-color: var(--ink); color: var(--ink); }
.woocommerce-pagination .current { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 空结果 ---------- */
.shop-empty { padding: 60px 0; text-align: center; color: var(--ink-mute); }

/* ============================================================
   商品详情页
   ============================================================ */
.sr-product { padding-bottom: 60px; }
.product__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: start; padding-top: 10px; }
@media (max-width: 989px) { .product__grid { grid-template-columns: 1fr; gap: 28px; } }

/* 图库 */
.product__media .woocommerce-product-gallery { width: 100% !important; float: none !important; }
.product__media .woocommerce-product-gallery__wrapper { border-radius: var(--radius-lg); overflow: hidden; background: var(--stone); }
.product__media .woocommerce-product-gallery__image img { width: 100%; height: auto; }
.product__media .flex-control-thumbs { display: flex; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; flex-wrap: wrap; }
.product__media .flex-control-thumbs li { width: calc((100% - 32px) / 5); }
.product__media .flex-control-thumbs img { border-radius: 4px; opacity: .55; }
.product__media .flex-control-thumbs img.flex-active, .product__media .flex-control-thumbs img:hover { opacity: 1; }

/* 信息栏 */
.product__summary { padding-top: 4px; }
.product__summary .product_title { font-size: clamp(24px, 3vw, 34px); margin-bottom: 10px; }
.product__summary .price { font-size: 24px; display: block; margin: 4px 0 12px; }
.product__summary .price del { font-size: 16px; color: var(--ink-mute); }
.product__summary .price ins { text-decoration: none; color: var(--gold-dark); }
.product__summary .woocommerce-product-details__short-description { font-size: 14.5px; color: var(--ink-mute); margin-bottom: 16px; }
.product__summary form.cart { display: flex; gap: 12px; align-items: stretch; margin: 18px 0 10px; }
.product__summary .quantity input {
  width: 76px; min-height: 48px; text-align: center; font: inherit;
  border: 1px solid var(--stone-2); border-radius: var(--radius); background: #fff;
}
.product__summary .single_add_to_cart_button {
  flex: 1; min-height: 48px; padding: 0 26px;
  background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: var(--radius);
  font-family: var(--font-heading); font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
}
.product__summary .single_add_to_cart_button:hover { background: #000; }
.product__summary .product_meta { font-size: 12.5px; color: var(--ink-mute); margin-top: 14px; }
.product__summary .product_meta a { color: var(--ink-mute); }

/* 费用三行 + 支付方式 */
.sr-trust-lines { list-style: none; margin: 0 0 6px; padding: 0; }
.sr-trust-lines li { font-size: 13.5px; color: var(--ink-soft); padding: 3px 0; }
.sr-pay-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.sr-pay-row__label { font-size: 12.5px; color: var(--ink-mute); }
.sr-pay-chip {
  font-size: 10.5px; letter-spacing: .04em; padding: 4px 8px;
  border: 1px solid var(--stone-2); border-radius: 3px; color: var(--ink-soft);
}

/* 寓意卡 + 长文案 */
.sr-story { padding-top: 46px; }
.sr-story__grid { display: grid; grid-template-columns: 330px 1fr; gap: 48px; align-items: start; }
@media (max-width: 989px) { .sr-story__grid { grid-template-columns: 1fr; gap: 26px; } }
.sr-story__card {
  background: var(--stone); border-radius: var(--radius-lg); padding: 26px 24px;
  position: sticky; top: calc(var(--header-h) + 20px);
}
.sr-card-eyebrow {
  font-family: var(--font-heading); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-dark); margin: 0 0 10px;
}
.sr-card-meaning { font-size: 22px; color: var(--ink); margin: 0 0 18px; font-weight: 600; }
.sr-card-rows { margin: 0 0 16px; }
.sr-card-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--stone-2); }
.sr-card-rows dt { font-size: 12.5px; color: var(--ink-mute); margin: 0; }
.sr-card-rows dd { font-size: 13px; color: var(--ink); margin: 0; text-align: right; }
.sr-card-cert { font-size: 12.5px; color: var(--ink-mute); margin: 0 0 12px; }
.sr-card-cert b { display: block; color: var(--ink); font-family: var(--font-heading); font-size: 13px; }

.sr-story__body { font-size: 15px; color: var(--ink-soft); }
.sr-story__body h2 { font-size: 20px; margin: 30px 0 12px; }
.sr-story__body h3 { font-size: 16px; margin: 24px 0 10px; }
.sr-story__body p { margin: 0 0 1em; }
.sr-story__body ul, .sr-story__body ol { margin: 0 0 1.2em; padding-left: 1.2em; }
.sr-story__body li { margin-bottom: 8px; }
.sr-story__body strong { color: var(--ink); }
.sr-story__body hr { border: 0; border-top: 1px solid var(--stone-2); margin: 28px 0; }
.sr-story__body blockquote {
  margin: 22px 0; padding: 16px 20px; background: var(--stone);
  border-left: 3px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14.5px; color: var(--ink-mute);
}
.sr-story__body .sr-faq-q { font-weight: 600; color: var(--ink); margin: 18px 0 4px; }

/* 相关推荐 */
.related.products, .upsells.products { margin-top: 56px; }
.related.products > h2, .upsells.products > h2 { font-size: 20px; margin-bottom: 20px; }

/* ============================================================
   商品网格强制 grid（压掉 WooCommerce 默认的 float 布局，
   否则卡片高度不一会错位）
   ============================================================ */
.woocommerce ul.products,
.woocommerce-page ul.products,
ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 26px 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  align-items: start;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none !important; content: none !important; }
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  clear: none !important;
  padding: 0 !important;
  text-align: left !important;
}
.woocommerce ul.products li.product a img { margin: 0 !important; }
.woocommerce ul.products li.product .button { margin-top: 0 !important; }
@media (max-width: 989px) {
  .woocommerce ul.products, ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 749px) {
  .woocommerce ul.products, ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 20px 12px !important; }
}
/* 商品图统一 4:5，避免不同尺寸图片撑乱网格 */
.woocommerce ul.products li.product .product-card__media img {
  width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5;
}

/* ============================================================
   社媒图标
   ============================================================ */
.announcement__social { display: flex; align-items: center; gap: 12px; }
.announcement__social a { color: inherit; opacity: .72; line-height: 0; }
.announcement__social a:hover { opacity: 1; }
.announcement__social a svg { width: 15px; height: 15px; display: block; }
.announcement__social:empty { display: none; }

.footer__social { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.footer__social a { color: inherit; opacity: .72; line-height: 0; }
.footer__social a:hover { opacity: 1; }
.footer__social a svg { width: 18px; height: 18px; display: block; }
.footer__social:empty { display: none; }

/* ============================================================
   页面 / 文章
   ============================================================ */
.sr-page, .sr-post { padding-bottom: 60px; }
.sr-page__head, .sr-post__head { padding: 6px 0 22px; border-bottom: 1px solid var(--stone-2); margin-bottom: 30px; }
.sr-page__head h1, .sr-post__head h1 { font-size: clamp(26px, 3.4vw, 38px); margin: 0; }
.sr-post__meta {
  font-family: var(--font-heading); font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-mute); margin: 0 0 10px;
}
.sr-post__hero { margin-bottom: 30px; }
.sr-post__hero img { width: 100%; height: auto; border-radius: var(--radius-lg); }
.sr-page__body, .sr-post__body { max-width: 76ch; }
.sr-page__body table, .sr-post__body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.sr-page__body th, .sr-page__body td, .sr-post__body th, .sr-post__body td {
  border: 1px solid var(--stone-2); padding: 10px 12px; text-align: left;
}
.sr-page__body th, .sr-post__body th { background: var(--stone); font-family: var(--font-heading); font-size: 12.5px; }
.shop-pagination { padding: 10px 0 50px; }
.shop-pagination ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; justify-content: center; flex-wrap: wrap; }
.shop-pagination a, .shop-pagination span.current {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 10px; border-radius: var(--radius);
  border: 1px solid var(--stone-2); font-family: var(--font-heading); font-size: 12.5px;
}
.shop-pagination span.current { background: var(--ink); border-color: var(--ink); color: #fff; }
