/* =============================================================
   SocialBiteHub — directorio.css
   Dark gastronómico · Glassmorphism profundo · Hover cinematográfico
   Compatible con slides.css · Clases sbh-* · Sin !important salvo necesario
   ============================================================= */

/* -----------------------------------------------
   VARIABLES
   ----------------------------------------------- */

:root {
    --sbh-glass-bg:       rgba(8,10,16,0.75);
    --sbh-glass-bg-hover: rgba(8,10,16,0.88);
    --sbh-glass-border:   rgba(255,255,255,0.1);
    --sbh-glass-border-h: rgba(255,255,255,0.22);
    --sbh-blur:           blur(22px);
    --sbh-blue:           #2196f3;
    --sbh-blue-glow:      rgba(33,150,243,0.35);
    --sbh-text:           #fff;
    --sbh-text-dim:       rgba(255,255,255,0.55);
    --sbh-text-ghost:     rgba(255,255,255,0.35);
    --sbh-radius-card:    16px;
    --sbh-radius-pill:    50px;
    --sbh-transition:     0.3s cubic-bezier(0.25,0.8,0.25,1);
}

/* -----------------------------------------------
   WRAPPER PRINCIPAL
   ----------------------------------------------- */

.sbh-dir-wrap {
    padding: 88px 5% 60px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100%;
}

/* -----------------------------------------------
   HEADER
   ----------------------------------------------- */

.sbh-dir-header {
    background: rgba(8,10,16,0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.sbh-dir-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.sbh-dir-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.sbh-dir-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--sbh-text);
    margin: 0;
    letter-spacing: -0.03em;
}

.sbh-results-badge {
    background: rgba(33,150,243,0.12);
    border: 1px solid rgba(33,150,243,0.25);
    border-radius: var(--sbh-radius-pill);
    padding: 3px 12px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(33,150,243,0.9);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* -----------------------------------------------
   BUSCADOR
   ----------------------------------------------- */

.sbh-search-box {
    display: inline-flex;
    align-items: center;
    background: var(--sbh-glass-bg);
    backdrop-filter: var(--sbh-blur);
    -webkit-backdrop-filter: var(--sbh-blur);
    border: 1px solid var(--sbh-glass-border);
    border-radius: var(--sbh-radius-pill);
    padding: 8px 8px 8px 20px;
    gap: 10px;
    min-width: 300px;
    transition: background var(--sbh-transition),
                border-color var(--sbh-transition),
                box-shadow var(--sbh-transition);
}

.sbh-search-box:focus-within {
    background: rgba(255,255,255,0.11);
    border-color: rgba(33,150,243,0.5);
    box-shadow: 0 0 0 3px rgba(33,150,243,0.12),
                0 8px 24px rgba(0,0,0,0.2);
}

.sbh-search-box > i {
    color: var(--sbh-text-ghost);
    font-size: 13px;
    flex-shrink: 0;
}

.sbh-search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--sbh-text);
    font-size: 14px;
    font-family: inherit;
    font-weight: 300;
    flex: 1;
    min-width: 0;
}

.sbh-search-box input::placeholder { color: var(--sbh-text-ghost); }

.sbh-search-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--sbh-blue);
    border: none;
    outline: none;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.sbh-search-btn:hover {
    background: #1976d2;
    transform: scale(1.08);
    box-shadow: 0 4px 16px var(--sbh-blue-glow);
}

/* -----------------------------------------------
   FILTROS
   ----------------------------------------------- */

.sbh-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.sbh-filter-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--sbh-glass-bg);
    backdrop-filter: var(--sbh-blur);
    -webkit-backdrop-filter: var(--sbh-blur);
    border: 1px solid var(--sbh-glass-border);
    border-radius: var(--sbh-radius-pill);
    padding: 8px 14px;
    transition: background var(--sbh-transition), border-color var(--sbh-transition);
    cursor: pointer;
}

.sbh-filter-pill:hover {
    background: var(--sbh-glass-bg-hover);
    border-color: var(--sbh-glass-border-h);
}

.sbh-filter-pill > i:first-child {
    color: var(--sbh-text-dim);
    font-size: 11px;
    flex-shrink: 0;
    pointer-events: none;
}

.sbh-filter-select {
    background: transparent;
    border: none;
    outline: none;
    color: var(--sbh-text);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    margin: 0;
    min-width: 80px;
}

