.shopbot-widget {
    border: 1px solid var(--shopbot-border, #ccc);
    border-radius: 8px;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
    background: var(--shopbot-chat-bg, #fff);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.shopbot-header {
    padding: 12px;
    font-weight: bold;
    background: var(--shopbot-header-bg, #1f6feb);
    color: var(--shopbot-header-text, #fff);
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.shopbot-header-icon {
    width: 20px;
    height: 20px;
}
.shopbot-header-title {
    line-height: 1.2;
}
.shopbot-messages {
    padding: 12px;
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.shopbot-msg-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.shopbot-msg-row.user {
    justify-content: flex-end;
}
.shopbot-msg {
    padding: 10px 12px;
    border-radius: 12px;
    line-height: 1.4;
    font-size: 14px;
    max-width: 85%;
    word-break: break-word;
}
.shopbot-msg.user {
    background: var(--shopbot-user-bg, #eef2ff);
    color: var(--shopbot-user-text, #111827);
}
.shopbot-msg.assistant {
    background: var(--shopbot-assistant-bg, #f6f8fa);
    color: var(--shopbot-assistant-text, #111827);
}
.shopbot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    overflow: hidden;
}
.shopbot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.shopbot-input {
    display: flex;
    gap: 8px;
    padding: 10px 12px 12px;
    border-top: 1px solid var(--shopbot-border, #eee);
}
.shopbot-input input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--shopbot-border, #ccc);
    border-radius: 8px;
    background: var(--shopbot-input-bg, #fff);
    color: var(--shopbot-input-text, #111827);
}
.shopbot-input button {
    background: var(--shopbot-button-bg, #1f6feb);
    color: var(--shopbot-button-text, #fff);
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    cursor: pointer;
}
.shopbot-input button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.shopbot-products {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 8px;
}

.shopbot-product {
    border: 1px solid var(--shopbot-border, #e2e8f0);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 14px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.06);
    align-items: stretch;
}

.shopbot-product-media {
    width: 110px;
    height: 110px;
    border-radius: 10px;
    background: #f3f4f6;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shopbot-product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shopbot-product-name {
    font-weight: 700;
    margin-bottom: 6px;
    color: #0f172a;
    line-height: 1.3;
}

.shopbot-product-body {
    display: grid;
    gap: 6px;
}

.shopbot-product-desc {
    color: #475569;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 2px;
}

.shopbot-product-price {
    color: #b91c1c;
    font-weight: 700;
    margin-bottom: 4px;
}

.shopbot-product-stock {
    color: #16a34a;
    font-size: 12px;
}

.shopbot-product-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.shopbot-btn {
    padding: 7px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid var(--shopbot-border, #e5e7eb);
    transition: all 0.15s ease;
}

.shopbot-btn.primary {
    background: var(--shopbot-button-bg, #1f6feb);
    color: var(--shopbot-button-text, #fff);
    border-color: var(--shopbot-button-bg, #1f6feb);
    box-shadow: 0 4px 12px rgba(31, 111, 235, 0.25);
}

.shopbot-btn.ghost {
    background: #fff;
    color: #0f172a;
}
