/* SBDEV Member Display Price Styling */
/* ==========================================================================
   Product Card & PDP Member Price Design
   ========================================================================== */

/* 1. Flex layout on product card details */
.product-item-info.has-member-price .product-item-details,
.product-item.has-member-price .product-item-details,
.product-item-info:has(.sbdev-member-main-price) .product-item-details,
.product-item:has(.sbdev-member-main-price) .product-item-details {
    display: flex !important;
    flex-direction: column !important;
}

/* Allow price-box children to flex into .product-item-details */
.product-item-info .price-box.has-member-price,
.product-item .price-box.has-member-price,
.product-item-info:has(.sbdev-member-main-price) .price-box,
.product-item:has(.sbdev-member-main-price) .price-box {
    display: contents !important;
}

/* Hide promotional labels on card image to match mockup */
.product-item.has-member-price .labels,
.product-item-info.has-member-price .labels,
.product-item:has(.sbdev-member-main-price) .labels,
.product-item.has-member-price .productLabels,
.product-item-info.has-member-price .productLabels,
.product-item:has(.sbdev-member-main-price) .productLabels {
    display: none !important;
}

/* 2. Main Member Price (Dark red/maroon, bold, large) */
.price-box.has-member-price .special-price,
.product-info-price .price-box.has-member-price .special-price,
.product-item .price-box.has-member-price .special-price,
.product-item-info .price-box.has-member-price .special-price,
.sbdev-member-main-price {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 4px 0 1px 0 !important;
    line-height: 1.15 !important;
    order: 1 !important;
}

.price-box.has-member-price .special-price .price-wrapper .price,
.product-item-info .price-box.has-member-price .special-price .price-wrapper .price,
.sbdev-member-main-price .price-wrapper .price,
.product-item .price-box.has-member-price .special-price .price-wrapper .price,
.product-item-info .sbdev-member-main-price .price,
.sbdev-member-main-price .price {
    font-size: 2.6em !important;
    font-weight: 700 !important;
    color: #d82b2b !important;
    letter-spacing: -0.3px !important;
    line-height: 1.15 !important;
    font-family: inherit !important;
}

/* On PDP main hero: preserve larger hero pricing and side-by-side badge */
.product-info-price .price-box.has-member-price .special-price .price-wrapper .price,
.product-info-price .sbdev-member-main-price .price-wrapper .price,
.product-info-price .sbdev-member-main-price .price {
    font-size: 36px !important;
    font-weight: 700 !important;
    color: #ba2426 !important;
}

.product-info-price .price-box.has-member-price .price-container,
.product-info-price .sbdev-member-main-price .price-container {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.product-info-price .price-box.has-member-price .price-wrapper,
.product-info-price .sbdev-member-main-price .price-wrapper {
    display: inline-block !important;
}

/* 3. Badge Next to Price: Pill shape, soft blush pink background, crimson text */
.price-box .sbdev-member-badge,
.sbdev-member-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #faebea !important;
    color: #ba2426 !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    padding: 2px 8px !important;
    border-radius: 9999px !important;
    vertical-align: middle !important;
    margin-left: 2px !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    text-transform: none !important;
    border: none !important;
}

.product-info-price .sbdev-member-badge {
    font-size: 15px !important;
    padding: 3px 12px !important;
    margin-left: 0 !important;
}

/* 4. Comparison Line: single compact row with exact colors */
.sbdev-member-comparison-line {
    order: 2 !important;
    display: flex !important;
    align-items: baseline !important;
    flex-wrap: wrap !important;
    gap: 5px 10px !important;
    letter-spacing: -0.2px !important;
    margin-top: 13px !important;
    margin-bottom: 6px !important;
    line-height: 1.3 !important;
}

.product-info-price .sbdev-member-comparison-line {
    font-size: 14px !important;
    gap: 6px 12px !important;
    letter-spacing: normal !important;
    margin-top: 13px !important;
    margin-bottom: 8px !important;
    flex-wrap: wrap !important;
}

.product-info-price .sbdev-member-comparison-item--previous {
    font-size: 16px !important;
}

.product-info-price .sbdev-member-comparison-item--regular,
.product-info-price .sbdev-member-discount-percent,
.product-info-price .sbdev-member-comparison-line .discount-percent {
    font-size: 14px !important;
    font-weight: 400 !important;
}

