/* Taobao-style side-flyout magnifier on product promotional gallery */
.tp-gallery,
.tp-gallery .wp-block-woocommerce-product-image-gallery,
.tp-gallery .woocommerce-product-gallery {
  overflow: visible !important;
  position: relative;
}

.tp-gallery .woocommerce-product-gallery.momo-tb-zoom-ready .woocommerce-product-gallery__image a {
  cursor: crosshair;
  display: block;
  position: relative;
}

.momo-tb-lens {
  background-color: rgba(38, 69, 214, 0.14);
  background-image:
    linear-gradient(rgba(38, 69, 214, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 69, 214, 0.22) 1px, transparent 1px);
  background-size: 6px 6px;
  border: 1px solid rgba(38, 69, 214, 0.48);
  box-shadow: 0 2px 8px rgba(15, 18, 24, 0.12);
  box-sizing: border-box;
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  transition: opacity 0.12s ease;
  visibility: hidden;
  will-change: transform, width, height;
  z-index: 490;
}

.momo-tb-lens.is-active {
  opacity: 1;
  visibility: visible;
}

.momo-tb-flyout {
  background: #f6f7f5;
  border: 1px solid #dfe2ec;
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(15, 18, 24, 0.2);
  box-sizing: border-box;
  left: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  top: 0;
  transition: opacity 0.14s ease;
  visibility: hidden;
  z-index: 500;
}

.momo-tb-flyout.is-active {
  opacity: 1;
  visibility: visible;
}

.momo-tb-flyout__img {
  display: block;
  left: 0;
  max-height: none !important;
  max-width: none !important;
  pointer-events: none;
  position: absolute;
  top: 0;
  transform-origin: 0 0;
  user-select: none;
  will-change: transform, width, height;
}

/* Upgraded Swatches & Size Pills for Finished Variable Products (matching PrintBlob design system) */
.variations_form.momo-swatches-ready table.variations {
  border: 0 !important;
  margin: 0 0 1.25rem !important;
  width: 100%;
}

.variations_form.momo-swatches-ready table.variations tr {
  display: block;
  margin-bottom: 1.15rem;
}

.variations_form.momo-swatches-ready table.variations th.label,
.variations_form.momo-swatches-ready table.variations td.value {
  border: 0 !important;
  display: block;
  padding: 0 !important;
}

.variations_form.momo-swatches-ready table.variations th.label {
  margin-bottom: 0.55rem;
}

.variations_form.momo-swatches-ready table.variations th.label label {
  color: #1a1d22;
  font-size: 0.96875rem;
  font-weight: 620;
}

.variations_form.momo-swatches-ready .momo-var-chosen {
  color: #5f6670;
  font-weight: 450;
  margin-left: 0.5rem;
}

.variations_form.momo-swatches-ready select[data-attribute_name],
.variations_form.momo-swatches-ready .reset_variations {
  display: none !important;
}

.momo-var-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.momo-var-swatch {
  background: var(--momo-swatch, #fff);
  border: 1px solid rgba(26, 29, 34, 0.22);
  border-radius: 50%;
  cursor: pointer;
  height: 2.6rem;
  padding: 0;
  position: relative;
  width: 2.6rem;
}

.momo-var-swatch[aria-pressed='true'] {
  outline: 2px solid #1a1d22;
  outline-offset: 3px;
}

.momo-var-swatch:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.momo-var-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.momo-var-pill {
  background: #fff;
  border: 1px solid #e2e4e0;
  border-radius: 8px;
  color: #1a1d22;
  cursor: pointer;
  font: inherit;
  font-weight: 560;
  min-width: 3.25rem;
  padding: 0.6rem 0.85rem;
}

.momo-var-pill[aria-pressed='true'] {
  border-color: #1a1d22;
  box-shadow: inset 0 0 0 1px #1a1d22;
}

.momo-var-pill:disabled {
  color: #98a2b3;
  cursor: not-allowed;
  text-decoration: line-through;
}

.momo-finished-specs {
  background: #f6f7f5;
  border: 1px solid #e2e4e0;
  border-radius: 12px;
  display: grid;
  gap: 0.55rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  margin-top: 1rem;
  padding: 0.9rem 1.05rem;
}

.momo-finished-specs__item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.momo-finished-specs__label {
  color: #5f6670;
  font-size: 0.78rem;
}

.momo-finished-specs__val {
  color: #1a1d22;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Detail images & Spec modal */
.momo-product-detail-gallery {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.momo-detail-figure {
  background: #f6f7f5;
  border-radius: 16px;
  margin: 0;
  overflow: hidden;
}

.momo-detail-image {
  display: block;
  height: auto;
  margin-inline: auto;
  max-width: 100%;
  width: 100%;
}

.momo-pdp-spec-wrap {
  margin-top: 0.875rem;
}

.momo-spec-trigger {
  align-items: center;
  background: transparent;
  border: 1.5px solid #d0d5dd;
  border-radius: 10px;
  color: #1a1d22;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 560;
  gap: 0.4rem;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.momo-spec-trigger:hover {
  background-color: #f6f7f5;
  border-color: #1a1d22;
}

.momo-spec-modal[hidden] {
  display: none !important;
}

.momo-spec-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1.25rem;
  position: fixed;
  z-index: 100050;
}

.momo-spec-modal__backdrop {
  background: rgba(15, 18, 24, 0.62);
  inset: 0;
  position: absolute;
}

.momo-spec-modal__dialog {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15, 18, 24, 0.24);
  display: flex;
  flex-direction: column;
  max-height: min(88svh, 880px);
  max-width: 780px;
  overflow: hidden;
  position: relative;
  width: 100%;
  z-index: 1;
}

.momo-spec-modal__header {
  align-items: center;
  border-bottom: 1px solid #e4e7ec;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}

.momo-spec-modal__title {
  font-size: 1.0625rem;
  font-weight: 640;
  margin: 0;
}

.momo-spec-modal__close {
  background: #f2f4f7;
  border: 0;
  border-radius: 8px;
  color: #1a1d22;
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 560;
  padding: 0.45rem 0.85rem;
}

.momo-spec-modal__close:hover {
  background: #e4e7ec;
}

.momo-spec-modal__body {
  display: grid;
  gap: 1rem;
  overflow-y: auto;
  padding: 1.25rem;
}

.momo-spec-modal__figure {
  margin: 0;
}

.momo-spec-modal__img {
  border-radius: 10px;
  display: block;
  height: auto;
  width: 100%;
}
