/* ALSHOP_HOMEPAGE_PRODUCT_UX_PRO_V1_0_0 */

/* NEW badge: homepage product cards + single product only */
.alshop-new-30-badge{
    position:absolute;
    z-index:8;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:48px;
    min-height:26px;
    padding:4px 10px;
    border:1px solid rgba(255,255,255,.78);
    border-radius:999px;
    color:#fff;
    background:linear-gradient(135deg,#ff5b24,#ed3e16);
    box-shadow:0 7px 18px rgba(238,65,22,.24);
    font-size:10px;
    font-weight:900;
    line-height:1;
    letter-spacing:.075em;
}

.agm-card-image .alshop-new-30-badge{
    left:9px;
    bottom:9px;
}

.alshop-new-30-badge--hero{
    top:8px;
    left:8px;
    bottom:auto!important;
    min-width:44px;
    min-height:23px;
    padding:3px 8px;
    font-size:9px;
}

.alshop-new-30-badge--single{
    top:10px;
    left:10px;
    bottom:auto!important;
    z-index:20;
    min-width:58px;
    min-height:30px;
    font-size:11px;
}

.agm-verified-product-image-wrap{
    position:relative;
}

/* Multi variant selector */
.alshop-multi-variant-order{
    margin:17px 0 16px;
    overflow:hidden;
    border:1px solid #dfe4eb;
    border-radius:14px;
    background:#fff;
    box-shadow:0 9px 28px rgba(30,41,59,.06);
}

.alshop-mv-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    padding:17px 18px;
    border-bottom:1px solid #edf0f4;
    background:linear-gradient(135deg,#fff8f3 0%,#fff 58%,#f8fbff 100%);
}

.alshop-mv-kicker{
    display:inline-flex;
    align-items:center;
    gap:6px;
    margin-bottom:5px;
    color:#ee4f1f;
    font-size:10px;
    font-weight:900;
    letter-spacing:.05em;
    text-transform:uppercase;
}

.alshop-mv-head h3{
    margin:0 0 4px;
    color:#172033;
    font-size:17px;
    font-weight:850;
    line-height:1.25;
}

.alshop-mv-head p{
    max-width:560px;
    margin:0;
    color:#697386;
    font-size:12px;
    line-height:1.45;
}

.alshop-mv-classic-toggle{
    display:inline-flex;
    flex:0 0 auto;
    align-items:center;
    gap:6px;
    min-height:35px;
    padding:0 11px;
    border:1px solid #d8dee8;
    border-radius:8px;
    color:#4b5565;
    background:#fff;
    font-size:10px;
    font-weight:800;
    cursor:pointer;
}

.alshop-mv-list{
    max-height:430px;
    overflow:auto;
    scrollbar-width:thin;
}

.alshop-mv-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) 96px 126px;
    gap:13px;
    align-items:center;
    padding:11px 15px;
    border-bottom:1px solid #edf0f4;
    transition:background .16s ease;
}

.alshop-mv-row:last-child{
    border-bottom:0;
}

.alshop-mv-row:hover{
    background:#fbfcfe;
}

.alshop-mv-row.is-selected{
    background:#fff7f2;
}

.alshop-mv-row.is-out{
    opacity:.54;
    background:#fafafa;
}

.alshop-mv-product{
    display:flex;
    align-items:center;
    min-width:0;
    gap:9px;
}

.alshop-mv-image{
    display:flex;
    flex:0 0 44px;
    align-items:center;
    justify-content:center;
    width:44px;
    height:44px;
    overflow:hidden;
    border:1px solid #edf0f4;
    border-radius:9px;
    background:#fff;
}

.alshop-mv-image img{
    width:100%;
    height:100%;
    object-fit:contain;
}

.alshop-mv-swatch{
    flex:0 0 20px;
    width:20px;
    height:20px;
    border:2px solid #fff;
    border-radius:50%;
    background:var(--alshop-swatch);
    box-shadow:0 0 0 1px #d8dee7,0 3px 8px rgba(31,41,55,.12);
}

.alshop-mv-meta{
    display:flex;
    min-width:0;
    flex-direction:column;
    line-height:1.25;
}

