.alina-assistant {
    --alina-accent: #157a6e;
    --alina-order: #46b45a;
    --alina-button-text: #fff;
    --alina-ink: #20252c;
    --alina-muted: #667085;
    --alina-line: #d9e0e7;
    --alina-soft: #f5f8fa;
    color: var(--alina-ink);
    font-family: inherit;
    line-height: 1.45;
}

.alina-header-search {
    --alina-accent: #157a6e;
    --alina-header-accent: #06415e;
    --alina-ink: #20252c;
    --alina-line: #d9e0e7;
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    height: 40px;
    margin: 0 14px 0 8px;
    font-family: inherit;
    position: relative;
    z-index: 20;
}

.alina-header-search__field {
    display: grid;
    grid-template-columns: 0 40px;
    align-items: stretch;
    width: 42px;
    height: 40px;
    min-height: 40px;
    overflow: hidden;
    border: 1px solid rgba(6, 65, 94, 0.28);
    border-radius: 5px;
    background: #fff;
    box-shadow: none;
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 25;
    transform: translateY(-50%);
    transition: width 180ms ease, box-shadow 180ms ease;
}

.alina-header-search__results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    width: min(360px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid rgba(6, 65, 94, 0.18);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(16, 24, 40, 0.18);
}

.alina-header-search__results[hidden] {
    display: none !important;
}

.alina-header-search__result {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    color: var(--alina-ink);
    text-decoration: none;
    border-bottom: 1px solid #eef2f5;
}

.alina-header-search__result:hover,
.alina-header-search__result:focus {
    background: #f5f8fa;
}

.alina-header-search__result:last-child {
    border-bottom: 0;
}

.alina-header-search__result img {
    width: 58px;
    height: 58px;
    display: block;
    object-fit: contain;
    background: #f7f9fb;
}

.alina-header-search__result strong {
    display: block;
    color: #06415e;
    font-size: 14px;
    line-height: 1.25;
}

.alina-header-search__result span {
    display: block;
    margin-top: 3px;
    color: #667085;
    font-size: 12px;
    line-height: 1.3;
}

.alina-header-search__empty {
    padding: 12px;
}

.alina-header-search__empty p {
    margin: 0 0 10px;
    color: #667085;
    font-size: 13px;
}

.alina-header-search__ask {
    width: 100%;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 5px;
    background: #06415e;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.alina-header-search.is-expanded .alina-header-search__field,
.alina-header-search:focus-within .alina-header-search__field {
    width: min(260px, calc(100vw - 32px));
    grid-template-columns: minmax(0, 1fr) 40px;
}

@media (min-width: 701px) {
    .alina-header-search__field {
        position: static;
        top: auto;
        right: auto;
        transform: none;
    }

    .alina-header-search.is-expanded,
    .alina-header-search:focus-within {
        flex-basis: clamp(190px, 16vw, 230px);
        width: clamp(190px, 16vw, 230px);
        min-width: 190px;
        max-width: 230px;
    }

    .alina-header-search.is-expanded .alina-header-search__field,
    .alina-header-search:focus-within .alina-header-search__field {
        width: 100%;
    }
}

.alina-header-search__field:focus-within {
    border-color: var(--alina-header-accent);
    box-shadow: 0 0 0 2px rgba(6, 65, 94, 0.14);
}

.alina-header-search input[type="search"] {
    width: 100%;
    height: 38px;
    min-width: 0;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--alina-ink) !important;
    box-shadow: none !important;
    font: inherit;
    font-size: 14px;
    line-height: 38px;
    padding: 0 11px !important;
    outline: 0 !important;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.alina-header-search.is-expanded input[type="search"],
.alina-header-search:focus-within input[type="search"] {
    opacity: 1;
    pointer-events: auto;
}

.alina-header-search .alina-header-search__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 38px;
    min-height: 38px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-left: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: var(--alina-header-accent) !important;
    box-shadow: none !important;
    cursor: pointer;
    text-indent: 0;
}

.alina-header-search.is-expanded .alina-header-search__button,
.alina-header-search:focus-within .alina-header-search__button {
    border-left: 1px solid rgba(6, 65, 94, 0.16) !important;
}

.alina-header-search .alina-header-search__button:hover,
.alina-header-search .alina-header-search__button:focus {
    background: #f5f8fa !important;
    color: var(--alina-header-accent) !important;
}

.alina-header-search .alina-header-search__button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
    margin: 0;
}

@media (max-width: 900px) {
    .alina-header-search.is-expanded,
    .alina-header-search:focus-within {
        flex-basis: 190px;
        width: 190px;
        min-width: 190px;
        max-width: 190px;
    }

    .alina-header-search.is-expanded .alina-header-search__field,
    .alina-header-search:focus-within .alina-header-search__field {
        width: 100%;
    }
}

