/* MASOMA single-product styles; loaded only on product pages. */

@media (hover: none), (max-width: 720px) {

    body.masoma-brand.single-product .single_add_to_cart_button:hover,
body.masoma-brand.single-product .single_add_to_cart_button:focus {
        background: #050505 !important;
        border-color: #050505 !important;
        color: #fffdf8 !important;
    }
}

.single-product .single_add_to_cart_button {
    background: #050505 !important;
    border-color: #050505 !important;
    color: #fffdf8 !important;
}

@media (hover: hover) and (pointer: fine) {
    .single-product .single_add_to_cart_button:hover,
.single-product .single_add_to_cart_button:focus {
        background: var(--masoma-gold) !important;
        border-color: var(--masoma-gold) !important;
        color: #050505 !important;
    }
}

body.masoma-brand .single_add_to_cart_button {
    background: #050505 !important;
    border-color: #050505 !important;
    color: #fffdf8 !important;
}

@media (hover: hover) and (pointer: fine) {
    body.masoma-brand .single_add_to_cart_button:hover,
body.masoma-brand .single_add_to_cart_button:focus {
        background: var(--masoma-gold) !important;
        border-color: var(--masoma-gold) !important;
        color: #050505 !important;
    }
}

@media (hover: none), (pointer: coarse), (max-width: 860px) {
    body.masoma-brand .single_add_to_cart_button:hover,
body.masoma-brand .single_add_to_cart_button:focus {
        background: #050505 !important;
        border-color: #050505 !important;
        color: #fffdf8 !important;
    }

    body.masoma-brand .single_add_to_cart_button:active {
        transform: translateY(1px);
    }
}

body.masoma-brand.single-product div.product div.images .woocommerce-product-gallery__image a {
        align-items: center;
        aspect-ratio: var(--masoma-product-thumb-ratio);
        background: var(--masoma-black);
        display: flex;
        justify-content: center;
        overflow: hidden;
    }

body.masoma-brand.single-product div.product div.images .woocommerce-product-gallery__image img {
    height: 100%;
    object-fit: contain;
    object-position: center;
    width: 100%;
}

body.masoma-brand.postid-28.single-product div.product div.images .woocommerce-product-gallery__image a {
    aspect-ratio: 3 / 4 !important;
    background: var(--masoma-black) !important;
}

.single-product div.product {
    /* 顶部 padding 再减半，让主图更贴近页面顶部；左右与底部保持不变 */
    padding: clamp(9px, 1.5vw, 21.5px) clamp(20px, 5vw, 72px) clamp(36px, 6vw, 86px) clamp(20px, 5vw, 72px);
}

body.masoma-brand.single-product div.product .summary .product_title {
    font-family: var(--masoma-serif);
    font-size: clamp(2.2rem, 5vw, 5.5rem);
    font-weight: 400;
    line-height: 1;
    margin-bottom: 0.25em;
}

body.masoma-brand.single-product .single-product-category {
    display: none !important;
}

body.masoma-brand.single-product .product_meta {
    display: none !important;
}

body.masoma-brand.single-product .product_meta .posted_in {
    display: none !important;
}

body.masoma-brand.single-product .product_meta .sku_wrapper {
    display: none !important;
}

body.masoma-brand.single-product .masoma-quick-badge {
    align-items: center;
    border: 1px solid var(--masoma-gold);
    box-sizing: border-box;
    color: var(--masoma-gold);
    display: inline-flex;
    font-family: var(--masoma-sans);
    font-size: 0.6rem;
    font-weight: 700;
    gap: 6px;
    height: 19px;
    letter-spacing: 0.14em;
    margin: 0;
    padding: 0 8px;
    text-transform: uppercase;
}

body.masoma-brand.single-product .masoma-quick-badge__icon {
    display: block;
    flex: 0 0 auto;
    height: 12px;
    object-fit: contain;
    width: 12px;
}

body.masoma-brand.single-product .masoma-product-trust-row {
    color: var(--masoma-ash);
    display: flex;
    flex-wrap: wrap;
    font-family: var(--masoma-sans);
    font-size: 0.62rem;
    font-weight: 400;
    gap: 6px 14px;
    letter-spacing: 0.04em;
    margin: 14px 0 0;
}