/* Previous Price: ราคาเดิม ฿13,900 (ALL red, no strikethrough, keep 1.6em font size) */
.sbdev-member-comparison-item--previous {
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 4px !important;
    color: #ba2426 !important;
    font-size: 1.6em !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.sbdev-member-comparison-item--previous .sbdev-member-comparison-label,
.sbdev-member-comparison-item--previous .sbdev-member-comparison-value {
    color: #ba2426 !important;
    font-weight: 400 !important;
    font-size: inherit !important;
    text-decoration: none !important;
}

/* Regular Price: ราคาปกติ ฿18,600 (ALL grey, strikethrough across label and amount) */
.sbdev-member-comparison-item--regular {
    display: inline-block !important;
    color: #666666 !important;
    font-size: 1.4em !important;
    font-weight: 400 !important;
    text-decoration: line-through !important;
    text-decoration-thickness: 1px !important;
    text-decoration-color: #666666 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.sbdev-member-comparison-item--regular .sbdev-member-comparison-label,
.sbdev-member-comparison-item--regular .sbdev-member-comparison-value,
.sbdev-member-comparison-item--regular .price {
    color: inherit !important;
    font-weight: inherit !important;
    font-size: inherit !important;
    text-decoration: inherit !important;
}

/* Discount Percent: ลด 36% (crimson red, normal weight) */
.sbdev-member-discount-percent,
.sbdev-member-comparison-line .discount-percent {
    color: #ba2426 !important;
    font-weight: 400 !important;
    font-size: 1.4em !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Review Stars: Clean spacing within flex flow */
.product-item-info.has-member-price .product-reviews-summary,
.product-item.has-member-price .product-reviews-summary,
.product-item-info:has(.sbdev-member-main-price) .product-reviews-summary,
.product-item:has(.sbdev-member-main-price) .product-reviews-summary {
    order: 4 !important;
    margin: 11px 0 8px 0 !important;
    clear: both !important;
    position: relative !important;
    display: block !important;
    height: auto !important;
    min-height: 16px !important;
}

/* 5. Bottom Blue Banner (แถบแจ้งส่วนลดด้านล่างของการ์ด) */
.sbdev-member-bottom-banner {
    order: 6 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #eef4fe !important;
    border-radius: 6px !important;
    padding: 3.5px 8px !important;
    margin-top: 4px !important;
    margin-bottom: 2px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    transition: background-color 0.2s ease !important;
}

.sbdev-member-bottom-banner[data-role="sbdev-login-trigger"] {
    cursor: pointer !important;
}

.sbdev-member-bottom-banner[data-role="sbdev-login-trigger"]:hover {
    background: #e2edfd !important;
}

.sbdev-member-bottom-banner__icon-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.sbdev-member-bottom-banner__icon {
    width: 10px !important;
    height: 15px !important;
    color: #4d61f3 !important;
    fill: #4d61f3 !important;
    display: block !important;
}

.sbdev-member-bottom-banner__text {
    color: #223875 !important;
    font-size: 8px !important;
    line-height: 1.35 !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.sbdev-member-bottom-banner__text strong {
    font-weight: 700 !important;
    color: #223875 !important;
}

.sbdev-member-bottom-banner__login-link {
    color: #223875 !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
    cursor: pointer !important;
    display: inline !important;
}

.sbdev-member-bottom-banner__login-link:hover {
    color: #004c99 !important;
}

/* 6. On cards with member price, suppress the installment pill. */
.product-item-info.has-member-price .sb-card-installment,
.product-item.has-member-price .sb-card-installment,
.product-item-info:has(.sbdev-member-main-price) .sb-card-installment,
.product-item-info:has(.sbdev-member-bottom-banner) .sb-card-installment,
.product-item:has(.sbdev-member-main-price) .sb-card-installment,
.product-item:has(.sbdev-member-bottom-banner) .sb-card-installment {
    display: none !important;
}

/* Hidden guest note / message adjustments on card */
.product-item .sbdev-member-price__guest-note,
.product-item-info .sbdev-member-price__guest-note,
.popular-product-item .sbdev-member-price__guest-note,
.product-item .sbdev-member-price__message,
.product-item-info .sbdev-member-price__message,
.popular-product-item .sbdev-member-price__message {
    display: none !important;
}

.sbdev-member-price__guest-note {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.4;
}

.sbdev-member-price__guest-label {
    color: #666;
    font-weight: 500;
}

.sbdev-member-price__guest-price {
    color: #222;
    font-weight: 600;
    margin-left: 4px;
}

.sbdev-member-price__message {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 2px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sbdev-member-main-price .price-wrapper .price,
    .product-item-info .price-box.has-member-price .special-price .price-wrapper .price,
    .product-item .price-box.has-member-price .special-price .price-wrapper .price,
    .sbdev-member-main-price .price {
        font-size: 1.9em !important;
        color: #d82b2b !important;
    }

    .sbdev-member-badge {
        font-size: 11px !important;
        padding: 1.5px 6px !important;
    }

    .product-item.has-member-price .sbdev-member-badge,
    .product-item-info.has-member-price .sbdev-member-badge {
        font-size: 11px !important;
        padding: 1.5px 6px !important;
    }

    .product-item.has-member-price .sbdev-member-bottom-banner__text,
    .product-item-info.has-member-price .sbdev-member-bottom-banner__text,
    .product-item.has-member-price .sbdev-member-bottom-banner__login-link,
    .product-item-info.has-member-price .sbdev-member-bottom-banner__login-link {
        font-size: 8px !important;
    }

    .product-item.has-member-price .sbdev-member-bottom-banner__icon,
    .product-item-info.has-member-price .sbdev-member-bottom-banner__icon {
        width: 10px !important;
        height: 15px !important;
    }

    .product-item.has-member-price .sbdev-member-bottom-banner,
    .product-item-info.has-member-price .sbdev-member-bottom-banner {
        padding: 3px 6px !important;
        gap: 4px !important;
    }

    .sbdev-member-comparison-line {
        margin-top: 9px !important;
        margin-bottom: 5px !important;
        gap: 4px 8px !important;
    }

    .sbdev-member-comparison-item--previous,
    .sbdev-member-comparison-item--previous .sbdev-member-comparison-label,
    .sbdev-member-comparison-item--previous .sbdev-member-comparison-value {
        font-size: 13px !important;
    }

    .sbdev-member-comparison-item--regular,
    .sbdev-member-comparison-item--regular .sbdev-member-comparison-label,
    .sbdev-member-comparison-item--regular .sbdev-member-comparison-value,
    .sbdev-member-comparison-item--regular .price {
        font-size: 11.5px !important;
        text-decoration: line-through !important;
    }

    .sbdev-member-discount-percent,
    .sbdev-member-comparison-line .discount-percent {
        font-size: 11.5px !important;
    }

    .product-item-info.has-member-price .product-reviews-summary,
    .product-item.has-member-price .product-reviews-summary,
    .product-item-info:has(.sbdev-member-main-price) .product-reviews-summary,
    .product-item:has(.sbdev-member-main-price) .product-reviews-summary {
        margin: 10px 0 6px 0 !important;
    }

    /* Mobile PDP overrides to preserve proportional hero price */
    body.catalog-product-view .product-info-main .product-info-price .price-box.has-member-price .sbdev-member-main-price.special-price .price-wrapper .price,
    .product-info-price .sbdev-member-main-price .price,
    .product-info-price .sbdev-member-main-price .price-wrapper .price {
        color: #d82b2b !important;
        font-size: 2.6rem !important;
    }

    body.catalog-product-view .product-info-main .sbdev-member-badge,
    .product-info-price .sbdev-member-badge {
        font-size: 15px !important;
        padding: 2px 8px !important;
    }

    body.catalog-product-view .product-info-main .sbdev-member-comparison-line,
    .product-info-price .sbdev-member-comparison-line {
        font-size: 14px !important;
        margin-top: 10px !important;
        margin-bottom: 6px !important;
    }

    body.catalog-product-view .product-info-main .sbdev-member-comparison-item--previous,
    body.catalog-product-view .product-info-main .sbdev-member-comparison-item--previous .sbdev-member-comparison-label,
    body.catalog-product-view .product-info-main .sbdev-member-comparison-item--previous .sbdev-member-comparison-value,
    .product-info-price .sbdev-member-comparison-item--previous {
        font-size: 15px !important;
    }

    body.catalog-product-view .product-info-main .sbdev-member-comparison-item--regular,
    body.catalog-product-view .product-info-main .sbdev-member-comparison-item--regular .sbdev-member-comparison-label,
    body.catalog-product-view .product-info-main .sbdev-member-comparison-item--regular .sbdev-member-comparison-value,
    body.catalog-product-view .product-info-main .sbdev-member-comparison-item--regular .price,
    .product-info-price .sbdev-member-comparison-item--regular {
        font-size: 14px !important;
        font-weight: 400 !important;
    }

    body.catalog-product-view .product-info-main .sbdev-member-discount-percent,
    body.catalog-product-view .product-info-main .sbdev-member-comparison-line .discount-percent,
    .product-info-price .sbdev-member-discount-percent,
    .product-info-price .sbdev-member-comparison-line .discount-percent {
        font-size: 14px !important;
        font-weight: 400 !important;
    }

    .sbdev-member-bottom-banner {
        padding: 6px 10px !important;
        gap: 6px !important;
    }

    .sbdev-member-bottom-banner__icon {
        width: 15px !important;
        height: 24px !important;
    }

    .sbdev-member-bottom-banner__text {
        font-size: 14px !important;
    }
}

/* Match sale-product dimension text to the compact PDP layout. */
@media (min-width: 769px) {
    body.catalog-product-view .product-info-main:has(> .product-info-price > .price-box > .special-price) .product-info-dimensions {
        font-size: 16px !important;
        line-height: 20px !important;
    }
}

/* Compact member-price layout on the product detail page. */
@media (min-width: 769px) {
    body.catalog-product-view .product-info-main:has(.sbdev-member-main-price) .product-info-price {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.catalog-product-view .product-info-main:has(.sbdev-member-main-price) .product-info-sku {
        margin-top: 6px !important;
        font-size: 15px !important;
        line-height: 20px !important;
    }

    body.catalog-product-view .product-info-main:has(.sbdev-member-main-price) .product-info-dimensions {
        margin-top: 4px !important;
        font-size: 15px !important;
        line-height: 20px !important;
    }

    body.catalog-product-view .product-info-main:has(.sbdev-member-main-price) .product-reviews-summary {
        margin: 8px 0 9px !important;
    }

    body.catalog-product-view .product-info-main .price-box:has(.sbdev-member-main-price) {
        margin-top: 10px !important;
        margin-bottom: 0 !important;
    }

    body.catalog-product-view .product-info-main .sbdev-member-main-price {
        margin: 0 !important;
    }

    body.catalog-product-view .product-info-main .sbdev-member-main-price .price-container {
        gap: 28px !important;
    }

    body.catalog-product-view .product-info-main .sbdev-member-main-price .price-wrapper {
        margin: 0 !important;
    }

    body.catalog-product-view .product-info-main .product-info-price .price-box.has-member-price .special-price .price-wrapper .price {
        font-size: 26px !important;
        line-height: 1.1 !important;
    }

    body.catalog-product-view .product-info-main .sbdev-member-badge {
        font-size: 19px !important;
        padding: 2px 12px !important;
    }

    body.catalog-product-view .product-info-main .sbdev-member-comparison-line {
        gap: 8px !important;
        margin: 16px 0 13px !important;
    }

    body.catalog-product-view .product-info-main .sbdev-member-comparison-item--previous {
        font-size: 19px !important;
    }

    body.catalog-product-view .product-info-main .sbdev-member-comparison-item--regular,
    body.catalog-product-view .product-info-main .sbdev-member-discount-percent {
        font-size: 17px !important;
    }

    body.catalog-product-view .product-info-main .sbdev-member-bottom-banner {
        width: max-content !important;
        max-width: 100% !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        padding: 9px 20px 9px 10px !important;
        margin: 0 0 29px !important;
    }

    body.catalog-product-view .product-info-main .sbdev-member-bottom-banner__text,
    body.catalog-product-view .product-info-main .sbdev-member-bottom-banner__login-prompt {
        font-size: 16px !important;
        white-space: normal !important;
        overflow: visible !important;
    }

    body.catalog-product-view .product-info-main:has(.sbdev-member-main-price) .product-info-stock-sku {
        font-size: 14px !important;
        line-height: 20px !important;
        margin-bottom: 2px !important;
    }

    body.catalog-product-view .product-info-main:has(.sbdev-member-main-price) .credit-card-promotion {
        padding: 12px !important;
        margin-bottom: 19px !important;
        border-radius: 8px !important;
    }

    body.catalog-product-view .product-info-main:has(.sbdev-member-main-price) .credit-card {
        box-sizing: border-box !important;
        width: 266px !important;
        height: 74px !important;
        padding: 7px 14px !important;
        border-radius: 8px !important;
    }

    body.catalog-product-view .product-info-main:has(.sbdev-member-main-price) .credit-card .size-small {
        font-size: 13px !important;
        line-height: 16px !important;
        white-space: nowrap !important;
    }

    body.catalog-product-view .product-info-main:has(.sbdev-member-main-price) .credit-card .size-big {
        font-size: 16px !important;
        line-height: 18px !important;
        white-space: nowrap !important;
    }

    body.catalog-product-view .product-info-main:has(.sbdev-member-main-price) .credit-card .price-percent {
        font-size: 24px !important;
        line-height: 26px !important;
        margin-top: 0 !important;
        white-space: nowrap !important;
    }

    body.catalog-product-view .product-info-main:has(.sbdev-member-main-price) .credit-card-promotion .promotion,
    body.catalog-product-view .product-info-main:has(.sbdev-member-main-price) .credit-card-promotion .img-promotion {
        height: 74px !important;
        overflow: hidden !important;
    }

    body.catalog-product-view .product-info-main:has(.sbdev-member-main-price) .credit-card-promotion .promotion {
        box-sizing: border-box !important;
        width: calc(100% - 266px) !important;
    }

    body.catalog-product-view .product-info-main:has(.sbdev-member-main-price) .credit-card-promotion .img-promotion {
        padding: 0 !important;
    }

    body.product-sb-furniture-sofas-19224639 .credit-card-promotion .img-promotion {
        position: relative !important;
    }

    body.product-sb-furniture-sofas-19224639 .credit-card-promotion .img-promotion > figure {
        display: none !important;
        position: absolute !important;
        width: 30px !important;
        height: 30px !important;
        margin: 0 !important;
    }

    body.product-sb-furniture-sofas-19224639 .credit-card-promotion .img-promotion > figure:nth-of-type(4),
    body.product-sb-furniture-sofas-19224639 .credit-card-promotion .img-promotion > figure:nth-of-type(5),
    body.product-sb-furniture-sofas-19224639 .credit-card-promotion .img-promotion > figure:nth-of-type(8) {
        display: block !important;
    }

    body.product-sb-furniture-sofas-19224639 .credit-card-promotion .img-promotion > figure:nth-of-type(4) {
        right: 56px;
        top: 4px;
    }

    body.product-sb-furniture-sofas-19224639 .credit-card-promotion .img-promotion > figure:nth-of-type(5) {
        right: 20px;
        top: 4px;
    }

    body.product-sb-furniture-sofas-19224639 .credit-card-promotion .img-promotion > figure:nth-of-type(8) {
        right: 92px;
        top: 40px;
    }

    body.product-sb-furniture-sofas-19224639 .credit-card-promotion .img-promotion > figure img {
        width: 30px !important;
        height: 30px !important;
        object-fit: contain !important;
    }
}

body.catalog-product-view .sbdev-member-bottom-banner__login-prompt {
    color: #223875 !important;
    line-height: 1.35 !important;
}

body.catalog-product-view .product-info-main .sbdev-member-price__guest-note,
body.catalog-product-view .product-info-main .sbdev-member-price__message {
    display: none !important;
}

body.catalog-product-view .sbdev-member-bottom-banner__login-link {
    color: #223875 !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
}

@media (min-width: 1100px) {
    body.product-sb-furniture-sofas-19224639 .product-add-form,
    body.product-sb-furniture-sofas-19224639 .box-tocart {
        height: 57px !important;
    }

    body.product-sb-furniture-sofas-19224639 .box-tocart .fieldset {
        height: 34px !important;
        margin-bottom: 0 !important;
    }

    body.product-sb-furniture-sofas-19224639 .box-tocart .field.qty {
        width: 70px !important;
        height: 34px !important;
        margin: 0 14px 0 0 !important;
        vertical-align: top !important;
    }

    body.product-sb-furniture-sofas-19224639 .box-tocart .field.qty .control {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        box-sizing: border-box !important;
        width: 70px !important;
        height: 34px !important;
        overflow: hidden !important;
        border: 1px solid #bbb !important;
        border-radius: 20px !important;
    }

    body.product-sb-furniture-sofas-19224639 .box-tocart .field.qty .count {
        display: inline-flex !important;
        position: static !important;
        align-items: center !important;
        justify-content: center !important;
        width: 20px !important;
        height: 32px !important;
        margin: 0 !important;
        border: 0 !important;
        background: transparent !important;
        font-size: 18px !important;
        line-height: 32px !important;
    }

    body.product-sb-furniture-sofas-19224639 .box-tocart #qty {
        width: 28px !important;
        height: 32px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        text-align: center !important;
        font-size: 20px !important;
        line-height: 32px !important;
    }

    body.product-sb-furniture-sofas-19224639 .box-tocart .actions-cart {
        display: inline-flex !important;
        align-items: flex-start !important;
        gap: 10px !important;
        width: 370px !important;
        height: 34px !important;
        vertical-align: top !important;
    }

    body.product-sb-furniture-sofas-19224639 .box-tocart .actions-cart .actions {
        display: block !important;
        float: none !important;
        height: 34px !important;
        margin: 0 !important;
    }

    body.product-sb-furniture-sofas-19224639 .box-tocart .actions-cart .actions:first-child {
        width: 197px !important;
    }

    body.product-sb-furniture-sofas-19224639 .box-tocart .actions-cart .actions:last-child {
        width: 163px !important;
    }

    body.product-sb-furniture-sofas-19224639 #product-addtocart-button,
    body.product-sb-furniture-sofas-19224639 #product-buynow-button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        width: 100% !important;
        height: 34px !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 20px !important;
    }

    body.product-sb-furniture-sofas-19224639 .product-addto-links .towishlist {
        box-sizing: border-box !important;
        width: 34px !important;
        height: 34px !important;
        top: -56px !important;
        padding: 0 !important;
    }

    body.product-sb-furniture-sofas-19224639 .product-addto-links .towishlist svg {
        width: 20px !important;
        height: 20px !important;
    }
}

@media (max-width: 768px) {
    body.catalog-product-view .product-info-main .sbdev-member-bottom-banner {
        flex-wrap: wrap !important;
    }
}

/* Member Cart & Checkout Notice Banners */
.sbdev-member-cart-notice-wrapper {
    margin: 10px 0 15px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    clear: both;
}

.sbdev-member-cart-notice {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0fa 100%);
    border: 1px solid #b8daff;
    border-left: 4px solid #0066cc;
    border-radius: 6px;
    padding: 10px 14px;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.08);
    transition: all 0.2s ease;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.sbdev-member-cart-notice--checkout {
    margin-bottom: 15px;
    padding: 10px 14px;
    font-size: 13px;
    background: #f8fbff;
    border-color: #cce5ff;
}

.sbdev-member-cart-notice__content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 10px 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Left side: Icon + Message + Savings pill badge on the same line */
.sbdev-member-cart-notice__row-main {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px 10px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.sbdev-member-cart-notice__icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #e6a100 !important;
    flex-shrink: 0 !important;
}

.sbdev-member-cart-notice__icon svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
}

.sbdev-member-cart-notice__message {
    color: #1a3962 !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

.sbdev-member-cart-notice--checkout .sbdev-member-cart-notice__message {
    font-size: 12.5px !important;
}

/* Savings badge trailing directly after text */
.sbdev-member-cart-notice__savings {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: #e8f7ee !important;
    border: 1px solid #c8e6c9 !important;
    border-radius: 4px !important;
    padding: 2px 8px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
}


.sbdev-member-cart-notice__savings-label {
    color: #2e7d32 !important;
    font-weight: 500 !important;
}

.sbdev-member-cart-notice__savings-amount {
    color: #1b5e20 !important;
    font-weight: 700 !important;
}

/* Right side: Black pill button */
.sbdev-member-cart-notice__row-action {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.sbdev-member-cart-notice__action {
    flex-shrink: 0 !important;
}

.sbdev-member-cart-notice__btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #222222 !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    padding: 6px 18px !important;
    border-radius: 999px !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    transition: background-color 0.2s ease, opacity 0.2s ease !important;
    border: none !important;
    cursor: pointer !important;
    width: auto !important;
    height: 32px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

.sbdev-member-cart-notice__btn:hover {
    background: #000000 !important;
    color: #ffffff !important;
}

.sbdev-member-cart-notice__login-inline {
    font-weight: 700 !important;
    text-decoration: underline !important;
    color: #1a3962 !important;
    cursor: pointer !important;
}

.sbdev-member-cart-notice__login-inline:hover {
    color: #004c99 !important;
}

@media (min-width: 769px) {
    .sbdev-member-cart-notice__content {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    .sbdev-member-cart-notice__row-action {
        width: auto !important;
        justify-content: flex-end !important;
    }
}

/* SBDEV Login Popup Modal (Matching Checkout Authentication Style) */
.sbdev-member-price__login-link {
    color: #4d61f3;
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
}

.sbdev-member-price__login-link:hover {
    color: #394dd6;
}

.popup-authentication,
.modal-popup.popup-authentication,
.modal-popup.popup-authentication.modal-slide._show {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1000002 !important;
}

.popup-authentication .modal-inner-wrap {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    min-width: 0 !important;
    margin: 0 !important;
    border-radius: 20px !important;
    width: 440px !important;
    max-width: calc(100vw - 48px) !important;
    height: auto !important;
    overflow: visible !important;
    background: #ffffff !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25) !important;
    box-sizing: border-box !important;
    z-index: 1000003 !important;
}

/* Ensure backdrop overlay stays behind the modal */
.modals-overlay {
    z-index: 1000000 !important;
}

.popup-authentication .action-close {
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    position: absolute !important;
    top: -15px !important;
    right: -15px !important;
    padding: 0 !important;
    width: 47px !important;
    height: 47px !important;
    z-index: 30 !important;
    display: block !important;
    outline: none !important;
}

.popup-authentication .action-close:before {
    content: '' !important;
    background: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDciIGhlaWdodD0iNDciIHZpZXdCb3g9IjAgMCA0NyA0NyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIzLjUgNDdDMzYuNDc4NyA0NyA0NyAzNi40Nzg3IDQ3IDIzLjVDNDcgMTAuNTIxMyAzNi40Nzg3IDAgMjMuNSAwQzEwLjUyMTMgMCAwIDEwLjUyMTMgMCAyMy41QzAgMzYuNDc4NyAxMC41MjEzIDQ3IDIzLjUgNDdaIiBmaWxsPSIjNEE0QTRBIi8+CjxwYXRoIGQ9Ik0xNC42NjggMTQuMjY2MUwzMi4zMzMgMzIuNzM0MSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIzIi8+CjxwYXRoIGQ9Ik0zMi4zMzMgMTQuMjY2MUwxNC42NjggMzIuNzM0MSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIzIi8+Cjwvc3ZnPgo=") no-repeat center !important;
    background-size: 100% 100% !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 47px !important;
    height: 47px !important;
    display: block !important;
    transition: transform 0.15s ease, filter 0.15s ease !important;
}

.popup-authentication .action-close:hover:before {
    filter: brightness(1.15) !important;
    transform: scale(1.05) !important;
}

.popup-authentication .action-close span {
    display: none !important;
}

.popup-authentication .modal-header {
    border-bottom: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

.popup-authentication .modal-content {
    padding: 30px 32px 32px 32px !important;
    border: 0 !important;
    max-height: calc(85vh - 40px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
}

.popup-authentication .block-authentication {
    border: 0;
    margin: 0;
}

.popup-authentication .block-authentication.sbdev-login-popup {
    border-top: 0 !important;
}

.popup-authentication .sbdev-login-popup .block-customer-login {
    padding-top: 0 !important;
}

.popup-authentication .block-authentication .block-title {
    font-style: normal;
    font-weight: 500;
    font-size: 22px;
    line-height: 30px;
    margin-bottom: 20px;
    color: #222222;
}

.popup-authentication .block-authentication .block-title strong {
    font-weight: 500;
    font-family: inherit;
    font-size: 22px;
    color: #222222;
}

.popup-authentication .block-customer-login {
    padding: 0;
}

.popup-authentication .block-customer-login .fieldset {
    margin-bottom: 22px;
}

.popup-authentication .sbdev-login-popup .block-customer-login .fieldset,
.popup-authentication .sbdev-login-popup .block-customer-login .field-password {
    margin-bottom: 0 !important;
}

.popup-authentication .block-customer-login .field {
    margin-bottom: 18px;
    position: relative;
}

.popup-authentication .block-customer-login .field.required label {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 400;
    color: #333333;
}

.popup-authentication .block-customer-login .field.required label:after {
    display: none !important;
}

.popup-authentication .required-asterisk {
    color: #e02b27;
    margin-left: 2px;
    font-weight: bold;
}

.popup-authentication .request-mess-right {
    color: #e02b27;
    font-size: 13px;
    font-weight: 400;
}

.popup-authentication .block-customer-login input.input-text {
    width: 100%;
    height: 44px;
    border: 1px solid #707070;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 15px;
    box-sizing: border-box;
    color: #333333;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.popup-authentication .block-customer-login input.input-text:focus {
    border-color: #4d61f3;
    box-shadow: 0 0 0 2px rgba(77, 97, 243, 0.2);
}

.popup-authentication .block-customer-login input.input-text::placeholder {
    color: #888888;
}

.popup-authentication .sbdev-login-forgot-link {
    display: flex !important;
    justify-content: flex-end !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
}

.popup-authentication .sbdev-action-remind,
.popup-authentication .action-remind {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    display: inline-block !important;
    color: #4d61f3 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    line-height: 1.4 !important;
    width: auto !important;
    height: auto !important;
}

.popup-authentication .sbdev-action-remind:hover,
.popup-authentication .action-remind:hover {
    text-decoration: underline !important;
    background: none !important;
    background-color: transparent !important;
    color: #394dd6 !important;
}

.popup-authentication .actions-toolbar {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 24px !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.popup-authentication .sbdev-login-popup .actions-toolbar {
    margin-top: 16px !important;
}

.popup-authentication .actions-toolbar:before,
.popup-authentication .actions-toolbar:after {
    content: none !important;
    display: none !important;
}

.popup-authentication .action-register-wrap,
.popup-authentication .action-login-wrap {
    flex: 1 1 0 !important;
    width: 50% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

.popup-authentication .action-register {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 44px !important;
    background: #4d61f3 !important;
    border: 1px solid #4d61f3 !important;
    color: #ffffff !important;
    border-radius: 60px !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
    line-height: 1.4 !important;
    outline: none !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    text-align: center !important;
    margin: 0 !important;
}

.popup-authentication .action-register:hover {
    background: #394dd6 !important;
    border-color: #394dd6 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.popup-authentication .action-login.secondary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 44px !important;
    background: #4d61f3 !important;
    border: 1px solid #4d61f3 !important;
    color: #ffffff !important;
    border-radius: 60px !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
    line-height: 1.4 !important;
    outline: none !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    text-align: center !important;
    margin: 0 !important;
}

.popup-authentication .action-login.secondary:hover {
    background: #394dd6 !important;
    border-color: #394dd6 !important;
    color: #ffffff !important;
}

.popup-authentication .messages {
    margin-bottom: 16px;
}

.popup-authentication .messages .message-error {
    background: #fdf2f2;
    color: #d32f2f;
    border: 1px solid #f8b4b4;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .popup-authentication .modal-inner-wrap {
        width: 440px !important;
        min-width: 0 !important;
        max-width: 440px !important;
        height: auto !important;
    }
}

@media (max-width: 767px) {
    .popup-authentication .modal-inner-wrap {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        width: 90% !important;
        max-width: 380px !important;
        height: auto !important;
        max-height: 90vh !important;
        min-height: 0 !important;
        border-radius: 16px !important;
        overflow: visible !important;
        box-sizing: border-box !important;
        z-index: 1000003 !important;
    }
    .popup-authentication .modal-content {
        padding: 18px 16px 20px 16px !important;
        height: auto !important;
        max-height: calc(85vh - 30px) !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        border-radius: 16px !important;
        box-sizing: border-box !important;
    }
    .popup-authentication .action-close {
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        width: 32px !important;
        height: 32px !important;
        z-index: 25 !important;
    }
    .popup-authentication .action-close:before {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        width: 32px !important;
        height: 32px !important;
    }
    .popup-authentication .block-authentication .block-title,
    .popup-authentication .block-authentication .block-title strong {
        font-size: 18px !important;
        line-height: 24px !important;
        margin-bottom: 12px !important;
    }
    .popup-authentication .block-customer-login .field {
        margin-bottom: 12px !important;
    }
    .popup-authentication .block-customer-login input.input-text {
        height: 40px !important;
        font-size: 14px !important;
    }
    .popup-authentication .actions-toolbar {
        margin-top: 14px !important;
    }
    .popup-authentication .action-register,
    .popup-authentication .action-login.secondary {
        height: 40px !important;
        font-size: 14px !important;
    }
}

/* Cart Item Member Savings Notification (Under SKU) */
.sbdev-cart-item-member-savings {
    margin-top: 6px;
    margin-bottom: 6px;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    line-height: 1.4;
    clear: both;
}

.sbdev-cart-item-member-savings__badge {
    background: #e02b27;
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    padding: 2px 7px;
    border-radius: 3px;
    letter-spacing: 0.2px;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.sbdev-cart-item-member-savings__text {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    color: #333333;
}

.sbdev-cart-item-member-savings__label {
    color: #2e7d32;
    font-weight: 500;
}

.sbdev-cart-item-member-savings__amount {
    color: #1b5e20;
    font-weight: 700;
    font-size: 13px;
}

.sbdev-cart-item-member-savings__from {
    color: #666666;
    font-size: 12px;
}

.sbdev-cart-item-member-savings__original {
    color: #888888;
    text-decoration: line-through;
    font-weight: 400;
}

/* PDP member savings and login prompt use the same accent color. */
body.catalog-product-view .product-info-main .sbdev-member-bottom-banner__text,
body.catalog-product-view .product-info-main .sbdev-member-bottom-banner__text strong,
body.catalog-product-view .product-info-main .sbdev-member-bottom-banner__login-prompt,
body.catalog-product-view .product-info-main .sbdev-member-bottom-banner__login-link {
    color: #4d61f3 !important;
}

/* Member savings in checkout cart item details. */
@media (min-width: 769px) {
    body.checkout-cart-index #shopping-cart-table .col.item .product-item-photo {
        padding-right: 10px !important;
    }

    body.checkout-cart-index #shopping-cart-table .col.item .product-image-container,
    body.checkout-cart-index #shopping-cart-table .col.item .product-image-photo {
        width: 136px !important;
        height: 136px !important;
    }

    body.checkout-cart-index #shopping-cart-table .col.item .product-image-photo {
        object-fit: cover;
    }

    body.checkout-cart-index #shopping-cart-table .col.item .product-item-name {
        font-size: 16px !important;
        line-height: 1.4 !important;
        margin-bottom: 3px !important;
    }

    body.checkout-cart-index #shopping-cart-table .col.item .product-item-sku {
        font-size: 13px !important;
        line-height: 1.4 !important;
    }
}

body.checkout-cart-index #shopping-cart-table .sbdev-cart-item-member-savings {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 4px 10px !important;
    width: 100%;
    margin: 9px 0 0 !important;
    line-height: 1.4;
}

body.checkout-cart-index #shopping-cart-table .sbdev-cart-item-member-savings__row-price {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: auto !important;
}

@media (max-width: 768px) {
    body.checkout-cart-index #shopping-cart-table .mobile-price-qty-row {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-end !important;
        margin-top: 6px !important;
    }

    body.checkout-cart-index #shopping-cart-table .mobile-price-qty-row .mobile-product-price {
        order: 1 !important;
        text-align: right !important;
        margin-right: 12px !important;
        flex: 1 1 auto !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #223875 !important;
    }

    body.checkout-cart-index #shopping-cart-table .mobile-price-qty-row .mobile-qty-controls {
        order: 2 !important;
        flex-shrink: 0 !important;
    }

    /* Member savings row in mobile cart details column */
    body.checkout-cart-index #shopping-cart-table .mobile-price-qty-row .sbdev-cart-item-member-savings {
        order: 3 !important;
        flex-basis: 100% !important;
        position: relative !important;
        left: 0 !important;
        margin-left: -95px !important;
        width: calc(100% + 95px) !important;
        min-width: calc(100% + 95px) !important;
        max-width: calc(100% + 95px) !important;
        align-self: flex-start !important;
        box-sizing: border-box !important;
        margin-top: 8px !important;
        padding-top: 8px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
        border-top: 1px solid #f2f2f2 !important;
    }

    body.checkout-cart-index #shopping-cart-table .mobile-price-qty-row .sbdev-cart-item-member-savings__row-price {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    body.checkout-cart-index #shopping-cart-table .mobile-price-qty-row .sbdev-cart-item-member-savings__badge {
        background: #fce9ea !important;
        color: #bd4549 !important;
        border-radius: 999px !important;
        padding: 2px 10px !important;
        font-size: 15px !important;
        font-weight: 400 !important;
        display: inline-block !important;
    }

    body.checkout-cart-index #shopping-cart-table .mobile-price-qty-row .sbdev-cart-item-member-savings__member-price {
        font-size: 17px !important;
        font-weight: 700 !important;
        color: #d82b2b !important;
        display: inline-block !important;
    }

    body.checkout-cart-index #shopping-cart-table .mobile-price-qty-row .sbdev-cart-item-member-savings__text {
        margin-top: 2px !important;
        display: flex !important;
        align-items: baseline !important;
        gap: 4px !important;
        color: #007000 !important;
        font-size: 13px !important;
    }

    body.checkout-cart-index #shopping-cart-table .mobile-price-qty-row .sbdev-cart-item-member-savings__label,
    body.checkout-cart-index #shopping-cart-table .mobile-price-qty-row .sbdev-cart-item-member-savings__amount {
        color: #007000 !important;
        font-size: 13px !important;
    }

    body.checkout-cart-index #shopping-cart-table .mobile-price-qty-row .sbdev-cart-item-member-savings__amount {
        font-weight: 700 !important;
    }
}