@media (max-width: 700px) {
    body header,
    body .site-header,
    body .main-header,
    body .elementor-location-header {
        position: relative;
    }

    .alina-header-search {
        position: absolute !important;
        top: -12px;
        right: 62px;
        z-index: 100;
        width: min(230px, calc(100vw - 170px));
        min-width: min(230px, calc(100vw - 170px));
        max-width: min(230px, calc(100vw - 170px));
        margin: 0 !important;
    }

    .alina-header-search__field,
    .alina-header-search.is-expanded .alina-header-search__field,
    .alina-header-search:focus-within .alina-header-search__field {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) 40px;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
    }

    .alina-header-search input[type="search"] {
        opacity: 1;
        pointer-events: auto;
    }

    .alina-header-search.is-expanded .alina-header-search__field,
    .alina-header-search:focus-within .alina-header-search__field {
        box-shadow: 0 0 0 2px rgba(6, 65, 94, 0.14);
    }

    .alina-header-search__results {
        width: min(300px, calc(100vw - 24px));
    }
}

@media (max-width: 380px) {
    .alina-header-search {
        top: -12px;
        right: 54px;
        width: min(200px, calc(100vw - 150px));
        min-width: min(200px, calc(100vw - 150px));
        max-width: min(200px, calc(100vw - 150px));
    }

    .alina-header-search.is-expanded .alina-header-search__field,
    .alina-header-search:focus-within .alina-header-search__field {
        width: 100%;
    }
}

.alina-assistant--floating {
    position: fixed;
    right: 20px;
    bottom: 92px;
    z-index: 2147483000;
    pointer-events: none;
}

.alina-assistant button,
.alina-assistant__product-action {
    border: 0;
    border-radius: 6px;
    background: var(--alina-accent);
    color: var(--alina-button-text);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
}

.alina-assistant__launcher {
    min-width: 104px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    pointer-events: auto;
    box-shadow: 0 12px 30px rgba(21, 122, 110, 0.25);
}

.alina-assistant.is-open .alina-assistant__launcher {
    display: none;
}

.alina-assistant__nudge {
    position: absolute;
    right: 0;
    bottom: 62px;
    width: min(330px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--alina-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(16, 24, 40, 0.18);
    pointer-events: auto;
    animation: alina-nudge-in 280ms ease-out both;
}

.alina-assistant__nudge[hidden] {
    display: none !important;
}

.alina-assistant .alina-assistant__nudge-close {
    position: absolute;
    top: -18px;
    right: 0;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 50%;
    background: #9aa0a6;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.18);
}

.alina-assistant__nudge-avatar {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8f5f2;
    color: var(--alina-accent);
    font-weight: 800;
    font-size: 20px;
}

.alina-assistant__nudge-copy {
    min-width: 0;
    padding-right: 22px;
}

.alina-assistant__nudge-copy strong {
    display: block;
    color: var(--alina-ink);
    font-size: 15px;
    line-height: 1.25;
    margin: 0 0 4px;
}

.alina-assistant__nudge-copy p {
    margin: 0;
    color: var(--alina-ink);
    font-size: 14px;
    line-height: 1.45;
}

.alina-assistant .alina-assistant__nudge-action {
    grid-column: 1 / -1;
    min-height: 38px;
    padding: 0 13px;
    justify-self: end;
}

@keyframes alina-nudge-in {
    from {
        opacity: 0;
        transform: translateX(18px);
    }

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

.alina-assistant__panel {
    width: min(420px, calc(100vw - 32px));
    max-height: min(720px, calc(100vh - 40px));
    max-height: min(720px, calc(100dvh - 40px));
    display: grid;
    grid-template-rows: auto minmax(180px, 1fr) auto auto;
    overflow: hidden;
    border: 1px solid var(--alina-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 60px rgba(16, 24, 40, 0.22);
    pointer-events: auto;
}

.alina-assistant__panel[hidden] {
    display: none !important;
}

.alina-assistant--floating .alina-assistant__panel {
    position: fixed;
    right: 20px;
    top: 16px;
    bottom: 86px;
    width: min(420px, calc(100vw - 32px));
    max-height: none;
}

.alina-assistant--inline .alina-assistant__panel {
    width: 100%;
    max-height: none;
    box-shadow: none;
}

.alina-assistant__header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--alina-line);
    background: #fff;
}

.alina-assistant__header h2 {
    margin: 0;
    min-width: 0;
    font-size: 18px;
    line-height: 1.2;
}

.alina-assistant__header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.alina-assistant__language {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--alina-line);
    border-radius: 6px;
}

.alina-assistant__language button,
.alina-assistant__close {
    min-width: 40px;
    min-height: 34px;
    padding: 0 10px;
    background: #fff;
    color: var(--alina-ink);
}

.alina-assistant__language button + button {
    border-left: 1px solid var(--alina-line);
}

.alina-assistant__language button.is-active {
    background: var(--alina-accent);
    color: var(--alina-button-text);
}

.alina-assistant__close {
    border: 1px solid var(--alina-line);
    font-size: 22px;
    line-height: 1;
}

.alina-assistant__messages {
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    background: var(--alina-soft);
}

.alina-assistant__message {
    width: fit-content;
    max-width: 92%;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid var(--alina-line);
    border-radius: 8px;
    background: #fff;
    white-space: pre-wrap;
}

.alina-assistant__message a {
    color: var(--alina-accent);
    font-weight: 700;
    text-decoration: underline;
}

