/* =========================================================================
   Buscador «dónde + qué» (templates/partials/_algolia_autocomplete.html, /api/sugerencias/).
   Sacado de custom.css para que lo carguen igual la web (base.html) y el panel del usuario
   (base_customer.html). Mismo orden y reglas que tenía allí.
   ========================================================================= */
.hero-banner__content .gp-search {
    max-width: 100%;
}

.hero-banner__content .gp-search__form {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-radius: 8px;
}

.hero-banner__content .gp-search__input {
    font-size: 16px;
    padding: 18px 12px;
}

.hero-banner__content .gp-search__btn {
    padding: 14px 28px;
    font-size: 15px;
}

/* =============================================
   GuiaPana Search Bar - TheFork style
   ============================================= */

/* Main container */
.hero_single .gp-search,
.hero-banner__content .gp-search {
    max-width: 780px;
    margin: 0 auto;
}

/* Form row */
.gp-search__form {
    display: flex;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    overflow: visible;
}

/* Fields */
.gp-search__field {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.gp-search__field--location {
    flex: 0 0 35%;
    border-right: 1px solid #e8e8e8;
}

.gp-search__field--query {
    flex: 1;
}

.gp-search__field > i {
    font-size: 16px;
    color: var(--gp-primary);
    padding-left: 14px;
    flex-shrink: 0;
}

/* Inputs */
.gp-search__input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    padding: 15px 10px;
    color: #333;
    background: transparent;
    width: 100%;
    min-width: 0;
}

.gp-search__input::placeholder {
    color: #999;
}

.gp-search__input--auto {
    color: #777;
}

/* Clear button */
.gp-search__clear {
    border: none;
    background: none;
    font-size: 18px;
    color: #ccc;
    cursor: pointer;
    padding: 0 10px;
    line-height: 1;
    flex-shrink: 0;
}

.gp-search__clear:hover {
    color: #666;
}

/* Search button */
.gp-search__btn {
    border: none;
    background: var(--gp-primary-dark);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 0 28px;
    cursor: pointer;
    letter-spacing: 0.5px;
    border-radius: 0 5px 5px 0;
    white-space: nowrap;
    transition: background 0.2s, filter 0.2s;
}

.gp-search__btn:hover {
    filter: brightness(0.88);
}

/* While the typed text is being resolved against the search index */
.gp-search__btn.is-loading {
    opacity: 0.75;
    cursor: progress;
}

/* Compact search in listing page header */
.page_header .gp-search__form {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e8e8e8;
}

.page_header .gp-search__input {
    font-size: 13px;
    padding: 10px 8px;
}

.page_header .gp-search__field > i {
    font-size: 14px;
    padding-left: 10px;
}

.page_header .gp-search__btn {
    font-size: 12px;
    padding: 0 16px;
}

.page_header .gp-search__field--location {
    flex: 0 0 38%;
}

/* Dropdown panels */
.gp-search__panel {
    position: absolute;
    top: calc(100% + 4px);
    left: -1px;
    right: -1px;
    z-index: 10000;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.18);
    border: 1px solid #e0e0e0;
    max-height: 480px;
    overflow-y: auto;
    padding: 8px 0;
}

.gp-search__panel--query {
    min-width: 460px;
    left: 0;
    right: auto;
}

/* While searching: status line on top, previous results dimmed */
.gp-search__status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px 10px;
    font-size: 13px;
    color: #666;
}

