.cmc-s-form {
    --cmc-s-ink: #171717;
    --cmc-s-muted: #6b6b6b;
    --cmc-s-line: rgba(23, 23, 23, 0.08);
    --cmc-s-soft: #f4f4f4;
    --cmc-s-hot: #f58220;
    --cmc-s-hot-soft: rgba(245, 130, 32, 0.1);
    --cmc-s-ok: #0a8f3d;
    --cmc-s-ok-soft: #e8f7ee;
    --cmc-s-bad: #c01515;
    --cmc-s-bad-soft: #fdecec;
    position: relative;
    width: 100%;
    max-width: 680px;
    box-sizing: border-box;
    margin: 16px auto 8px;
    z-index: 20;
    font-family: inherit;
}

#barra_pesquisa {
    position: sticky;
    z-index: 40;
    top: 90px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

#barra_pesquisa .cmc-s-form,
.woocommerce-products-header .cmc-s-form {
    background: none;
    margin-top: 0;
}

.cmc-s-slot {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.cmc-s-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 4px 4px 4px 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e6e6e6;
    box-shadow: 0 10px 28px -18px rgba(0, 0, 0, 0.45);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cmc-s-form.is-open .cmc-s-field,
.cmc-s-field:focus-within {
    border-color: var(--cmc-s-hot);
    box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.16), 0 12px 28px -16px rgba(0, 0, 0, 0.2);
}

.cmc-s-icon {
    flex: 0 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #8a8a8a;
    pointer-events: none;
}

.cmc-s-icon svg,
.cmc-s-clear svg,
.cmc-s-submit svg,
.cmc-s-dismiss svg {
    display: block;
    flex: 0 0 auto;
}

.cmc-s-input,
#barra_pesquisa .cmc-s-input,
#barra_pesquisa input.cmc-s-input,
.woocommerce-products-header .cmc-s-input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    height: 44px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    font-size: 16px;
    line-height: 1.2;
    color: var(--cmc-s-ink);
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    letter-spacing: 0 !important;
    word-spacing: normal !important;
    text-transform: none !important;
}

.cmc-s-input::-webkit-search-decoration,
.cmc-s-input::-webkit-search-cancel-button,
.cmc-s-input::-webkit-search-results-button,
.cmc-s-input::-webkit-search-results-decoration {
    display: none;
}

.cmc-s-clear,
.cmc-s-submit {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    padding: 0;
    line-height: 0;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.cmc-s-clear {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f2f2f2;
    color: #555;
}

.cmc-s-clear[hidden] {
    display: none !important;
}

.cmc-s-clear:hover {
    background: #e6e6e6;
    color: var(--cmc-s-ink);
}

.cmc-s-submit {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #181818;
    color: #fff;
}

.cmc-s-submit:hover,
.cmc-s-form.is-open .cmc-s-submit {
    background: var(--cmc-s-hot);
}

.cmc-s-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999998;
    background: rgba(255, 255, 255, 0);
    opacity: 0;
    pointer-events: none;
    transition: background 0.38s ease, opacity 0.38s ease;
}

.cmc-s-overlay.is-on {
    background: rgba(255, 255, 255, 0.94);
    opacity: 1;
    pointer-events: auto;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .cmc-s-overlay.is-on {
        background: rgba(255, 255, 255, 0.9);
        -webkit-backdrop-filter: blur(18px) saturate(140%);
        backdrop-filter: blur(18px) saturate(140%);
    }
}

.cmc-s-dismiss {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px 0 14px;
    border: 1px solid rgba(23, 23, 23, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    color: #555;
    cursor: pointer;
    font: 600 11px/1 system-ui, "Segoe UI", sans-serif;
    letter-spacing: 0.06em;
}

.cmc-s-dismiss:hover {
    color: #111;
    border-color: rgba(23, 23, 23, 0.2);
}

.cmc-s-form.is-flying {
    position: fixed;
    z-index: 9999999;
    margin: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    will-change: top, left, width;
}

.cmc-s-form.is-flying.is-anim {
    transition: top 0.42s cubic-bezier(0.22, 1, 0.36, 1), left 0.42s cubic-bezier(0.22, 1, 0.36, 1), width 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.cmc-s-form.is-open {
    max-height: calc(100vh - 40px);
}

.cmc-s-form.is-open .cmc-s-field {
    flex: 0 0 auto;
    position: relative;
}

.cmc-s-form.is-loading .cmc-s-field::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cmc-s-hot), transparent);
    animation: cmc-s-load 0.9s linear infinite;
}

