/**
 * Hero Instant Search Bar — Premium Stylesheet
 * Replaces old multi-dropdown form with a single, powerful search bar
 */

/* =============================================
   HERO SEARCH BAR WRAPPER
   ============================================= */

#formSearchTour {
    position: relative;
    z-index: 100;
}

.hero-search-bar-wrap {
    padding: 30px 0 20px;
}

/* =============================================
   MAIN SEARCH BAR CONTAINER
   ============================================= */

.hero-search-inner {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 60px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
    padding: 8px 8px 8px 28px;
    gap: 0;
    position: relative;
    transition: box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.hero-search-inner:focus-within {
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.28);
    border-color: rgba(76, 175, 80, 0.35);
}

/* =============================================
   SEARCH ICON
   ============================================= */

.hero-search-icon {
    color: #4CAF50;
    font-size: 20px;
    flex-shrink: 0;
    margin-right: 14px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.hero-search-inner:focus-within .hero-search-icon {
    transform: scale(1.1);
}

/* =============================================
   INPUT LABEL + FIELD
   ============================================= */

.hero-search-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.hero-search-label {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 2px 0;
    line-height: 1;
    display: block;
    cursor: text;
}

.hero-search-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    color: #222 !important;
    width: 100% !important;
    height: auto !important;
    line-height: 1.4 !important;
}

.hero-search-input::placeholder {
    color: #aaa !important;
    font-weight: 400 !important;
    font-size: 15px !important;
}

/* =============================================
   CLEAR BUTTON
   ============================================= */

.hero-search-clear {
    background: #f0f0f0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-search-clear:hover {
    background: #e0e0e0;
    color: #555;
}

/* =============================================
   SUBMIT BUTTON
   ============================================= */

.hero-search-submit {
    background: linear-gradient(135deg, #4CAF50, #2e7d32);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 28px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    letter-spacing: 0.3px;
}

.hero-search-submit:hover {
    background: linear-gradient(135deg, #45a049, #1b5e20);
    transform: translateX(2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.hero-search-submit .submit-icon {
    font-size: 13px;
    transition: transform 0.2s ease;
}

.hero-search-submit:hover .submit-icon {
    transform: translateX(3px);
}

.hero-search-hints {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding: 0 4px;
    animation: fadeInUp 0.5s ease 0.3s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hints-label {
    font-size: 13px;
    color: #555;
    font-weight: 600;
    flex-shrink: 0;
}

.hints-label i {
    color: #e65100;
    margin-right: 4px;
}

.hint-tag {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32 !important;
    border: 1px solid #a5d6a7;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.hint-tag:hover {
    background: #4CAF50 !important;
    color: #fff !important;
    border-color: #4CAF50;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(76,175,80,0.3);
}

/* =============================================
   AUTOCOMPLETE DROPDOWN
   ============================================= */

.hero-autocomplete {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(0, 0, 0, 0.07);
    overflow: hidden;
    z-index: 99999;
    animation: dropdownFadeIn 0.2s ease;
}

/* Position relative on the form */
#heroSearchForm {
    position: relative;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
.hero-autocomplete::-webkit-scrollbar { width: 5px; }
.hero-autocomplete::-webkit-scrollbar-track { background: #f5f5f5; }
.hero-autocomplete::-webkit-scrollbar-thumb { background: #ddd; border-radius: 5px; }

/* Status messages */
.hero-autocomplete .search-msg {
    padding: 22px;
    text-align: center;
    color: #777;
    font-size: 14px;
}

.hero-autocomplete .search-msg i {
    margin-right: 8px;
    color: #4CAF50;
}

.hero-autocomplete .search-error {
    color: #e53935;
    font-weight: 500;
}

/* Results list */
.search-results-list {
    list-style: none;
    padding: 8px 0;
    margin: 0;
    max-height: 420px;
    overflow-y: auto;
}

.search-results-list li {
    border-bottom: 1px solid #f5f5f5;
}

.search-results-list li:last-child {
    border-bottom: none;
}

/* Individual item link */
.search-result-item-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none !important;
    color: #333 !important;
    transition: background 0.15s ease;
    gap: 14px;
}

.search-result-item-link:hover {
    background: #f7fdf7;
}

/* Thumbnail */
.search-result-item-link .item-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    border: 1px solid #eee;
    background: #f0f0f0;
}

/* Text details */
.search-result-item-link .item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.search-result-item-link .item-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    transition: color 0.15s ease;
}

.search-result-item-link:hover .item-title {
    color: #4CAF50;
}

.search-result-item-link .item-meta {
    font-size: 12px;
    color: #999;
}

/* Price badge */
.search-result-item-link .item-price {
    font-size: 13px;
    font-weight: 700;
    color: #e53935;
    flex-shrink: 0;
    text-align: right;
    background: rgba(229, 57, 53, 0.08);
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.search-result-item-link .item-price.contact-price {
    color: #777;
    background: #f5f5f5;
    font-size: 12px;
    font-weight: 500;
}

/* Footer — View all */
.search-results-footer {
    padding: 14px 20px;
    text-align: center;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.search-results-footer a {
    color: #4CAF50 !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease;
}

.search-results-footer a:hover {
    gap: 10px;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 992px) {
    .hero-search-submit .submit-text {
        display: none;
    }
    .hero-search-submit {
        padding: 14px 18px;
        border-radius: 50%;
    }
    .hero-search-submit .submit-icon {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .hero-search-inner {
        border-radius: 16px;
        padding: 10px 10px 10px 18px;
        flex-wrap: nowrap;
    }

    .hero-search-input {
        font-size: 15px !important;
    }

    .hero-search-label {
        display: none;
    }

    .hero-autocomplete {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        border-radius: 20px 20px 0 0 !important;
        max-height: 70vh;
        overflow-y: auto;
    }

    .hero-search-hints {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-search-bar-wrap {
        padding: 20px 0 15px;
    }

    .hero-search-inner {
        padding: 8px 8px 8px 14px;
    }

    .hero-search-icon {
        font-size: 16px;
        margin-right: 10px;
    }

    .hero-search-submit {
        padding: 12px 14px;
    }
}

/* =============================================
   KEYBOARD NAVIGATION HIGHLIGHT
   ============================================= */

.search-results-list li .search-result-item-link.is-active {
    background: #f0fbf0;
}

.search-results-list li .search-result-item-link.is-active .item-title {
    color: #4CAF50;
}

/* =============================================
   THUMBNAIL PLACEHOLDER (no image)
   ============================================= */

.item-thumb-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    flex-shrink: 0;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 20px;
    border: 1px solid #eee;
}