.gp-search__spinner {
    width: 14px;
    height: 14px;
    min-width: 14px;
    border: 2px solid var(--gp-primary-light, #eaf5ec);
    border-top-color: var(--gp-primary, #2c8a3e);
    border-radius: 50%;
    animation: gp-spin 0.7s linear infinite;
}

.gp-search__panel--loading .aa-Source {
    opacity: 0.5;
    transition: opacity 0.15s;
}

.gp-search__skeleton-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
}

.gp-search__skeleton-row span {
    display: block;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: gp-shimmer 1.1s ease-in-out infinite;
}

.gp-search__skeleton-row span:first-child {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-radius: 10px;
}

.gp-search__skeleton-row span:last-child { width: 60%; }

@media (prefers-reduced-motion: reduce) {
    .gp-search__spinner, .gp-search__skeleton-row span { animation: none; }
}

/* No results / error */
.gp-search__empty {
    padding: 14px 20px 10px;
}

.gp-search__empty-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.gp-search__empty-hint {
    margin-top: 4px;
    font-size: 13px;
    color: #777;
    line-height: 1.4;
}

/* "Ver todos los resultados para «…»" */
.gp-search__all {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    font-size: 14px;
    font-weight: 600;
    color: var(--gp-primary, #2c8a3e);
    text-decoration: none;
}

.gp-search__all:hover {
    background: var(--gp-primary-light);
    color: var(--gp-primary, #2c8a3e);
    text-decoration: none;
}

.gp-location-search .gp-search__form {
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.gp-location-search .gp-search__location-label {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    padding: 14px 10px;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .gp-search__form {
        flex-direction: column;
        border-radius: 8px;
    }
    .gp-search__field--location {
        flex: auto;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }
    .gp-search__btn {
        border-radius: 0 0 8px 8px;
        padding: 14px;
        width: 100%;
    }
    .gp-search__panel {
        left: 0;
        right: 0;
    }
    .gp-search__panel--query {
        min-width: auto;
    }
}

.hero_single.kenburns_slider .gp-search {
    max-width: 700px;
}

.hero_single.kenburns_slider .gp-search__form {
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    border-radius: 8px;
}

.hero-search-wrapper .gp-search__form {
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

/* =============================================
   MOBILE FULLSCREEN SEARCH — TheFork-style
   ============================================= */

/* Overlay — fullscreen on mobile only */
.ms-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Steps */
.ms-step {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.ms-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}

.ms-header__title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.ms-header__close {
    border: none;
    background: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

/* Search field */
.ms-search-field {
    display: flex;
    align-items: center;
    margin: 12px 16px;
    border: 2px solid var(--gp-primary);
    border-radius: 10px;
    background: #fff;
    padding: 0 12px;
    transition: border-color 0.2s;
}

.ms-search-field:focus-within {
    border-color: var(--gp-primary);
    box-shadow: 0 0 0 3px rgba(50,160,103,0.12);
}

.ms-search-field__icon {
    font-size: 16px;
    color: var(--gp-primary);
    flex-shrink: 0;
}

.ms-search-field__input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 14px 10px;
    color: #1a1a1a;
    background: transparent;
    min-width: 0;
}

.ms-search-field__input::placeholder {
    color: #999;
}

.ms-search-field__clear {
    border: none;
    background: none;
    font-size: 20px;
    color: #bbb;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.ms-search-field__clear:hover {
    color: #666;
}

/* Near me button */
.ms-nearme {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 16px 8px;
    padding: 14px 16px;
    border: none;
    background: var(--gp-primary-light);
    border-radius: 10px;
    cursor: pointer;
    width: calc(100% - 32px);
    text-align: left;
    transition: background 0.15s, filter 0.15s;
}

.ms-nearme:hover {
    filter: brightness(0.88);
}

.ms-nearme__icon {
    color: var(--gp-primary-dark);
    font-size: 18px;
}

.ms-nearme__text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.ms-nearme__arrow {
    color: var(--gp-primary-dark);
    font-size: 14px;
}

/* Section labels */
.ms-section-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #999;
    padding: 16px 20px 8px;
}

.ms-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 20px;
}

.ms-section-header .ms-section-label {
    padding-right: 0;
}

.ms-section-clear {
    border: none;
    background: none;
    font-size: 12px;
    font-weight: 700;
    color: var(--gp-primary-dark);
    cursor: pointer;
    letter-spacing: 0.5px;
}

/* Results list */
.ms-results {
    flex: 1;
}

/* Location items */
.ms-loc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.12s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.ms-loc-item:hover,
.ms-loc-item:active {
    background: var(--gp-primary-light);
}

.ms-loc-item__icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 16px;
    color: #666;
}

.ms-loc-item__info {
    flex: 1;
    min-width: 0;
}

.ms-loc-item__name {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    display: block;
}

.ms-loc-item__sub {
    font-size: 12px;
    color: #999;
    display: block;
    margin-top: 2px;
}

/* City chip (step 2) */
.ms-city-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 16px 0;
    padding: 8px 14px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: fit-content;
}

.ms-city-chip i {
    font-size: 14px;
    color: var(--gp-primary);
}

.ms-city-chip__change {
    border: none;
    background: none;
    color: var(--gp-primary-dark);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 4px;
    text-decoration: underline;
}

/* See all button */
.ms-see-all {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 16px;
    padding: 14px 16px;
    background: var(--gp-primary-light);
    border-radius: 10px;
    text-decoration: none;
    color: #1a1a1a;
    transition: background 0.15s, filter 0.15s;
}

.ms-see-all:hover {
    filter: brightness(0.88);
    text-decoration: none;
    color: #1a1a1a;
}

.ms-see-all__icon {
    color: var(--gp-primary-dark);
    font-size: 18px;
}

.ms-see-all__text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
}

.ms-see-all__arrow {
    color: var(--gp-primary-dark);
    font-size: 14px;
}

/* Recent searches */
.ms-recent-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: background 0.12s;
}

.ms-recent-item:hover {
    background: var(--gp-primary-light);
}

.ms-recent-item__icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
}