body.masoma-brand.single-product .masoma-product-trust-row span {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

body.masoma-brand.single-product .masoma-product-trust-row span::before {
    background: var(--masoma-gold);
    border-radius: 50%;
    content: '';
    display: inline-block;
    height: 4px;
    width: 4px;
}

body.masoma-brand.single-product .masoma-scene-gallery {
    margin: clamp(40px, 6vw, 72px) auto 0;
    max-width: 1200px;
    padding: 0 clamp(20px, 5vw, 72px);
}

body.masoma-brand.single-product .masoma-scene-gallery__grid {
    display: grid;
    gap: clamp(16px, 3vw, 32px);
    grid-template-columns: repeat(2, 1fr);
}

body.masoma-brand.single-product .masoma-scene-gallery figure {
    margin: 0;
}

body.masoma-brand.single-product .masoma-scene-gallery img {
    display: block;
    height: auto;
    width: 100%;
}

body.masoma-brand.single-product .woocommerce-Tabs-panel--description .masoma-scene-gallery {
    margin: 0 0 clamp(34px, 5vw, 58px);
    max-width: none;
    padding: 0;
}

body.masoma-brand.single-product .woocommerce-Tabs-panel--description .masoma-scene-gallery__grid {
    grid-template-columns: 1fr;
}

@media (max-width: 860px) {
    body.masoma-brand.single-product .masoma-scene-gallery__grid {
        grid-template-columns: 1fr;
    }
}

body.masoma-brand.single-product .related.products .masoma-product-meta > span {
    display: none !important;
}

body.masoma-brand.single-product .related.products {
    border-top: 1px solid var(--masoma-line);
    margin-top: clamp(42px, 6vw, 82px);
    padding-top: clamp(38px, 6vw, 76px);
}

body.masoma-brand.single-product .related.products > h2 {
    margin: 0 0 clamp(24px, 4vw, 44px);
    max-width: 780px;
    text-align: left;
}

body.masoma-brand.single-product .related.products > h2::before {
    color: var(--masoma-gold);
    content: "Related Works";
    display: block;
    font-family: var(--masoma-sans);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.6;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.single-product div.product p.price,
.single-product div.product span.price {
    color: var(--masoma-gold);
    font-size: clamp(1.5rem, 2.25vw, 2.1rem);
    font-weight: 400;
}

body.masoma-brand.single-product div.product form.cart {
    align-items: stretch;
    display: flex;
    gap: 14px;
    margin: 24px 0 18px;
}

body.masoma-brand.single-product div.product form.cart.variations_form {
    align-items: start;
    display: grid;
    gap: 14px;
    margin-top: 22px;
    max-width: min(520px, 100%);
}

body.masoma-brand.single-product div.product form.cart.variations_form table.variations {
    border: 0;
    border-collapse: collapse;
    margin: 0;
    width: 100%;
}

body.masoma-brand.single-product div.product form.cart.variations_form table.variations tbody,
body.masoma-brand.single-product div.product form.cart.variations_form table.variations tr,
body.masoma-brand.single-product div.product form.cart.variations_form table.variations th,
body.masoma-brand.single-product div.product form.cart.variations_form table.variations td {
    border: 0;
    display: block;
    padding: 0;
    text-align: left;
}

body.masoma-brand.single-product div.product form.cart.variations_form table.variations tr {
    display: grid;
    gap: 8px;
}

body.masoma-brand.single-product div.product form.cart.variations_form table.variations .label label {
    color: var(--masoma-ash);
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1;
    text-transform: uppercase;
}

body.masoma-brand.single-product div.product form.cart.variations_form table.variations .value {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

body.masoma-brand.single-product div.product form.cart.variations_form select {
    appearance: none;
    background-color: var(--masoma-bone);
    background-image: linear-gradient(45deg, transparent 50%, var(--masoma-ink) 50%), linear-gradient(135deg, var(--masoma-ink) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    border: 1px solid var(--masoma-line);
    border-radius: 0;
    box-shadow: none;
    color: var(--masoma-ink);
    cursor: pointer;
    flex: 1 1 220px;
    font-size: 0.78rem;
    font-weight: 700;
    height: 44px;
    letter-spacing: 0.08em;
    min-height: 44px;
    min-width: min(100%, 220px);
    padding: 0 38px 0 14px;
    text-transform: uppercase;
}

body.masoma-brand.single-product div.product form.cart.variations_form select:hover,
body.masoma-brand.single-product div.product form.cart.variations_form select:focus {
    border-color: var(--masoma-gold);
    outline: 0;
}

body.masoma-brand.single-product div.product form.cart.variations_form .reset_variations {
    display: none !important;
}

body.masoma-brand.single-product div.product form.cart.variations_form .reset_variations:hover,
body.masoma-brand.single-product div.product form.cart.variations_form .reset_variations:focus {
    color: var(--masoma-gold);
}

body.masoma-brand.single-product div.product form.cart.variations_form .single_variation_wrap {
    display: grid;
    gap: 12px;
}

body.masoma-brand.single-product div.product form.cart.variations_form.has-masoma-purchase-context:not(.is-masoma-sticky-cart) {
    gap: 4px;
}

body.masoma-brand.single-product .masoma-purchase-context {
    align-items: start;
    display: grid;
    gap: 3px;
    justify-items: start;
}

.masoma-variation-swatches {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.masoma-swatch-card {
    background: var(--masoma-bone);
    border: 1px solid var(--masoma-line);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    padding: 0;
    position: relative;
    transition: border-color 200ms ease, box-shadow 200ms ease;
    width: 88px;
}

.masoma-swatch-card:hover {
    border-color: var(--masoma-gold);
}

.masoma-swatch-card.is-selected {
    border-color: var(--masoma-ink);
    box-shadow: 0 0 0 1px var(--masoma-ink);
}

/* 点击（按下）状态与选中状态一致：移动端没有 hover，
   用 :active（+ JS .is-pressed 兜底）提供与 PC hover 相当的即时反馈 */
.masoma-swatch-card:active,
.masoma-swatch-card.is-pressed {
    border-color: var(--masoma-ink);
    box-shadow: 0 0 0 1px var(--masoma-ink);
}

.masoma-swatch-image {
    aspect-ratio: 3 / 4;
    display: block;
    overflow: hidden;
    width: 100%;
}

.masoma-swatch-image img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.masoma-swatch-label {
    color: var(--masoma-ink);
    display: block;
    font-family: var(--masoma-sans);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.3;
    padding: 4px 4px 5px;
    text-align: center;
    text-transform: uppercase;
}

body.masoma-brand.single-product .masoma-selected-finish-note {
    color: var(--masoma-ash);
    font-family: var(--masoma-sans);
    font-size: 0.76rem;
    line-height: 1.5;
    margin: 0;
    max-width: 480px;
}

body.masoma-brand.single-product .masoma-selected-finish-note[hidden] {
    display: none;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .masoma-variation-swatches {
    gap: 6px;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .masoma-swatch-image {
    display: none !important;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .masoma-swatch-card {
    align-items: center;
    flex-direction: row;
    gap: 0;
    padding: 5px 10px;
    width: auto;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .masoma-swatch-label {
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    padding: 0;
    white-space: nowrap;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .masoma-selected-finish-note {
    display: none !important;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .masoma-purchase-context {
    display: none !important;
}

@media (max-width: 860px) {
    .masoma-swatch-card {
        width: 76px;
    }

    .masoma-swatch-label {
        font-size: 0.56rem;
    }
    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .masoma-variation-swatches {
        display: none !important;
    }

    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart select {
        display: block !important; /* 覆盖 JS 内联的 display:none */
        width: 100%;
    }
}

body.masoma-brand.single-product div.product form.cart.variations_form .woocommerce-variation-add-to-cart {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

body.masoma-brand.single-product div.product form.cart.variations_form .woocommerce-variation {
    color: var(--masoma-ash);
    font-size: 0.9rem;
    line-height: 1.5;
}

.masoma-sticky-cart-placeholder {
    display: none;
}

.masoma-sticky-cart-title {
    display: none;
}

body.masoma-brand.single-product div.product form.cart.is-masoma-sticky-cart {
    align-items: center;
    background: rgba(255, 253, 248, 0.96);
    border-bottom: 1px solid var(--masoma-line);
    box-shadow: 0 12px 34px rgba(5, 5, 5, 0.08);
    gap: clamp(10px, 2vw, 18px);
    justify-content: flex-end;
    left: 0;
    margin: 0 !important;
    padding: 12px clamp(20px, 5vw, 72px);
    position: fixed;
    right: 0;
    top: var(--masoma-sticky-cart-top, 60px);
    z-index: 76;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(220px, 320px) auto;
    max-width: none;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart::before,
body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart::after {
    content: none !important;
    display: none !important;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .masoma-sticky-cart-title {
    grid-column: 1;
    grid-row: 1;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart table.variations {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart table.variations tr {
    display: block;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart table.variations .label {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart table.variations .value {
    display: block;
    min-width: 0;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart select {
    min-width: 0;
    width: 100%;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .reset_variations {
    display: none !important;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .reset_variations_alert {
    grid-column: 1;
    grid-row: 1;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .single_variation_wrap {
    display: block;
    grid-column: 3;
    grid-row: 1;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .woocommerce-variation {
    display: none !important;
}

body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .woocommerce-variation-add-to-cart {
    flex-wrap: nowrap;
}

.is-masoma-sticky-cart .masoma-sticky-cart-title {
    color: var(--masoma-ink);
    display: block;
    flex: 1 1 auto;
    font-family: var(--masoma-serif);
    font-size: clamp(1rem, 2.1vw, 1.45rem);
    font-weight: 400;
    line-height: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.masoma-sticky-cart-placeholder.is-active {
    display: block;
}

body.masoma-brand.single-product div.product form.cart div.quantity {
    align-items: stretch;
    border: 1px solid var(--masoma-line);
    display: inline-flex;
    float: none;
    height: 44px;
    margin: 0 !important;
}

body.masoma-brand.single-product div.product form.cart .quantity .qty {
    background: var(--masoma-bone);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--masoma-ink);
    font-size: 0.9rem;
    height: 42px;
    line-height: 42px;
    min-height: 42px;
    padding: 0;
    text-align: center;
    width: 44px;
}

body.masoma-brand.single-product div.product form.cart div.quantity:hover,
body.masoma-brand.single-product div.product form.cart div.quantity:focus-within {
    border-color: var(--masoma-gold);
}

body.masoma-brand.single-product div.product form.cart .quantity .qty:focus {
    outline: 0;
}

body.masoma-brand.single-product div.product form.cart .quantity .qty::-webkit-inner-spin-button,
body.masoma-brand.single-product div.product form.cart .quantity .qty::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
}

body.masoma-brand.single-product div.product form.cart .quantity .masoma-quantity-button {
    align-items: center;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    color: var(--masoma-ink) !important;
    cursor: pointer;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 700;
    height: 42px;
    justify-content: center;
    line-height: 1;
    min-height: 42px;
    opacity: 0;
    padding: 0;
    transition: background 160ms ease, color 160ms ease, opacity 160ms ease;
    width: 44px;
}

body.masoma-brand.single-product div.product form.cart .quantity:hover .masoma-quantity-button,
body.masoma-brand.single-product div.product form.cart .quantity:focus-within .masoma-quantity-button,
body.masoma-brand.single-product div.product form.cart.is-masoma-sticky-cart .quantity .masoma-quantity-button {
    opacity: 1;
}

body.masoma-brand.single-product div.product form.cart .quantity .masoma-quantity-button:hover,
body.masoma-brand.single-product div.product form.cart .quantity .masoma-quantity-button:focus {
    background: var(--masoma-black) !important;
    color: var(--masoma-bone) !important;
    outline: 0;
}

body.masoma-brand.single-product div.product form.cart .single_add_to_cart_button {
    align-items: center;
    display: inline-flex;
    height: 44px;
    justify-content: center;
    line-height: 1;
    margin: 0 !important;
    min-height: 44px;
    padding-bottom: 0;
    padding-top: 0;
}

body.masoma-brand.single-product div.product form.cart .single_add_to_cart_button:disabled,
body.masoma-brand.single-product div.product form.cart .single_add_to_cart_button.disabled,
body.masoma-brand.single-product div.product form.cart .single_add_to_cart_button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.48;
}

body.masoma-brand.single-product .ppcp-messages,
body.masoma-brand.single-product .ppc-button-wrapper {
    display: none !important;
}

body.masoma-brand.single-product .masoma-product-details {
    border-top: 1px solid var(--masoma-line);
    margin-top: 24px;
    padding-top: 24px;
}

body.masoma-brand.single-product .masoma-product-details__heading {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    justify-content: flex-start;
    margin-bottom: 14px;
}

body.masoma-brand.single-product .masoma-product-details dl {
    display: grid;
    gap: 0;
    margin: 0;
}

body.masoma-brand.single-product .masoma-product-details dl div {
    border-bottom: 1px solid var(--masoma-line);
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(110px, 0.32fr) minmax(0, 1fr);
    padding: 14px 0;
}

body.masoma-brand.single-product .masoma-product-details dt {
    color: var(--masoma-ink);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

body.masoma-brand.single-product .masoma-product-details dd {
    color: var(--masoma-ash);
    margin: 0;
}

body.masoma-brand.single-product .masoma-product-details dd p {
    font-size: 13px;
    margin: 0 0 10px;
}

body.masoma-brand.single-product .masoma-product-details dd p:last-child {
    margin-bottom: 0;
}

body.masoma-brand.single-product .masoma-additional-details,
body.masoma-brand.single-product .masoma-product-qa {
    border-top: 1px solid var(--masoma-line);
    margin-top: clamp(28px, 4vw, 48px);
    padding-top: clamp(24px, 4vw, 40px);
}

body.masoma-brand.single-product .masoma-additional-details h2,
body.masoma-brand.single-product .masoma-product-qa h2 {
    color: var(--masoma-ink);
    font-family: var(--masoma-serif);
    font-size: clamp(1.8rem, 3vw, 3rem);
    font-weight: 400;
    line-height: 1;
    margin: 0 0 22px;
}

body.masoma-brand.single-product .masoma-additional-details dl,
body.masoma-brand.single-product .masoma-product-qa dl {
    border-top: 1px solid var(--masoma-line);
    margin: 0;
}

body.masoma-brand.single-product .masoma-additional-details dl div,
body.masoma-brand.single-product .masoma-product-qa dl div {
    border-bottom: 1px solid var(--masoma-line);
    display: grid;
    gap: clamp(18px, 3vw, 42px);
    grid-template-columns: minmax(160px, 0.32fr) minmax(0, 1fr);
    padding: 18px 0;
}

body.masoma-brand.single-product .masoma-additional-details dt,
body.masoma-brand.single-product .masoma-product-qa dt {
    color: var(--masoma-ink);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

body.masoma-brand.single-product .masoma-additional-details dd,
body.masoma-brand.single-product .masoma-product-qa dd {
    color: var(--masoma-ash);
    margin: 0;
}

body.masoma-brand.single-product .masoma-additional-details dd p {
    margin: 0;
}

body.masoma-brand.single-product .masoma-product-studio-links {
    color: var(--masoma-ash);
    font-size: 0.85rem;
    margin: 22px 0 0;
}

body.masoma-brand.single-product .masoma-product-studio-links span {
    color: var(--masoma-ink);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

body.masoma-brand.single-product .masoma-product-studio-links a {
    color: var(--masoma-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.masoma-brand.single-product .masoma-product-studio-links a:hover {
    color: var(--masoma-accent, inherit);
}

body.masoma-brand.single-product .related.products > h2 {
    color: var(--masoma-ink);
    font-family: var(--masoma-serif);
    font-size: clamp(2rem, 4vw, 4.4rem);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
    margin: 0;
}

body.masoma-brand.single-product .related.products > h2 {
    margin: 0 0 clamp(24px, 4vw, 44px);
}

body.masoma-brand.single-product .woocommerce-tabs {
    margin-top: clamp(34px, 5vw, 70px);
}

body.masoma-brand.single-product div.product .woocommerce-tabs ul.tabs {
    border-bottom: 1px solid var(--masoma-line) !important;
    display: flex !important;
    gap: 0;
    margin: 0 0 clamp(34px, 5vw, 64px) !important;
    overflow-x: auto;
    padding: 0 !important;
}

body.masoma-brand.single-product div.product .woocommerce-tabs ul.tabs::before,
body.masoma-brand.single-product div.product .woocommerce-tabs ul.tabs::after,
body.masoma-brand.single-product div.product .woocommerce-tabs ul.tabs li::before,
body.masoma-brand.single-product div.product .woocommerce-tabs ul.tabs li::after {
    display: none !important;
}

body.masoma-brand.single-product div.product .woocommerce-tabs ul.tabs li {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
}

body.masoma-brand.single-product div.product .woocommerce-tabs ul.tabs li:hover,
body.masoma-brand.single-product div.product .woocommerce-tabs ul.tabs li:focus-within,
body.masoma-brand.single-product div.product .woocommerce-tabs ul.tabs li.active {
    background: transparent !important;
    border-bottom-color: var(--masoma-gold) !important;
}

body.masoma-brand.single-product div.product .woocommerce-tabs ul.tabs li a {
    color: var(--masoma-ash) !important;
    display: block;
    font-family: var(--masoma-sans);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.2;
    padding: 15px 18px 14px !important;
    text-decoration: none !important;
    text-transform: uppercase;
}

body.masoma-brand.single-product div.product .woocommerce-tabs ul.tabs li a:hover,
body.masoma-brand.single-product div.product .woocommerce-tabs ul.tabs li a:focus,
body.masoma-brand.single-product div.product .woocommerce-tabs ul.tabs li.active a {
    color: var(--masoma-ink) !important;
    outline: 0;
}

body.masoma-brand.single-product div.product .woocommerce-tabs .panel {
    border: 0;
    color: var(--masoma-ash);
    margin: 0 !important;
    padding: 0 !important;
}

body.masoma-brand.single-product .woocommerce-product-gallery__trigger,
body.masoma-brand.single-product .woocommerce-product-gallery .zoomImg {
    display: none !important;
}

body.masoma-brand.single-product .woocommerce-product-gallery__wrapper {
    cursor: pointer;
    touch-action: pan-y;
}

.single-product .single_add_to_cart_button {
    background: var(--masoma-black);
    border-radius: 0;
    color: var(--masoma-bone);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    padding: 14px 20px;
    text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
    .single-product .single_add_to_cart_button:hover {
        background: var(--masoma-gold);
        color: var(--masoma-black);
    }
}

@media (max-width: 980px) {

    body.is-masoma-gallery-open {
        overflow: hidden;
    }

    body.is-masoma-gallery-open .masoma-header {
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
    }

    /* 全屏查看大图时隐藏底部加购栏（display:grid !important 需同权重 !important 覆盖） */
    body.is-masoma-gallery-open .masoma-fixed-bar {
        display: none !important;
    }

    .masoma-mobile-gallery-lightbox {
        align-items: center;
        background: rgba(5, 5, 5, 0.94);
        display: flex;
        inset: 0;
        justify-content: center;
        padding: 22px;
        position: fixed;
        /* 容器级锁定手势：touch-action 不继承，img 已设，这里覆盖 padding/背景
           区域 —— 否则手指落在图片外时浏览器会执行页面级 pinch 缩放，
           退出全屏后页面停留在缩放态（变形） */
        touch-action: none;
        overscroll-behavior: none;
        /* 高于 .masoma-fixed-bar(9990)，任何注入条都不浮在全屏之上 */
        z-index: 10000;
    }

    .masoma-mobile-gallery-lightbox * {
        touch-action: none;
    }

    .masoma-mobile-gallery-dismiss {
        align-items: center;
        background: rgba(5, 5, 5, 0.82) !important;
        border: 1px solid rgba(255, 253, 248, 0.4) !important;
        color: var(--masoma-bone) !important;
        cursor: pointer;
        display: inline-flex;
        font-family: var(--masoma-sans);
        font-size: 1.5rem;
        height: 44px;
        justify-content: center;
        line-height: 1;
        padding: 0;
        position: absolute;
        right: max(16px, env(safe-area-inset-right));
        top: max(16px, env(safe-area-inset-top));
        width: 44px;
        z-index: 2;
    }

    .masoma-mobile-gallery-dismiss:hover,
.masoma-mobile-gallery-dismiss:focus-visible {
        background: rgba(5, 5, 5, 0.94) !important;
        border-color: var(--masoma-gold) !important;
        color: var(--masoma-gold) !important;
    }

    .masoma-mobile-gallery-lightbox[hidden] {
        display: none !important;
    }

    .masoma-mobile-gallery-lightbox img {
        display: block;
        max-height: 100%;
        max-width: 100%;
        object-fit: contain;
        touch-action: none;
        transform-origin: center center;
        user-select: none;
        will-change: transform;
    }

}

@media (max-width: 860px) {
    body.masoma-brand.single-product div.product form.cart .quantity .masoma-quantity-button {
        opacity: 1;
    }

    body.masoma-brand.single-product div.product form.cart.is-masoma-sticky-cart {
        transition: top 180ms ease;
    }

    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart {
        gap: 8px;
        grid-template-columns: clamp(104px, 28vw, 132px) auto;
        justify-content: space-between;
        padding: 8px 12px;
    }

    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .masoma-sticky-cart-title {
        display: none;
    }

    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart table.variations {
        display: block;
        grid-column: 1;
        grid-row: 1;
        height: 44px;
        min-width: 0;
    }

    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .single_variation_wrap {
        grid-column: 2;
        grid-row: 1;
    }

    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .woocommerce-variation-add-to-cart {
        gap: 8px;
        justify-content: flex-end;
    }

    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart select {
        background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
        font-size: 0.66rem;
        height: 44px;
        letter-spacing: 0.04em;
        min-width: 0;
        padding-left: 10px;
        padding-right: 28px;
        width: 100%;
    }

    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart div.quantity {
        width: 104px;
    }

    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .quantity .masoma-quantity-button,
body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .quantity .qty {
        width: 34px;
    }

    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .single_add_to_cart_button {
        font-size: 0.64rem;
        letter-spacing: 0.07em;
        min-width: 108px;
        padding-left: 10px;
        padding-right: 10px;
        white-space: nowrap;
    }
}

@media (hover: none), (pointer: coarse) {
    body.masoma-brand.single-product div.product form.cart .quantity .masoma-quantity-button {
        opacity: 1;
    }
}

@media (max-width: 359px) {
    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart {
        gap: 6px;
        grid-template-columns: minmax(86px, 94px) auto;
        padding-left: 8px;
        padding-right: 8px;
    }

    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .woocommerce-variation-add-to-cart {
        gap: 6px;
    }

    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart select {
        background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%;
        font-size: 0.6rem;
        padding-left: 8px;
        padding-right: 24px;
    }

    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart div.quantity {
        width: 96px;
    }

    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .quantity .masoma-quantity-button,
body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .quantity .qty {
        width: 32px;
    }

    body.masoma-brand.single-product div.product form.cart.variations_form.is-masoma-sticky-cart .single_add_to_cart_button {
        font-size: 0.6rem;
        letter-spacing: 0.05em;
        min-width: 98px;
        padding-left: 8px;
        padding-right: 8px;
    }
}

@media (max-width: 720px) {

    body.masoma-brand.single-product .masoma-product-details dl div {
        gap: 8px;
        grid-template-columns: 1fr;
    }

    body.masoma-brand.single-product .masoma-additional-details dl div,
body.masoma-brand.single-product .masoma-product-qa dl div {
    gap: 8px;
    grid-template-columns: 1fr;
}

}


body.masoma-brand.single-product .masoma-thumb-col {
    display: none;
}

body.masoma-brand.single-product .masoma-sku-hidden {
    visibility: hidden !important;
}

@media (max-width: 921.98px) {
    /* 移动端连续流画廊：所有 SKU 的大图全部可见、可横向触摸滑动。
       不再隐藏任何 slide（SKU 过滤只作用于桌面端）；
       也不强制 transform:none / width 覆盖（否则 flexslider
       的横向滑动 translate 动画失效，无法随手指同步滑出）。 */
    body.masoma-brand.single-product .masoma-sku-hidden {
        visibility: visible !important;
        display: block !important;
    }
    body.masoma-brand.single-product .woocommerce-product-gallery__image {
        /* 连续流画廊依赖 flexslider 横向布局：slide 由 flexslider 设置
           float:left + computedW 宽度。不得覆盖 float/width（否则 slide
           纵向堆叠，水平滑动与 SKU 切换动画全部失效）。 */
        margin: 0 !important;
        display: block;
    }
}

@media (min-width: 922px) {
    body.masoma-brand.single-product div.product {
        display: grid;
        grid-template-columns: 80px auto minmax(440px, 560px);
        grid-template-areas: 'thumbs images summary';
        gap: 28px;
        align-items: start;
        justify-content: center;
        /* 超过固定宽度后整体不再拉伸，始终居中，主图与右侧信息列保持在一起 */
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
    }
    body.masoma-brand.single-product div.product > *:not(.images):not(.summary):not(.masoma-thumb-col) {
        grid-column: 1 / -1;
    }
    body.masoma-brand.single-product div.product div.images {
        grid-area: images;
        float: none !important;
        max-width: 100%;
        width: auto;
        min-width: 0;
    }
    body.masoma-brand.single-product div.product div.summary {
        grid-area: summary;
        width: auto !important;
        float: none !important;
    }
    body.masoma-brand.single-product .masoma-thumb-col {
        grid-area: thumbs;
        display: flex;
        flex-direction: column;
        gap: 8px;
        max-height: calc(100vh - 190px);
        overflow-y: auto;
        padding: 0;
    }
    body.masoma-brand.single-product .masoma-thumb-col button {
        width: 80px;
        height: 0;
        padding-bottom: 80px;
        position: relative;
        border: 1px solid var(--masoma-line);
        cursor: pointer;
        background: var(--masoma-bone);
        overflow: hidden;
        transition: border-color .2s;
    }
    body.masoma-brand.single-product .masoma-thumb-col button.on {
        border-color: var(--masoma-ink);
    }
    body.masoma-brand.single-product .masoma-thumb-col button img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    body.masoma-brand.single-product .masoma-thumb-col::-webkit-scrollbar {
        width: 4px;
    }
    body.masoma-brand.single-product .masoma-thumb-col::-webkit-scrollbar-thumb {
        background: var(--masoma-line);
    }
    body.masoma-brand.single-product div.product div.images {
        width: min(calc((100vh - 190px) * 0.75), 800px);
        max-width: 100%;
    }
    body.masoma-brand.single-product div.product div.images .woocommerce-product-gallery__wrapper {
        margin: 0;
        position: relative;
    }
    body.masoma-brand.single-product div.product div.images .flex-viewport {
        overflow: hidden;
        position: relative;
    }
    body.masoma-brand.single-product div.product div.images .woocommerce-product-gallery__image {
        margin: 0;
        float: none !important;
        width: 100% !important;
    }
    body.masoma-brand.single-product div.product div.images .woocommerce-product-gallery__image a,
body.masoma-brand.single-product div.product div.images .woocommerce-product-gallery__image img {
        display: block;
        width: 100% !important;
        max-width: 100%;
        height: auto;
        margin: 0;
    }
    body.masoma-brand.single-product div.product div.images .woocommerce-product-gallery__image a {
        max-height: calc(100vh - 190px);
        width: 100% !important;
        max-width: 100%;
    }
}

/* 超宽桌面：按视口高度收紧首屏，让图片、缩略图和信息栏成为紧凑的一组。 */
@media (min-width: 1601px) {
    body.masoma-brand.single-product #primary {
        margin-top: 30px;
    }

    body.masoma-brand.single-product div.product {
        grid-template-columns:
            80px
            min(calc((100vh - 132px) * 0.75), 800px)
            minmax(440px, 560px);
        gap: 18px;
        max-width: calc(
            80px + min(calc((100vh - 132px) * 0.75), 800px) + 560px + 36px + 144px
        );
        padding-top: clamp(4.5px, 0.75vw, 10.75px);
    }

    body.masoma-brand.single-product div.product div.images {
        width: min(calc((100vh - 132px) * 0.75), 800px);
    }

    body.masoma-brand.single-product div.product div.images .woocommerce-product-gallery__image a,
    body.masoma-brand.single-product .masoma-thumb-col {
        max-height: calc(100vh - 132px);
    }
}

@media (min-width: 922px) and (max-width: 1600px) {
    body.masoma-brand.single-product div.product {
        grid-template-columns: 64px minmax(0, 1fr) minmax(340px, 440px);
        grid-template-areas: 'thumbs images summary';
        gap: 18px;
        max-width: 1600px;
    }
    body.masoma-brand.single-product div.product div.images {
        width: 100%;
        max-width: 100%;
    }
    body.masoma-brand.single-product .masoma-thumb-col button {
        width: 64px;
        padding-bottom: 64px;
    }
}

body.masoma-brand.single-product .flex-control-thumbs {
    display: none !important;
}

@media (max-width: 921px) {
    body.masoma-brand.single-product .ast-container {
        padding-left: 0;
        padding-right: 0;
    }

    body.masoma-brand.single-product div.product {
        padding: 0;
    }

    body.masoma-brand.single-product div.product div.images {
        float: none !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    body.masoma-brand.single-product div.product div.images .woocommerce-product-gallery {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    body.masoma-brand.single-product div.product div.images .woocommerce-product-gallery__wrapper,
body.masoma-brand.single-product div.product div.images .woocommerce-product-gallery__image {
        /* 去掉 width:100% !important：会压掉 flexslider 的横向布局宽度
           （wrapper 2400%、slide computedW），导致 slide 纵向堆叠。 */
        margin: 0 !important;
        padding: 0 !important;
    }
    body.masoma-brand.single-product div.product div.images .woocommerce-product-gallery__image a {
        display: block;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    body.masoma-brand.single-product div.product div.images .woocommerce-product-gallery__image img {
        display: block;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
    }
    body.masoma-brand.single-product div.product > *:not(.images) {
        padding-left: 20px;
        padding-right: 20px;
    }
    body.masoma-brand.single-product .masoma-gallery-dots {
        align-items: center;
        display: flex;
        gap: 8px;
        justify-content: center;
        padding: 12px 20px 6px;
    }

    body.masoma-brand.single-product .masoma-gallery-dots button {
        background: var(--masoma-line);
        border: 0;
        border-radius: 50%;
        cursor: pointer;
        height: 6px;
        margin: 0;
        padding: 0;
        transition: background 0.2s, transform 0.2s;
        width: 6px;
    }

    body.masoma-brand.single-product .masoma-gallery-dots button.on {
        background: var(--masoma-gold);
        transform: scale(1.4);
    }
    body.masoma-brand.single-product div.product form.cart .woocommerce-variation-add-to-cart {
        align-items: center;
        background: rgba(255, 253, 248, 0.97);
        border-top: 1px solid var(--masoma-line);
        bottom: 0;
        box-shadow: 0 -8px 24px rgba(5, 5, 5, 0.1);
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        left: 0;
        margin: 0 !important;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        position: fixed;
        right: 0;
        z-index: 80;
    }

    body.masoma-brand.single-product div.product form.cart:not(.variations_form) {
        align-items: center;
        background: rgba(255, 253, 248, 0.97);
        border-top: 1px solid var(--masoma-line);
        bottom: 0;
        box-shadow: 0 -8px 24px rgba(5, 5, 5, 0.1);
        display: flex;
        gap: 10px;
        left: 0;
        margin: 0 !important;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        position: fixed;
        right: 0;
        z-index: 80;
    }

    body.masoma-brand.single-product div.product form.cart .woocommerce-variation-add-to-cart .single_add_to_cart_button,
body.masoma-brand.single-product div.product form.cart:not(.variations_form) .single_add_to_cart_button {
        flex: 1;
        margin: 0;
    }
    body.masoma-brand.single-product .summary {
        padding-bottom: 96px;
    }
}

/* ============================================================
   MASOMA 单产品移动端草图布局 · 第一步（纯 CSS，不注入任何 JS 元素）
   目标：只重排摘要顺序 + 安全隐藏，验证视觉方向。后续步骤再注入
   返回按钮 / 计数器 / 底部三栏，届时取消本块内"临时隐藏"。
   ============================================================ */
@media (max-width: 921px) {

    /* 1) 隐藏 LOGO（返回按钮由后续 JS 注入）
         以及隐藏 .masoma-nav，仅保留右侧购物车（.masoma-header-tools） */
    body.masoma-brand.single-product .masoma-header .masoma-logo,
    body.masoma-brand.single-product .masoma-header .masoma-mobile-context,
    body.masoma-brand.single-product .masoma-header .masoma-nav {
        display: none !important;
    }

    /* 2) 去掉面包屑 */
    body.masoma-brand.single-product nav.woocommerce-breadcrumb {
        display: none !important;
    }

    /* 3) 摘要改 flex + order：SKU(form) 紧贴大图 → 标题 → 描述 → 其余
       原本 DOM 顺序：breadcrumb→category→title→price→form(swatches)→details→trust
       重排后：form(1) → title(2) → desc(3) → 其它 */
    body.masoma-brand.single-product .summary {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px 20px 110px;
    }
    body.masoma-brand.single-product .summary form.cart,
    body.masoma-brand.single-product .summary form.variations_form {
        order: 1;
    }
    body.masoma-brand.single-product .summary .product_title {
        order: 2;
        margin: 0 !important;
    }
    body.masoma-brand.single-product .summary .woocommerce-product-details__short-description {
        order: 3;
    }
    body.masoma-brand.single-product .summary p.price {
        order: 4;
        display: none !important; /* 价格后续搬到底部栏 */
    }
    body.masoma-brand.single-product .summary .masoma-purchase-context {
        order: 5;
    }
    body.masoma-brand.single-product .summary .masoma-mobile-seo-copy {
        order: 6;
    }
    body.masoma-brand.single-product .summary .masoma-product-details,
    body.masoma-brand.single-product .summary .masoma-product-trust-row,
    body.masoma-brand.single-product .summary .masoma-additional-details,
    body.masoma-brand.single-product .summary .masoma-product-qa {
        order: 7;
    }

    /* 4) 标题样式（移动端更醒目） */
    body.masoma-brand.single-product .summary .product_title {
        font-family: var(--masoma-serif);
        font-size: clamp(1.8rem, 7vw, 2.4rem);
        font-weight: 400;
        line-height: 1.05;
        padding-top: 4px;
    }

    /* 5) 隐藏移动端原本嵌套在 summary 里的固定加购栏（后续由 JS 注入三栏底栏替代）。
       数量选择隐藏（草图要求去掉数量） */
    body.masoma-brand.single-product div.product form.cart .woocommerce-variation-add-to-cart,
    body.masoma-brand.single-product div.product form.cart:not(.variations_form) {
        display: none !important;
    }
    body.masoma-brand.single-product .summary form.cart div.quantity {
        display: none !important;
    }
}

/* ============================================================
   MASOMA 单产品移动端草图布局 · 第二步（注入元素配套）
   配合 masoma-product.js 第三个 IIFE 的注入元素：
     .masoma-mobile-back / .masoma-gallery-counter /
     .masoma-fixed-bar / .masoma-mobile-seo-copy
   ============================================================ */

/* 桌面端永远不显示移动端注入元素（防断点残留） */
@media (min-width: 922px) {
    .masoma-mobile-back,
    .masoma-fixed-bar {
        display: none !important;
    }
}

@media (max-width: 921px) {
    /* 1) 隐藏 flexslider 默认控制 + js 注入的移动端 dots */
    body.masoma-brand.single-product .flex-direction-nav,
    body.masoma-brand.single-product .flex-control-nav,
    body.masoma-brand.single-product .masoma-gallery-dots {
        display: none !important;
    }

    /* 2) short-description 紧随标题之后（草图：SKU→标题→介绍） */
    body.masoma-brand.single-product .summary .woocommerce-product-details__short-description {
        order: 3;
        font-size: 0.95rem;
        line-height: 1.55;
        color: #555;
        margin: 0;
    }
    body.masoma-brand.single-product .summary .woocommerce-product-details__short-description p { margin: 0; }

    /* 3) JS 注入的 long description 容器（在表单之后） */
    body.masoma-brand.single-product .summary .masoma-mobile-seo-copy {
        order: 4;
        margin-top: 14px;
        font-size: 0.95rem;
        line-height: 1.65;
        color: #333;
    }
    body.masoma-brand.single-product .summary .masoma-mobile-seo-copy p { margin: 0 0 12px; }
    body.masoma-brand.single-product .summary .masoma-mobile-seo-copy h2,
    body.masoma-brand.single-product .summary .masoma-mobile-seo-copy h3,
    body.masoma-brand.single-product .summary .masoma-mobile-seo-copy h4 {
        font-family: var(--masoma-serif);
        font-weight: 400;
        line-height: 1.25;
        margin: 18px 0 8px;
        color: #1a1a1a;
    }
    body.masoma-brand.single-product .summary .masoma-mobile-seo-copy img {
        max-width: 100%;
        height: auto;
        margin: 12px 0;
    }

    /* 4) 返回按钮（占 LOGO 位，靠左） */
    body.masoma-brand.single-product .masoma-header {
        gap: 8px;
    }
    .masoma-mobile-back {
        appearance: none;
        background: transparent;
        border: 0;
        cursor: pointer;
        width: 44px;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin-right: auto;
        -webkit-tap-highlight-color: transparent;
    }
    .masoma-mobile-back svg {
        width: 22px;
        height: 22px;
        stroke: currentColor;
        fill: none;
        stroke-width: 0.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* 5) 大图右下角计数器 */
    body.masoma-brand.single-product .woocommerce-product-gallery {
        position: relative;
    }
    body.masoma-brand.single-product .masoma-gallery-counter {
        position: absolute;
        right: 12px;
        /* 与左下角 finish note 文字水平中线对齐：
           note 文字中心 = bottom 12 + 12px*1.5/2 = 21px；
           counter 文字中心 = bottom + padding-top 4 + 11px*1.5/2，
           取 bottom 9px → 9 + 4 + 8.25 = 21.25px ≈ 21px */
        bottom: 9px;
        /* 高于 finish note(5)：长文案缩小字号后仍极端超宽时，数字永远在最上层 */
        z-index: 6;
        padding: 4px 10px;
        background: rgba(0, 0, 0, 0.55);
        color: #fff;
        font-size: 11px;
        line-height: 1.5;
        letter-spacing: 0.04em;
        font-variant-numeric: tabular-nums;
        border-radius: 999px;
        pointer-events: none;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    /* 6) 底部固定栏：左价格 / 中数量选择 / 右加购 */
    .masoma-fixed-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9990;
        display: grid !important;
        grid-template-columns: minmax(80px, auto) 104px 1fr;
        gap: 8px;
        align-items: center;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
        background: #fff;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
    }
    .masoma-fixed-bar .masoma-bar-price {
        font-size: 13px;
        line-height: 1.1;
        font-weight: 600;
        color: #1a1a1a;
        letter-spacing: 0;
        padding-left: 2px;
    }
    .masoma-fixed-bar .masoma-bar-price .amount {
        display: block;
        font-size: 10px;
        font-weight: 400;
        color: #888;
        margin-top: 2px;
    }
    .masoma-fixed-bar button {
        appearance: none;
        border-radius: 0;
        font: inherit;
        padding: 12px 6px;
        font-size: 12px;
        cursor: pointer;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        line-height: 1;
        -webkit-tap-highlight-color: transparent;
        min-height: 44px;
    }
    .masoma-fixed-bar .masoma-bar-add {
        background: var(--masoma-black);
        border: 1px solid var(--masoma-black);
        color: var(--masoma-bone);
        transition: background 0.15s, color 0.15s;
    }
    .masoma-fixed-bar .masoma-bar-add:active {
        background: #333;
        color: var(--masoma-bone);
    }
    /* 数量 stepper：- / 数值 / + 居中组合（与购物车抽屉 .masoma-cart-drawer-quantity 一致：
       浅灰边框、透明按钮墨色粗体、按下黑底白字、数值两侧分隔线） */
    .masoma-fixed-bar .masoma-bar-qty {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 44px;
        border: 1px solid var(--masoma-line);
    }
    .masoma-fixed-bar .masoma-bar-qty-btn {
        flex: 0 0 32px;
        width: 32px;
        min-height: 0;
        padding: 0;
        font-size: 16px;
        font-weight: 700;
        line-height: 1;
        letter-spacing: 0;
        text-transform: none;
        background: transparent;
        border: 0;
        color: var(--masoma-ink);
    }
    .masoma-fixed-bar .masoma-bar-qty-btn:active {
        background: var(--masoma-black);
        color: var(--masoma-bone);
    }
    .masoma-fixed-bar .masoma-bar-qty-input {
        flex: 0 0 38px;
        width: 38px;
        min-width: 0;
        border: 0;
        border-left: 1px solid var(--masoma-line);
        border-right: 1px solid var(--masoma-line);
        background: transparent;
        padding: 0;
        text-align: center;
        font: inherit;
        font-size: 13px;
        color: var(--masoma-ink);
        outline: none;
        -moz-appearance: textfield;
        -webkit-appearance: none;
        appearance: none;
    }
    .masoma-fixed-bar .masoma-bar-qty-input::-webkit-outer-spin-button,
    .masoma-fixed-bar .masoma-bar-qty-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    /* 7) 移动端为 .summary 末尾留出底部栏空间，防止 fixed-bar 遮挡。
       之前 body padding-bottom:78px 会让 footer 之下也出现约 9% 视口的空白，
       现改为加到 .summary 的 padding-bottom，让喘息空间落在 summary 之内而不是全局 body。 */
    body.masoma-brand.single-product {
        padding-bottom: 0;
    }
    body.masoma-brand.single-product .summary {
        padding-bottom: 78px !important;
    }

    /* 8) 移动端产品页隐藏 Astra 默认返回顶部按钮，避免与底栏 BUY NOW 重叠 */
    body.masoma-brand.single-product .ast-scroll-top-icon {
        display: none !important;
    }
}

/* ============================================================
   MASOMA 单产品移动端草图布局 · 第三步
   - header 初始透明悬浮（大图顶到页面顶部），滚动后白底黑图标 + 中间标题
   - 去掉 LOGO / 菜单按钮 / 移动端 nav
   - 覆盖 masoma.js 的滚动隐藏逻辑：产品页 header 滚动时始终可见
   - FINISH 文字隐藏，swatch 更贴近大图
   - finish hint 小字搬到大图左下角
   - 底部栏价格字号加大
   ============================================================ */
@media (max-width: 921px) {
    /* 1) header 悬浮不占位：初始透明，大图顶到页面顶部 */
    body.masoma-brand.single-product .masoma-header {
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-bottom: 0;
        box-shadow: none;
        display: flex;
        gap: 0;
        grid-template-columns: none;
        grid-template-rows: none;
        justify-content: space-between;
        min-height: 50px;
        padding: 0 16px;
        position: fixed;
        transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
        z-index: 1000;
    }
    body.masoma-brand.single-product .masoma-header.is-product-scroll-hidden:not(.is-menu-open) {
        pointer-events: auto;
        transform: none;
    }
    body.masoma-brand.single-product .masoma-header .masoma-logo,
    body.masoma-brand.single-product .masoma-header .masoma-menu-toggle,
    body.masoma-brand.single-product .masoma-header .masoma-nav {
        display: none !important;
    }
    body.masoma-brand.single-product .masoma-header .masoma-header-tools {
        display: flex;
        align-items: center;
    }

    /* 2) 初始：白色悬浮图标（叠加在大图上），中间标题隐藏 */
    body.masoma-brand.single-product .masoma-header .masoma-mobile-back {
        color: #fff;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
        margin-right: 0;
    }
    body.masoma-brand.single-product .masoma-header .masoma-cart {
        color: #fff;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
    }
    body.masoma-brand.single-product .masoma-header .masoma-mobile-context {
        display: -webkit-box !important;
        opacity: 0;
        font-size: 13px;
        letter-spacing: 0.05em;
        color: #1a1a1a;
        transition: opacity 200ms ease;
    }

    /* 3) 滚动后：白底黑图标 + 中间标题浮现 */
    body.masoma-brand.single-product .masoma-header.is-scrolled {
        background: rgba(255, 253, 248, 0.96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(22, 20, 18, 0.08);
        box-shadow: 0 1px 12px rgba(0, 0, 0, 0.05);
    }
    body.masoma-brand.single-product .masoma-header.is-scrolled .masoma-mobile-back,
    body.masoma-brand.single-product .masoma-header.is-scrolled .masoma-cart {
        color: #1a1a1a;
        filter: none;
    }
    body.masoma-brand.single-product .masoma-header.is-scrolled .masoma-mobile-context {
        opacity: 1;
    }

    /* 4) FINISH 文字隐藏，swatch 贴近大图（flexslider 默认 margin-bottom:16px 会拉开间距，清零）。
       form 下边距清零：form 是 summary 第一个 flex item，margin-bottom 10px + summary gap 12px
       会在 SKU 选择区与标题之间累计出 22px 空隙（用户反馈"SKU 下面太空"），清掉后只剩 gap 12px */
    body.masoma-brand.single-product div.product form.cart.variations_form table.variations .label {
        display: none;
    }
    body.masoma-brand.single-product div.product form.cart.variations_form {
        margin: 0;
    }
    body.masoma-brand.single-product .woocommerce-product-gallery .flex-viewport {
        margin-bottom: 0 !important;
    }
    body.masoma-brand.single-product .summary {
        padding-top: 8px;
    }

    /* 5) finish hint 小字：原位置隐藏，大图左下角显示 */
    body.masoma-brand.single-product .summary .masoma-selected-finish-note {
        display: none !important;
    }
    body.masoma-brand.single-product .woocommerce-product-gallery {
        position: relative;
    }
    /* 无背景胶囊：只留细文字阴影保证在浅色/深色大图上都可读 */
    body.masoma-brand.single-product .masoma-gallery-finish-note {
        bottom: 12px;
        color: #fff;
        font-family: var(--masoma-sans);
        font-size: 12px;
        left: 12px;
        letter-spacing: 0.01em;
        line-height: 1.5;
        margin: 0;
        max-width: 65%;
        padding: 0;
        pointer-events: none;
        position: absolute;
        text-align: left;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
        z-index: 5;
    }
    body.masoma-brand.single-product .masoma-gallery-finish-note[hidden] {
        display: none;
    }

    /* 6) 底部栏价格字号加大 */
    .masoma-fixed-bar .masoma-bar-price {
        font-size: 17px;
    }
    .masoma-fixed-bar .masoma-bar-price .amount {
        font-size: 13px;
    }
}

/* ============================================================
   MASOMA 单产品移动端草图布局 · 第四步
   - 返回按钮更靠左、图标加大、清除残留方框阴影
   - swatch 左边距与上边距一致（8px）
   - finish hint 小字单行显示完整
   - 底部栏价格字号加大
   ============================================================ */
@media (max-width: 921px) {
    /* 1) 返回按钮：更靠左、图标更大、无方框 */
    body.masoma-brand.single-product .masoma-header {
        padding-left: 8px;
    }
    body.masoma-brand.single-product .masoma-header .masoma-mobile-back {
        background: transparent !important;
        border: 0;
        box-shadow: none !important;
        outline: none;
        -webkit-tap-highlight-color: transparent;
    }
    body.masoma-brand.single-product .masoma-header .masoma-mobile-back svg {
        height: 26px;
        width: 26px;
    }

    /* 2) swatch 左边距与 summary 其它内容一致（继承 padding-left 20px，不再 -12px 内缩） */

    /* 3) finish hint 小字单行显示完整：
       max-width 在右下角图片计数器（"3 / 12"）左缘前留 10px（实际可用 305px），
       长文案永不压到数字；文字仍超宽时 JS 会把字号从 12px 逐级缩到 9px，
       overflow:hidden 只是 JS 失效时的最后兜底（裁切而非遮挡数字） */
    body.masoma-brand.single-product .masoma-gallery-finish-note {
        max-width: calc(100% - 85px);
        overflow: hidden;
        white-space: nowrap;
    }

    /* 4) 底部栏价格字号加大（金额是实际显示主体，与 summary 原价格观感一致） */
    .masoma-fixed-bar .masoma-bar-price {
        font-size: 20px;
    }
    .masoma-fixed-bar .masoma-bar-price .amount {
        font-size: 20px;
    }
}
