/* BIGBROSTUDIO 全站分享组件 */

/* 全局半透明遮罩层 */
.share-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 19, 0.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99990;
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.share-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* 分享触发按钮容器 */
.share-row,
.share-trigger {
  font: inherit;
}

.share-row {
  position: relative !important;
  display: inline-flex;
  align-items: center;
}

.share-row.is-open,
.site-footer.has-share-open,
.site-footer:has(.share-row.is-open),
.share-section:has(.share-row.is-open),
.blog-share-card:has(.share-row.is-open) {
  position: relative !important;
  z-index: 99995 !important;
}

.share-trigger {
  min-height: 42px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 8px !important;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.34) inset;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.share-trigger svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.share-trigger:hover,
.share-trigger:focus-visible,
.share-row.is-open .share-trigger {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-1px);
}

.share-trigger:focus-visible {
  outline: 2px solid var(--sage-text);
  outline-offset: 2px;
}

.site-footer .share-trigger {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: none;
}

.site-footer .share-trigger:hover,
.site-footer .share-trigger:focus-visible,
.site-footer .share-row.is-open .share-trigger {
  color: var(--ink);
  background: var(--white);
  border-color: var(--white);
}

/* 分享面板 */
.share-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 100000;
  width: min(336px, calc(100vw - 28px));
  padding: 16px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.98);
  border: 1px solid rgba(23, 33, 31, 0.12);
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(10, 22, 19, 0.32), 0 4px 16px rgba(10, 22, 19, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transform-origin: right bottom;
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.share-row.is-open .share-panel {
  pointer-events: auto;
}

.share-row.is-visible .share-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.share-panel[hidden] {
  display: none;
}

.share-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.share-panel-head > div {
  min-width: 0;
}

.share-panel-head strong {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.25;
}

.share-panel-head span {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  line-height: 1.4;
}

.share-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.share-close:hover,
.share-close:focus-visible {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.share-option {
  min-width: 0;
  min-height: 58px;
  padding: 7px 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.67rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.share-option:hover,
.share-option:focus-visible {
  border-color: rgba(23, 33, 31, 0.24);
  box-shadow: 0 8px 20px rgba(23, 33, 31, 0.1);
  transform: translateY(-2px);
}

.share-option:focus-visible {
  outline: 2px solid var(--sage-text);
  outline-offset: 2px;
}

.share-option-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  border-radius: 50%;
}

.share-option-icon img {
  width: 15px;
  height: 15px;
  display: block;
  filter: brightness(0) invert(1);
}

.share-option[data-network="facebook"] .share-option-icon { background: #1877f2; }
.share-option[data-network="instagram"] .share-option-icon { background: linear-gradient(135deg, #f9ce34 0%, #ee2a7b 55%, #6228d7 100%); }
.share-option[data-network="reddit"] .share-option-icon { background: #ff4500; }
.share-option[data-network="whatsapp"] .share-option-icon { background: #25d366; }
.share-option[data-network="telegram"] .share-option-icon { background: #229ed9; }
.share-option[data-network="messenger"] .share-option-icon { background: #00b2ff; }
.share-option[data-network="line"] .share-option-icon { background: #06c755; }
.share-option[data-network="pinterest"] .share-option-icon { background: #e60023; }

.share-option[data-network="xiaohongshu"] .share-option-icon { background: #ff2442; }
.share-option[data-network="wechat"] .share-option-icon { background: #07c160; }
.share-option[data-network="tiktok"] .share-option-icon { background: #111; }
.share-option[data-network="sinaweibo"] .share-option-icon { background: #e6162d; }
.share-option[data-network="linkedin"] .share-option-icon { background: #0077b5; }

.share-option-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 一键复制链接按钮 */
.share-copy-link-btn {
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 9px;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 160ms ease;
}

.share-copy-link-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke-width: 2;
}

.share-copy-link-btn:hover,
.share-copy-link-btn:focus-visible {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
  border-style: solid;
}

.share-copy-link-btn.is-copied {
  color: #fff;
  background: #07c160;
  border-color: #07c160;
  border-style: solid;
}

/* 全局浮动吐司通知 */
.share-toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -38px;
  padding: 8px 11px;
  color: var(--white);
  background: rgba(23, 33, 31, 0.96);
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 100010;
}

.share-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 通用社媒分享操作指引弹窗（微信、小红书、TikTok、Instagram） */
.share-guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 22, 19, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.share-guide-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.share-guide-card {
  position: relative;
  width: min(348px, calc(100vw - 32px));
  padding: 24px;
  background: #fffdf8;
  color: var(--ink);
  border: 1px solid rgba(23, 33, 31, 0.12);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(10, 22, 19, 0.38), 0 4px 16px rgba(10, 22, 19, 0.12);
  text-align: center;
  transform: scale(0.94) translateY(8px);
  transition: transform 180ms ease;
}

.share-guide-overlay.is-visible .share-guide-card {
  transform: scale(1) translateY(0);
}

.share-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.share-guide-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
}

.share-guide-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: #fff;
  flex-shrink: 0;
}

.share-guide-icon img {
  width: 15px;
  height: 15px;
  filter: brightness(0) invert(1);
}

.share-guide-icon.is-wechat { background: #07c160; }
.share-guide-icon.is-xiaohongshu { background: #ff2442; }
.share-guide-icon.is-tiktok { background: #111; }
.share-guide-icon.is-instagram { background: linear-gradient(135deg, #f9ce34 0%, #ee2a7b 55%, #6228d7 100%); }

.share-guide-close {
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.share-guide-close:hover {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.share-guide-qr-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #fff;
  border: 1px solid rgba(23, 33, 31, 0.1);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(10, 22, 19, 0.06);
  margin-bottom: 14px;
}

.share-guide-qr-box svg,
.share-guide-qr-box img {
  display: block;
  width: 176px;
  height: 176px;
}

.share-guide-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  margin-bottom: 10px;
  color: #0b7c3d;
  background: rgba(7, 193, 96, 0.12);
  border: 1px solid rgba(7, 193, 96, 0.28);
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
}

.share-guide-status svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.share-guide-lead {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 16px;
  text-align: center;
}

.share-guide-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-guide-actions .button,
.share-guide-btn {
  width: 100%;
  min-height: 40px;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 9px;
  cursor: pointer;
  transition: all 160ms ease;
  box-sizing: border-box;
}

.share-guide-btn-primary {
  color: var(--white, #fff);
  background: var(--ink, #17211f);
  border: 1px solid var(--ink, #17211f);
  box-shadow: 0 4px 14px rgba(23, 33, 31, 0.16);
}

.share-guide-btn-primary:hover,
.share-guide-btn-primary:focus-visible {
  color: #fff;
  background: #000;
  border-color: #000;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(23, 33, 31, 0.24);
}

.share-guide-btn-secondary {
  color: var(--ink, #17211f);
  background: var(--paper, #faf6ee);
  border: 1px solid var(--line, rgba(23, 33, 31, 0.14));
}

.share-guide-btn-secondary:hover,
.share-guide-btn-secondary:focus-visible {
  color: var(--ink, #17211f);
  background: #fff;
  border-color: var(--ink, #17211f);
  transform: translateY(-1px);
}

/* 微信内置浏览器指引浮层（全屏高对比度指示） */
.wechat-guide-tip {
  position: fixed;
  inset: 0;
  z-index: 100060;
  background: rgba(10, 22, 19, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 24px 20px 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  overflow-y: auto;
  box-sizing: border-box;
}

.wechat-guide-tip.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.wechat-guide-header {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
}

.wechat-guide-arrow {
  width: 58px;
  height: 58px;
  stroke: #07c160;
  margin-right: 14px;
  animation: bounceTip 1.2s infinite alternate ease-in-out;
}

@keyframes bounceTip {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(-10px) rotate(-6deg); }
}

.wechat-guide-content {
  width: 100%;
  max-width: 320px;
  margin: 14px auto 0;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 24px 20px;
  box-sizing: border-box;
}

.wechat-guide-title {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin: 0 0 8px;
  font-family: var(--serif);
}

.wechat-guide-text {
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.84);
  margin: 0 0 20px;
}

.wechat-guide-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wechat-guide-actions .button,
.wechat-guide-actions .share-guide-btn {
  width: 100%;
  justify-content: center;
  min-height: 42px;
  font-size: 0.84rem;
}

.wechat-guide-actions .share-guide-btn-primary {
  color: #17211f;
  background: #07c160;
  border-color: #07c160;
  font-weight: 700;
}

.wechat-guide-actions .share-guide-btn-primary:hover {
  background: #06ad56;
  border-color: #06ad56;
  color: #17211f;
}

.wechat-guide-actions .share-guide-btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.wechat-guide-actions .share-guide-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.wechat-guide-actions .share-guide-btn-ghost {
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: 1px solid transparent;
}

.wechat-guide-actions .share-guide-btn-ghost:hover {
  color: #fff;
}

/* 没有页脚的页面（条款、隐私、404、下单、查单） */
.share-section {
  padding: 34px 24px 38px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.share-section .share-row {
  grid-column: auto;
  grid-row: auto;
  justify-content: center;
}

.share-section .share-trigger {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.share-section .share-panel {
  right: auto;
  left: 50%;
  transform-origin: center bottom;
  transform: translate(-50%, 8px) scale(0.98);
}

.share-section .share-row.is-visible .share-panel {
  transform: translate(-50%, 0) scale(1);
}
/* 博客文章专属分享卡片 */
.blog-share-card {
  margin: 38px 0 30px;
  padding: 22px 26px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 4px 18px rgba(10, 22, 19, 0.04);
}

.blog-share-card-info {
  flex: 1 1 auto;
  min-width: 0;
}

.blog-share-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.blog-share-card-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--sage-text);
  background: rgba(84, 110, 96, 0.12);
  border-radius: 4px;
}

.blog-share-card-title {
  margin: 0 !important;
  font-family: var(--serif);
  font-size: 1.25rem !important;
  font-weight: 400 !important;
  color: var(--ink);
  line-height: 1.3;
}

.blog-share-card-lead {
  margin: 0 !important;
  font-size: 0.88rem !important;
  color: var(--ink-soft);
  line-height: 1.5;
}

.blog-share-action {
  flex: 0 0 auto;
}

.blog-share-card .share-row {
  position: relative !important;
  display: inline-flex;
}

.blog-share-card .share-trigger {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px !important;
  box-shadow: 0 4px 14px rgba(23, 33, 31, 0.16);
}

.blog-share-card .share-trigger:hover,
.blog-share-card .share-trigger:focus-visible,
.blog-share-card .share-row.is-open .share-trigger {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(166, 92, 61, 0.25);
}

@media (max-width: 980px) {
  .blog-share-card {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 20px;
    gap: 16px;
  }

  .blog-share-action {
    display: flex;
    justify-content: stretch;
  }

  .blog-share-card .share-row {
    width: 100%;
  }

  .blog-share-card .share-trigger {
    width: 100%;
    justify-content: center;
  }

  .share-section {
    padding: 28px 20px 32px;
  }

  .share-panel,
  .share-section .share-panel,
  .blog-share-card .share-panel {
    position: fixed !important;
    right: 14px !important;
    left: 14px !important;
    bottom: 18px !important;
    width: auto !important;
    max-width: 400px !important;
    margin: 0 auto !important;
    max-height: min(84vh, 600px) !important;
    overflow-y: auto !important;
    z-index: 100000 !important;
    transform: translateY(20px) scale(0.98) !important;
    transform-origin: center bottom !important;
  }

  .share-row.is-visible .share-panel,
  .share-section .share-row.is-visible .share-panel,
  .blog-share-card .share-row.is-visible .share-panel {
    transform: translateY(0) scale(1) !important;
  }

  .share-toast {
    position: fixed !important;
    right: 24px !important;
    left: 24px !important;
    bottom: 28px !important;
    z-index: 100005 !important;
  }
}