@media (min-width: 769px) {
    body.checkout-cart-index #shopping-cart-table .sbdev-cart-item-member-savings__badge,
    body.checkout-cart-index #shopping-cart-table .sbdev-member-badge {
        font-size: 15px !important;
    }

    body.checkout-cart-index #shopping-cart-table .sbdev-cart-item-member-savings__badge {
        background: #fce9ea !important;
        color: #bd4549 !important;
        border-radius: 999px !important;
        padding: 3px 12px !important;
        font-weight: 400 !important;
        letter-spacing: 0 !important;
    }

    body.checkout-cart-index #shopping-cart-table .sbdev-cart-item-member-savings__member-price {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #d82b2b !important;
    }

    body.checkout-cart-index #shopping-cart-table .sbdev-cart-item-member-savings__text {
        display: inline-flex !important;
        align-items: baseline !important;
        flex-wrap: wrap !important;
        gap: 3px 5px !important;
        width: auto !important;
    }

    body.checkout-cart-index #shopping-cart-table .sbdev-cart-item-member-savings__label,
    body.checkout-cart-index #shopping-cart-table .sbdev-cart-item-member-savings__amount,
    body.checkout-cart-index #shopping-cart-table .sbdev-cart-item-member-savings__from {
        font-size: 14px !important;
    }

    body.checkout-cart-index #shopping-cart-table .sbdev-cart-item-member-savings__label,
    body.checkout-cart-index #shopping-cart-table .sbdev-cart-item-member-savings__amount {
        color: #007000 !important;
    }

    body.checkout-cart-index #shopping-cart-table .sbdev-cart-item-member-savings__from,
    body.checkout-cart-index #shopping-cart-table .sbdev-cart-item-member-savings__original {
        color: #858585 !important;
    }
}

