.wcob-header-tools {
    --wcob-primary: #D62828;
    --wcob-primary-hover: #A91E1E;
    --wcob-whatsapp: #25D366;
    --wcob-whatsapp-hover: #128C4A;
    --wcob-text: #3B241B;
    --wcob-border: #E5E7EB;
    --wcob-search-bg: #FFFFFF;
    --wcob-radius: 12px;
    --wcob-control-height: 44px;
    --wcob-search-max: 420px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    width: 100%;
    min-width: 0;
    color: var(--wcob-text);
    font-family: inherit;
}

.wcob-header-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 300px;
    width: 100%;
    max-width: var(--wcob-search-max);
    min-width: 220px;
}

.wcob-header-search input {
    width: 100%;
    height: var(--wcob-control-height);
    padding: 0 42px;
    border: 1px solid var(--wcob-border);
    border-radius: var(--wcob-radius);
    background: var(--wcob-search-bg);
    color: var(--wcob-text);
    font: inherit;
    font-size: 14px;
    line-height: 1;
    outline: 0;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.wcob-header-search input::placeholder {
    color: #9A8E88;
    opacity: 1;
}

.wcob-header-search input:focus {
    border-color: var(--wcob-primary);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--wcob-primary) 14%, transparent);
}

.wcob-search-icon {
    position: absolute;
    left: 15px;
    z-index: 1;
    width: 18px;
    height: 18px;
    color: #776A64;
    pointer-events: none;
}

.wcob-search-icon svg,
.wcob-action-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.wcob-search-clear {
    position: absolute;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #776A64;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, background-color .15s ease;
}

.wcob-search-clear:hover,
.wcob-search-clear:focus-visible {
    background: #F3F4F6;
}

.wcob-header-search.has-text .wcob-search-clear {
    opacity: 1;
    pointer-events: auto;
}

.wcob-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.wcob-action,
.wcob-primary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: var(--wcob-control-height);
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: var(--wcob-radius);
    text-decoration: none !important;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.wcob-action {
    color: var(--wcob-text);
}

.wcob-action:hover,
.wcob-action:focus-visible {
    background: #FFF7F2;
    border-color: #F5E5DC;
    color: var(--wcob-primary);
    transform: translateY(-1px);
}

.wcob-whatsapp-link {
    color: var(--wcob-whatsapp);
}

.wcob-whatsapp-link:hover,
.wcob-whatsapp-link:focus-visible {
    background: color-mix(in srgb, var(--wcob-whatsapp) 10%, white);
    border-color: color-mix(in srgb, var(--wcob-whatsapp) 24%, white);
    color: var(--wcob-whatsapp-hover);
}

.wcob-action-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}

.wcob-cart-link {
    position: relative;
}

.wcob-cart-count,
.wcob-cta-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--wcob-primary);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.wcob-primary-cta {
    padding: 0 18px;
    background: var(--wcob-primary);
    color: #FFFFFF !important;
    box-shadow: 0 7px 18px color-mix(in srgb, var(--wcob-primary) 24%, transparent);
}

.wcob-primary-cta:hover,
.wcob-primary-cta:focus-visible {
    background: var(--wcob-primary-hover);
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 9px 22px color-mix(in srgb, var(--wcob-primary-hover) 28%, transparent);
}

.wcob-cta-count {
    background: rgba(255, 255, 255, .2);
}

.wcob-cta-count.is-empty {
    display: none;
}

.wcob-action:focus-visible,
.wcob-primary-cta:focus-visible,
.wcob-search-clear:focus-visible,
.wcob-header-search input:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--wcob-primary) 25%, transparent);
    outline-offset: 2px;
}

@media (max-width: 1100px) {
    .wcob-header-tools {
        gap: 9px;
    }

    .wcob-header-search {
        max-width: min(var(--wcob-search-max), 330px);
        min-width: 180px;
    }

    .wcob-action-text {
        display: none;
    }

    .wcob-action {
        width: var(--wcob-control-height);
        padding: 0;
    }
}

@media (max-width: 767px) {
    .wcob-header-tools {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        width: 100%;
    }

    .wcob-header-search {
        grid-column: 1 / -1;
        grid-row: 2;
        max-width: none;
        min-width: 0;
    }

    .wcob-header-actions {
        grid-column: 2;
        grid-row: 1;
    }

    .wcob-compact-mobile .wcob-whatsapp-link,
    .wcob-compact-mobile .wcob-primary-cta {
        display: none;
    }

    .wcob-cart-link {
        width: var(--wcob-control-height);
        padding: 0;
    }

    .wcob-cart-count {
        position: absolute;
        top: -5px;
        right: -5px;
        min-width: 18px;
        height: 18px;
        font-size: 10px;
        border: 2px solid #FFFFFF;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wcob-header-tools *,
    .wcob-header-tools *::before,
    .wcob-header-tools *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