.sbh-filter-select option {
    background: #0f1117;
    color: #fff;
    font-weight: 400;
}

.sbh-filter-clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--sbh-text-ghost);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--sbh-radius-pill);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.sbh-filter-clear:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.08);
}

/* -----------------------------------------------
   LABEL DE BÚSQUEDA ACTIVA
   ----------------------------------------------- */

.sbh-search-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--sbh-text-dim);
    margin-bottom: 22px;
    padding: 6px 14px;
    background: rgba(33,150,243,0.08);
    border: 1px solid rgba(33,150,243,0.15);
    border-radius: var(--sbh-radius-pill);
}

.sbh-search-label i { font-size: 11px; color: var(--sbh-blue); }

.sbh-search-label strong {
    color: rgba(255,255,255,0.9);
    font-weight: 600;
}

/* -----------------------------------------------
   VER TODOS
   ----------------------------------------------- */

.sbh-ver-todos {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sbh-text-dim);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: var(--sbh-radius-pill);
    border: 1px solid var(--sbh-glass-border);
    background: var(--sbh-glass-bg);
    backdrop-filter: var(--sbh-blur);
    -webkit-backdrop-filter: var(--sbh-blur);
    letter-spacing: 0.02em;
    transition: color var(--sbh-transition),
                border-color var(--sbh-transition),
                background var(--sbh-transition),
                box-shadow var(--sbh-transition);
    flex-shrink: 0;
}

.sbh-ver-todos:hover {
    color: #fff;
    border-color: rgba(33,150,243,0.5);
    background: rgba(33,150,243,0.1);
    box-shadow: 0 4px 20px rgba(33,150,243,0.15);
    opacity: 1;
}

.sbh-ver-todos i {
    font-size: 10px;
    transition: transform 0.25s;
}

.sbh-ver-todos:hover i { transform: translateX(4px); }

/* -----------------------------------------------
   GRILLA DE CARDS
   ----------------------------------------------- */

.sbh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* -----------------------------------------------
   CARD
   ----------------------------------------------- */

.sbh-card {
    background: var(--sbh-glass-bg);
    backdrop-filter: var(--sbh-blur);
    -webkit-backdrop-filter: var(--sbh-blur);
    border: 1px solid var(--sbh-glass-border);
    border-radius: var(--sbh-radius-card);
    overflow: hidden;
    text-decoration: none;
    color: var(--sbh-text);
    display: flex;
    flex-direction: column;
    transition: background var(--sbh-transition),
                border-color var(--sbh-transition),
                transform var(--sbh-transition),
                box-shadow var(--sbh-transition);
    position: relative;
}

.sbh-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--sbh-radius-card);
    background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--sbh-transition);
    z-index: 1;
}

.sbh-card:hover {
    background: var(--sbh-glass-bg-hover);
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5),
                0 0 0 1px rgba(255,255,255,0.06);
    color: var(--sbh-text);
    opacity: 1;
}

.sbh-card:hover::before { opacity: 1; }

.sbh-card-img {
    width: 100%;
    height: 165px;
    overflow: hidden;
    background: rgba(8,10,16,0.6);
    flex-shrink: 0;
    position: relative;
}

.sbh-card-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(8,10,16,0.7), transparent);
    pointer-events: none;
    z-index: 1;
}

.sbh-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s cubic-bezier(0.25,0.8,0.25,1);
}

.sbh-card:hover .sbh-card-img img { transform: scale(1.07); }

.sbh-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: rgba(255,255,255,0.08);
    background: linear-gradient(135deg,
        rgba(255,255,255,0.03) 0%,
        rgba(0,0,0,0.15) 100%);
}

.sbh-card-cat-badge {
    position: absolute;
    bottom: 10px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--sbh-radius-pill);
    padding: 4px 11px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    z-index: 2;
}

.sbh-card-cat-badge i {
    font-size: 10px;
    color: var(--sbh-blue);
}

.sbh-card-body {
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    position: relative;
    z-index: 2;
}

.sbh-card-name {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--sbh-text);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.sbh-card-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--sbh-text-dim);
}

.sbh-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
    padding-top: 6px;
}