@keyframes cmc-s-load {
    0% { transform: translateX(-40%); opacity: 0.3; }
    50% { opacity: 1; }
    100% { transform: translateX(40%); opacity: 0.3; }
}

.cmc-s-panels {
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    gap: 24px;
    margin-top: 22px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    font-family: system-ui, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--cmc-s-ink);
    letter-spacing: 0 !important;
    word-spacing: normal !important;
    text-transform: none !important;
    opacity: 0;
    transform: translateY(14px);
}

.cmc-s-form.is-open .cmc-s-panels {
    opacity: 1;
    transform: none;
    transition: opacity 0.32s ease 0.08s, transform 0.32s ease 0.08s;
}

.cmc-s-panels[hidden],
.cmc-s-details[hidden] {
    display: none !important;
}

.cmc-s-panels,
.cmc-s-panels *,
.cmc-s-panels a,
.cmc-s-panels h3,
.cmc-s-panels p,
.cmc-s-panels small,
.cmc-s-panels strong,
.cmc-s-panels span {
    letter-spacing: 0 !important;
    word-spacing: normal !important;
    word-break: normal;
    overflow-wrap: break-word;
    text-transform: none !important;
    font-kerning: normal;
}

.cmc-s-suggest {
    flex: 1 1 50%;
    min-width: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cmc-s-suggest::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.cmc-s-details {
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(23, 23, 23, 0.08);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    overscroll-behavior: contain;
    padding: 20px 22px 22px;
}

.cmc-s-group {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 8px 8px;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: #8a8a8a !important;
    background: transparent;
}

.cmc-s-item {
    display: flex !important;
    gap: 12px;
    align-items: center;
    width: 100%;
    margin: 0 0 2px;
    padding: 11px 10px !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--cmc-s-ink) !important;
    text-decoration: none !important;
    text-align: left !important;
    cursor: pointer;
    min-height: 0 !important;
    height: auto !important;
    font: inherit !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
}

.cmc-s-item:hover,
.cmc-s-item.is-active {
    background: var(--cmc-s-hot-soft) !important;
}

.cmc-s-item:focus-visible {
    outline: 2px solid var(--cmc-s-hot);
    outline-offset: 0;
}

.cmc-s-thumb,
.cmc-s-item img {
    width: 48px !important;
    height: 48px !important;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    flex: 0 0 48px;
    border: 1px solid var(--cmc-s-line);
}

.cmc-s-badge {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #181818;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px !important;
    font-weight: 700 !important;
}

.cmc-s-item-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cmc-s-item-title,
.cmc-s-item strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px !important;
    font-weight: 650 !important;
    line-height: 1.3 !important;
    color: var(--cmc-s-ink) !important;
}