/* Member-discount product cards (Desktop). */
@media (min-width: 769px) {
    .product-item.has-member-price .sbdev-member-main-price .price,
    .product-item-info.has-member-price .sbdev-member-main-price .price,
    .product-item.has-member-price .price-box.has-member-price .special-price .price-wrapper .price,
    .product-item-info.has-member-price .price-box.has-member-price .special-price .price-wrapper .price {
        font-size: 2.6em !important;
        color: #d82b2b !important;
    }
}

/* Member-discount product cards (Mobile). */
@media (max-width: 768px) {
    .product-item.has-member-price .sbdev-member-main-price .price,
    .product-item-info.has-member-price .sbdev-member-main-price .price,
    .product-item.has-member-price .price-box.has-member-price .special-price .price-wrapper .price,
    .product-item-info.has-member-price .price-box.has-member-price .special-price .price-wrapper .price,
    .product-item .sbdev-member-main-price .price,
    .product-item-info .sbdev-member-main-price .price,
    .product-item .sbdev-member-main-price .price-wrapper .price,
    .product-item-info .sbdev-member-main-price .price-wrapper .price,
    .product-item .price-box.has-member-price .special-price .price-wrapper .price,
    .product-item-info .price-box.has-member-price .special-price .price-wrapper .price,
    .popular-product-item .sbdev-member-main-price .price,
    .popular-product-item .sbdev-member-main-price .price-wrapper .price {
        font-size: 1.9em !important;
        color: #d82b2b !important;
    }
}

