#input-search{
    width: 100%;
    padding: 10px;
    margin: 5px 0px 15px 0px;
    box-sizing: border-box;
    font-size: 14px;
}
#button-search {
    width: 100%;
    padding: 11px 10px 10px 10px;
    margin: 5px 0px 15px 2px;
    box-sizing: border-box;
    font-size: 14px;
    border: 1px solid #222;
}
.search_fleft {
    width: 90%;
}
.search_fright_button {
    float: right;
    width: 10%;
}
.clear {
    clear: both;
}

/* --- Header live search --- */
.header { overflow: visible; }

.header-search-btn.is-active { color: var(--color-orange); }

.header-search-dim {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(15, 23, 42, 0.28);
    opacity: 0;
    transition: opacity 0.28s ease;
}
.header-search-dim.is-open { opacity: 1; }

.header-search {
    position: fixed;
    left: 0;
    right: 0;
    top: 80px;
    z-index: 110;
    background: #fff;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    padding: 16px 0 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.38s;
}
.header-search.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.header-search-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

.header-search-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 78%;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(6px);
    transition: width 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.header-search.is-open .header-search-row {
    width: 100%;
    opacity: 1;
    transform: none;
}
.header-search-field-wrap { flex: 1; min-width: 0; }
.header-search-field {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 12px 14px 12px 16px;
    background: #fff;
    border: 1px solid #E8ECF1;
    border-radius: 999px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.header-search-field:focus-within {
    border-color: rgba(249, 115, 22, 0.55);
    box-shadow: 0 10px 32px rgba(249, 115, 22, 0.12);
}
.header-search-field-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0;
    color: var(--color-text-muted);
}
.header-search-field-icon:hover { color: var(--color-orange); }
.header-search-field input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font: 500 16px/1.3 var(--font-main);
    color: var(--color-text-main);
}
.header-search-field input::placeholder { color: #94A3B8; font-weight: 400; }
.header-search-field input::-webkit-search-cancel-button { display: none; }
.header-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--color-text-muted);
    flex: 0 0 auto;
}
.header-search-clear:hover { background: var(--color-gray-bg); color: var(--color-text-main); }
.header-search-clear[hidden] { display: none; }

.hs-line {
    height: 0;
    margin: 0 18px;
    border-radius: 2px;
    background: #F1F5F9;
    overflow: hidden;
    opacity: 0;
    transition: height 0.2s ease, margin 0.2s ease, opacity 0.2s ease;
}
.header-search.is-loading .hs-line {
    height: 2px;
    margin: 10px 18px 0;
    opacity: 1;
}
.hs-line span {
    display: block;
    height: 100%;
    width: 36%;
    border-radius: 2px;
    background: var(--color-orange);
    transform: translateX(-120%);
}
.header-search.is-loading .hs-line span {
    animation: hs-slide 1s ease-in-out infinite;
}
@keyframes hs-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(340%); }
}

.header-search-results {
    display: none;
    margin-top: 12px;
    max-height: min(62vh, 480px);
    overflow: auto;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
}
.header-search-results.is-visible { display: block; }
.header-search.is-loading .header-search-results { opacity: 0.55; }

.hs-label {
    padding: 14px 16px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94A3B8;
}
.hs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    min-height: 60px;
    animation: hs-in 0.28s ease both;
}
.hs-item:hover { background: #FAFAFA; }
.hs-item:hover .hs-name { color: var(--color-orange); }
.hs-thumb {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
    overflow: hidden;
    background: #F4F5F7 center / 20px no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E");
}
.hs-item.is-product .hs-thumb {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
}
.hs-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hs-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--color-text-main);
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hs-meta {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-main);
    white-space: nowrap;
}
.hs-item.is-category .hs-meta {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
}
.hs-empty {
    padding: 22px 16px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 14px;
}
@keyframes hs-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 768px) {
    .header-search { padding: 12px 0 14px; }
    .header-search-inner { padding: 0 16px; }
    .header-search-row { width: 100%; }
    .header-search-field { padding: 11px 12px 11px 14px; }
    .header-search-field input { font-size: 15px; }
    .hs-name { font-size: 13px; }
    .hs-meta { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .header-search,
    .header-search-field,
    .header-search-dim,
    .hs-line,
    .hs-item {
        transition: none;
        animation: none;
    }
}