/**
 * Single-product sticky purchase sidebar.
 * Legacy classes stay in the template because product.js synchronizes this
 * duplicate native WooCommerce variation form with the primary product form.
 */

.rs-sticky-product-layout {
    align-items: flex-start;
    overflow: visible;
}

.product-left-sidebar.rs-sticky-product-box-shell {
    width: 30%;
    min-width: 0;
    align-self: stretch;
    padding-inline-start: 24px;
    padding-inline-end: 0;
    margin: 0 0 28px;
    overflow: visible;
}

.product-left-sidebar.rs-sticky-product-box-shell .rs-sticky-product-box {
    --rs-sticky-box-blue: var(--main-color, #2f67ff);
    --rs-sticky-box-ink: #17233c;
    --rs-sticky-box-muted: #68758d;
    --rs-sticky-box-border: #e1e9f6;
    position: sticky;
    top: 24px;
    z-index: 5;
    width: 100%;
    min-width: 0;
    padding: 16px 16px 84px;
    overflow: visible;
    border: 1px solid var(--rs-sticky-box-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(25, 55, 105, .11), 0 3px 12px rgba(25, 55, 105, .05);
    color: var(--rs-sticky-box-ink);
    font-family: inherit;
    box-sizing: border-box;
}

body.admin-bar .rs-sticky-product-box-shell .rs-sticky-product-box {
    top: calc(24px + var(--wp-admin--admin-bar--height, 32px));
}

.rs-sticky-product-box .rs-sticky-product-box__header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    margin: 0 0 14px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--rs-sticky-box-border);
}

