/* ========== 单品页 ========== */
.woocommerce div.product {
    padding: 16px;
}
.woocommerce div.product .quantity .qty {
    width: 56px;
    min-height: 44px;
    text-align: center;
    border: 1px solid var(--rhm-color-outline, #d9dcd7);
    border-radius: 8px;
    font-size: 14px;
}
.single-product .woocommerce-notices-wrapper:not(:empty) {
    padding: 12px 16px 0;
}

.single-product .rhm-single-product {
    --rhm-single-product-section-gap: 28px;
    padding: 14px 16px 36px;
}

/* Keep deferred below-fold sections close to their final geometry. */
.rhm-single-product__reviews[data-rhm-product-reviews-assets="pending"],
.rhm-single-product__reviews[data-rhm-product-reviews-assets="loading"] {
    margin-top: var(--rhm-single-product-section-gap);
    content-visibility: auto;
    contain-intrinsic-size: auto 780px;
}

.rhm-single-product__related[data-rhm-related-assets="pending"],
.rhm-single-product__related[data-rhm-related-assets="loading"] {
    margin-top: var(--rhm-single-product-section-gap);
    content-visibility: auto;
    contain-intrinsic-size: auto 776px;
}

/* Keep the deferred list stable before its component stylesheet arrives. */
.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-single-product__related-list,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-single-product__related-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    list-style: none;
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-single-product__related-list > li.product,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-single-product__related-list > li.product {
    display: flex;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    float: none;
    clear: none;
}

/* Keep deferred recommendation cards in the same mobile geometry as the loaded component. */
.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card {
    box-sizing: border-box;
    display: flex;
    width: 100%;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    background: var(--rhm-color-surface, #fff);
    border: 1px solid var(--rhm-color-outline, #d9dcd7);
    border-radius: 10px;
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__image-wrapper,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__image-wrapper {
    box-sizing: border-box;
    width: 100%;
    flex: 0 0 auto;
    aspect-ratio: 1;
    overflow: hidden;
    padding: 0;
    background: var(--rhm-product-card-image-fill, #fff);
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__image-link,
.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__picture,
.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__image,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__image-link,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__picture,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__image {
    display: block;
    width: 100%;
    height: 100%;
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__image,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__image {
    object-fit: var(--rhm-product-card-image-fit, cover);
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__body,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__title,
.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__excerpt,
.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__rating,
.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__price,
.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__actions,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__title,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__excerpt,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__rating,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__price,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__actions {
    min-width: 0;
    margin: 0;
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__title,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__title {
    overflow: hidden;
    font-size: 14px;
    line-height: 1.4;
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__title-text,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__title-text {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__excerpt,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__excerpt {
    display: -webkit-box;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__rating,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__rating {
    display: flex;
    align-items: center;
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-rating-summary,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-rating-summary {
    display: inline-flex;
    max-width: 100%;
    min-width: 0;
    align-items: center;
    gap: 3px;
    color: var(--rhm-color-ink, #171817);
    line-height: 1.2;
    white-space: nowrap;
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-rating-summary__stars,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-rating-summary__stars {
    display: block;
    width: 46px;
    height: 8.625px;
    flex: 0 0 auto;
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-rating-summary__value,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-rating-summary__value {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-rating-summary__score,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-rating-summary__score {
    font-size: 11px;
    font-weight: 750;
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-rating-summary__rated,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-rating-summary__rated {
    font-size: 10px;
    font-weight: 750;
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-rating-summary__reviews,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-rating-summary__reviews {
    margin-left: 1px;
    color: var(--rhm-color-ink-muted, #626660);
    font-size: 10px;
    font-weight: 400;
    white-space: nowrap;
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-product-card__actions,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-product-card__actions {
    display: flex;
    align-items: center;
    margin-top: auto;
}

@media (min-width: 768px) {
    .rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-rating-summary__stars,
    .rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-rating-summary__stars {
        width: 60px;
        height: 11.25px;
    }
}

.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-single-product__related-list::before,
.rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-single-product__related-list::after,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-single-product__related-list::before,
.rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-single-product__related-list::after {
    display: none;
    content: none;
}

/* Defer layout and paint for the long-form sections that sit below the purchase area. */
.rhm-single-product__accordions {
    margin-top: var(--rhm-single-product-section-gap);
    content-visibility: auto;
    contain-intrinsic-size: auto 420px;
}

.rhm-single-product__description {
    margin: var(--rhm-single-product-section-gap) 0 0;
    padding: 0;
    content-visibility: auto;
    contain-intrinsic-size: auto 820px;
}

@media (max-width: 359px) {
    .rhm-single-product__reviews[data-rhm-product-reviews-assets="pending"],
    .rhm-single-product__reviews[data-rhm-product-reviews-assets="loading"] {
        contain-intrinsic-size: auto 880px;
    }

    .rhm-single-product__related[data-rhm-related-assets="pending"],
    .rhm-single-product__related[data-rhm-related-assets="loading"] {
        contain-intrinsic-size: auto 752px;
    }
}

@media (min-width: 768px) {
    .rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-single-product__related-list,
    .rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-single-product__related-list {
        gap: 20px;
        padding: 0 24px;
    }
}

@media (min-width: 992px) {
    .rhm-single-product__related[data-rhm-related-assets="pending"] .rhm-single-product__related-list,
    .rhm-single-product__related[data-rhm-related-assets="loading"] .rhm-single-product__related-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 22px;
        padding: 0 32px;
    }

    .rhm-single-product__reviews[data-rhm-product-reviews-assets="pending"],
    .rhm-single-product__reviews[data-rhm-product-reviews-assets="loading"] {
        contain-intrinsic-size: auto 660px;
    }

    .rhm-single-product__related[data-rhm-related-assets="pending"],
    .rhm-single-product__related[data-rhm-related-assets="loading"] {
        contain-intrinsic-size: auto 490px;
    }
}

/* ========== 单品详情页：彻底贴顶 ========== */
body.single-product .rhm-single-product,
body.single-product .rhm-single-product__hero,
body.single-product .rhm-single-product__media-shell,
body.single-product .rhm-single-product__gallery,
body.single-product .rhm-single-product__main-media,
body.single-product .rhm-single-product__carousel,
body.single-product .rhm-single-product__carousel-track,
body.single-product .rhm-single-product__carousel-slide,
body.single-product .rhm-single-product__main-image {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: 0 !important;
}
/* ========== 移动端：图片区全屏（edge-to-edge） ========== */
@media (max-width: 767.98px) {
    /* 根容器保持 16px 左右内边距，section 自然处于安全区内 */
    body.single-product .rhm-single-product__media-shell {
        margin-left: -16px;
        margin-right: -16px;
        width: calc(100% + 32px);
        max-width: calc(100% + 32px);
    }
    /* summary 不再需要自己的 16px，根容器已经提供 */
    body.single-product .rhm-single-product__summary {
        padding-left: 0;
        padding-right: 0;
    }
}

.rhm-single-product__hero {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rhm-single-product__media-shell {
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.rhm-single-product__gallery {
    display: block;
    width: 100%;
    max-width: 100%;
}

.rhm-single-product__main-media {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    padding: 0;
}

/* ========== 单品主图区：返回按钮（轻量） ========== */
.rhm-single-product__back {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--rhm-color-ink, #171817);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: var(--rhm-color-surface, #ffffff);
    box-shadow: none;
    transition: background-color 160ms ease, color 160ms ease;
    -webkit-tap-highlight-color: transparent;
}
.rhm-single-product__back svg {
    display: block;
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
}
.rhm-single-product__back:hover {
    background: var(--rhm-color-surface-subtle, #f6f7f8);
}
.rhm-single-product__back:active {
    transform: none;
    color: var(--rhm-color-brand-strong, #59400c);
    background: var(--rhm-color-surface-subtle, #f6f7f8);
    transition-duration: 80ms;
}
.rhm-single-product__back:focus-visible {
    outline: 3px solid var(--rhm-color-info, #176b73);
    outline-offset: 2px;
}

/* ========== 单品主图轮播 ========== */
.rhm-single-product__carousel {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}
.rhm-single-product__carousel.is-dragging {
    cursor: grabbing;
}
.rhm-single-product__carousel-track {
    display: flex;
    width: 100%;
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}
.rhm-single-product__carousel-slide {
    flex: 0 0 100%;
    min-width: 0;
    aspect-ratio: var(--rhm-single-product-image-ratio, 4 / 3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--rhm-single-product-image-fill, #fff);
}
.rhm-single-product__picture {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.rhm-single-product__carousel-slide .rhm-single-product__main-image {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: block;
    object-fit: var(--rhm-single-product-image-fit, cover);
    border-radius: 0;
    position: relative;
    z-index: 1;
    cursor: zoom-in;
    pointer-events: auto;
    -webkit-user-drag: none;
}
.rhm-single-product__carousel-dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: safe center;
    gap: 2px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    z-index: 3;
    pointer-events: auto;
    max-width: calc(100% - 24px);
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.rhm-single-product__carousel-dots::-webkit-scrollbar {
    display: none;
}

.rhm-single-product__carousel-dots[hidden] {
    display: none;
}
.rhm-single-product__carousel-dot {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.rhm-single-product__carousel-dot {
    appearance: none;
    -webkit-appearance: none;
    border-radius: 999px;
    flex-shrink: 0;
}

.rhm-single-product__carousel-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--rhm-color-outline, #d9dcd7);
    transition: background-color 220ms ease, width 220ms ease;
}

.rhm-single-product__carousel-dot:hover::before {
    background: var(--rhm-color-ink-muted, #626660);
}

.rhm-single-product__carousel-dot.is-active::before {
    width: 14px;
    background: var(--rhm-color-ink-muted, #626660);
}

.rhm-single-product__carousel-dot:focus-visible {
    outline: 3px solid var(--rhm-color-info, #176b73);
    outline-offset: -3px;
}


.rhm-single-product__summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rhm-single-product__title-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.rhm-single-product__title-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 8px;
    background: var(--rhm-title-badge-bg, #d62828);
    color: var(--rhm-title-badge-color, #ffffff);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.rhm-single-product__title {
    margin: 0;
    font-size: 27px;
    line-height: 1.2;
    color: #1b1b1b;
}

.rhm-single-product__rating-row {
    display: flex;
    align-items: center;
    margin: 0;
    line-height: 1.3;
}

.rhm-single-product__rating-row .rhm-rating-summary {
    display: inline-flex;
    max-width: 100%;
    min-width: 0;
    align-items: center;
    gap: 6px;
    color: var(--rhm-color-ink, #171817);
    line-height: 1.2;
    white-space: nowrap;
}

.rhm-single-product__rating-row .rhm-rating-summary__stars {
    display: block;
    width: 96px;
    height: 18px;
    flex: 0 0 auto;
    shape-rendering: geometricPrecision;
}

.rhm-single-product__rating-row .rhm-rating-summary__track {
    fill: #cbd2ce;
}

.rhm-single-product__rating-row .rhm-rating-summary__fill {
    fill: #007a5a;
}

.rhm-single-product__rating-row .rhm-rating-summary__star {
    fill: #fff;
}

.rhm-single-product__rating-row .rhm-rating-summary__value {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
}

.rhm-single-product__rating-row .rhm-rating-summary__score,
.rhm-single-product__rating-row .rhm-rating-summary__rated {
    font-weight: 750;
}

.rhm-single-product__rating-row .rhm-rating-summary__score {
    font-size: 14px;
}

.rhm-single-product__rating-row .rhm-rating-summary__rated,
.rhm-single-product__rating-row .rhm-rating-summary__reviews {
    font-size: 13px;
}

.rhm-single-product__rating-row .rhm-rating-summary__reviews {
    margin-left: 2px;
    color: var(--rhm-color-ink-muted, #626660);
    font-weight: 400;
    white-space: nowrap;
}

.rhm-single-product__price {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: #151515;
}

.rhm-single-product__price del {
    /* margin-right: 8px; */
    font-size: 18px;
    color: rgba(21, 21, 21, 0.42);
}

.rhm-single-product__price ins {
    text-decoration: none;
}

.rhm-single-product__excerpt {
    margin: 0;
    font-size: 13px;
    line-height: 1.3;
    color: rgba(34, 34, 34, 0.74);
}

.rhm-single-product__purchase-card {
    display: grid;
    gap: 14px;
    margin: 0;
    /* padding: 20px 16px 4px; */
    /* border: 1px solid rgba(29, 41, 57, 0.08); */
    /* box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08); */
}


.rhm-single-product__purchase-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
}


.rhm-single-product__purchase-label {
    font-size: 14px;
    font-weight: 700;
    color: #1f1f1f;
    letter-spacing: 0;
}

.rhm-single-product .cart {
    display: grid;
    gap: 10px;
}


.woocommerce div.product .rhm-single-product__purchase-card form.cart {
    margin-bottom: 0;
}


.rhm-single-product__qty-block {
    display: grid;
    gap: 10px;
}

.rhm-single-product__qty-label {
    font-size: 13px;
    font-weight: 700;
    color: #1d2939;
    letter-spacing: 0;
    text-transform: none;
}

.rhm-single-product__qty-row {
    width: 188px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 0;
    border: 1px solid rgba(29, 41, 57, 0.14);
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.rhm-single-product__qty-display {
    min-height: 48px;
    padding: 0;
    border-left: 1px solid rgba(29, 41, 57, 0.12);
    border-right: 1px solid rgba(29, 41, 57, 0.12);
    border-radius: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rhm-single-product__qty-caption {
    display: none;
}

.rhm-single-product .quantity {
    width: 100%;
    margin: 0;
    display: block;
}

.rhm-single-product .quantity .qty {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 16px;
    font-weight: 700;
    color: #1b1b1b;
    text-align: center;
    box-shadow: none;
    padding: 0;
    line-height: 48px;
    outline: none;
    appearance: textfield;
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
}

.rhm-single-product .quantity input.qty.input-text {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.rhm-single-product .quantity .qty:focus,
.rhm-single-product .quantity .qty:hover,
.rhm-single-product .quantity .qty:active {
    border: 0;
    outline: none;
    box-shadow: none;
}

.rhm-single-product .quantity input.qty:focus-visible {
    outline: 3px solid var(--rhm-color-info, #176b73);
    outline-offset: -3px;
}

.rhm-single-product .quantity .qty::-webkit-outer-spin-button,
.rhm-single-product .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.rhm-single-product__qty-btn {
    width: 100%;
    min-height: 48px;
    border: none;
    background: #ffffff;
    color: #1d2939;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 0;
    transition: background-color 150ms ease, color 150ms ease;
    box-shadow: none;
}

.rhm-single-product__qty-btn:hover {
    background: #f8fafc;
}

/* ========== 单品详情页：简单产品规格属性列表 ========== */
.rhm-single-product__price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    line-height: 1.12;
}
.rhm-single-product__price .price {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.12;
}
.rhm-single-product__spec-list {
    list-style: none;
    margin: 0;
    padding: 14px 16px;
    border-radius: 10px;
    background: #fffdf8;
    border: 1px solid rgba(196, 146, 41, 0.10);
    display: grid;
    gap: 8px;
}
.rhm-single-product__spec-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    line-height: 1.4;
}
.rhm-single-product__spec-row + .rhm-single-product__spec-row {
    padding-top: 8px;
    border-top: 1px dashed rgba(196, 146, 41, 0.14);
}
.rhm-single-product__spec-label {
    color: rgba(31, 31, 31, 0.55);
    font-weight: 500;
    white-space: nowrap;
}
.rhm-single-product__spec-value {
    color: #1f1f1f;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}


.rhm-single-product .stock {
    margin: 0 0 8px;
    font-size: 13px;
}

body.single-product .rhm-single-product .single_add_to_cart_button,
body.single-product .rhm-single-product .rhm-single-product__buy-now {
    width: 100%;
    min-height: 58px;
    border: 2px solid var(--rhm-color-brand, #765816) !important;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, opacity 150ms ease;
}

.rhm-single-product .single_add_to_cart_button {
    background: var(--rhm-color-brand, #765816) !important;
    color: var(--rhm-color-surface, #ffffff) !important;
}

.rhm-single-product .single_add_to_cart_button:hover {
    border-color: var(--rhm-color-brand, #765816) !important;
    background: var(--rhm-color-brand-strong, #59400c) !important;
    color: var(--rhm-color-surface, #ffffff) !important;
    opacity: 1;
}

.rhm-single-product__buy-now {
    margin-top: 0;
    background: var(--rhm-color-surface, #ffffff) !important;
    color: var(--rhm-color-brand-strong, #59400c) !important;
    box-shadow: none;
}

.rhm-single-product__buy-now:hover {
    border-color: var(--rhm-color-brand, #765816) !important;
    background: var(--rhm-color-brand-soft, #f4eddc) !important;
    color: var(--rhm-color-brand-strong, #59400c) !important;
    opacity: 1;
}

.rhm-single-product__button-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rhm-single-product__button-icon svg {
    width: 24px;
    height: 24px;
}

.rhm-single-product .single_add_to_cart_button.disabled,
.rhm-single-product .single_add_to_cart_button:disabled,
.rhm-single-product__buy-now.is-disabled,
.rhm-single-product__buy-now:disabled {
    opacity: 0.56;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Purchase information card below the Buy now control. */
.rhm-product-info {
    display: grid;
    gap: 0;
    width: 100%;
    border: 1px solid var(--rhm-color-outline, #d9dcd7);
    border-radius: 10px;
    background: var(--rhm-color-surface, #fff);
    color: var(--rhm-color-ink, #171817);
    overflow: hidden;
}

.rhm-product-info__row {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-width: 0;
    padding: 12px 14px;
    border-top: 1px solid var(--rhm-color-outline, #d9dcd7);
    font-size: 12px;
    line-height: 1.45;
}

.rhm-product-info__row:first-child {
    border-top: 0;
}

.rhm-product-info__copy,
.rhm-product-info__copy p {
    min-width: 0;
    margin: 0;
}

.rhm-product-info__copy {
    overflow-wrap: anywhere;
}

.rhm-product-info__copy p + p {
    margin-top: 6px;
}

.rhm-product-info__copy strong {
    font-weight: 700;
}

.rhm-product-info__copy em {
    font-style: italic;
}

.rhm-product-info__icon {
    width: 18px;
    height: 18px;
    color: var(--rhm-color-brand-strong, #59400c);
}

.rhm-product-info__row--payments {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-block: 14px;
    background: var(--rhm-color-surface-subtle, #f6f7f8);
}

.rhm-product-info__label {
    font-weight: 700;
}

.rhm-product-info__payment-icons{display:flex;flex-wrap:wrap;align-items:center;gap:6px 7px}
.rhm-product-info__payment-icon,[data-rhm-payment-more]{display:block;width:38px;height:24px;flex:none}
.rhm-product-info__payment-icon svg,[data-rhm-payment-more] svg{display:block;width:100%;height:100%}
.rhm-product-info__payment-icons.is-collapsed{flex-wrap:nowrap;}
.rhm-product-info__payment-icons>[hidden]{display:none}
[data-rhm-payment-more]{position:relative;padding:0;border:0;background:transparent;color:var(--rhm-color-brand-strong,#59400c);cursor:pointer}
[data-rhm-payment-more]::before{position:absolute;inset:-10px -3px;content:""}
[data-rhm-payment-more]:focus-visible{outline:2px solid var(--rhm-color-info,#176b73);outline-offset:3px}
[data-rhm-payment-more][aria-expanded="true"] .rhm-product-info__payment-more-vertical{opacity:0}

.rhm-product-info__row a {
    display: inline-block;
    min-height: 0;
    line-height: inherit;
    color: var(--rhm-color-brand-strong, #59400c);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rhm-product-info__row a:hover {
    color: var(--rhm-color-brand, #765816);
}

@media (max-width: 600px) {
    .rhm-product-info__row {
        padding: 11px 12px;
    }

    .rhm-product-info__row--payments {
        padding-block: 12px;
    }

    .rhm-product-info__payment-icons {
        gap: 5px;
    }
}

/* Native WooCommerce notice fallback. */
.woocommerce-notices-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    --rhm-notice-accent: var(--rhm-color-info, #176b73);
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px 14px 48px;
    border: 1px solid var(--rhm-color-outline, #d9dcd7);
    border-left: 4px solid var(--rhm-notice-accent);
    border-radius: 8px;
    background: var(--rhm-color-surface-raised, #ffffff);
    color: var(--rhm-color-ink, #171817);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    margin: 0 0 12px;
    box-shadow: none;
    animation: rhmNoticeIn 180ms ease;
    transition: background-color 150ms ease, border-color 150ms ease;
}
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 14px;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 22px 22px;
    pointer-events: none;
}
.woocommerce-message > a,
.woocommerce-info > a,
.woocommerce-error > a,
.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button,
.woocommerce-message .button.wc-forward,
.woocommerce-info .button.wc-forward,
.woocommerce-error .button.wc-forward {
    margin: -2px 0 -2px auto;
    padding: 6px 14px;
    border: 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    background: var(--rhm-notice-accent);
    color: var(--rhm-color-surface, #ffffff);
    text-decoration: none;
    transition: opacity 150ms ease, filter 150ms ease;
}
.woocommerce-message > a:hover,
.woocommerce-info > a:hover,
.woocommerce-error > a:hover,
.woocommerce-message .button:hover,
.woocommerce-info .button:hover,
.woocommerce-error .button:hover,
.woocommerce-message .button.wc-forward:hover,
.woocommerce-info .button.wc-forward:hover,
.woocommerce-error .button.wc-forward:hover {
    opacity: 1;
    filter: brightness(1.05);
    color: var(--rhm-color-surface, #ffffff);
}
.woocommerce-message > a:not(.button),
.woocommerce-info > a:not(.button),
.woocommerce-error > a:not(.button) {
    background: transparent;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
    margin: 0 0 0 4px;
}

/* Success */
.woocommerce-message {
    --rhm-notice-accent: var(--rhm-color-success, #1e6b46);
}
.woocommerce-message::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e6b46' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");
}

/* Info */
.woocommerce-info {
    --rhm-notice-accent: var(--rhm-color-info, #176b73);
}
.woocommerce-info::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23176b73' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 8v.01'/><path d='M11 12h1v4h1'/></svg>");
}

/* Error */
.woocommerce-error {
    --rhm-notice-accent: var(--rhm-color-danger, #a63a32);
    list-style: none;
}
.woocommerce-error::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a63a32' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 8v4'/><path d='M12 16h.01'/></svg>");
}
.woocommerce-error li {
    margin: 0;
    padding: 0;
    width: 100%;
}
.woocommerce-error li::before { display: none; }

/* 多错误列表（ul）纵向排列，避免 flex row 导致 li 横向挤压竖排 */
ul.woocommerce-error {
    flex-direction: column;
}

/* Notice list spacing when multiple errors */
.woocommerce-error li + li {
    margin-top: 4px;
}

@keyframes rhmNoticeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .woocommerce-message,
    .woocommerce-info,
    .woocommerce-error {
        animation: none;
        transition: none;
    }
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .woocommerce-message,
    .woocommerce-info,
    .woocommerce-error {
        padding: 12px 14px 12px 44px;
        font-size: 13px;
        gap: 8px;
    }
    .woocommerce-message::before,
    .woocommerce-info::before,
    .woocommerce-error::before {
        left: 12px;
        top: 12px;
        width: 20px;
        height: 20px;
        background-size: 20px 20px;
    }
    .woocommerce-message .button,
    .woocommerce-info .button,
    .woocommerce-error .button,
    .woocommerce-message .button.wc-forward,
    .woocommerce-info .button.wc-forward,
    .woocommerce-error .button.wc-forward {
        padding: 5px 12px;
        font-size: 12px;
    }
}


/* ========== 骞虫澘澧炲己 ========== */
@media (min-width: 768px) {
    .woocommerce ul.products { gap: 20px; padding: 0 24px; }

    .woocommerce div.product { padding: 24px; }

    .single-product .woocommerce-notices-wrapper,
    .single-product .rhm-single-product {
        padding-left: 24px;
        padding-right: 24px;
    }

    .rhm-single-product__hero {
        gap: 24px;
    }

    .rhm-single-product__gallery {
        gap: 0;
    }

    .rhm-single-product__main-media {
        min-height: 0;
        padding: 0;
    }

    .rhm-single-product__carousel-dots {
        bottom: 12px;
    }


    /* 结账页双栏 */
}

/* ========== 桌面增强 ========== */
@media (min-width: 992px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 22px;
        padding: 0 32px;
    }

    .woocommerce div.product { padding: 40px; }

    .single-product .woocommerce-notices-wrapper,
    .single-product .rhm-single-product {
        --rhm-single-product-section-gap: 40px;
        max-width: 1240px;
        margin: 0 auto;
        padding-left: 40px;
        padding-right: 40px;
    }

    .rhm-single-product__hero {
        display: grid;
        grid-template-columns: minmax(0, 1.03fr) minmax(420px, 0.97fr);
        gap: 40px;
        align-items: start;
    }

    .rhm-single-product__gallery {
        position: sticky;
        top: 96px;
    }

    .rhm-single-product__main-media {
        min-height: 0;
        border-radius: 0;
        padding: 0;
    }

    .rhm-single-product__title {
        font-size: 38px;
    }

    .rhm-single-product__price {
        font-size: 34px;
    }

    .rhm-single-product__excerpt {
        font-size: 14px;
        line-height: 1.55;
    }

    .rhm-single-product__purchase-card {
        padding: 22px 22px 8px;
        border-radius: 10px;
    }

}