.product-item.has-member-price .sbdev-member-comparison-item--regular,
.product-item-info.has-member-price .sbdev-member-comparison-item--regular {
    font-size: 1.4em !important;
    color: #666666 !important;
    font-weight: 400 !important;
    text-decoration: line-through !important;
}

@media (min-width: 769px) {
    .product-item.has-member-price .sbdev-member-comparison-line,
    .product-item-info.has-member-price .sbdev-member-comparison-line,
    .sbdev-member-comparison-line {
        margin-bottom: 18px !important;
    }

    .product-item.has-member-price .product-reviews-summary,
    .product-item-info.has-member-price .product-reviews-summary {
        margin-top: 0 !important;
    }

    .product-item.has-member-price .sbdev-member-badge,
    .product-item-info.has-member-price .sbdev-member-badge {
        font-size: 15px !important;
        padding: 2px 8px !important;
    }

    .product-item.has-member-price .sbdev-member-bottom-banner__text,
    .product-item-info.has-member-price .sbdev-member-bottom-banner__text,
    .product-item.has-member-price .sbdev-member-bottom-banner__login-link,
    .product-item-info.has-member-price .sbdev-member-bottom-banner__login-link,
    .sbdev-member-bottom-banner__text {
        font-size: 14px !important;
    }

    .product-item.has-member-price .sbdev-member-bottom-banner,
    .product-item-info.has-member-price .sbdev-member-bottom-banner {
        padding: 4px 10px !important;
        gap: 8px !important;
    }

    .product-item.has-member-price .sbdev-member-bottom-banner__icon,
    .product-item-info.has-member-price .sbdev-member-bottom-banner__icon,
    .sbdev-member-bottom-banner__icon {
        width: 15px !important;
        height: 24px !important;
    }
}