.rs-sticky-product-box .rs-sticky-product-box__title {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--rs-sticky-box-ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.75;
    text-align: right;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rs-sticky-product-box .rs-sticky-product-box__thumb {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e6edf7;
    border-radius: 12px;
    background: #f8faff;
}

.rs-sticky-product-box .rs-sticky-product-box__thumb img {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 4px;
    object-fit: contain;
    border: 0;
    border-radius: inherit;
    box-sizing: border-box;
}

.rs-sticky-product-box .rs-sticky-product-box__form,
.rs-sticky-product-box .rs-sticky-product-box__form form.cart,
.rs-sticky-product-box .rs-sticky-product-box__form .variations_form {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.rs-sticky-product-box table.variations,
.rs-sticky-product-box table.variations tbody {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
}

.rs-sticky-product-box table.variations tr {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0 0 11px;
    padding: 0;
    border: 0;
}

.rs-sticky-product-box table.variations th.label,
.rs-sticky-product-box table.variations td.value {
    display: block;
    width: 100%;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    text-align: right;
}

.rs-sticky-product-box table.variations th.label {
    margin-bottom: 5px;
}

.rs-sticky-product-box table.variations th.label label,
.rs-sticky-product-box .quantity .sidebar-label,
.rs-sticky-product-box .price-title {
    display: block;
    margin: 0;
    color: var(--rs-sticky-box-muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.7;
    text-align: right;
}

.rs-sticky-product-box-shell .rs-sticky-product-box .rs-native-variation-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.rs-sticky-product-box .rs-native-variation-select + .rs-variation-options {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    min-width: 0;
    direction: rtl;
}

.rs-sticky-product-box .rs-variation-options .rs-variation-option {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100%;
    height: 34px;
    min-height: 34px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0;
    padding: 5px 9px;
    border: 1px solid #dbe4f2;
    border-radius: 9px;
    background: #fff;
    color: #44516a;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    box-sizing: border-box;
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.rs-sticky-product-box .rs-variation-options .rs-variation-option:hover:not(:disabled):not(.is-disabled) {
    color: var(--rs-sticky-box-blue);
    border-color: rgba(47, 103, 255, .58);
    background: #f8faff;
    transform: translateY(-1px);
}

.rs-sticky-product-box .rs-variation-options .rs-variation-option.is-selected,
.rs-sticky-product-box .rs-variation-options .rs-variation-option.selected {
    color: #2447dc;
    border-color: var(--rs-sticky-box-blue);
    background: rgba(47, 103, 255, .07);
    font-weight: 750;
    box-shadow: 0 0 0 2px rgba(47, 103, 255, .08);
}

.rs-sticky-product-box .rs-variation-options .rs-variation-option:disabled,
.rs-sticky-product-box .rs-variation-options .rs-variation-option.is-disabled,
.rs-sticky-product-box .rs-variation-options .rs-variation-option.disabled {
    opacity: .42;
    color: #8e9aaf;
    border-color: #e2e7ef;
    background: #f4f6f9;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.rs-sticky-product-box .rs-variation-options .rs-variation-option__swatch {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    display: block;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(47, 103, 255, .22);
}

.rs-sticky-product-box .rs-variation-options .rs-variation-option__label {
    min-width: 0;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rs-sticky-product-box .rs-variation-options .rs-variation-option:focus-visible,
.rs-sticky-product-box .single_add_to_cart_button:focus-visible,
.rs-sticky-product-box .quantity .ws-qty-btn:focus-visible,
.rs-sticky-product-box select:focus-visible {
    outline: 3px solid rgba(47, 103, 255, .2);
    outline-offset: 2px;
}

.rs-sticky-product-box .reset_variations {
    display: inline-flex;
    margin: 6px 0 0;
    color: var(--rs-sticky-box-blue);
    font-size: 11px;
    line-height: 1.6;
}

.rs-sticky-product-box .woocommerce-variation,
.rs-sticky-product-box .woocommerce-variation-add-to-cart,
.rs-sticky-product-box .extra-quantity-wrap {
    width: 100%;
    min-width: 0;
}

.rs-sticky-product-box .extra-quantity-wrap {
    display: block;
}

.rs-sticky-product-box .rs-simple-cart-row {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
}

.rs-sticky-product-box .quantity {
    width: 100%;
    min-width: 0;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between;
    gap: 8px;
    margin: 3px 0 14px;
}

.rs-sticky-product-box .quantity .summary-label {
    display: none;
}

.rs-sticky-product-box .quantity .sidebar-label {
    flex: 0 0 auto;
    white-space: nowrap;
}

.rs-sticky-product-box .quantity > div {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
}

.rs-sticky-product-box .quantity .qty,
.rs-sticky-product-box .quantity .ws-qty-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    flex: 0 0 34px;
    margin: 0;
    padding: 0;
    border: 1px solid #dbe4f2;
    border-radius: 9px;
    background: #fff;
    color: var(--rs-sticky-box-ink);
    line-height: 32px;
    box-sizing: border-box;
}

.rs-sticky-product-box .quantity .qty {
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.rs-sticky-product-box .quantity .ws-qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.rs-sticky-product-box .quantity .ws-qty-btn:hover:not(:disabled) {
    color: var(--rs-sticky-box-blue);
    border-color: rgba(47, 103, 255, .5);
    background: #f5f8ff;
}

.rs-sticky-product-box .quantity .ws-qty-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.rs-sticky-product-box .rs-sticky-product-box__price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    min-width: 0;
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px solid var(--rs-sticky-box-border);
    text-align: left;
}

.rs-sticky-product-box .rs-sticky-product-box__price > .price {
    max-width: 100%;
    margin: 0;
    color: var(--rs-sticky-box-ink);
    font-family: inherit;
    line-height: 1.45;
    text-align: left;
}

.rs-sticky-product-box .rs-sticky-product-box__price > .price bdi {
    font-size: 21px;
    font-weight: 850;
    white-space: nowrap;
}

.rs-sticky-product-box .rs-sticky-product-box__price > .price del bdi {
    color: #8a95a8;
    font-size: 13px;
    font-weight: 500;
}

.rs-sticky-product-box .rs-sticky-product-box__price > .price ins {
    text-decoration: none;
}

.rs-sticky-product-box .rs-sticky-product-box__price .woocommerce-Price-currencySymbol {
    margin-inline-start: 3px;
    font-size: 12px;
    font-weight: 650;
}

.rs-sticky-product-box-shell .rs-sticky-product-box .single_add_to_cart_button {
    position: absolute;
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: calc(100% - 32px);
    max-width: none;
    height: 50px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 8px 14px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffcc35 0%, #f5a914 100%);
    box-shadow: 0 10px 22px rgba(238, 166, 20, .24);
    color: #332400;
    font-family: inherit;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.5;
    text-align: center;
    white-space: normal;
    box-sizing: border-box;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.rs-sticky-product-box-shell .rs-sticky-product-box .single_add_to_cart_button:hover:not(:disabled) {
    filter: saturate(1.06) brightness(1.02);
    box-shadow: 0 13px 26px rgba(238, 166, 20, .3);
    transform: translateY(-1px);
}

.rs-sticky-product-box-shell .rs-sticky-product-box .single_add_to_cart_button:disabled,
.rs-sticky-product-box-shell .rs-sticky-product-box .single_add_to_cart_button.disabled,
.rs-sticky-product-box-shell .rs-sticky-product-box .single_add_to_cart_button.wc-variation-selection-needed {
    opacity: .72;
    cursor: not-allowed;
    transform: none;
}

.rs-sticky-product-box .stock,
.rs-sticky-product-box .woocommerce-variation-availability {
    margin: 4px 0 9px;
    color: var(--rs-sticky-box-muted);
    font-size: 12px;
    line-height: 1.7;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .product-left-sidebar.rs-sticky-product-box-shell {
        width: 34%;
        padding-inline-start: 18px;
    }

    .woocommerce-tabs .product-panels {
        width: 66%;
    }

    .product-left-sidebar.rs-sticky-product-box-shell .rs-sticky-product-box {
        padding-inline: 14px;
        padding-bottom: 82px;
    }

    .rs-sticky-product-box-shell .rs-sticky-product-box .single_add_to_cart_button {
        right: 14px;
        left: 14px;
        width: calc(100% - 28px);
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    .product-left-sidebar.rs-sticky-product-box-shell {
        display: block;
    }

    .woocommerce-tabs .product-panels {
        width: 66%;
    }
}

@media (min-width: 768px) and (max-width: 782px) {
    body.admin-bar .rs-sticky-product-box-shell .rs-sticky-product-box {
        top: calc(24px + var(--wp-admin--admin-bar--height, 46px));
    }
}

@media (max-width: 767px) {
    .rs-sticky-product-layout {
        display: flex;
        flex-direction: column;
    }

    .woocommerce-tabs .product-panels {
        width: 100%;
    }

    .product-left-sidebar.rs-sticky-product-box-shell {
        position: static;
        inset: auto;
        z-index: auto;
        order: -1;
        display: block;
        width: 100%;
        padding: 0;
        margin: 0 0 24px;
    }

    .product-left-sidebar.rs-sticky-product-box-shell .rs-sticky-product-box {
        position: relative;
        inset: auto;
        z-index: auto;
        display: block;
        width: 100%;
        padding: 16px 16px 82px;
        border-radius: 18px;
        box-shadow: 0 12px 32px rgba(25, 55, 105, .09);
    }

    .rs-sticky-product-box .rs-sticky-product-box__header,
    .rs-sticky-product-box .quantity {
        display: flex !important;
    }

    .rs-sticky-product-box table.variations .label,
    .rs-sticky-product-box-shell .rs-sticky-product-box .price-title {
        display: block !important;
    }

    .rs-sticky-product-box .rs-sticky-product-box__title {
        font-size: 14px;
    }

    .rs-sticky-product-box .rs-variation-options .rs-variation-option {
        width: auto !important;
        min-width: 0 !important;
        flex: 0 0 auto;
        min-height: 34px;
        padding: 5px 8px;
    }

    .rs-sticky-product-box-shell .rs-sticky-product-box .single_add_to_cart_button {
        right: 16px;
        bottom: 16px;
        left: 16px;
        width: calc(100% - 32px);
        height: 50px;
    }
}

@media (max-width: 360px) {
    .rs-sticky-product-box .quantity {
        gap: 6px;
    }

    .rs-sticky-product-box .quantity .qty,
    .rs-sticky-product-box .quantity .ws-qty-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        flex-basis: 32px;
    }

    .rs-sticky-product-box .rs-variation-options .rs-variation-option__label {
        max-width: 120px;
    }
}
