/* ═══════════════════════════════════════════════════════════════
   search-overlay.css — Faceted search overlay styles
   ═══════════════════════════════════════════════════════════════ */

.search-overlay-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10000;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Section headers ────────────────────────────────── */

.search-overlay__section {
    border-bottom: 1px solid #eee;
}

.search-overlay__section:last-of-type {
    border-bottom: none;
}

.search-overlay__section-title {
    padding: 10px 16px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.5px;
}

/* ── Product items ──────────────────────────────────── */

.search-overlay__item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    text-decoration: none;
    color: #333;
    transition: background 0.15s ease;
    cursor: pointer;
}

.search-overlay__item:hover,
.search-overlay__item--active {
    background: #f5f5f5;
    text-decoration: none;
    color: #333;
}

.search-overlay__item-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-overlay__item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.search-overlay__item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.search-overlay__item-name {
    font-size: 13px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.search-overlay__item-name em {
    font-style: normal;
    font-weight: 700;
    color: #0066cc;
}

.search-overlay__item-brand {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.search-overlay__item-etiquetas {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 3px;
}

.search-overlay__etiqueta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: #fff;
    background: #e91e63;
    padding: 1px 6px;
    border-radius: 3px;
    line-height: 1.4;
}

.search-overlay__etiqueta-icon {
    width: 12px;
    height: 12px;
    object-fit: contain;
}

.search-overlay__item-price {
    font-size: 14px;
    font-weight: 700;
    color: #e63946;
    white-space: nowrap;
    margin-left: 12px;
}

/* ── Blog post items ────────────────────────────────── */

.search-overlay__blog-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    text-decoration: none;
    color: #333;
    transition: background 0.15s ease;
    cursor: pointer;
}

.search-overlay__blog-item:hover,
.search-overlay__blog-item.search-overlay__item--active {
    background: #f5f5f5;
    text-decoration: none;
    color: #333;
}

.search-overlay__blog-image {
    width: 60px;
    height: 40px;
    flex-shrink: 0;
    margin-right: 12px;
    border-radius: 4px;
    overflow: hidden;
}

.search-overlay__blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-overlay__blog-info {
    flex: 1;
    min-width: 0;
}

.search-overlay__blog-title {
    font-size: 13px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.search-overlay__blog-meta {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.search-overlay__blog-category {
    display: inline-block;
    background: #e8f4fd;
    color: #0066C9;
    padding: 0 6px;
    border-radius: 3px;
    font-size: 10px;
    margin-right: 6px;
}

/* ── Category / Brand tags ──────────────────────────── */

.search-overlay__tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    transition: background 0.15s ease;
    cursor: pointer;
}

.search-overlay__tag:hover,
.search-overlay__tag.search-overlay__item--active {
    background: #f5f5f5;
    text-decoration: none;
    color: #333;
}

.search-overlay__tag-count {
    font-size: 11px;
    color: #999;
    background: #eee;
    border-radius: 10px;
    padding: 2px 8px;
    margin-left: 8px;
}

/* ── Empty state ────────────────────────────────────── */

.search-overlay__empty {
    padding: 24px 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ── Footer (view all) ──────────────────────────────── */

.search-overlay__footer {
    border-top: 1px solid #eee;
    text-align: center;
    padding: 12px 16px;
}

.search-overlay__view-all {
    color: #0066cc;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.search-overlay__view-all:hover {
    text-decoration: underline;
}

/* ── Responsive: position relative to header ────────── */

/* Desktop: position overlay below the search box in the header */
.search_box {
    position: relative;
}

/* Mobile: full-width overlay below the mobile search bar */
@media (max-width: 450px) {
    .search-overlay-dropdown {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: calc(100vh - 60px);
        border-radius: 0;
        border: none;
        border-top: 1px solid #ddd;
        z-index: 100000002;
    }
}