.ms-recent-item__info {
    flex: 1;
    min-width: 0;
}

.ms-recent-item__label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.ms-recent-item__sub {
    font-size: 12px;
    color: #999;
    margin-top: 1px;
}

.ms-recent-item__remove {
    border: none;
    background: none;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
}

.ms-recent-item__remove:hover {
    color: #999;
}

/* Trends */
.ms-trend-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    text-decoration: none;
    color: #1a1a1a;
    transition: background 0.12s;
}

.ms-trend-item:hover {
    background: var(--gp-primary-light);
    text-decoration: none;
    color: #1a1a1a;
}

.ms-trend-item__icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 18px;
}

.ms-trend-item__icon--category {
    background: var(--gp-primary-light);
    color: var(--gp-primary-dark);
}

.ms-trend-item__icon--best {
    background: #fff8e1;
    color: #f59e0b;
}

.ms-trend-item__icon--offer {
    background: #fce4ec;
    color: #e91e63;
}

.ms-trend-item__icon--dish {
    background: #e3f2fd;
    color: #1976d2;
}

.ms-trend-item__icon--picture {
    background: #f0f0f0;
    overflow: hidden;
    border-radius: 10px;
}

.ms-trend-item__icon--picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ms-trend-item__info {
    flex: 1;
    min-width: 0;
}

.ms-trend-item__sub {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
    display: block;
}

.ms-trend-item__label {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    display: block;
}

.ms-trend-item__arrow {
    color: #ccc;
    font-size: 14px;
}

/* Query results (step 2 autocomplete) */
.ms-query-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    text-decoration: none;
    color: #1a1a1a;
    transition: background 0.12s;
}

.ms-query-item:hover {
    background: var(--gp-primary-light);
    text-decoration: none;
    color: #1a1a1a;
}

.ms-query-item__icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gp-primary-light);
    border-radius: 10px;
    font-size: 18px;
    color: var(--gp-primary-dark);
}

.ms-query-item__icon--picture {
    background: #f0f0f0;
    overflow: hidden;
}

.ms-query-item__icon--picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ms-query-item__info {
    flex: 1;
    min-width: 0;
}

.ms-query-item__name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    display: block;
}

.ms-query-item__sub {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
    display: block;
}

.ms-query-item__rating {
    background: var(--gp-primary-dark);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Slide animation */
.ms-step {
    transition: transform 0.3s ease, opacity 0.25s ease;
}

.ms-step--slide-out-left {
    transform: translateX(-100%);
    opacity: 0;
    position: absolute;
    inset: 0;
}

@media (min-width: 768px) {
    .ms-overlay {
        display: none !important;
    }
}

/* Mobile search overlay: same searching state as the desktop panel */
.gp-search__panel--loading .ms-query-item,
.gp-search__panel--loading .ms-loc-item,
.gp-search__panel--loading .ms-section-label {
    opacity: 0.5;
    transition: opacity 0.15s;
}

/* Lista de sugerencias (aa-*) */
/* No results / error */




/* "Ver todos los resultados para «…»" */



/* Sources */
.aa-Source + .aa-Source {
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
    padding-top: 4px;
}

.aa-SourceHeader {
    padding: 10px 20px 6px;
}

.aa-SourceHeaderTitle {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #999;
}

/* List */
.aa-List {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aa-Item {
    margin: 0;
}

/* Item links */
.aa-ItemLink {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    text-decoration: none;
    color: #333;
    gap: 14px;
    transition: background 0.15s;
}

.aa-ItemLink:hover,
.aa-Item:hover .aa-ItemLink {
    background: var(--gp-primary-light);
    text-decoration: none;
    color: #333;
}

/* Icons — category type */
.aa-ItemIcon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gp-primary-light);
    border-radius: 10px;
    font-size: 18px;
    color: var(--gp-primary-dark);
}

/* Icons — restaurant image */
.aa-ItemIcon--picture {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: #f0f0f0;
    overflow: hidden;
    border-radius: 10px;
}

.aa-ItemIcon--picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Icons — location pin */
.aa-ItemIcon--location {
    background: #f0f0f0;
    color: #666;
}

/* Content */
.aa-ItemContent {
    flex: 1;
    min-width: 0;
}

.aa-ItemTitle {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-spacing: 0;
}

.aa-ItemTitle mark {
    background: transparent;
    font-weight: inherit;
    color: var(--gp-primary-dark);
    padding: 0;
    margin: 0;
}

.aa-ItemSubtitle {
    font-size: 13px;
    color: #999;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Rating badge */
.aa-ItemRating {
    background: var(--gp-primary-dark);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    min-width: 36px;
    text-align: center;
}

/* Explore quick-link icons */
.aa-ItemIcon--explore {
    background: #f5f0ff;
    color: #6b21a8;
}
