body { font-family: 'Segoe UI', system-ui, sans-serif; background: #f5f6fa; }
.product-card { transition: transform .2s, box-shadow .2s; height: 100%; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.product-card img { height: 180px; object-fit: contain; background: #fff; padding: 0; }
.price { color: #e74c3c; font-weight: 700; font-size: 1.2rem; }
.price-old { text-decoration: line-through; color: #999; font-size: .9rem; }
.hero { background: linear-gradient(135deg, #1e3c72, #2a5298); color: white; padding: 60px 0; border-radius: 12px; }
.spec-table th { background: #f1f3f5; width: 30%; }
.rating-stars { color: #f39c12; }

/* Chatbot */
.chat-bubble { position: fixed; bottom: 20px; right: 20px; width: 56px; height: 56px; border-radius: 50%; background: #2a5298; color: white; display: flex; align-items: center; justify-content: center; font-size: 24px; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.3); z-index: 1000; }
.chat-box { position: fixed; bottom: 90px; right: 20px; width: 340px; height: 460px; background: white; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); display: flex; flex-direction: column; z-index: 1000; }
.chat-header { background: #2a5298; color: white; padding: 12px; border-radius: 12px 12px 0 0; font-weight: 600; }
.chat-msgs { flex: 1; padding: 12px; overflow-y: auto; }
.chat-msgs .msg { margin-bottom: 8px; padding: 8px 12px; border-radius: 8px; max-width: 85%; }
.chat-msgs .user { background: #e3f2fd; margin-left: auto; }
.chat-msgs .bot { background: #f1f3f5; }
.chat-input { display: flex; padding: 8px; gap: 4px; border-top: 1px solid #eee; }

.cart-page {
    padding-top: 20px;
    padding-bottom: 40px;
}

.cart-table thead th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
}

.cart-table td,
.cart-table th {
    padding: 16px;
    vertical-align: middle;
}

.cart-img {
    width: 76px;
    height: 76px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 6px;
}

.cart-qty {
    width: 76px;
}

.cart-summary {
    position: sticky;
    top: 20px;
}

@media (max-width: 768px) {
    .cart-summary {
        position: static;
    }

    .cart-table td,
    .cart-table th {
        padding: 12px;
    }

    .cart-img {
        width: 60px;
        height: 60px;
    }
}

/* AI Chatbot Widget */
.ai-chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    font-family: Inter, 'Segoe UI', system-ui, sans-serif;
}

.ai-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 999px;
    border: none;
    background: #003f87;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 63, 135, 0.35);
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}

    .ai-chat-toggle:hover {
        transform: translateY(-2px);
        background: #0056b3;
    }

    .ai-chat-toggle .material-symbols-outlined {
        font-size: 30px;
    }

.ai-chat-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: 390px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border: 1px solid #c2c6d4;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-chat-hidden {
    display: none;
}

.ai-chat-header {
    background: #003f87;
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ai-chat-title {
    font-weight: 700;
    font-size: 16px;
}

.ai-chat-subtitle {
    font-size: 12px;
    opacity: .85;
    margin-top: 2px;
}

.ai-chat-close {
    border: none;
    background: rgba(255,255,255,.12);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-messages {
    flex: 1;
    padding: 14px;
    background: #f8f9fa;
    overflow-y: auto;
}

.ai-msg {
    display: flex;
    margin-bottom: 12px;
}

.ai-msg-user {
    justify-content: flex-end;
}

.ai-msg-bot {
    justify-content: flex-start;
}

.ai-msg-content {
    max-width: 86%;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
}

.ai-msg-user .ai-msg-content {
    background: #003f87;
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-msg-bot .ai-msg-content {
    background: white;
    color: #191c1d;
    border: 1px solid #e1e3e4;
    border-bottom-left-radius: 4px;
}

.ai-loading {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .ai-loading span {
        width: 6px;
        height: 6px;
        background: #727784;
        border-radius: 50%;
        display: inline-block;
        animation: aiBlink 1s infinite ease-in-out;
    }

        .ai-loading span:nth-child(2) {
            animation-delay: .15s;
        }

        .ai-loading span:nth-child(3) {
            animation-delay: .3s;
        }

@keyframes aiBlink {
    0%, 80%, 100% {
        opacity: .25;
        transform: translateY(0);
    }

    40% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

.ai-product-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-product-card {
    background: #fff;
    border: 1px solid #d8dce6;
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 10px;
    padding: 10px;
}

.ai-product-img {
    width: 78px;
    height: 78px;
    border-radius: 10px;
    object-fit: contain;
    background: #f3f4f5;
    border: 1px solid #e1e3e4;
}

.ai-product-name {
    font-weight: 700;
    font-size: 13px;
    color: #191c1d;
    line-height: 1.3;
    margin-bottom: 4px;
}

.ai-product-meta {
    font-size: 12px;
    color: #424752;
    margin-bottom: 4px;
}

.ai-product-price {
    color: #003f87;
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 6px;
}

.ai-product-reason {
    font-size: 12px;
    color: #5c666e;
    line-height: 1.35;
    margin-bottom: 8px;
}

.ai-product-link {
    display: inline-flex;
    height: 30px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 8px;
    background: #003f87;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

    .ai-product-link:hover {
        color: white;
        background: #0056b3;
    }

.ai-chat-suggestions {
    padding: 10px 12px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    background: #fff;
    border-top: 1px solid #e1e3e4;
}

    .ai-chat-suggestions button {
        white-space: nowrap;
        border: 1px solid #c2c6d4;
        background: #fff;
        color: #003f87;
        border-radius: 999px;
        padding: 7px 10px;
        font-size: 12px;
        font-weight: 600;
    }

        .ai-chat-suggestions button:hover {
            background: #dae4ee;
        }

.ai-chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: white;
    border-top: 1px solid #e1e3e4;
}

.ai-chat-input {
    flex: 1;
    height: 42px;
    border: 1px solid #c2c6d4;
    border-radius: 12px;
    padding: 0 12px;
    outline: none;
    font-size: 14px;
}

    .ai-chat-input:focus {
        border-color: #003f87;
        box-shadow: 0 0 0 2px rgba(0, 63, 135, .12);
    }

.ai-chat-send {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: #003f87;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ai-chat-send:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

@media (max-width: 576px) {
    .ai-chat-widget {
        right: 16px;
        bottom: 16px;
    }

    .ai-chat-panel {
        width: calc(100vw - 32px);
        height: 70vh;
        bottom: 74px;
    }
}

.fade-image {
    animation: fadeImage 0.25s ease;
}

.slide-right {
    animation: slideRightImage 0.28s ease;
}

.slide-left {
    animation: slideLeftImage 0.28s ease;
}

@keyframes fadeImage {
    from {
        opacity: 0.4;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideRightImage {
    from {
        opacity: 0.4;
        transform: translateX(24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideLeftImage {
    from {
        opacity: 0.4;
        transform: translateX(-24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}
