:root{
    --primary:#1c5cff;
    --primary-dark:#1245c9;
    --primary-light:#eaf0ff;
    --bg-body:#f4f6fb;
    --bg-chat:#f7f8fc;
    --text-dark:#1c1f2a;
    --text-muted:#6b7280;
    --radius:16px;
    --shadow-lg:0 20px 45px rgba(20,30,60,.18);
    --shadow-sm:0 2px 10px rgba(20,30,60,.08);
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
}

body{
    background:var(--bg-body);
}

/* ============ Bootstrap Icons — baseline sizing ============ */

.bi{
    line-height:1;
    vertical-align:0;
}

/* ============ Floating Toggle Button ============ */

.chat-toggle{
    position:fixed;
    bottom:25px;
    right:25px;
    width:62px;
    height:62px;
    background:linear-gradient(135deg,var(--primary),var(--primary-dark));
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    cursor:pointer;
    box-shadow:var(--shadow-lg);
    z-index:9999;
    transition:transform .2s ease;
}

.chat-toggle:hover{
    transform:scale(1.07);
}

.icon-chat{
    font-size:26px;
    color:#fff;
}

.notify-dot{
    position:absolute;
    top:4px;
    right:4px;
    width:12px;
    height:12px;
    background:#22c55e;
    border:2px solid #fff;
    border-radius:50%;
}

/* ============ Chat Window ============ */

.chatbot{
    position:fixed;
    bottom:100px;
    right:25px;
    width:380px;
    height:600px;
    max-height:80vh;
    background:#fff;
    border-radius:20px;
    overflow:hidden;
    display:none;
    flex-direction:column;
    box-shadow:var(--shadow-lg);
    z-index:9999;
    animation:pop-in .25s ease;
}

@keyframes pop-in{
    from{ opacity:0; transform:translateY(15px) scale(.97); }
    to{ opacity:1; transform:translateY(0) scale(1); }
}

@media (max-width:420px){
    .chatbot{
        width:100vw;
        height:100vh;
        max-height:100vh;
        bottom:0;
        right:0;
        border-radius:0;
    }
}

/* ============ Header ============ */

