/* ALSHOP_AI_SHOPPING_ASSISTANT_PRO_V2_0_0 */
.alshop-ai-page{
    --ai-orange:#f4511e;
    --ai-orange-dark:#d83a0d;
    --ai-ink:#172033;
    --ai-muted:#687385;
    --ai-line:#e7ebf0;
    --ai-soft:#f7f8fa;
    --ai-green:#0f9f6e;
    background:#f4f6f8;
    min-height:70vh;
    padding:22px 0 34px;
    color:var(--ai-ink);
}
.alshop-ai-page *{box-sizing:border-box}
.alshop-ai-container{max-width:1420px!important}
.alshop-ai-desktop-top{
    align-items:center;
    justify-content:space-between;
    gap:18px;
    margin-bottom:14px;
}
.alshop-ai-brand-block{display:flex;align-items:center;gap:12px}
.alshop-ai-brand-icon{
    width:44px;height:44px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;
    background:linear-gradient(145deg,#ff6a33,#f04416);color:#fff;font-size:23px;
    box-shadow:0 10px 26px rgba(244,81,30,.22)
}
.alshop-ai-kicker{display:block;color:#8b95a4;font-size:10px;font-weight:900;letter-spacing:.13em;text-transform:uppercase;margin-bottom:2px}
.alshop-ai-brand-block h1{font-size:25px;line-height:1.1;margin:0;font-weight:900;color:#172033}
.alshop-ai-desktop-status{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.alshop-ai-desktop-status>span{
    display:inline-flex;align-items:center;gap:6px;height:33px;padding:0 10px;border-radius:10px;
    background:#fff;border:1px solid var(--ai-line);color:#5c6675;font-size:11px;font-weight:800
}
.alshop-ai-desktop-status i{font-size:15px;color:var(--ai-orange)}
.alshop-ai-role-chip{background:#fff8f4!important;border-color:#ffd9c9!important;color:#a63c17!important}
.alshop-ai-role-super{background:#171c25!important;color:#fff!important;border-color:#171c25!important}
.alshop-ai-role-super i{color:#ffb18f!important}
.alshop-ai-admin-notice{
    max-width:1420px;margin:0 auto 12px;background:#fff8e8;border:1px solid #f7dfab;border-radius:13px;padding:10px 13px;
    display:flex;align-items:center;gap:10px;font-size:12px;color:#76551a
}
.alshop-ai-admin-notice>i{font-size:20px}.alshop-ai-admin-notice strong,.alshop-ai-admin-notice span{display:block}.alshop-ai-admin-notice span{margin-top:1px;color:#8d6d33}
.alshop-ai-workspace{
    display:grid;grid-template-columns:minmax(430px,.78fr) minmax(540px,1.22fr);gap:14px;align-items:stretch;
    min-height:680px;max-height:calc(100vh - 185px)
}
.alshop-ai-chat-panel,.alshop-ai-results-panel{
    min-width:0;background:#fff;border:1px solid var(--ai-line);border-radius:20px;overflow:hidden;
    box-shadow:0 14px 40px rgba(25,34,49,.055)
}
.alshop-ai-chat-panel{display:flex;flex-direction:column;min-height:680px}
.alshop-ai-chat-head{
    min-height:68px;padding:10px 13px 10px 15px;border-bottom:1px solid var(--ai-line);background:rgba(255,255,255,.96);
    display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto
}
.alshop-ai-agent{display:flex;align-items:center;gap:10px;min-width:0}
.alshop-ai-agent-avatar{
    width:39px;height:39px;flex:0 0 39px;border-radius:13px;display:inline-flex;align-items:center;justify-content:center;
    background:#fff1eb;color:var(--ai-orange);font-size:20px;border:1px solid #ffe0d3
}
.alshop-ai-agent strong{display:block;font-size:14px;color:#1d2634;font-weight:900;line-height:1.2}
.alshop-ai-agent span span{display:block}
.alshop-ai-agent>div>span{display:block;margin-top:3px;color:#8992a0;font-size:10.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.alshop-ai-reset{
    min-width:37px;height:37px;border:1px solid #e4e8ed;border-radius:11px;background:#fff;color:#6d7786;padding:0 10px;
    display:inline-flex;align-items:center;justify-content:center;gap:5px;font-size:11px;font-weight:800;cursor:pointer
}
.alshop-ai-reset:hover{border-color:#ffc6ae;color:var(--ai-orange);background:#fff8f5}
.alshop-ai-offer-banner{
    margin:9px 10px 0;border:1px solid #ffd5a6;border-radius:13px;background:linear-gradient(135deg,#fff9ed,#fff4e5);
    padding:9px 11px;color:#7d4b10;flex:0 0 auto
}
.alshop-ai-offer-banner[hidden]{display:none!important}
.alshop-ai-offer-main,.alshop-ai-offer-side{display:flex;align-items:center;gap:8px}
.alshop-ai-offer-banner{display:flex;align-items:center;justify-content:space-between;gap:10px}
.alshop-ai-offer-main>i{width:29px;height:29px;border-radius:9px;background:#f59e0b;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:16px}
.alshop-ai-offer-main strong,.alshop-ai-offer-main span{display:block}.alshop-ai-offer-main strong{font-size:11.5px}.alshop-ai-offer-main span{font-size:10px;margin-top:1px;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.alshop-ai-offer-side{margin-left:auto}.alshop-ai-offer-prices{font-size:10px;text-align:right}.alshop-ai-offer-prices del,.alshop-ai-offer-prices b{display:block}.alshop-ai-offer-prices b{color:#b64a05;font-size:12px}
.alshop-ai-offer-side time{font:900 13px/1 ui-monospace,SFMono-Regular,Menlo,monospace;background:#1d2634;color:#fff;border-radius:8px;padding:7px 8px;min-width:55px;text-align:center}
.alshop-ai-offer-expired{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:800}
.alshop-ai-messages{
    flex:1 1 auto;overflow:auto;padding:16px 14px 10px;background:
    radial-gradient(circle at 10% 10%,rgba(244,81,30,.035),transparent 26%),
    linear-gradient(#fbfcfd,#f8fafb)
}
.alshop-ai-message{display:flex;align-items:flex-end;gap:7px;margin:0 0 11px;max-width:94%}
.alshop-ai-message-user{margin-left:auto;justify-content:flex-end}
.alshop-ai-message-avatar{
    width:27px;height:27px;flex:0 0 27px;border-radius:9px;display:flex;align-items:center;justify-content:center;
    color:var(--ai-orange);background:#fff;border:1px solid #ffe0d4;font-size:14px;box-shadow:0 3px 10px rgba(31,38,48,.04)
}
.alshop-ai-message-body{
    padding:9px 11px;border-radius:5px 14px 14px 14px;background:#fff;border:1px solid #e8ebef;
    box-shadow:0 4px 14px rgba(26,35,50,.035);color:#354052;font-size:12.5px;line-height:1.52
}
.alshop-ai-message-body p{margin:0;white-space:pre-line}
.alshop-ai-message-user .alshop-ai-message-body{
    background:linear-gradient(135deg,#f45b27,#ef4817);color:#fff;border:0;border-radius:14px 5px 14px 14px;
    box-shadow:0 8px 18px rgba(244,81,30,.16)
}
.alshop-ai-typing .alshop-ai-message-body{display:flex;align-items:center;gap:4px;min-height:37px}
.alshop-ai-typing .alshop-ai-message-body span{width:6px;height:6px;border-radius:50%;background:#a5adba;animation:alshopAiTyping 1s infinite ease-in-out}
.alshop-ai-typing .alshop-ai-message-body span:nth-child(2){animation-delay:.13s}.alshop-ai-typing .alshop-ai-message-body span:nth-child(3){animation-delay:.26s}
@keyframes alshopAiTyping{0%,70%,100%{transform:translateY(0);opacity:.45}35%{transform:translateY(-3px);opacity:1}}
.alshop-ai-offer-hint{
    margin:3px 0 11px 34px;max-width:86%;display:flex;align-items:flex-start;gap:7px;padding:8px 10px;border-radius:11px;
    background:#fff8e8;border:1px solid #f7ddaa;color:#79561d;font-size:11px;font-weight:700;line-height:1.42
}
.alshop-ai-offer-hint i{color:#f59e0b;font-size:15px;margin-top:1px}
.alshop-ai-quick-wrap{padding:7px 10px 8px;background:#fff;border-top:1px solid #f0f2f4;flex:0 0 auto}
.alshop-ai-quick-list{display:flex;gap:6px;overflow:auto;scrollbar-width:none}.alshop-ai-quick-list::-webkit-scrollbar{display:none}
.alshop-ai-quick-list button{
    flex:0 0 auto;max-width:240px;border:1px solid #e2e6eb;background:#fff;color:#586374;border-radius:999px;padding:7px 10px;
    font-size:10.5px;font-weight:800;white-space:nowrap;cursor:pointer
}
.alshop-ai-quick-list button:hover{border-color:#ffc5ae;background:#fff8f5;color:#c74317}
.alshop-ai-composer{padding:9px 10px 10px;border-top:1px solid var(--ai-line);background:#fff;flex:0 0 auto}
.alshop-ai-input-shell{
    min-height:48px;border:1.5px solid #dfe4e9;border-radius:14px;background:#fafbfc;display:flex;align-items:flex-end;gap:8px;padding:7px 7px 7px 11px;
    transition:border-color .18s,box-shadow .18s,background .18s
}
.alshop-ai-input-shell:focus-within{border-color:#f8a083;background:#fff;box-shadow:0 0 0 3px rgba(244,81,30,.08)}
.alshop-ai-input-shell textarea{flex:1;resize:none;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;padding:6px 0 5px!important;min-height:34px;max-height:118px;font-size:13px;line-height:1.4;color:#202a38}
.alshop-ai-input-shell textarea::placeholder{color:#9aa2ae}
.alshop-ai-send{width:36px;height:36px;flex:0 0 36px;border:0;border-radius:11px;background:var(--ai-orange);color:#fff;display:flex;align-items:center;justify-content:center;font-size:17px;cursor:pointer;box-shadow:0 6px 14px rgba(244,81,30,.19)}
.alshop-ai-send:hover{background:var(--ai-orange-dark)}.alshop-ai-send:disabled{opacity:.55;cursor:not-allowed}
.alshop-ai-composer-note{margin:6px 2px 0;color:#9aa2ae;font-size:9.5px;font-weight:700}
.alshop-ai-results-panel{flex-direction:column;min-height:680px}
.alshop-ai-results-head{height:68px;flex:0 0 68px;border-bottom:1px solid var(--ai-line);display:flex;align-items:center;justify-content:space-between;padding:0 17px}
.alshop-ai-results-head span{display:block;color:#9aa2ae;text-transform:uppercase;letter-spacing:.09em;font-size:9px;font-weight:900;margin-bottom:2px}.alshop-ai-results-head strong{font-size:14px;color:#242d3a}.alshop-ai-results-head>i{font-size:21px;color:#f18a61}
.alshop-ai-profile{margin:10px 12px 0;padding:8px 10px;border:1px solid #dce9ff;background:#f5f9ff;border-radius:11px;color:#3c5f8e;font-size:10.5px;line-height:1.42;display:flex;align-items:flex-start;gap:7px}.alshop-ai-profile[hidden]{display:none!important}.alshop-ai-profile i{font-size:15px;margin-top:1px}
.alshop-ai-results-empty{margin:auto;padding:40px;max-width:420px;text-align:center;color:#8b95a3}.alshop-ai-results-empty[hidden]{display:none!important}
.alshop-ai-results-empty-icon{width:56px;height:56px;margin:0 auto 12px;border-radius:17px;display:flex;align-items:center;justify-content:center;background:#f7f8fa;border:1px solid #e8ebef;color:#a6aebb;font-size:26px}.alshop-ai-results-empty strong{display:block;color:#566171;font-size:14px;margin-bottom:5px}.alshop-ai-results-empty p{font-size:11px;line-height:1.55;margin:0}
.alshop-ai-results{padding:11px;overflow:auto;display:grid;grid-template-columns:1fr 1fr;gap:10px;align-content:start}
.alshop-ai-product{min-width:0;border:1px solid #e5e8ed;border-radius:15px;background:#fff;overflow:hidden;display:grid;grid-template-columns:104px minmax(0,1fr);min-height:152px;box-shadow:0 4px 14px rgba(26,35,50,.025);transition:transform .16s,border-color .16s,box-shadow .16s}
.alshop-ai-product:hover{transform:translateY(-1px);border-color:#f2c0ad;box-shadow:0 10px 24px rgba(34,42,55,.07)}
.alshop-ai-product-media{position:relative;display:flex;align-items:center;justify-content:center;background:#fafbfc;padding:8px;border-right:1px solid #f0f2f4;min-width:0}
.alshop-ai-product-media img{width:100%;height:116px;object-fit:contain;mix-blend-mode:multiply}
.alshop-ai-match{position:absolute;top:7px;left:7px;background:#1f2937;color:#fff;border-radius:999px;padding:4px 6px;font-size:8.5px;font-weight:900;z-index:1}
.alshop-ai-product-body{padding:10px;min-width:0;display:flex;flex-direction:column}
.alshop-ai-product-overline{display:flex;align-items:center;gap:5px;min-width:0;margin-bottom:4px}.alshop-ai-product-overline span{color:var(--ai-orange);font-size:8.5px;font-weight:900;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.alshop-ai-product-overline small{color:#9da5b0;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.alshop-ai-product-overline small:before{content:'•';margin-right:5px}
.alshop-ai-product-title{font-size:11.5px;line-height:1.28;font-weight:900;color:#273141;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:5px}.alshop-ai-product-title:hover{color:var(--ai-orange)}
.alshop-ai-product-reason{font-size:9.7px;line-height:1.38;color:#7a8492;margin:0 0 6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.alshop-ai-fit{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:6px}.alshop-ai-fit span{padding:3px 5px;border-radius:999px;background:#f6f7f9;color:#697483;font-size:8px;font-weight:800}
.alshop-ai-staff-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;margin:1px 0 6px}.alshop-ai-staff-meta span{background:#f7f8fa;border-radius:5px;padding:3px 5px;font-size:7.8px;color:#66707e;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.alshop-ai-staff-meta b{color:#303b49}
.alshop-ai-super-meta{display:flex;gap:4px;flex-wrap:wrap;margin:0 0 6px}.alshop-ai-super-meta span{padding:3px 5px;border-radius:5px;background:#222832;color:#dce2e8;font-size:7.5px}.alshop-ai-super-meta b{color:#fff}
.alshop-ai-offer-btn{width:100%;border:1px solid #f4c779;background:#fff8e8;color:#a25f0b;border-radius:8px;padding:6px 7px;margin:0 0 7px;display:flex;align-items:center;justify-content:center;gap:5px;font-size:9px;font-weight:900;cursor:pointer}.alshop-ai-offer-btn i{color:#f59e0b;font-size:13px}.alshop-ai-offer-btn:hover{background:#fff1cd}.alshop-ai-offer-btn:disabled{opacity:.55}
.alshop-ai-product-foot{display:flex;align-items:flex-end;justify-content:space-between;gap:7px;margin-top:auto}.alshop-ai-product-price-wrap{display:flex;align-items:baseline;gap:5px;min-width:0}.alshop-ai-price{font-size:13px;color:#151e2a;font-weight:950;white-space:nowrap}.alshop-ai-old-price{font-size:9px;color:#9aa2ae;text-decoration:line-through}.alshop-ai-price-offer{color:#d64b14}.alshop-ai-view{font-size:9px;font-weight:900;color:#d9511e;white-space:nowrap}.alshop-ai-view i{font-size:10px}

@media(max-width:1199.98px) and (min-width:992px){
    .alshop-ai-workspace{grid-template-columns:minmax(390px,.9fr) minmax(460px,1.1fr)}
    .alshop-ai-results{grid-template-columns:1fr}
}

@media(max-width:991.98px){
    .alshop-ai-page{padding:0 0 78px;background:#f0f2f4;min-height:calc(100dvh - 65px)}
    .alshop-ai-container{padding:0!important;max-width:none!important}
    .alshop-ai-admin-notice{margin:7px 8px;border-radius:11px}
    .alshop-ai-workspace{display:block;min-height:0;max-height:none}
    .alshop-ai-chat-panel{border:0;border-radius:0;box-shadow:none;min-height:calc(100dvh - 115px);background:#f5f7f8;overflow:visible}
    .alshop-ai-chat-head{position:sticky;top:0;z-index:8;min-height:56px;height:56px;padding:7px 10px;border-bottom:1px solid #e3e7eb;box-shadow:0 2px 8px rgba(22,31,43,.04)}
    .alshop-ai-agent-avatar{width:35px;height:35px;flex-basis:35px;border-radius:50%;background:var(--ai-orange);color:#fff;border:0;font-size:18px}
    .alshop-ai-agent strong{font-size:13px}.alshop-ai-agent>div>span{font-size:9.5px;margin-top:1px}
    .alshop-ai-reset{width:34px;height:34px;min-width:34px;padding:0;border-radius:50%}
    .alshop-ai-offer-banner{position:sticky;top:57px;z-index:7;margin:0;border-radius:0;border-left:0;border-right:0;padding:7px 9px}
    .alshop-ai-offer-main>i{width:25px;height:25px;font-size:14px}.alshop-ai-offer-main strong{font-size:10.5px}.alshop-ai-offer-main span{font-size:8.8px;max-width:145px}.alshop-ai-offer-prices{display:none}.alshop-ai-offer-side time{font-size:11px;padding:6px;min-width:49px}
    .alshop-ai-messages{overflow:visible;flex:none;min-height:260px;padding:13px 9px 4px;background-color:#f2f4f5;background-image:radial-gradient(rgba(135,145,155,.08) .8px,transparent .8px);background-size:16px 16px}
    .alshop-ai-message{max-width:92%;margin-bottom:9px;gap:5px}.alshop-ai-message-avatar{display:none}.alshop-ai-message-body{font-size:12.3px;line-height:1.46;padding:8px 10px;border-radius:4px 12px 12px 12px;box-shadow:0 2px 8px rgba(30,38,50,.05)}.alshop-ai-message-user .alshop-ai-message-body{border-radius:12px 4px 12px 12px}
    .alshop-ai-offer-hint{margin:3px 10px 10px 8px;max-width:94%;font-size:10.5px}
    .alshop-ai-quick-wrap{padding:6px 8px;background:#f5f7f8;border:0}
    .alshop-ai-quick-list button{font-size:9.7px;padding:6px 9px;background:#fff}
    .alshop-ai-mobile-results{padding:4px 7px 12px;display:grid;grid-template-columns:1fr;gap:8px;background:#f5f7f8}
    .alshop-ai-product{grid-template-columns:92px minmax(0,1fr);min-height:138px;border-radius:13px}.alshop-ai-product-media{padding:6px}.alshop-ai-product-media img{height:104px}.alshop-ai-product-body{padding:8px}.alshop-ai-product-title{font-size:11.5px}.alshop-ai-product-reason{font-size:9.4px;-webkit-line-clamp:2}.alshop-ai-fit span{font-size:7.8px}.alshop-ai-price{font-size:12.5px}
    .alshop-ai-composer{position:sticky;bottom:64px;z-index:10;padding:7px 8px calc(7px + env(safe-area-inset-bottom));border-top:1px solid #e1e5e9;background:rgba(255,255,255,.97);backdrop-filter:blur(10px)}
    .alshop-ai-input-shell{min-height:44px;border-radius:22px;padding:5px 5px 5px 12px;background:#fff}.alshop-ai-input-shell textarea{font-size:12.5px;padding:6px 0 4px!important}.alshop-ai-send{width:34px;height:34px;flex-basis:34px;border-radius:50%;font-size:15px}
}

@media(max-width:420px){
    .alshop-ai-product-overline small{display:none}.alshop-ai-product-reason{font-size:9px}.alshop-ai-offer-main span{max-width:118px}
}

@media(prefers-reduced-motion:reduce){
    .alshop-ai-typing .alshop-ai-message-body span{animation:none}.alshop-ai-product{transition:none}
}


/* ==========================================================================
   ALSHOP_AI_MOBILE_LAYOUT_V2_0_3
   Mobile app-like chat. Composer follows REAL mobile-nav position.
   ========================================================================== */

/* Legacy cookie UI must never flash from a stale/cached include. */
html body #alshop-cookie-banner,
html body #alshop-cookie-modal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@media (max-width: 991.98px) {

    /*
     * There are two assistant entry points in header markup:
     * - legacy desktop .agm-perfume-finder-pill
     * - new mobile AI-badged icon
     *
     * Mobile keeps ONLY the AI-badged icon.
     */
    html body .agm-header
    .agm-actions
    .agm-perfume-finder-pill {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    body.alshop-ai-mobile-chat-page {
        overflow-x: hidden !important;
        background: #eef1f3 !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-page {
        min-height: 100svh !important;

        margin: 0 !important;

        padding:
            0
            0
            calc(
                var(
                    --alshop-ai-mobile-composer-h,
                    58px
                )
                +
                var(
                    --alshop-ai-mobile-nav-offset,
                    64px
                )
                +
                8px
            )
            !important;

        background: #eef1f3 !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-container {
        width: 100% !important;
        max-width: none !important;

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

    body.alshop-ai-mobile-chat-page
    .alshop-ai-workspace,
    body.alshop-ai-mobile-chat-page
    .alshop-ai-chat-panel {
        width: 100% !important;
        max-width: none !important;

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

    body.alshop-ai-mobile-chat-page
    .alshop-ai-chat-panel {
        min-height:
            calc(
                100svh -
                var(
                    --alshop-ai-mobile-nav-offset,
                    64px
                )
            )
            !important;

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

        background: #eef1f3 !important;
        box-shadow: none !important;

        overflow: visible !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-chat-head {
        min-height: 54px !important;
        height: 54px !important;

        padding: 7px 10px !important;

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

        border-bottom:
            1px solid #dde2e7 !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-messages {
        min-height: 230px !important;

        margin: 0 !important;
        padding:
            11px
            9px
            5px
            !important;

        background-color: #eef1f3 !important;

        background-image:
            radial-gradient(
                rgba(
                    105,
                    116,
                    127,
                    .075
                )
                .75px,
                transparent .75px
            )
            !important;

        background-size:
            17px 17px !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-message {
        max-width: 91% !important;

        margin-bottom: 8px !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-message-body {
        padding: 8px 10px !important;

        border-radius:
            4px 12px 12px 12px !important;

        font-size: 12.2px !important;
        line-height: 1.45 !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-message-user
    .alshop-ai-message-body {
        border-radius:
            12px 4px 12px 12px !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-quick-wrap {
        margin: 0 !important;

        padding: 5px 8px 7px !important;

        background: #eef1f3 !important;

        border: 0 !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-quick-list {
        gap: 5px !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-quick-list button {
        min-height: 31px !important;

        padding: 5px 9px !important;

        font-size: 9.5px !important;

        background: #fff !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-mobile-results {
        margin: 0 !important;

        padding: 3px 7px 8px !important;

        background: #eef1f3 !important;
    }

    /*
     * Critical fix:
     * no fixed "64px" guess.
     * JS measures the REAL visible top of .agm-mobile-bottom-nav2 and writes
     * --alshop-ai-mobile-nav-offset.
     */
    body.alshop-ai-mobile-chat-page
    .alshop-ai-composer {
        position: fixed !important;

        z-index: 2147481200 !important;

        left: 0 !important;
        right: 0 !important;

        bottom:
            var(
                --alshop-ai-mobile-nav-offset,
                64px
            )
            !important;

        width: 100vw !important;
        max-width: 100vw !important;

        margin: 0 !important;

        padding:
            6px
            8px
            6px
            !important;

        border-top:
            1px solid #dde2e7 !important;

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

        box-shadow:
            0 -4px 16px
            rgba(
                25,
                34,
                48,
                .07
            )
            !important;

        backdrop-filter:
            blur(12px)
            saturate(1.08)
            !important;

        -webkit-backdrop-filter:
            blur(12px)
            saturate(1.08)
            !important;

        transform: none !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-input-shell {
        width: 100% !important;
        min-height: 45px !important;

        margin: 0 !important;

        padding:
            5px
            5px
            5px
            12px
            !important;

        border:
            1px solid #d8dde3 !important;

        border-radius: 23px !important;

        background: #fff !important;

        box-shadow:
            0 2px 10px
            rgba(
                26,
                35,
                48,
                .045
            )
            !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-input-shell textarea {
        min-height: 33px !important;
        max-height: 96px !important;

        padding:
            6px
            0
            4px
            !important;

        font-size: 12.5px !important;
        line-height: 1.38 !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-send {
        width: 35px !important;
        height: 35px !important;
        flex: 0 0 35px !important;

        border-radius: 50% !important;
    }

    /*
     * Direct-chat page on mobile: no footer content underneath the fixed
     * composer. Bottom nav remains exactly as the main site uses it.
     */
    body.alshop-ai-mobile-chat-page
    .alshop-last-viewed-v154,
    body.alshop-ai-mobile-chat-page
    .alshop-footer-description-v154,
    body.alshop-ai-mobile-chat-page
    .alshop-unified-footer-v154 {
        display: none !important;
    }
}

@media (max-width: 374.98px) {
    body.alshop-ai-mobile-chat-page
    .alshop-ai-composer {
        padding:
            5px
            6px
            5px
            !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-input-shell {
        min-height: 43px !important;

        padding-left: 10px !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-input-shell textarea {
        font-size: 12px !important;
    }

    body.alshop-ai-mobile-chat-page
    .alshop-ai-send {
        width: 33px !important;
        height: 33px !important;
        flex-basis: 33px !important;
    }
}

/* ==========================================================================
   ALSHOP_AI_MOBILE_PRO_APP_SHELL_V2_0_4
   ========================================================================== */

@media (max-width: 991.98px) {

    /*
     * Assistant page behaves as a dedicated mobile chat application.
     * Shop chrome remains available on every other page.
     */
    html.alshop-ai-mobile-shell-v204,
    html.alshop-ai-mobile-shell-v204 body {
        width: 100% !important;
        max-width: 100% !important;

        height: 100% !important;
        min-height: 100% !important;

        overflow: hidden !important;

        overscroll-behavior:
            none !important;

        -webkit-text-size-adjust:
            100% !important;

        text-size-adjust:
            100% !important;

        background:
            #e9edef !important;
    }

    body.alshop-ai-mobile-app-v204
    .agm-topline,

    body.alshop-ai-mobile-app-v204
    .agm-mobile-appbar,

    body.alshop-ai-mobile-app-v204
    .agm-header,

    body.alshop-ai-mobile-app-v204
    .alshop-last-viewed-v154,

    body.alshop-ai-mobile-app-v204
    .alshop-footer-description-v154,

    body.alshop-ai-mobile-app-v204
    .alshop-unified-footer-v154 {
        display: none !important;
        visibility: hidden !important;
    }

    body.alshop-ai-mobile-app-v204
    .aiz-main-wrapper {
        min-height: 100% !important;

        overflow: hidden !important;

        background:
            #e9edef !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-page {
        position: static !important;

        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;

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

        overflow: hidden !important;

        background:
            #e9edef !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-container,

    body.alshop-ai-mobile-app-v204
    .alshop-ai-workspace {
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        max-width: none !important;

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

        overflow: hidden !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-admin-notice {
        display: none !important;
    }

    /*
     * The whole visible chat lives inside the real VisualViewport.
     * JavaScript updates the px values whenever keyboard/browser chrome
     * changes viewport geometry.
     */
    body.alshop-ai-mobile-app-v204
    .alshop-ai-chat-panel {
        position: fixed !important;

        z-index:
            2147481000 !important;

        top:
            var(
                --alshop-ai-vv-top-v204,
                0px
            )
            !important;

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

        display: grid !important;

        grid-template-rows:
            auto
            auto
            minmax(0, 1fr)
            auto
            auto
            auto
            !important;

        width: 100vw !important;

        height:
            var(
                --alshop-ai-shell-height-v204,
                100dvh
            )
            !important;

        min-height: 280px !important;
        max-height: none !important;

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

        overflow: hidden !important;

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

        background:
            #e9edef !important;

        box-shadow: none !important;

        transform: none !important;
    }

    /*
     * WhatsApp-style compact top bar.
     * It is now part of the fixed shell instead of sticky page content,
     * so focusing the textarea cannot push it above the viewport.
     */
    body.alshop-ai-mobile-app-v204
    .alshop-ai-chat-head {
        position: relative !important;

        z-index: 5 !important;

        display: grid !important;

        grid-template-columns:
            38px
            minmax(0, 1fr)
            36px
            !important;

        align-items: center !important;

        gap: 7px !important;

        width: 100% !important;

        min-height:
            calc(
                54px +
                env(
                    safe-area-inset-top,
                    0px
                )
            )
            !important;

        height: auto !important;

        margin: 0 !important;

        padding:
            max(
                6px,
                env(
                    safe-area-inset-top,
                    0px
                )
            )
            8px
            6px
            !important;

        border: 0 !important;

        border-bottom:
            1px solid
            rgba(
                17,
                24,
                39,
                .08
            )
            !important;

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

        box-shadow:
            0 1px 8px
            rgba(
                15,
                23,
                42,
                .055
            )
            !important;

        backdrop-filter:
            blur(14px)
            saturate(1.08)
            !important;

        -webkit-backdrop-filter:
            blur(14px)
            saturate(1.08)
            !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-mobile-back-v204 {
        display: inline-flex !important;

        align-items: center !important;
        justify-content: center !important;

        width: 36px !important;
        height: 36px !important;

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

        border:
            1px solid #e5e9ed !important;

        border-radius: 50% !important;

        color:
            #202733 !important;

        background:
            #fff !important;

        box-shadow:
            0 1px 4px
            rgba(
                15,
                23,
                42,
                .04
            )
            !important;

        cursor: pointer !important;

        -webkit-tap-highlight-color:
            transparent !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-mobile-back-v204 i {
        font-size: 20px !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-agent {
        min-width: 0 !important;

        gap: 8px !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-agent-avatar {
        position: relative !important;

        width: 36px !important;
        height: 36px !important;
        flex: 0 0 36px !important;

        border-radius: 50% !important;

        background:
            linear-gradient(
                145deg,
                #ff6530,
                #e43d0d
            )
            !important;

        box-shadow:
            0 3px 9px
            rgba(
                244,
                81,
                30,
                .18
            )
            !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-agent-avatar::after {
        content: '' !important;

        position: absolute !important;

        right: -1px !important;
        bottom: 0 !important;

        width: 10px !important;
        height: 10px !important;

        border:
            2px solid #fff !important;

        border-radius: 50% !important;

        background:
            #16a34a !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-agent strong {
        display: block !important;

        overflow: hidden !important;

        color:
            #17202b !important;

        font-size: 13px !important;
        font-weight: 900 !important;

        line-height: 1.15 !important;

        text-overflow:
            ellipsis !important;

        white-space:
            nowrap !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-agent span {
        display: block !important;

        overflow: hidden !important;

        margin-top: 2px !important;

        color:
            #74808f !important;

        font-size: 9.5px !important;
        font-weight: 700 !important;

        line-height: 1.2 !important;

        text-overflow:
            ellipsis !important;

        white-space:
            nowrap !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-reset {
        display: inline-flex !important;

        align-items: center !important;
        justify-content: center !important;

        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;

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

        border:
            1px solid #e5e9ed !important;

        border-radius: 50% !important;

        color:
            #657180 !important;

        background:
            #fff !important;

        box-shadow: none !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-reset span {
        display: none !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-offer-banner {
        position: relative !important;

        z-index: 4 !important;

        max-height: 72px !important;

        overflow-y: auto !important;

        margin: 0 !important;

        border-radius: 0 !important;
    }

    /*
     * Only this region scrolls. Page/header/composer stay stable.
     */
    body.alshop-ai-mobile-app-v204
    .alshop-ai-messages {
        min-width: 0 !important;
        min-height: 0 !important;
        max-height: none !important;

        margin: 0 !important;

        padding:
            10px
            9px
            7px
            !important;

        overflow-x: hidden !important;
        overflow-y: auto !important;

        overscroll-behavior:
            contain !important;

        -webkit-overflow-scrolling:
            touch !important;

        scroll-behavior:
            smooth !important;

        background:
            #e9edef !important;

        scrollbar-width:
            thin !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-message {
        max-width: 92% !important;

        margin-bottom: 7px !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-message-body {
        padding:
            8px
            10px
            !important;

        border:
            1px solid
            rgba(
                15,
                23,
                42,
                .055
            )
            !important;

        border-radius:
            4px
            12px
            12px
            12px
            !important;

        color:
            #283443 !important;

        background:
            #fff !important;

        box-shadow:
            0 1px 2px
            rgba(
                15,
                23,
                42,
                .045
            )
            !important;

        font-size: 12.5px !important;
        line-height: 1.44 !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-message-user
    .alshop-ai-message-body {
        border-color:
            #f2602b !important;

        border-radius:
            12px
            4px
            12px
            12px
            !important;

        color:
            #fff !important;

        background:
            #f2602b !important;
    }

    /*
     * Quick replies remain horizontally scrollable when keyboard is closed.
     */
    body.alshop-ai-mobile-app-v204
    .alshop-ai-quick-wrap {
        min-height: 0 !important;

        margin: 0 !important;

        padding:
            5px
            8px
            6px
            !important;

        overflow: hidden !important;

        border:
            0 !important;

        background:
            #f6f7f8 !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-quick-list {
        display: flex !important;

        flex-wrap: nowrap !important;

        gap: 5px !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;

        padding-bottom: 1px !important;

        scrollbar-width:
            none !important;

        -webkit-overflow-scrolling:
            touch !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-quick-list::-webkit-scrollbar {
        display: none !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-quick-list button {
        flex:
            0 0 auto !important;

        min-height:
            30px !important;

        padding:
            5px
            9px
            !important;

        border:
            1px solid #dde3e8 !important;

        border-radius:
            999px !important;

        color:
            #4c5968 !important;

        background:
            #fff !important;

        font-size:
            9.5px !important;

        font-weight:
            800 !important;

        white-space:
            nowrap !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-mobile-results {
        min-height: 0 !important;
        max-height: 34vh !important;

        margin: 0 !important;

        padding:
            4px
            7px
            6px
            !important;

        overflow-x:
            hidden !important;

        overflow-y:
            auto !important;

        overscroll-behavior:
            contain !important;

        background:
            #f6f7f8 !important;

        -webkit-overflow-scrolling:
            touch !important;
    }

    /*
     * Composer is a normal final row INSIDE the fixed viewport shell.
     * No page-level fixed positioning, so browser keyboard cannot detach it.
     */
    body.alshop-ai-mobile-app-v204
    .alshop-ai-composer {
        position: relative !important;

        z-index: 6 !important;

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

        width: 100% !important;
        max-width: none !important;

        margin: 0 !important;

        padding:
            6px
            8px
            max(
                6px,
                env(
                    safe-area-inset-bottom,
                    0px
                )
            )
            !important;

        border: 0 !important;

        border-top:
            1px solid #dce2e7 !important;

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

        box-shadow:
            0 -3px 12px
            rgba(
                15,
                23,
                42,
                .055
            )
            !important;

        transform:
            none !important;

        backdrop-filter:
            blur(12px)
            !important;

        -webkit-backdrop-filter:
            blur(12px)
            !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-input-shell {
        display: grid !important;

        grid-template-columns:
            minmax(0, 1fr)
            38px
            !important;

        align-items:
            end !important;

        gap: 6px !important;

        width: 100% !important;

        min-height:
            46px !important;

        margin: 0 !important;

        padding:
            4px
            4px
            4px
            12px
            !important;

        border:
            1px solid #d5dce2 !important;

        border-radius:
            24px !important;

        background:
            #fff !important;

        box-shadow:
            0 1px 5px
            rgba(
                15,
                23,
                42,
                .045
            )
            !important;
    }

    /*
     * IMPORTANT:
     * 16px prevents Safari/iOS automatic input zoom on focus.
     */
    body.alshop-ai-mobile-app-v204
    #alpf-ai-input {
        width: 100% !important;

        min-height:
            36px !important;

        max-height:
            104px !important;

        margin: 0 !important;

        padding:
            7px
            0
            5px
            !important;

        overflow-y:
            auto !important;

        border: 0 !important;

        outline:
            0 !important;

        color:
            #253140 !important;

        background:
            transparent !important;

        font-size:
            16px !important;

        line-height:
            1.35 !important;

        resize:
            none !important;

        -webkit-appearance:
            none !important;

        appearance:
            none !important;

        touch-action:
            manipulation !important;
    }

    body.alshop-ai-mobile-app-v204
    #alpf-ai-input::placeholder {
        color:
            #8d98a5 !important;

        opacity: 1 !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-send {
        display: inline-flex !important;

        align-items: center !important;
        justify-content: center !important;

        width: 38px !important;
        height: 38px !important;

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

        border: 0 !important;

        border-radius:
            50% !important;

        color:
            #fff !important;

        background:
            linear-gradient(
                145deg,
                #fb6330,
                #df3d0d
            )
            !important;

        box-shadow:
            0 3px 8px
            rgba(
                244,
                81,
                30,
                .21
            )
            !important;

        -webkit-tap-highlight-color:
            transparent !important;

        touch-action:
            manipulation !important;
    }

    /*
     * Keyboard mode:
     * suggestions/results temporarily collapse to maximize message space.
     * They come back automatically when keyboard closes.
     */
    body.alshop-ai-mobile-app-v204.alshop-ai-keyboard-open-v204
    .alshop-ai-quick-wrap,

    body.alshop-ai-mobile-app-v204.alshop-ai-keyboard-open-v204
    .alshop-ai-mobile-results {
        display: none !important;
    }

    body.alshop-ai-mobile-app-v204.alshop-ai-keyboard-open-v204
    .alshop-ai-chat-head {
        box-shadow:
            0 1px 5px
            rgba(
                15,
                23,
                42,
                .04
            )
            !important;
    }
}


/* Very small phones: preserve tap targets, reduce decorative spacing only. */
@media (max-width: 374.98px) {

    body.alshop-ai-mobile-app-v204
    .alshop-ai-chat-head {
        grid-template-columns:
            35px
            minmax(0, 1fr)
            33px
            !important;

        gap:
            5px !important;

        padding-right:
            6px !important;

        padding-left:
            6px !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-mobile-back-v204 {
        width:
            34px !important;

        height:
            34px !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-reset {
        width:
            32px !important;

        min-width:
            32px !important;

        height:
            32px !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-agent-avatar {
        width:
            34px !important;

        height:
            34px !important;

        flex-basis:
            34px !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-messages {
        padding-right:
            7px !important;

        padding-left:
            7px !important;
    }

    body.alshop-ai-mobile-app-v204
    .alshop-ai-composer {
        padding-right:
            6px !important;

        padding-left:
            6px !important;
    }
}