/* Recently viewed cards render reviews inside a description wrapper. Place
   that wrapper after the original-price comparison and before the savings bar. */
body.catalog-product-view .block-viewed-products-grid .product-item-info:has(.sbdev-member-main-price) .product-item-details > .product-item-description {
    order: 3 !important;
    margin: 0 !important;
}

body.catalog-product-view .block-viewed-products-grid .product-item-info:has(.sbdev-member-main-price) .product-item-details > .product-item-description .product-reviews-summary {
    margin: 0 0 8px !important;
}

body.catalog-product-view .block-viewed-products-grid .product-item-info:has(.sbdev-member-main-price) .product-item-details > .product-item-actions {
    order: 7 !important;
}

/* Keep the category card's product facts visible when a member price is added. */
body.catalog-category-view .product-item-info:has(.sbdev-member-main-price) .brand-product,
body.catalog-category-view .product-item-info:has(.sbdev-member-main-price) .product-item-size {
    display: block !important;
}

/* Keep category-card stars close to the original-price line on mobile, while desktop preserves 18px margin-bottom. */
@media (max-width: 768px) {
    body.catalog-category-view .products.wrapper .product-item-info:has(.sbdev-member-main-price) .sbdev-member-comparison-line,
    body.catalogsearch-result-index .products.wrapper .product-item-info:has(.sbdev-member-main-price) .sbdev-member-comparison-line {
        margin-bottom: 4px !important;
    }

    body.catalog-category-view .products.wrapper .product-item-info:has(.sbdev-member-main-price) .product-reviews-summary,
    body.catalogsearch-result-index .products.wrapper .product-item-info:has(.sbdev-member-main-price) .product-reviews-summary {
        margin-top: 2px !important;
    }
}