.alshop-mv-meta strong{
    overflow:hidden;
    color:#263244;
    font-size:12px;
    font-weight:850;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.alshop-mv-meta small{
    margin-top:3px;
    color:#8490a1;
    font-size:9.5px;
    font-weight:650;
}

.alshop-mv-price{
    color:#111827;
    font-size:13px;
    font-weight:900;
    text-align:right;
}

.alshop-mv-qty{
    display:grid;
    grid-template-columns:34px 52px 34px;
    align-items:center;
    overflow:hidden;
    border:1px solid #d8dee8;
    border-radius:9px;
    background:#fff;
}

.alshop-mv-qty button,
.alshop-mv-qty input{
    height:36px;
    border:0;
    background:#fff;
}

.alshop-mv-qty button{
    color:#344054;
    font-size:18px;
    font-weight:700;
    cursor:pointer;
}

.alshop-mv-qty button:hover:not(:disabled){
    color:#ee4f1f;
    background:#fff4ee;
}

.alshop-mv-qty button:disabled{
    cursor:not-allowed;
    opacity:.32;
}

.alshop-mv-qty input{
    width:52px;
    padding:0 3px;
    border-right:1px solid #edf0f4;
    border-left:1px solid #edf0f4;
    color:#172033;
    font-size:13px;
    font-weight:850;
    text-align:center;
    outline:0;
    -moz-appearance:textfield;
}

.alshop-mv-qty input::-webkit-outer-spin-button,
.alshop-mv-qty input::-webkit-inner-spin-button{
    margin:0;
    -webkit-appearance:none;
}

.alshop-mv-footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:14px 15px;
    border-top:1px solid #e9edf2;
    background:#fbfcfe;
}

.alshop-mv-summary{
    display:flex;
    flex-wrap:wrap;
    gap:7px 13px;
    color:#667085;
    font-size:11px;
    font-weight:700;
}

.alshop-mv-summary strong{
    color:#172033;
    font-size:13px;
}