.sbh-tag {
    font-size: 10px;
    font-weight: 500;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 6px;
    padding: 3px 9px;
    color: var(--sbh-text-dim);
    letter-spacing: 0.02em;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.sbh-card:hover .sbh-tag {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.75);
}

.sbh-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 6px;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.sbh-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--sbh-blue);
    letter-spacing: 0.02em;
    transition: gap 0.25s, color 0.25s;
}

.sbh-card:hover .sbh-card-cta {
    gap: 10px;
    color: #64b5f6;
}

.sbh-card-location {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--sbh-text-ghost);
}

.sbh-card-location i { font-size: 10px; }

/* -----------------------------------------------
   EMPTY STATE
   ----------------------------------------------- */

.sbh-empty {
    text-align: center;
    padding: 80px 20px;
}

.sbh-empty-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 30px;
    color: rgba(255,255,255,0.18);
}

/* -----------------------------------------------
   PAGINACIÓN
   ----------------------------------------------- */

.sbh-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 0 52px;
}

.sbh-page-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--sbh-glass-bg);
    border: 1px solid var(--sbh-glass-border);
    color: var(--sbh-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    text-decoration: none;
    transition: background var(--sbh-transition),
                border-color var(--sbh-transition),
                transform var(--sbh-transition),
                box-shadow var(--sbh-transition);
}

.sbh-page-btn:hover {
    background: rgba(33,150,243,0.15);
    border-color: rgba(33,150,243,0.4);
    color: #fff;
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(33,150,243,0.2);
}

.sbh-page-btn--disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

.sbh-page-info {
    font-size: 13px;
    font-weight: 600;
    color: var(--sbh-text-dim);
    min-width: 60px;
    text-align: center;
    letter-spacing: 0.04em;
}

/* -----------------------------------------------
   RESPONSIVE
   ----------------------------------------------- */

@media (max-width: 767px) {
    .sbh-dir-wrap { padding: 78px 4% 40px; }

    .sbh-dir-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .sbh-search-box {
        min-width: 0;
        width: 100%;
    }

    .sbh-search-box input { width: 100%; }

    .sbh-filters {
        gap: 8px;
        width: 100%;
    }

    .sbh-filter-pill {
        flex: 1;
        min-width: 130px;
    }

    .sbh-filter-select {
        width: 100%;
        min-width: 0;
    }

    .sbh-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .sbh-card-img { height: 185px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .sbh-grid { grid-template-columns: repeat(2, 1fr); }
    .sbh-search-box { min-width: 220px; }
}

@media (min-width: 1024px) {
    .sbh-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* -----------------------------------------------
   CUSTOM DROPDOWNS (JS)
   ----------------------------------------------- */

.sbh-custom-select {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.sbh-custom-trigger {
    background: transparent;
    border: none;
    outline: none;
    color: var(--sbh-text);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.sbh-trigger-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sbh-text-ghost);
    transition: transform 0.22s ease, color 0.22s;
    flex-shrink: 0;
    line-height: 1;
}

.sbh-trigger-arrow svg {
    display: block;
    fill: currentColor;
}

.sbh-trigger-arrow.sbh-arrow-open {
    transform: rotate(180deg);
    color: rgba(255,255,255,0.7);
}

.sbh-custom-dropdown {
    display: none;
    position: fixed;
    min-width: 200px;
    background: rgba(10,12,20,0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 6px;
    z-index: 9999;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7),
                0 0 0 1px rgba(255,255,255,0.04);
    animation: sbhDropIn 0.18s cubic-bezier(0.25,0.8,0.25,1);
    overflow: hidden;
}

.sbh-custom-dropdown.sbh-dropdown-open { display: block; }

@keyframes sbhDropIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@keyframes sbhDropUp {
    from { opacity: 0; transform: translateY(6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.sbh-custom-option {
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 400;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, padding-left 0.15s;
    white-space: nowrap;
}

.sbh-custom-option:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    padding-left: 18px;
}

.sbh-option-selected {
    background: rgba(33,150,243,0.15);
    color: #fff;
    font-weight: 600;
}

.sbh-option-selected::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sbh-blue);
    margin-right: 8px;
    vertical-align: middle;
    position: relative;
    top: -1px;
    box-shadow: 0 0 8px var(--sbh-blue-glow);
}

.sbh-option-selected:hover {
    background: rgba(33,150,243,0.22);
    padding-left: 14px;
}