@media (min-width: 769px) {
    body.catalog-category-view .products.wrapper .product-item-info:has(.sbdev-member-main-price) .sbdev-member-comparison-line,
    body.catalogsearch-result-index .products.wrapper .product-item-info:has(.sbdev-member-main-price) .sbdev-member-comparison-line {
        margin-bottom: 18px !important;
    }
}

/* Match the PDP member price to the standard PDP price size and color on desktop. */
@media (min-width: 769px) {
    body.catalog-product-view .product-info-main .product-info-price .price-box.has-member-price .sbdev-member-main-price.special-price .price-wrapper .price {
        color: #d82b2b !important;
        font-size: 4rem !important;
    }
}
/* ==========================================================================
   Cart Recommendation Slider - Compact Member Price Style
   ========================================================================== */

/* 1. Reset container to standard block layout (prevent PLP contents flex leak) */
.cart-recommendation-products .price-box.has-member-price,
.cart-recommendation-items .price-box.has-member-price,
.recommended-products-grid .price-box.has-member-price,
.cart-recommendation-item .price-box.has-member-price {
    display: block !important;
    margin: 4px 0 !important;
}

/* 2. Hide comparison row (ราคาเดิม, ราคาปกติ, ลด XX%) and bottom blue banner */
.cart-recommendation-products .sbdev-member-comparison-line,
.cart-recommendation-items .sbdev-member-comparison-line,
.recommended-products-grid .sbdev-member-comparison-line,
.cart-recommendation-item .sbdev-member-comparison-line,
.cart-recommendation-products .sbdev-member-bottom-banner,
.cart-recommendation-items .sbdev-member-bottom-banner,
.recommended-products-grid .sbdev-member-bottom-banner,
.cart-recommendation-item .sbdev-member-bottom-banner {
    display: none !important;
}