.alina-assistant__message--user {
    margin-left: auto;
    background: #e8f5f2;
    border-color: #b9ddd5;
}

.alina-assistant__products {
    display: grid;
    gap: 12px;
    margin: 4px 0 12px;
}

.alina-assistant__options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.alina-assistant__option {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--alina-line) !important;
    background: #fff !important;
    color: var(--alina-ink) !important;
}

.alina-assistant__product-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--alina-line);
    border-radius: 8px;
    background: #fff;
}

.alina-assistant__product-image {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--alina-line);
    border-radius: 6px;
    background: var(--alina-soft);
}

.alina-assistant__product-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.alina-assistant__product-body {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.alina-assistant__product-title {
    color: var(--alina-ink);
    font-weight: 800;
    text-decoration: none;
}

.alina-assistant__product-meta {
    display: grid;
    gap: 4px;
    color: var(--alina-muted);
    font-size: 13px;
}

.alina-assistant__product-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.alina-assistant__product-meta-row strong {
    color: var(--alina-ink);
    text-align: right;
}

.alina-assistant__product-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: var(--alina-order);
    color: #fff;
}

.alina-assistant__email-fallback {
    max-width: 92%;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid var(--alina-line);
    border-radius: 8px;
    background: #fff;
}

.alina-assistant__email-fallback p {
    margin: 0 0 10px;
}

.alina-assistant__email-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 6px;
    background: var(--alina-accent);
    color: var(--alina-button-text);
    font-weight: 700;
    text-decoration: none;
}

.alina-assistant__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid var(--alina-line);
    background: #fff;
    box-sizing: border-box;
}

.alina-assistant__form textarea {
    width: 100%;
    min-height: 58px;
    max-height: 140px;
    resize: vertical;
    border: 1px solid var(--alina-line);
    border-radius: 6px;
    padding: 10px;
    box-sizing: border-box;
    font: inherit;
}

.alina-assistant .alina-assistant__form button[data-alina-send] {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
    min-height: 58px !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 12px !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-align: center !important;
    text-indent: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    line-height: 1.15 !important;
    box-sizing: border-box !important;
}

.alina-assistant__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-height: 28px;
    padding: 8px 12px;
    border-top: 1px solid var(--alina-line);
    background: #fff;
}

.alina-assistant__footer span {
    min-width: 0;
    color: var(--alina-muted);
    font-size: 13px;
    text-align: right;
}

.alina-assistant button:disabled {
    cursor: wait;
    opacity: 0.65;
}

body.search .entry-meta,
body.search .byline,
body.search .posted-on,
body.search .author,
body.search .cat-links,
body.search .comments-link {
    display: none !important;
}

body.search article .entry-title,
body.search .entry-title a {
    font-size: clamp(24px, 2vw, 34px) !important;
    line-height: 1.18 !important;
}

body.search article.type-product,
body.search article.product,
body.search .type-product {
    background: #fff !important;
    box-sizing: border-box !important;
}

body.search article.type-product .post-thumbnail,
body.search article.type-product .entry-image,
body.search article.type-product .entry-thumb,
body.search article.product .post-thumbnail,
body.search article.product .entry-image,
body.search article.product .entry-thumb {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 18px !important;
    overflow: hidden !important;
    background: #fff !important;
}

body.search article.type-product img,
body.search article.product img,
body.search img.alina-search-product-image {
    width: min(240px, 82%) !important;
    height: min(240px, 82vw) !important;
    max-width: 100% !important;
    max-height: 240px !important;
    display: block !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #fff !important;
}

body.search article.type-product .entry-title,
body.search article.product .entry-title {
    margin-top: 0 !important;
}

@media (max-width: 700px) {
    body.search article.type-product img,
    body.search article.product img,
    body.search img.alina-search-product-image {
        width: min(210px, 78vw) !important;
        height: min(210px, 78vw) !important;
        max-height: 210px !important;
    }
}

@media (max-width: 480px) {
    .alina-assistant--floating {
        right: 8px;
        bottom: 80px;
    }

    .alina-assistant__nudge {
        right: 0;
        bottom: 60px;
        width: min(320px, calc(100vw - 16px));
    }

    .alina-assistant--floating .alina-assistant__panel {
        position: fixed;
        top: 8px;
        left: 6px;
        right: 6px;
        bottom: 72px;
        width: auto;
        max-height: none;
    }

    .alina-assistant__header {
        gap: 8px;
        padding: 12px;
    }

    .alina-assistant__header h2 {
        font-size: 17px;
    }

    .alina-assistant__language button,
    .alina-assistant__close {
        min-width: 38px;
        padding: 0 8px;
    }

    .alina-assistant__product-card {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .alina-assistant__form {
        grid-template-columns: minmax(0, 1fr) 112px;
        gap: 8px;
        padding: 10px;
    }

    .alina-assistant .alina-assistant__form button[data-alina-send] {
        width: 112px !important;
        min-width: 112px !important;
        max-width: 112px !important;
    }
}

@media (max-width: 360px) {
    .alina-assistant__form {
        grid-template-columns: 1fr;
    }

    .alina-assistant .alina-assistant__form button[data-alina-send] {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 44px !important;
    }
}