.cmc-s-item-meta,
.cmc-s-item small {
    display: block;
    color: var(--cmc-s-muted) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmc-s-item mark {
    background: #ffe0c4;
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

.cmc-s-item-price {
    flex: 0 0 auto;
    min-width: 64px;
    text-align: right;
    white-space: nowrap;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    color: var(--cmc-s-ink) !important;
}

.cmc-s-item-price.is-sale {
    color: var(--cmc-s-ok) !important;
}

.cmc-s-more,
.cmc-s-empty,
.cmc-s-idle {
    display: block;
    padding: 18px 10px;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.cmc-s-empty,
.cmc-s-idle {
    color: var(--cmc-s-muted);
}

.cmc-s-idle {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-top: 28px;
}

.cmc-s-idle strong {
    color: var(--cmc-s-ink) !important;
    font-size: 16px !important;
    font-weight: 650 !important;
}

.cmc-s-more {
    color: var(--cmc-s-hot) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
}

.cmc-s-more:hover {
    color: #d36a10 !important;
}

.cmc-s-details-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 8px 8px 16px;
}

.cmc-s-details-media img,
.cmc-s-details img {
    width: auto !important;
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 8px;
    background: #fafafa;
}

.cmc-s-details-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 4px 8px;
}

.cmc-s-details-brand {
    margin: 0;
    color: var(--cmc-s-hot) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

.cmc-s-details h3,
.cmc-s-details-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: var(--cmc-s-ink) !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cmc-s-details-sku {
    margin: 0;
    color: var(--cmc-s-muted) !important;
    font-size: 13px !important;
}

.cmc-s-price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.cmc-s-panels .screen-reader-text,
.cmc-s-details .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    border: 0 !important;
}

.cmc-s-details .price .woocommerce-Price-suffix,
.cmc-s-item-price .woocommerce-Price-suffix {
    display: none !important;
}

.cmc-s-details .price,
.cmc-s-details .cmc-s-price-row .price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    font-size: 24px !important;
    font-weight: 750 !important;
    color: var(--cmc-s-ink) !important;
}

.cmc-s-details .price del,
.cmc-s-details .price del .woocommerce-Price-amount {
    color: #9a9a9a !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.cmc-s-details .price ins,
.cmc-s-details .price ins .woocommerce-Price-amount {
    text-decoration: none;
    color: var(--cmc-s-ok) !important;
    font-size: 24px !important;
}

.cmc-s-vat {
    color: var(--cmc-s-muted) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.cmc-s-stock {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 6px;
    margin: 2px 0 0;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--cmc-s-ok-soft);
    color: var(--cmc-s-ok) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

.cmc-s-stock.is-out {
    background: var(--cmc-s-bad-soft);
    color: var(--cmc-s-bad) !important;
}

.cmc-s-excerpt,
.cmc-s-details p {
    margin: 2px 0 0 !important;
    color: #555 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cmc-s-details-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.cmc-s-add,
.cmc-s-view {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 46px;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

.cmc-s-add {
    background: #181818 !important;
    color: #fff !important;
    border: 0 !important;
}

.cmc-s-add:hover {
    background: var(--cmc-s-hot) !important;
}

.cmc-s-view {
    background: rgba(255, 255, 255, 0.7) !important;
    color: var(--cmc-s-ink) !important;
    border: 1px solid rgba(23, 23, 23, 0.12) !important;
}

.cmc-s-view:hover {
    background: #fff !important;
}

.cmc-s-brand-preview,
.cmc-s-term-preview {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    min-height: 100%;
    padding: 24px 8px;
}

.cmc-s-brand-preview .cmc-s-badge {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
    border-radius: 10px;
    font-size: 15px !important;
}

.cmc-s-brand-preview h3,
.cmc-s-term-preview h3 {
    -webkit-line-clamp: 2;
}

html.cmc-s-open,
body.cmc-s-open {
    overflow: hidden !important;
}

body.cmc-s-open {
    padding-right: var(--cmc-s-sbw, 0px) !important;
}

@media (max-width: 879px) {
    .cmc-s-details {
        display: none !important;
    }

    .cmc-s-dismiss {
        top: 14px;
        right: 14px;
    }

    .cmc-s-panels {
        margin-top: 20px;
    }
}

@media (max-width: 1023px) {
    .cmc-s-form,
    #barra_pesquisa {
        max-width: 100%;
    }

    #barra_pesquisa {
        top: 80px;
        padding: 0 10px;
    }
}

@media (max-width: 600px) {
    .cmc-s-field {
        min-height: 48px;
        padding-left: 12px;
        gap: 8px;
    }

    .cmc-s-submit {
        width: 40px;
        height: 40px;
    }

    .cmc-s-item-price {
        display: none;
    }

    .cmc-s-details-actions {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cmc-s-overlay,
    .cmc-s-form.is-flying.is-anim,
    .cmc-s-form.is-open .cmc-s-panels {
        transition: none !important;
    }
}
