:root {
    --lac-primary: #d63384;
    --lac-bg: #ffffff;
    --lac-text: #222222;
    --lac-muted: #667085;
    --lac-border: #ece7ed;
    --lac-soft: #fff5fa;
}

.lac-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--lac-text);
}

.lac-widget--floating {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 99999;
}

.lac-widget__toggle,
.lac-button,
.lac-whatsapp,
.lac-product__link {
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: var(--lac-primary);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

.lac-widget__toggle {
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lac-widget__toggle svg {
    display: block;
}

.lac-widget__toggle:hover,
.lac-button:hover,
.lac-whatsapp:hover,
.lac-product__link:hover {
    transform: translateY(-1px);
    color: #fff;
}

.lac-panel {
    width: min(380px, calc(100vw - 28px));
    max-height: min(720px, calc(100vh - 92px));
    margin-bottom: 12px;
    border: 1px solid var(--lac-border);
    border-radius: 22px;
    background: var(--lac-bg);
    box-shadow: 0 18px 60px rgba(0,0,0,.2);
    overflow-y: auto;
}

.lac-widget:not(.lac-widget--floating) .lac-panel {
    width: 100%;
    max-width: 760px;
    box-shadow: none;
}

.lac-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--lac-primary), #8f2bb8);
    color: #fff;
}

.lac-panel__header strong,
.lac-panel__header span {
    display: block;
}

.lac-panel__header span {
    opacity: .86;
    font-size: 13px;
}

.lac-panel__close {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lac-messages {
    max-height: 320px;
    overflow-y: auto;
    padding: 16px;
    background: #fff;
}

.lac-message {
    width: fit-content;
    max-width: 92%;
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.35;
}

.lac-message--bot {
    background: var(--lac-soft);
    border: 1px solid var(--lac-border);
}

.lac-message--user {
    margin-left: auto;
    background: var(--lac-primary);
    color: #fff;
}

.lac-form {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--lac-border);
    background: #fff;
}

.lac-form label {
    display: grid;
    gap: 5px;
    margin: 0;
    color: var(--lac-muted);
    font-size: 12px;
    font-weight: 700;
}

.lac-form select,
.lac-form input {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--lac-border);
    border-radius: 12px;
    padding: 8px 10px;
    color: var(--lac-text);
    background: #fff;
}

.lac-button {
    min-height: 42px;
    padding: 10px 14px;
}

/* === Consultar encomenda — destaque principal === */

.lac-order-box {
    display: flex;
    gap: 12px;
    margin: 10px 16px;
    padding: 14px;
    border: 2px solid var(--lac-primary);
    border-radius: 16px;
    background: linear-gradient(135deg, #fff, var(--lac-soft));
}

.lac-order-box__icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.lac-order-box__content {
    flex: 1;
    min-width: 0;
}

.lac-order-box__content > strong {
    display: block;
    margin: 0 0 8px;
    color: var(--lac-primary);
    font-size: 14px;
}

.lac-order-form {
    display: grid;
    gap: 8px;
}

.lac-order-form label {
    display: grid;
    gap: 4px;
    color: var(--lac-muted);
    font-size: 12px;
    font-weight: 700;
}

.lac-order-form input {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--lac-border);
    border-radius: 12px;
    padding: 8px 10px;
}

.lac-order-box__note {
    margin: 0;
    color: var(--lac-muted);
    font-size: 11px;
    line-height: 1.3;
}

.lac-order-result {
    margin: 8px 0 12px;
    padding: 10px 12px;
    border: 1px solid var(--lac-border);
    border-radius: 16px;
    background: #fff;
    font-size: 12px;
}

.lac-order-result dl {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 5px 8px;
    margin: 8px 0 0;
}

.lac-order-result dt {
    color: var(--lac-muted);
    font-weight: 700;
}

.lac-order-result dd {
    margin: 0;
}

.lac-products {
    display: grid;
    gap: 10px;
    margin: 8px 0 12px;
}

.lac-product {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 10px;
    border: 1px solid var(--lac-border);
    border-radius: 16px;
    padding: 8px;
    background: #fff;
}

.lac-product img {
    width: 76px;
    height: 76px;
    border-radius: 12px;
    object-fit: cover;
    background: #f6f6f6;
}

.lac-product__body {
    display: grid;
    align-content: start;
    gap: 4px;
}

.lac-product__body strong {
    font-size: 13px;
    line-height: 1.25;
}

.lac-product__price {
    color: var(--lac-primary);
    font-weight: 800;
    font-size: 13px;
}

.lac-product__body p {
    margin: 0;
    color: var(--lac-muted);
    font-size: 12px;
    line-height: 1.3;
}

.lac-product__link,
.lac-whatsapp {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    padding: 7px 11px;
    font-size: 12px;
}

.lac-whatsapp {
    margin: 4px 0 12px;
    background: #25d366;
}

@media (max-width: 480px) {
    .lac-widget--floating {
        left: 12px;
        bottom: 12px;
    }

    .lac-widget__toggle {
        width: 50px;
        height: 50px;
        font-size: 22px;
        padding: 0;
    }

    .lac-panel {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 86px);
    }
}

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

.lac-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-top: 1px solid var(--lac-border);
    background: #fafafa;
}

.lac-footer__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--lac-muted);
}

.lac-footer__logo {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    object-fit: contain;
}

.lac-footer__text {
    font-size: 11px;
    font-weight: 700;
    color: var(--lac-muted);
}