/* 3. Main member price: font-size: 1.5em !important; color: #fe0f00 !important; */
.cart-recommendation-products .sbdev-member-main-price .price,
.cart-recommendation-items .sbdev-member-main-price .price,
.recommended-products-grid .sbdev-member-main-price .price,
.cart-recommendation-item .sbdev-member-main-price .price,
.cart-recommendation-products .price-box.has-member-price .special-price .price-wrapper .price,
.cart-recommendation-items .price-box.has-member-price .special-price .price-wrapper .price,
.recommended-products-grid .price-box.has-member-price .special-price .price-wrapper .price,
.cart-recommendation-item .price-box.has-member-price .special-price .price-wrapper .price {
    font-size: 1.5em !important;
    font-weight: 700 !important;
    color: #fe0f00 !important;
    line-height: 1.2 !important;
    letter-spacing: normal !important;
}

/* 4. Stack price and member badge vertically */
.cart-recommendation-products .sbdev-member-main-price,
.cart-recommendation-items .sbdev-member-main-price,
.recommended-products-grid .sbdev-member-main-price,
.cart-recommendation-item .sbdev-member-main-price {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
    margin: 4px 0 2px 0 !important;
    line-height: 1.2 !important;
}

.cart-recommendation-products .sbdev-member-main-price .price-container,
.cart-recommendation-items .sbdev-member-main-price .price-container,
.recommended-products-grid .sbdev-member-main-price .price-container,
.cart-recommendation-item .sbdev-member-main-price .price-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
}

/* 5. Member badge styling under price */
.cart-recommendation-products .sbdev-member-badge,
.cart-recommendation-items .sbdev-member-badge,
.recommended-products-grid .sbdev-member-badge,
.cart-recommendation-item .sbdev-member-badge {
    margin-left: 0 !important;
    font-size: 12px !important;
    padding: 2px 8px !important;
    line-height: 1.2 !important;
    border-radius: 9999px !important;
    background: #faebea !important;
    color: #ba2426 !important;
    display: inline-block !important;
    white-space: nowrap !important;
}

/* 2026-09-30: Keep cart recommendation prices compact over the generic card rules. */
body.checkout-cart-index .cart-recommendation-products .product-item-info.has-member-price .price-box.has-member-price .sbdev-member-main-price .price-wrapper .price,
body.checkout-cart-index .recommended-products-grid .product-item-info.has-member-price .price-box.has-member-price .sbdev-member-main-price .price-wrapper .price {
    font-size: 1.5em !important;
    color: #fe0f00 !important;
}
/* The cart upsell popup uses its own product-card markup. */
body.checkout-cart-index .pc-recommendation-popup .pc-product-price.has-member-price .pc-member-comparison {
    display: none !important;
}
body.checkout-cart-index .pc-recommendation-popup .pc-product-price.has-member-price .pc-member-main {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
}
body.checkout-cart-index .pc-recommendation-popup .pc-product-price.has-member-price .pc-current-price {
    font-size: 1.5em !important;
    color: #fe0f00 !important;
}

/* DEV 2026-09-30: product card savings banner font */
.product-item.has-member-price .sbdev-member-bottom-banner__text,
.product-item.has-member-price .sbdev-member-bottom-banner__text *,
.product-item-info.has-member-price .sbdev-member-bottom-banner__text,
.product-item-info.has-member-price .sbdev-member-bottom-banner__text * {
    font-size: 12px !important;
}

/* 2026-10-01: mobile card savings and unbroken currency amounts. */
@media (max-width: 768px) {
    .product-item.has-member-price .sbdev-member-bottom-banner__text,
    .product-item.has-member-price .sbdev-member-bottom-banner__text *,
    .product-item-info.has-member-price .sbdev-member-bottom-banner__text,
    .product-item-info.has-member-price .sbdev-member-bottom-banner__text *,
    .popular-product-item.has-member-price .sbdev-member-bottom-banner__text,
    .popular-product-item.has-member-price .sbdev-member-bottom-banner__text * {
        font-size: 8px !important;
    }
    .product-item.has-member-price .sbdev-member-comparison-item--regular,
    .product-item-info.has-member-price .sbdev-member-comparison-item--regular,
    .popular-product-item.has-member-price .sbdev-member-comparison-item--regular {
        display: inline-flex !important;
        align-items: baseline !important;
        flex: 0 0 auto !important;
        gap: 3px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }
    .product-item.has-member-price .sbdev-member-comparison-line,
    .product-item-info.has-member-price .sbdev-member-comparison-line,
    .popular-product-item.has-member-price .sbdev-member-comparison-line {
        gap: 4px 8px !important;
    }
}
.product-item.has-member-price .sbdev-member-comparison-value,
.product-item.has-member-price .sbdev-member-comparison-value .price,
.product-item-info.has-member-price .sbdev-member-comparison-value,
.product-item-info.has-member-price .sbdev-member-comparison-value .price,
.popular-product-item.has-member-price .sbdev-member-comparison-value,
.popular-product-item.has-member-price .sbdev-member-comparison-value .price {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    width: auto !important;
    max-width: none !important;
    flex-shrink: 0 !important;
}
.product-item.has-member-price .sbdev-member-main-price .price-wrapper,
.product-item.has-member-price .sbdev-member-main-price .price,
.product-item-info.has-member-price .sbdev-member-main-price .price-wrapper,
.product-item-info.has-member-price .sbdev-member-main-price .price {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}
/* The points promotion gets its own row above PDP pricing. */
body.catalog-product-view .product-info-main .product-info-price .price-box:has(.margin-couponPoint4sb) {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}
body.catalog-product-view .product-info-main .product-info-price .margin-couponPoint4sb {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    order: -1 !important;
    align-self: flex-start !important;
    width: auto !important;
    max-width: calc(100% - 16px) !important;
    margin: 12px 0 16px 16px !important;
    float: none !important;
}
body.catalog-product-view .product-info-main .margin-couponPoint4sb .overflowIcon-container-couponPoint4sbds {
    box-sizing: border-box !important;
    max-width: 100% !important;
}
body.catalog-product-view .product-info-main .price-box:has(.margin-couponPoint4sb) > .special-price {
    order: 1 !important;
}
body.catalog-product-view .product-info-main .price-box:has(.margin-couponPoint4sb) > .old-price {
    order: 2 !important;
}
