.thegem-te-search .thegem-te-search-hide {
    display: none !important;
}

.thegem-te-search .tmc-search-icon-widget,
li.menu-item-type-search-widget.tmc-search-menu-item .tmc-search-icon-widget {
    position: relative;
    display: inline-flex;
    align-items: center;
}

li.menu-item-type-search-widget.tmc-search-menu-item {
    display: list-item !important;
    list-style: none;
}

ul.nav-menu--stretch > li.menu-item-type-search-widget.tmc-search-menu-item {
    display: inline-block !important;
    vertical-align: middle;
}

nav.desktop-view li.menu-item-type-search-widget.tmc-search-menu-item {
    display: inline-block !important;
    vertical-align: middle;
}

.tmc-header-search-wrap {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-right: 8px;
}

.tmc-search-icon-widget {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tmc-search-icon-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    color: #111;
    cursor: pointer;
    transition: color 0.2s ease;
}

.tmc-search-icon-toggle svg {
    width: 24px;
    height: 24px;
}

.tmc-search-icon-toggle:hover {
    color: #394e73;
}

.tmc-search-icon-toggle .tmc-search-icon-close {
    display: none;
}

.tmc-search-icon-widget.is-open .tmc-search-icon-toggle {
    border: 1px solid #0aaef0;
    border-radius: 4px;
    color: #666;
}

.tmc-search-icon-widget.is-open .tmc-search-icon-open {
    display: none;
}

.tmc-search-icon-widget.is-open .tmc-search-icon-close {
    display: inline-flex;
}

.tmc-search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px;
    z-index: 9999;
}

.tmc-search-input-wrap {
    position: relative;
}

.tmc-search-input {
    width: stretch;
    padding: 12px 40px 12px 14px !important;
    border: none !important;
    border-radius: 6px;
    background: #f0f0f0;
    font-size: 15px;
    color: #111;
    outline: none !important;
}

.tmc-search-input::placeholder {
    color: #999;
}

.tmc-search-input:focus {
    background: #e8e8e8;
}

.tmc-search-input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #111;
    pointer-events: none;
    display: inline-flex;
}

.tmc-search-input-spinner,
.tmc-search-preview-loading {
    display: none;
}

.tmc-search-icon-widget.is-search-loading .tmc-search-input-icon {
    display: none;
}

.tmc-search-icon-widget.is-search-loading .tmc-search-input-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tmc-search-icon-widget.is-search-loading .tmc-search-preview-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tmc-search-input-spinner {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.tmc-search-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(57, 78, 115, 0.2);
    border-top-color: #394e73;
    border-radius: 50%;
    animation: none;
}

.tmc-search-icon-widget.is-search-loading .tmc-search-spinner {
    animation: tmc-search-spin 0.7s linear infinite;
}

.tmc-search-preview {
    margin-top: 12px;
    position: relative;
}

.tmc-search-icon-widget.is-search-loading .tmc-search-preview {
    min-height: 48px;
}

.tmc-search-preview-loading {
    padding: 16px 0;
}

.tmc-search-preview-loading .tmc-search-spinner {
    width: 22px;
    height: 22px;
}

@keyframes tmc-search-spin {
    to {
        transform: rotate(360deg);
    }
}

.tmc-search-preview-items {
    max-height: 360px;
    overflow-y: auto;
}

.tmc-search-preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    text-decoration: none;
    color: #111;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
}

.tmc-search-preview-items .tmc-search-preview-item:last-child {
    border-bottom: none;
}

.tmc-search-preview-item:hover {
    background: #f8f8f8;
}

.tmc-search-preview-thumb {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 4px;
    background: #fff;
}

.tmc-search-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tmc-search-preview-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.tmc-search-preview-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #111;
}

.tmc-search-preview-price {
    font-size: 13px;
    color: #666;
}

.tmc-search-preview-empty {
    margin: 8px 0 0;
    font-size: 14px;
    color: #666;
    text-align: center;
}

.tmc-search-view-all {
    display: block;
    margin-top: 12px;
    padding: 10px 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #394e73;
    text-decoration: none;
    border-top: 1px solid #eee;
    transition: color 0.2s ease, background 0.2s ease;
}

.tmc-search-view-all:hover {
    color: #0aaef0;
    background: #f8f8f8;
}

.tmc-search-results-header {
    margin-bottom: 32px;
}

.tmc-search-results-form {
    margin-bottom: 28px;
}

.tmc-search-results-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.tmc-search-results-input {
    width: 100%;
    padding: 16px 52px 16px 18px !important;
    border-radius: 8px;
    background: #f3f3f3;
    font-size: 16px;
    font-weight: 400;
    color: #333;
    outline: none;
    box-shadow: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.tmc-search-results-input::placeholder {
    color: #999;
}

.tmc-search-results-input:focus {
    background: #fff;
    border-color: #b8b8b8;
}

.tmc-search-results-submit {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #111;
    cursor: pointer;
    transition: color 0.2s ease;
}

.tmc-search-results-submit:hover {
    color: #394e73;
    background: transparent;
}

.tmc-search-results-header h1 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 10px;
    padding: 0;
    color: #394e73;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.tmc-search-results-count {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    color: #888;
}

.tmc-search-results-page .tmc-no-products {
    margin-top: 8px;
    font-size: 16px;
    color: #888;
}

@media (max-width: 768px) {
    .tmc-search-results-header h1 {
        font-size: 24px;
    }

    .tmc-search-results-input {
        font-size: 15px;
        padding: 14px 48px 14px 16px;
    }
}

@media (max-width: 480px) {
    .tmc-search-dropdown {
        width: 280px;
        right: -40px;
    }
}
