/**
 * BABOLOON Share & Quantity — styles
 */

/* ============================================================ 分享按钮 === */
.okg-share-btn {
  position: absolute;
  top: 10px;
  right: 52px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(16, 24, 32, .10);
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: #39454d;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 3px 10px rgba(16, 24, 32, .10);
  transition: color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.okg-share-btn__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.okg-share-btn:hover {
  color: var(--deep, #101820);
  border-color: rgba(16, 24, 32, .22);
  box-shadow: 0 6px 16px rgba(16, 24, 32, .16);
  transform: translateY(-1px);
}

/* tooltip 与对比按钮一致 */
.okg-share-btn::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 9px);
  right: -2px;
  padding: 6px 10px;
  border-radius: 7px;
  background: rgba(16, 24, 32, .94);
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-3px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 6;
}
.okg-share-btn:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* 详情页大按钮 */
.okg-share-btn--single {
  position: static;
  width: auto;
  height: auto;
  gap: 7px;
  margin: 12px 10px 0 0;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: none;
}
.okg-share-btn--single::after {
  display: none;
}
.okg-share-btn__label {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* ============================================================ 分享面板 === */
.okg-sq-mask {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(16, 24, 32, .42);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}
.okg-sq-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}

.okg-sq-pop {
  width: min(420px, 100%);
  padding: 22px 22px 18px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(16, 24, 32, .3);
  transform: scale(.94) translateY(10px);
  opacity: 0;
  transition: transform .34s cubic-bezier(.22, .61, .36, 1), opacity .24s ease;
}
.okg-sq-mask.is-open .okg-sq-pop {
  transform: none;
  opacity: 1;
}

.okg-sq-pop__title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.okg-sq-pop__sub {
  margin: 0 0 16px;
  font-size: 12.5px;
  color: #6b7680;
  line-height: 1.5;
  word-break: break-all;
}

