.hs-wrap {
    --hs-red: #c31b2b;
    --hs-red-dark: #9f1522;
    --hs-ink: #202124;
    --hs-muted: #70757a;
    --hs-line: #dfe1e5;
    --hs-soft: #f1f3f4;
    position: relative;
    z-index: 20;
    max-width: 860px;
    margin: -56px auto 36px;
    padding: 0 16px;
    font-family: "Jost", system-ui, sans-serif;
}

.hs-wrap *,
.hs-wrap *::before,
.hs-wrap *::after {
    box-sizing: border-box;
}

.hs-card {
    background: #fff;
    border: 1px solid var(--hs-line);
    border-radius: 20px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.24), 0 1px 4px 0 rgba(0, 0, 0, 0.12);
    padding: 16px 20px 18px;
}

/* ---- Tabs (segmented) ---- */
.hs-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 14px;
    background: var(--hs-soft);
    border-radius: 999px;
    width: 100%;
}

.hs-tab {
    flex: 1;
    min-width: 0;
    padding: 8px 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--hs-muted);
    font: 600 15px/1 "Jost", system-ui, sans-serif;
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s;
    text-align: center;
}

.hs-tab:hover {
    color: var(--hs-ink);
}

.hs-tab[aria-selected="true"] {
    background: var(--hs-red);
    color: #fff;
    box-shadow: 0 2px 6px rgba(195, 27, 43, .35);
}

.hs-tab:focus-visible {
    outline: 2px solid var(--hs-ink);
    outline-offset: 2px;
}

/* ---- Google-style search bar ---- */
.hs-bar-wrap {
    position: relative;
}

.hs-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 14px 0 16px;
    border: 1px solid var(--hs-line);
    border-radius: 26px;
    background: #fff;
    transition: box-shadow .2s, border-color .2s;
}

.hs-bar:hover,
.hs-bar:focus-within {
    box-shadow: 0 1px 6px rgba(32, 33, 36, .28);
    border-color: transparent;
}

.hs-bar.hs-open {
    border-radius: 26px 26px 0 0;
    border-bottom-color: transparent;
    box-shadow: 0 2px 6px rgba(32, 33, 36, .28);
}

.hs-bar svg.hs-ico {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: var(--hs-muted);
}

.hs-bar input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--hs-ink);
    font: 400 17px "Jost", system-ui, sans-serif;
}

.hs-bar input::placeholder {
    color: #9aa0a6;
}

.hs-clear {
    display: none;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--hs-muted);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.hs-clear:hover {
    background: var(--hs-soft);
}

.hs-clear.hs-show {
    display: inline-flex;
}

.hs-clear svg {
    width: 18px;
    height: 18px;
}

.hs-bar.hs-invalid {
    border-color: var(--hs-red);
}

.hs-err {
    display: none;
    margin: 6px 16px 0;
    color: var(--hs-red);
    font-size: 13px;
}

.hs-err.hs-show {
    display: block;
}

/* ---- Suggestions ---- */
.hs-suggest {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 30;
    margin: 0;
    padding: 6px 0 10px;
    list-style: none;
    max-height: 360px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid transparent;
    border-top: 1px solid var(--hs-line);
    border-radius: 0 0 26px 26px;
    box-shadow: 0 6px 10px rgba(32, 33, 36, .2);
}

.hs-suggest.hs-show {
    display: block;
}

.hs-sg-label {
    padding: 6px 18px 2px;
    color: var(--hs-muted);
    font-size: 12px;
}

.hs-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 18px;
    color: var(--hs-ink);
    font-size: 16px;
    cursor: pointer;
}

.hs-opt[aria-selected="true"],
.hs-opt:hover {
    background: var(--hs-soft);
}

.hs-opt .hs-oi {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--hs-soft);
    color: var(--hs-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hs-opt .hs-oi svg {
    width: 18px;
    height: 18px;
}

.hs-opt .hs-oi img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hs-opt .hs-ot {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hs-opt .hs-ot b {
    font-weight: 600;
}

.hs-opt .hs-tag {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fdecee;
    color: var(--hs-red);
    font-size: 11px;
    font-weight: 600;
}

.hs-opt .hs-rm {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: var(--hs-muted);
    font-size: 12px;
    cursor: pointer;
}

.hs-opt .hs-rm:hover {
    color: var(--hs-red);
    text-decoration: underline;
}

/* ---- Filters row ---- */
.hs-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    align-items: center;
}

.hs-sel {
    position: relative;
    flex: 1 1 140px;
    min-width: 0;
}

.hs-sel select {
    width: 100%;
    height: 42px;
    padding: 0 34px 0 14px;
    border: 1px solid var(--hs-line);
    border-radius: 999px;
    background: #fff;
    color: var(--hs-ink);
    font: 400 15px "Jost", system-ui, sans-serif;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.hs-sel::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--hs-muted);
    border-bottom: 2px solid var(--hs-muted);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.hs-sel select:hover {
    background: #f8f9fa;
}

.hs-sel select:focus {
    outline: none;
    border-color: var(--hs-red);
    box-shadow: 0 0 0 3px rgba(195, 27, 43, .12);
}

.hs-submit {
    flex: 0 0 auto;
    height: 42px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    background: var(--hs-red);
    color: #fff;
    font: 600 15px "Jost", system-ui, sans-serif;
    cursor: pointer;
    transition: background .2s, transform .15s;
}

.hs-submit:hover {
    background: var(--hs-red-dark);
}

.hs-submit:active {
    transform: translateY(1px);
}

.hs-submit:focus-visible {
    outline: 2px solid var(--hs-ink);
    outline-offset: 2px;
}

.hs-hint {
    margin: 12px 4px 0;
    color: var(--hs-muted);
    font-size: 13px;
}

.hs-sel select {
    accent-color: #c31b2b;
}

.hs-sel select option {
    background: #fff !important;
    color: #292b32;
    padding: 10px !important;
}

/* ---- Tablet ---- */
@media (max-width: 767.98px) {
    .hs-sel {
        flex: 1 1 calc(50% - 5px);
    }

    .hs-submit {
        flex: 1 1 100%;
    }
}

/* ---- Mobile ---- */
@media (max-width: 575.98px) {
    .hs-wrap {
        margin-top: -28px;
        padding: 0 10px;
    }

    .hs-card {
        padding: 12px 12px 14px;
        border-radius: 16px;
    }

    .hs-tabs {
        display: flex;
    }

    .hs-tab {
        flex: 1;
        min-width: 0;
        padding: 9px 4px;
    }

    .hs-bar {
        height: 48px;
    }

    .hs-bar input {
        font-size: 16px;
    }

    /* iOS zoom na ho */
    .hs-sel select {
        font-size: 16px;
    }

    .hs-suggest {
        max-height: 300px;
        border-radius: 0 0 24px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hs-wrap * {
        transition: none !important;
    }
}