.alshop-mv-add-all{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-height:42px;
    padding:0 17px;
    border:0;
    border-radius:9px;
    color:#fff;
    background:linear-gradient(135deg,#ff5b24,#ed3e16);
    box-shadow:0 8px 18px rgba(238,65,22,.20);
    font-size:12px;
    font-weight:900;
    cursor:pointer;
}

.alshop-mv-add-all:disabled{
    box-shadow:none;
    cursor:not-allowed;
    opacity:.44;
}

.alshop-mv-add-all.is-loading{
    pointer-events:none;
    opacity:.72;
}

.alshop-mv-message{
    display:none;
    margin:0 15px 14px;
    padding:9px 11px;
    border-radius:8px;
    font-size:11px;
    font-weight:750;
}

.alshop-mv-message.is-success{
    display:block;
    color:#067647;
    background:#ecfdf3;
}

.alshop-mv-message.is-error{
    display:block;
    color:#b42318;
    background:#fef3f2;
}

/*
 * Multi-selector is primary. Existing single-variant selector remains
 * available behind the "standard" toggle.
 */
/*
 * ALSHOP_MOBILE_VARIANT_CTA_CLEAN_REBUILD_V1_2_0
 *
 * Desktop:
 *   quick multi-variant selector is primary, so old single-variant form
 *   controls are hidden.
 *
 * Mobile:
 *   old AL Shop purchase action bar MUST stay available. Only the old
 *   radio/quantity UI is hidden because the multi-selector replaces it.
 */
@media (min-width: 992px) {
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .product-variant,
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .agm-qty-price-panel,
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .selected-variations,
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page #added_to_cart_btn,
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .buy-now {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .product-variant,
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .agm-qty-price-panel,
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .selected-variations {
        display: none !important;
    }

    /*
     * This is the DESKTOP sticky bar from product_details.blade.php.
     * It carries d-none d-lg-block and must NEVER be promoted to mobile.
     */
    html body.alshop-multi-variant-product
    .agm-sticky-product-bar {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /*
     * Keep the site's REAL mobile purchase source visible.
     * Its existing marketplace CSS controls exact visual placement/design.
     */
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .alshop-in-stock-actions:not(.d-none),
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .agm-product-action-buttons,
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .agm-product-secondary-actions {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .buy-now:not(.d-none),
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page #added_to_cart_btn:not(.d-none) {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

body.alshop-multi-variant-classic .alshop-mv-content{
    display:none!important;
}

body.alshop-multi-variant-classic .alshop-multi-variant-order{
    border-color:#e5e7eb;
    box-shadow:none;
}

@media(max-width:767.98px){
    .alshop-new-30-badge{
        min-width:42px;
        min-height:23px;
        padding:3px 8px;
        font-size:9px;
    }

    .alshop-mv-head{
        display:block;
        padding:14px;
    }

    .alshop-mv-classic-toggle{
        margin-top:10px;
    }

    .alshop-mv-list{
        max-height:none;
    }

    .alshop-mv-row{
        grid-template-columns:minmax(0,1fr) 118px;
        gap:9px 11px;
        padding:11px 12px;
    }

    .alshop-mv-price{
        grid-column:1;
        grid-row:2;
        padding-left:53px;
        text-align:left;
    }

    .alshop-mv-qty{
        grid-column:2;
        grid-row:1 / span 2;
        justify-self:end;
    }

    .alshop-mv-footer{
        position:static;
        top:auto;
        right:auto;
        bottom:auto;
        left:auto;
        z-index:auto;
        display:block;
        padding:11px 12px;
        box-shadow:none;
    }

    .alshop-mv-summary{
        margin-bottom:8px;
    }

    .alshop-mv-add-all{
        width:100%;
        min-height:46px;
    }

    .alshop-mv-meta strong{
        white-space:normal;
    }
}


/* ==========================================================================
   ALSHOP_MOBILE_VARIANT_CTA_CLEAN_REBUILD_V1_2_0
   ONE consolidated CTA layer. No V1.1.0/V1.1.1/V1.1.2/V1.1.3 stacking.
   ========================================================================== */

.alshop-mv-primary-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.alshop-mv-buy-now,
.alshop-mv-add-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 42px;
    padding: 0 16px;

    border-radius: 9px;

    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;

    cursor: pointer;

    transition:
        transform .15s ease,
        opacity .15s ease,
        box-shadow .15s ease,
        background-color .15s ease;
}

.alshop-mv-buy-now {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #ff5b24, #ed3e16);
    box-shadow: 0 8px 18px rgba(238,65,22,.20);
}

.alshop-mv-add-all {
    border: 1px solid #f15a2a;
    color: #e64b1d;
    background: #fff;
    box-shadow: none;
}

.alshop-mv-buy-now:disabled,
.alshop-mv-add-all:disabled {
    cursor: not-allowed;
    opacity: .44;
    box-shadow: none;
}

.alshop-mv-buy-now.is-loading,
.alshop-mv-add-all.is-loading {
    pointer-events: none;
    opacity: .70;
}

/* Retire the experimental V1.1.0 custom mobile bar permanently. */
.alshop-unified-mobile-purchase-bar {
    display: none !important;
}

/* --------------------------------------------------------------------------
   MOBILE BOTTOM SHEET
   -------------------------------------------------------------------------- */
.alshop-mv-mobile-sheet-backdrop {
    display: none;
}

@media (max-width: 991.98px) {
    .alshop-mv-primary-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        margin-top: 8px;
    }

    .alshop-mv-buy-now,
    .alshop-mv-add-all {
        width: 100%;
        min-height: 45px;
        padding: 0 9px;
    }

    /*
     * Inline selector is the SECOND ordering path.
     * It remains part of normal document flow and never floats.
     */
    .alshop-multi-variant-order:not(.alshop-mv-in-sheet),
    .alshop-multi-variant-order:not(.alshop-mv-in-sheet) .alshop-mv-footer,
    .alshop-multi-variant-order:not(.alshop-mv-in-sheet) .alshop-mv-primary-actions,
    .alshop-multi-variant-order:not(.alshop-mv-in-sheet) .alshop-mv-buy-now,
    .alshop-multi-variant-order:not(.alshop-mv-in-sheet) .alshop-mv-add-all {
        position: static !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
    }

    .alshop-mv-mobile-sheet-backdrop {
        position: fixed;
        z-index: 2147482900;
        inset: 0;

        display: none;

        background: rgba(15,23,42,.48);
        opacity: 0;

        transition: opacity .18s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .alshop-mv-mobile-sheet-backdrop.is-open {
        display: block;
        opacity: 1;
    }

    .alshop-mv-mobile-sheet {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;

        display: flex;
        flex-direction: column;

        max-height: min(86vh, 760px);

        overflow: hidden;

        border-radius: 20px 20px 0 0;
        background: #fff;
        box-shadow: 0 -18px 50px rgba(15,23,42,.22);

        transform: translateY(100%);
        transition: transform .22s ease;
    }

    .alshop-mv-mobile-sheet-backdrop.is-open .alshop-mv-mobile-sheet {
        transform: translateY(0);
    }

    .alshop-mv-mobile-sheet-head {
        position: relative;

        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;

        flex: 0 0 auto;

        padding: 15px 14px 12px;

        border-bottom: 1px solid #eceff3;
        background: linear-gradient(135deg,#fff7f2,#fff);
    }

    .alshop-mv-mobile-sheet-head::before {
        position: absolute;
        top: 6px;
        left: 50%;

        width: 38px;
        height: 4px;

        border-radius: 99px;
        background: #d7dce4;

        content: "";
        transform: translateX(-50%);
    }

    .alshop-mv-mobile-sheet-title {
        min-width: 0;
        padding-top: 4px;
    }

    .alshop-mv-mobile-sheet-title strong {
        display: block;
        color: #172033;
        font-size: 15px;
        font-weight: 900;
        line-height: 1.2;
    }

    .alshop-mv-mobile-sheet-title span {
        display: block;
        margin-top: 3px;
        color: #737e8f;
        font-size: 10.5px;
        font-weight: 650;
        line-height: 1.25;
    }

    .alshop-mv-mobile-sheet-close {
        display: inline-flex;
        flex: 0 0 38px;
        align-items: center;
        justify-content: center;

        width: 38px;
        height: 38px;

        border: 1px solid #e3e7ed;
        border-radius: 50%;

        color: #344054;
        background: #fff;

        font-size: 21px;
        cursor: pointer;
    }

    .alshop-mv-mobile-sheet-body {
        min-height: 0;
        flex: 1 1 auto;

        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .alshop-mv-mobile-sheet-body .alshop-multi-variant-order {
        margin: 0 !important;

        border: 0 !important;
        border-radius: 0 !important;

        box-shadow: none !important;
    }

    .alshop-mv-mobile-sheet-body
    .alshop-multi-variant-order
    .alshop-mv-head {
        display: none !important;
    }

    .alshop-mv-mobile-sheet-body .alshop-mv-list {
        max-height: none !important;
    }

    /*
     * Sticky only INSIDE the sheet.
     */
    .alshop-mv-mobile-sheet-body
    .alshop-multi-variant-order.alshop-mv-in-sheet
    .alshop-mv-footer {
        position: sticky !important;

        top: auto !important;
        right: auto !important;
        bottom: 0 !important;
        left: auto !important;

        z-index: 8 !important;

        margin: 0 !important;

        background: rgba(255,255,255,.985) !important;

        box-shadow:
            0 -7px 20px rgba(15,23,42,.09) !important;
    }

    body.alshop-mv-sheet-open {
        overflow: hidden !important;
        touch-action: none;
    }
}

@media (min-width: 992px) {
    .alshop-mv-mobile-sheet-backdrop {
        display: none !important;
    }
}

/* ==========================================================================
   ALSHOP_MOBILE_VARIANT_REAL_CTA_RESTORE_V1_2_1
   The REAL mobile CTA lives inside .agm-qty-price-panel.
   Keep the parent alive and hide only obsolete quantity/summary UI.
   ========================================================================== */
@media (max-width: 991.98px) {

    /*
     * V1.2.0 hid this entire parent. That also hid:
     *   .alshop-in-stock-actions
     *   .agm-product-action-buttons
     *   .agm-product-secondary-actions (WhatsApp)
     *
     * Restore the parent without changing the site's existing CTA design.
     */
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .agm-qty-price-panel {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;

        position: static !important;

        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        margin: 0 !important;
        padding: 0 !important;

        border: 0 !important;
        background: transparent !important;
        overflow: visible !important;
        box-shadow: none !important;
    }

    /*
     * Hide only the old single-variant quantity/summary controls.
     * Multi-variant selector replaces these.
     */
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .agm-qty-price-panel > .agm-qty-summary-row,
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .agm-qty-price-panel > .selected-variations {
        display: none !important;
    }

    /*
     * Restore the actual old mobile purchase actions.
     * Exact position/colors/layout are still controlled by the site's
     * existing marketplace/mobile CSS.
     */
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .agm-qty-price-panel .alshop-in-stock-actions:not(.d-none) {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .agm-qty-price-panel
    .alshop-in-stock-actions .agm-product-action-buttons {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .agm-qty-price-panel
    .alshop-in-stock-actions .buy-now:not(.d-none),
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .agm-qty-price-panel
    .alshop-in-stock-actions #added_to_cart_btn:not(.d-none),
    body.alshop-multi-variant-product:not(.alshop-multi-variant-classic)
    .agm-product-page .agm-qty-price-panel
    .alshop-in-stock-actions .agm-product-secondary-actions:not(.d-none) {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    /*
     * Desktop-only sticky bar must remain gone on mobile.
     */
    html body.alshop-multi-variant-product
    .agm-sticky-product-bar {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}