.chat-header{
    background:linear-gradient(135deg,var(--primary),var(--primary-dark));
    color:#fff;
    padding:16px 18px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.header-left{
    display:flex;
    align-items:center;
    gap:12px;
}

.avatar{
    width:40px;
    height:40px;
    border-radius:50%;
    background:rgba(255,255,255,.18);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    color:#fff;
    flex-shrink:0;
}

.logo{
    font-weight:700;
    font-size:15px;
    line-height:1.3;
}

.status{
    font-size:12px;
    opacity:.9;
    display:flex;
    align-items:center;
    gap:6px;
    margin-top:2px;
}

.status-dot{
    width:8px;
    height:8px;
    background:#22c55e;
    border-radius:50%;
    display:inline-block;
    box-shadow:0 0 0 rgba(34,197,94,.6);
    animation:pulse 1.6s infinite;
}

@keyframes pulse{
    0%{ box-shadow:0 0 0 0 rgba(34,197,94,.6); }
    70%{ box-shadow:0 0 0 6px rgba(34,197,94,0); }
    100%{ box-shadow:0 0 0 0 rgba(34,197,94,0); }
}

.close-chat{
    cursor:pointer;
    width:30px;
    height:30px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    font-size:15px;
    transition:background .15s ease;
}

.close-chat:hover{
    background:rgba(255,255,255,.18);
}

/* ============ Chat Body ============ */

.chat-body{
    flex:1;
    padding:20px 16px;
    overflow-y:auto;
    background:var(--bg-chat);
    display:flex;
    flex-direction:column;
    gap:4px;
}

.chat-body::-webkit-scrollbar{
    width:6px;
}
.chat-body::-webkit-scrollbar-thumb{
    background:#d3d8e4;
    border-radius:10px;
}

.bot-message,
.user-message{
    padding:12px 15px;
    border-radius:16px;
    max-width:85%;
    font-size:14.5px;
    line-height:1.5;
    margin-bottom:14px;
    animation:msg-in .2s ease;
    word-wrap:break-word;
}

@keyframes msg-in{
    from{ opacity:0; transform:translateY(6px); }
    to{ opacity:1; transform:translateY(0); }
}

.bot-message{
    background:#fff;
    color:var(--text-dark);
    box-shadow:var(--shadow-sm);
    border-bottom-left-radius:4px;
    align-self:flex-start;
}

.user-message{
    background:linear-gradient(135deg,var(--primary),var(--primary-dark));
    color:#fff;
    border-bottom-right-radius:4px;
    align-self:flex-end;
    text-align:left;
}

.msg-time{
    font-size:10.5px;
    color:var(--text-muted);
    margin-top:6px;
}

.user-message .msg-time{
    color:rgba(255,255,255,.75);
}
.option-card .option-btn{
    color: #fff;
}
.bot-message hr{
    border:none;
    border-top:1px solid #eee;
    margin:10px 0;
}

.bot-message a{
    color:var(--primary);
    font-weight:400;
}
.bot-message ul{
    margin-left: 15px;
}
/* ============ Typing Indicator ============ */

.typing-message{
    align-self:flex-start;
    background:#fff;
    box-shadow:var(--shadow-sm);
    padding:14px 18px;
    border-radius:16px;
    border-bottom-left-radius:4px;
    display:inline-flex;
    gap:5px;
    margin-bottom:14px;
    width:fit-content;
}

.typing-message .dot{
    width:7px;
    height:7px;
    background:#9aa3b2;
    border-radius:50%;
    animation:typing-bounce 1.2s infinite ease-in-out;
}

.typing-message .dot:nth-child(2){ animation-delay:.15s; }
.typing-message .dot:nth-child(3){ animation-delay:.3s; }

@keyframes typing-bounce{
    0%, 60%, 100%{ transform:translateY(0); opacity:.5; }
    30%{ transform:translateY(-5px); opacity:1; }
}

/* ============ Quick Reply Chips ============ */

.quick-chips{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:14px;
}

.chip{
    display:inline-flex;
    align-items:center;
    gap:6px;
    border:1px solid #d7e0ff;
    background:var(--primary-light);
    color:var(--primary-dark);
    font-size:12.5px;
    font-weight:600;
    padding:8px 12px;
    border-radius:20px;
    cursor:pointer;
    transition:all .15s ease;
    white-space:nowrap;
}

.chip i{
    font-size:13px;
}

.chip:hover{
    background:var(--primary);
    color:#fff;
    transform:translateY(-1px);
}

/* ============ Product Cards ============ */

.product-results{
    display:flex;
    flex-direction:column;
    gap:12px;
    max-width:100%;
}

.product-card{
    display:flex;
    gap:12px;
    border:1px solid #eceff5;
    padding:12px;
    border-radius:14px;
    background:#fff;
    box-shadow:var(--shadow-sm);
    align-self:flex-start;
}

.product-card img{
    width:70px;
    height:70px;
    object-fit:cover;
    border-radius:10px;
    flex-shrink:0;
    background:#f2f4f9;
}

.product-info{
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:4px;
}

.product-info h4{
    font-size:13.5px;
    font-weight:600;
    color:var(--text-dark);
    line-height:1.35;
}

.product-price{
    color:var(--primary);
    font-weight:700;
    font-size:13px;
}

.product-btn{
    align-self:flex-start;
    background:var(--primary);
    color:#fff!important;
    font-size:12px;
    font-weight:600;
    padding:6px 12px;
    border-radius:8px;
    text-decoration:none;
    margin-top:2px;
    transition:background .15s ease;
}

.product-btn:hover{
    background:var(--primary-dark);
}

/* ============ Stock vs Custom Option Cards ============ */

.intent-results{
    display:flex;
    flex-direction:column;
    gap:10px;
    max-width:100%;
}

.intent-heading{
    font-size:13px;
    color:var(--text-muted);
    margin-bottom:2px;
}

.option-card{
    border:1px solid #eceff5;
    border-radius:14px;
    padding:14px;
    background:#fff;
    box-shadow:var(--shadow-sm);
}

.option-badge{
    display:inline-flex;
    align-items:center;
    gap:5px;
    font-size:11px;
    font-weight:700;
    padding:4px 10px;
    border-radius:20px;
    margin-bottom:8px;
    letter-spacing:.2px;
}

.intent-heading{
    display:flex;
    align-items:center;
    gap:6px;
}

.intent-heading i{
    color:#22c55e;
}

.option-badge.stock{
    background:#e6f4ea;
    color:#1a7f37;
}

.option-badge.custom{
    background:var(--primary-light);
    color:var(--primary-dark);
}

.option-card h4{
    font-size:14px;
    font-weight:700;
    color:var(--text-dark);
    margin-bottom:4px;
    line-height:1.35;
}

.option-sub{
    font-size:12.5px;
    color:var(--text-muted);
    line-height:1.4;
    margin-bottom:10px;
}

.option-btn{
    display:inline-block;
    background:var(--primary);
    color:#fff!important;
    font-size:12.5px;
    font-weight:600;
    padding:8px 14px;
    border-radius:8px;
    text-decoration:none;
    transition:background .15s ease;
}

.option-btn:hover{
    background:var(--primary-dark);
}



/* ============ Contact Support Bar (above input) ============ */

.chat-support-bar{
    text-align:center;
    font-size:11.5px;
    color:var(--text-muted);
    padding:7px 14px;
    background:var(--bg-chat);
    border-top:1px solid #eef0f5;
}

.chat-support-bar .dot-sep{
    margin:0 6px;
    color:#c7cce0;
}

.chat-support-bar a{
    color:var(--text-muted);
    font-weight:600;
    text-decoration:none;
}

.chat-support-bar a:hover{
    color:var(--primary);
    text-decoration:underline;
}

/* ============ Footer ============ */

.chat-footer{
    display:flex;
    align-items:center;
    padding:14px;
    gap:10px;
    background:#fff;
    border-top:1px solid #eef0f5;
}

.chat-footer input{
    flex:1;
    height:44px;
    border:1px solid #e2e6ef;
    background:var(--bg-chat);
    border-radius:22px;
    padding:0 18px;
    outline:none;
    font-size:14px;
    transition:border-color .15s ease;
}

.chat-footer input:focus{
    border-color:var(--primary);
    background:#fff;
}

.chat-footer button{
    width:44px;
    height:44px;
    background:linear-gradient(135deg,var(--primary),var(--primary-dark));
    border:none;
    color:#fff;
    border-radius:50%;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    transition:transform .15s ease;
}

.chat-footer button:hover{
    transform:scale(1.06);
}

.chat-footer button:disabled{
    opacity:.6;
    cursor:not-allowed;
    transform:none;
}

.icon-send{
    font-size:16px;
    color:#fff;
    margin-left:-2px;
}

/* ============ Service Selector Grid (welcome screen) ============ */

.service-grid{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-bottom:14px;
}

.service-card{
    display:flex;
    align-items:center;
    gap:12px;
    width:100%;
    border:1px solid #eceff5;
    background:#fff;
    padding:11px 12px;
    border-radius:14px;
    cursor:pointer;
    box-shadow:var(--shadow-sm);
    text-align:left;
    transition:transform .12s ease, border-color .15s ease, box-shadow .15s ease;
}

.service-card:hover{
    transform:translateY(-1px);
    border-color:#d7e0ff;
    box-shadow:0 6px 16px rgba(20,30,60,.1);
}

.service-icon{
    flex-shrink:0;
    width:38px;
    height:38px;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:17px;
    color:#fff;
}

.service-icon.stock{ background:linear-gradient(135deg,#22c55e,#16a34a); }
.service-icon.custom{ background:linear-gradient(135deg,var(--primary),var(--primary-dark)); }
.service-icon.design{ background:linear-gradient(135deg,#f59e0b,#d97706); }
.service-icon.sample{ background:linear-gradient(135deg,#ec4899,#db2777); }
.service-icon.support{ background:linear-gradient(135deg,#64748b,#475569); }

.service-text{
    display:flex;
    flex-direction:column;
    gap:1px;
    flex:1;
    min-width:0;
}

.service-text b{
    font-size:13.5px;
    color:var(--text-dark);
}

.service-text small{
    font-size:11.5px;
    color:var(--text-muted);
}

.service-arrow{
    color:#c7cce0;
    font-size:14px;
    flex-shrink:0;
}

/* ============ Fallback "No Match" Card ============ */

.fallback-card{
    max-width:100%;
}

.fallback-icon{
    width:44px;
    height:44px;
    border-radius:50%;
    background:var(--primary-light);
    color:var(--primary);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:19px;
    margin-bottom:10px;
}

.fallback-card h4{
    font-size:15px;
    font-weight:700;
    color:var(--text-dark);
    margin-bottom:6px;
}

.browse-links{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin:6px 0;
}

.browse-link{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 12px;
    border:1px solid #eceff5;
    border-radius:12px;
    text-decoration:none;
    color:var(--text-dark) !important;
    font-weight:600;
    font-size:13px;
    transition:border-color .15s ease, background .15s ease;
}

.browse-link:hover{
    border-color:#d7e0ff;
    background:var(--primary-light);
}

.browse-link i:first-child{
    color:var(--primary);
    font-size:16px;
}

.browse-link span{
    flex:1;
}

.browse-link i:last-child{
    color:#c7cce0;
    font-size:13px;
}

/* ============ Contact Card ============ */

.contact-card{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin:8px 0;
}

.contact-row{
    display:block;
    gap:8px;
}

.contact-action{
    display:flex;
    align-items:center;
    gap:9px;
    flex:1;
    padding:10px;
    border:1px solid #eceff5;
    border-radius:12px;
    text-decoration:none !important;
    color:var(--text-dark) !important;
    font-size:11.5px;
    font-weight:500;
    line-height:1.3;
    transition:border-color .15s ease, background .15s ease;
}

.contact-action b{
    font-size:12.5px;
}

.contact-action i{
    font-size:16px;
    color:var(--primary);
    flex-shrink:0;
}

.contact-action:hover{
    border-color:#d7e0ff;
    background:var(--primary-light);
}

.contact-action.whatsapp{
    background:#e6f9ee;
    border-color:#c9f0da;
    font-weight:600;
    font-size:12.5px;
    justify-content:center;
    text-align:center;
}

.contact-action.whatsapp i{
    color:#22c55e;
    font-size:18px;
}

.contact-action.whatsapp:hover{
    background:#d7f4e3;
}
