@media (min-width: 768px) {
    #ormau-mobile-buy-bar,
    #ormau-mobile-buy-sheet,
    #ormau-mbs-image-viewer {
        display: none !important;
    }
}

@media (max-width: 767px) {
    #ormau-mobile-buy-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40 !important;
        background: #fff;
        border-top: 1px solid #e7e7e7;
        padding: 10px 12px  calc(10px + env(safe-area-inset-bottom));
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        transition: bottom 0.2s ease;
        box-shadow: 0 -8px 24px rgba(16, 22, 19, 0.08);
    }

    /* Chrome Android: fill the gap between the bar and the physical screen bottom
       that appears during address-bar hide/show animation */
    #ormau-mobile-buy-bar::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 200px;
        background: #fff;
    }

    .ormau-mbs-top-btn {
        border: 1px solid #395544;
        border-radius: 8px;
        height: 44px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }

    .ormau-mbs-top-btn.add {
        background: #fff;
        color: #111;
    }

    .ormau-mbs-top-btn.buy {
        background: #395544;
        color: #fff;
    }

    #ormau-mobile-buy-sheet {
        position: fixed;
        inset: 0;
        z-index: 1000010;
        pointer-events: none;
    }

    #ormau-mobile-buy-sheet.is-open {
        pointer-events: auto;
    }

    .ormau-mbs-overlay {
        position: absolute;
        inset: 0;
        background: rgba(12, 16, 14, 0.52);
        opacity: 0;
        transition: opacity 0.2s ease;
        backdrop-filter: blur(2px);
    }

    #ormau-mobile-buy-sheet.is-open .ormau-mbs-overlay {
        opacity: 1;
    }

    .ormau-mbs-panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: auto;
        max-height: 85vh;
        min-height: 0;
        background: #fdfdfd;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        transition: transform 0.25s ease;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        box-shadow: 0 -20px 40px rgba(15, 23, 19, 0.2);
    }

    #ormau-mobile-buy-sheet.is-open .ormau-mbs-panel {
        transform: translateY(0);
    }

    .ormau-mbs-head {
        display: flex;
        justify-content: flex-end;
        padding: 10px 12px 8px;
        border-bottom: 1px solid #ececec;
        background: #fff;
    }

    .ormau-mbs-close {
        width: auto;
        height: auto;
        border-radius: 0;
        background: transparent;
        color: #111;
        border: 0;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
        padding: 0 6px;
    }

    .ormau-mbs-selected {
        display: grid;
        grid-template-columns: 108px 1fr;
        gap: 12px;
        padding: 12px;
        border-bottom: 1px solid #efefef;
        background: #fff;
    }

    .ormau-mbs-selected-media {
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        border-radius: 10px;
        background: #f4f6f5;
    }

    #ormau-mbs-selected-img,
    .ormau-mbs-selected-img {
        width: 100%;
        height: 100%;
        max-height: 108px;
        object-fit: cover;
        cursor: zoom-in;
        background: #f5f5f5;
        display: block;
    }

    .ormau-mbs-selected-name {
        font-size: 16px;
        line-height: 1.3;
        font-weight: 600;
        color: #121712;
        margin-bottom: 6px;
    }

    .ormau-mbs-selected-price {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px;
    }

    .ormau-mbs-selected-sku {
        font-size: 12px;
        line-height: 1.4;
        color: #5f665f;
        margin-bottom: 0;
    }

    .ormau-mbs-price-sale,
    .ormau-mbs-price-normal {
        color: #1a1a1a;
        font-size: 15px;
        font-weight: 700;
    }

    .ormau-mbs-price-regular {
        color: #999;
        text-decoration: line-through;
        font-size: 13px;
    }

    .ormau-mbs-qty {
        display: inline-flex;
        border: 1px solid #ddd;
        border-radius: 5px;
        overflow: hidden;
        align-items: center;
    }

    .ormau-mbs-qty button {
        width: 30px;
        height: 28px;
        border: 0;
        background: #fff;
        color: #000;
        font-size: 16px;
        cursor: pointer;
    }

    .ormau-mbs-qty input {
        width: 42px;
        height: 28px;
        border: 0;
        text-align: center;
        font-size: 13px;
        padding: 0;
    }

    #ormau-mbs-groups,
    .ormau-mbs-groups {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 12px;
        background: #fff;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

    .ormau-mbs-group {
        margin-bottom: 12px;
    }

    .ormau-mbs-group:last-child {
        margin-bottom: 0;
    }

  
    .ormau-mbs-group-title {
        font-size: 15px;
        margin: 0 0 8px;
        color: #1a211d;
        text-transform: none;
        font-weight: 700;
        letter-spacing: 0.01em;
    }

    .ormau-mbs-group-list {
        display: grid;
        gap: 8px;
    }

    .ormau-mbs-var-item {
        width: 100%;
        border: 1px solid #e5e5e5;
        border-radius: 12px;
        background: #fff;
        display: grid;
        grid-template-columns: 64px 1fr auto;
        gap: 10px;
        align-items: center;
        padding: 10px;
        text-align: left;
        cursor: pointer;
    }

    .ormau-mbs-var-item.is-active {
        border-color: #395544;
        box-shadow: 0 0 0 1px #395544 inset;
    }

    .ormau-mbs-var-thumb {
        width: 64px;
        height: 64px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        border-radius: 8px;
        background: #f4f6f5;
    }

    .ormau-mbs-var-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .ormau-mbs-var-meta {
        min-width: 0;
    }

    .ormau-mbs-var-name {
        display: block;
        font-size: 16px;
        color: #111;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ormau-mbs-var-price {
        font-size: 14px;
        font-weight: 700;
        color: #1a1a1a;
        white-space: nowrap;
    }

    .ormau-mbs-foot {
        border-top: 1px solid #efefef;
        background: #fff;
        padding: 10px 12px ;
    }
    @supports (-webkit-touch-callout: none) {
        #ormau-mobile-buy-bar {
            padding-bottom: calc(10px + env(safe-area-inset-bottom));
        }
    }

    .ormau-mbs-cta-wrap {
        position: sticky;
        bottom: 0;
        flex: 0 0 auto;
        display: grid;
        grid-template-columns: 108px 1fr;
        gap: 10px;
        align-items: center;
        border-top: 1px solid #ececec;
        background: #fff;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        z-index: 6;
    }

    .ormau-mbs-qty-wrap {
        display: grid;
        grid-template-columns: 32px 1fr 32px;
        align-items: center;
        height: 46px;
        border: 1px solid #d7ddd8;
        border-radius: 10px;
        overflow: hidden;
        background: #fff;
    }

    .ormau-mbs-qty-btn {
        border: 0;
        background: #fff;
        color: #16201b;
        font-size: 22px;
        line-height: 1;
        height: 100%;
        cursor: pointer;
    }

    #ormau-mbs-qty {
        width: 100%;
        border: 0;
        text-align: center;
        font-size: 18px;
        font-weight: 600;
        color: #16201b;
        padding: 0;
        background: #fff;
    }

    #ormau-mbs-cta {
        width: 100%;
        height: 46px;
        border: 1px solid #395544;
        background: #395544;
        color: #fff;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        letter-spacing: 0.01em;
    }

    #ormau-mbs-cta.is-loading {
        opacity: 0.7;
        cursor: not-allowed;
    }

    #ormau-mbs-image-viewer {
        position: fixed;
        inset: 0;
        z-index: 1000011;
        background: #ffffff;
        display: none;
        grid-template-rows: 1fr auto;
        padding: 0;
    }

    #ormau-mbs-image-viewer.is-open {
        display: grid;
    }

    .ormau-mbs-viewer-stage {
        position: relative;
        min-height: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px 16px 12px;
        overflow: hidden;
    }

    .ormau-mbs-viewer-image-wrap {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ormau-mbs-viewer-image {
        position: absolute;
        max-width: 100%;
        max-height: calc(90vh - 150px);
        object-fit: contain;
        opacity: 0;
        transition: opacity 0.18s ease;
        will-change: opacity;
    }

    .ormau-mbs-viewer-image.is-active {
        opacity: 1;
    }

    .ormau-mbs-viewer-close {
        position: absolute;
        top: 12px;
        left: 12px;
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: #000;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
    }

    .ormau-mbs-viewer-count {
        position: absolute;
        top: 14px;
        right: 14px;
        color: #000;
        font-size: 14px;
        font-weight: 600;
    }

    #ormau-mbs-image-viewer img {
        max-width: 100%;
        max-height: calc(90vh - 150px);
        object-fit: contain;
    }

    .ormau-mbs-viewer-footer {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: end;
        gap: 12px;
        background: #fff;
        border-radius: 16px 16px 0 0;
        padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
    }

    .ormau-mbs-viewer-info {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .ormau-mbs-viewer-title {
        text-align: left;
        color: #111;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.35;
        margin: 0;
    }

    .ormau-mbs-viewer-price {
        display: block;
        color: #111;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.25;
    }

    .ormau-mbs-viewer-price .ormau-mbs-price-regular {
        margin-left: 8px;
    }

    .ormau-mbs-viewer-cta {
        min-width: 138px;
        height: 44px;
        border: 1px solid #395544;
        border-radius: 8px;
        padding: 0 16px;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        background: #fff;
        color: #111;
    }

    .ormau-mbs-viewer-cta.is-buy {
        background: #395544;
        color: #fff;
    }

    html.ormau-mbs-open,
    html.ormau-mbs-open body {
        overflow: hidden;
    }

    body.single-product a.ct-back-to-top.ct-show {
        bottom: 130px;
    }
}