.okg-sq-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.okg-sq-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 6px 10px;
  border: 1px solid #eef1f2;
  border-radius: 12px;
  background: #fbfcfc;
  color: #39454d;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.okg-sq-tile:hover {
  border-color: rgba(16, 24, 32, .18);
  background: #fff;
  transform: translateY(-1px);
}
.okg-sq-tile svg {
  width: 22px;
  height: 22px;
}
.okg-sq-tile--wa svg { color: #25d366; }
.okg-sq-tile--fb svg { color: #1877f2; }
.okg-sq-tile--x  svg { color: #101820; }
.okg-sq-tile--in svg { color: #0a66c2; }
.okg-sq-tile--pin svg { color: #e60023; }
.okg-sq-tile--wx svg { color: #07c160; }

.okg-sq-copy {
  display: flex;
  gap: 8px;
}
.okg-sq-copy input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #dfe3e6;
  border-radius: 10px;
  background: #fbfcfc;
  font-size: 12.5px;
  color: #5c666d;
}
.okg-sq-copy button {
  flex: 0 0 auto;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--deep, #101820);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .16s ease;
}
.okg-sq-copy button:hover {
  filter: brightness(1.15);
}
.okg-sq-copy button.is-done {
  background: #12a150;
}

.okg-sq-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #97a0a6;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.okg-sq-close:hover {
  background: #f2f4f5;
  color: #101820;
}
.okg-sq-pop {
  position: relative;
}

/* ============================================================ 数量控件 === */
.okg-qty {
  display: inline-flex;
  align-items: stretch;
  height: 48px;
  border: 1px solid #dfe3e6;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  vertical-align: middle;
}
.okg-qty__btn {
  width: 42px;
  border: 0;
  background: #fbfcfc;
  color: #39454d;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
  -webkit-user-select: none;
  user-select: none;
}
.okg-qty__btn:hover:not(:disabled) {
  background: #f0f3f4;
  color: #101820;
}
.okg-qty__btn:disabled {
  color: #c7ced3;
  cursor: not-allowed;
}
.okg-qty__input {
  width: 54px;
  border: 0;
  border-left: 1px solid #eef1f2;
  border-right: 1px solid #eef1f2;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #101820;
  background: #fff;
  -moz-appearance: textfield;
  appearance: textfield;
}
.okg-qty__input::-webkit-outer-spin-button,
.okg-qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.okg-qty__input:focus {
  outline: none;
  background: #fffdf6;
}

/* 包裹后隐藏原来的 .quantity 边框，避免双框 */
.quantity.okg-qty-wrapped {
  display: inline-block;
}
.quantity.okg-qty-wrapped > .okg-qty {
  margin: 0;
}

/* ============================================================ 超限弹窗 === */
.okg-qty-modal {
  position: fixed;
  inset: 0;
  z-index: 9995;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(16, 24, 32, .48);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .26s ease;
}
.okg-qty-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.okg-qty-modal__card {
  position: relative;
  width: min(430px, 100%);
  padding: 30px 26px 24px;
  border-radius: 22px;
  background: #fff;
  text-align: center;
  box-shadow: 0 32px 80px rgba(16, 24, 32, .34);
  transform: scale(.9) translateY(16px);
  opacity: 0;
  transition: transform .42s cubic-bezier(.22, .61, .36, 1), opacity .3s ease;
}
.okg-qty-modal.is-open .okg-qty-modal__card {
  transform: none;
  opacity: 1;
}

.okg-qty-modal__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d9f7a8 0%, #b8f34a 100%);
  color: #101820;
}
.okg-qty-modal__ico svg {
  width: 30px;
  height: 30px;
}

.okg-qty-modal__title {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.okg-qty-modal__text {
  margin: 0 0 22px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #5c666d;
}

.okg-qty-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.okg-qty-modal__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #d9f7a8 0%, #b8f34a 100%);
  color: #101820;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: filter .16s ease, transform .16s ease;
}
.okg-qty-modal__cta:hover {
  filter: brightness(.97);
  transform: translateY(-1px);
}
.okg-qty-modal__alt {
  height: 44px;
  border: 1px solid #e4e8ea;
  border-radius: 999px;
  background: #fff;
  color: #5c666d;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease;
}
.okg-qty-modal__alt:hover {
  border-color: #c7ced3;
  color: #101820;
}

@media (max-width: 560px) {
  .okg-sq-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .okg-sq-tile {
    padding: 10px 4px 8px;
    font-size: 10px;
  }
  .okg-sq-tile svg {
    width: 20px;
    height: 20px;
  }
  .okg-qty-modal__card {
    padding: 26px 20px 20px;
  }
  .okg-share-btn--single {
    padding: 10px 16px;
  }
}

/* ============================================================ 2026-11-19 修正 ===
 * 类名隔离：主题 main.css 有一个同名的 .okg-share（文章底部分享条），
 * 会把 padding-top:20px / display:flex / margin-top:26px 灌进我们的按钮，
 * 造成卡片图标偏下、详情页按钮换行。现在按钮统一叫 .okg-share-btn。
 * 下面再把四条边、padding、gap 显式钉死，杜绝任何继承歧义。
 * ============================================================================ */
.okg-card .okg-share-btn {
  top: 10px;
  right: 52px;
  bottom: auto;
  left: auto;
  margin: 0;
  padding: 0;
  gap: 0;
  box-sizing: border-box;
}
/* 卡片上的分享与对比按钮完全对称：同样 34px、同样四边、图标都居中 */
.okg-card .okg-share-btn .okg-share-btn__icon {
  display: block;
  margin: 0;
}

/* 详情页：两个按钮同排、等高、间距一致 */
.okg-pdp-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.okg-pdp-actions .okg-cmp-add--single,
.okg-pdp-actions .okg-share-btn--single {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0;
  padding: 10px 20px;
  box-sizing: border-box;
  border-radius: 999px;
  line-height: 1.2;
}
.okg-pdp-actions .okg-cmp-add--single,
.okg-pdp-actions .okg-share-btn--single,
.okg-pdp-actions .okg-cmp-add--single:hover,
.okg-pdp-actions .okg-share-btn--single:hover {
  transform: none;
}
@media (max-width: 560px) {
  .okg-pdp-actions { gap: 8px; }
  .okg-pdp-actions .okg-cmp-add--single,
  .okg-pdp-actions .okg-share-btn--single { padding: 10px 16px; }
}

/* 分享平台配色 */
.okg-sq-tile--tg svg { color: #26a5e4; }
.okg-sq-tile--mail svg { color: #5c666d; }
.okg-sq-tile--ig svg { color: #e1306c; }

/* 购物车页的数量框：表格里空间窄，收紧一点，别把行撑破 */
.woocommerce-cart-form .okg-qty {
  height: 40px;
}
.woocommerce-cart-form .okg-qty__btn {
  width: 34px;
  font-size: 15px;
}
.woocommerce-cart-form .okg-qty__input {
  width: 46px;
  font-size: 14px;
}
.woocommerce-cart-form td.product-quantity {
  white-space: nowrap;
}
@media (max-width: 768px) {
  .woocommerce-cart-form .okg-qty {
    height: 36px;
  }
  .woocommerce-cart-form .okg-qty__btn {
    width: 30px;
  }
  .woocommerce-cart-form .okg-qty__input {
    width: 40px;
  }
}

