/* =========================================================
   SEARCH AUTOCOMPLETE v1 — Loja da Barba
   Para reverter: remova as linhas deste arquivo no header.twig
   ========================================================= */

.ldb-search-wrap {
    position: relative;
}

.ldb-autocomplete-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #E8ECE9;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(30, 57, 42, 0.14);
    z-index: 1000010;
    max-height: 420px;
    overflow-y: auto;
    display: none;
    -webkit-overflow-scrolling: touch;
    font-family: "Lexend", sans-serif;
}

.ldb-autocomplete-panel.is-open {
    display: block;
    animation: ldbAcIn 0.22s ease;
}

@keyframes ldbAcIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ldb-ac-section {
    padding: 6px 0;
    border-bottom: 1px solid #F2F4F3;
}

.ldb-ac-section:last-child {
    border-bottom: none;
}

.ldb-ac-heading {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #8A8A8A;
    padding: 8px 14px 4px;
}

.ldb-ac-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: #222;
    transition: background 0.15s ease;
    cursor: pointer;
}

.ldb-ac-item:hover,
.ldb-ac-item:focus,
.ldb-ac-item.is-highlighted {
    background: #F4F8F5;
    outline: none;
}

.ldb-ac-product-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: #F5F5F5;
    border: 1px solid #EEF0EE;
    flex-shrink: 0;
}

.ldb-ac-product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ldb-ac-product-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--ldb-title, #5C6670);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.ldb-ac-item:hover .ldb-ac-product-name,
.ldb-ac-item.is-highlighted .ldb-ac-product-name {
    color: var(--ldb-title-hover, #1E392A);
}

.ldb-ac-product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ldb-ac-price-current {
    font-size: 13px;
    font-weight: 700;
    color: var(--ldb-price-regular, #1E392A);
}

.ldb-ac-price-current.is-special {
    color: var(--ldb-price-promo-value, #B8923A);
}

.ldb-ac-price-old {
    font-size: 11px;
    color: var(--ldb-price-striked, #9CA3A0);
    text-decoration: line-through;
}

.ldb-ac-cat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1E392A, #2d5a42);
    color: #D4AF68;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.ldb-ac-cat-name,
.ldb-ac-term-text {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--ldb-title, #5C6670);
    transition: color 0.15s ease;
}

.ldb-ac-item:hover .ldb-ac-cat-name,
.ldb-ac-item:hover .ldb-ac-term-text,
.ldb-ac-item.is-highlighted .ldb-ac-cat-name,
.ldb-ac-item.is-highlighted .ldb-ac-term-text {
    color: var(--ldb-title-hover, #1E392A);
}

.ldb-ac-term-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #F4F7F5;
    color: #D4AF68;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.ldb-ac-arrow {
    font-size: 10px;
    color: #ccc;
    flex-shrink: 0;
}

.ldb-ac-empty,
.ldb-ac-loading {
    padding: 20px 16px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

.ldb-ac-loading i {
    color: #D4AF68;
    margin-right: 6px;
}

.ldb-ac-footer {
    padding: 10px 14px;
    border-top: 1px solid #F0F2F1;
    background: #FAFBFA;
    border-radius: 0 0 14px 14px;
}

.ldb-ac-footer a {
    display: block;
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ldb-price-regular, #1E392A);
    text-decoration: none;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.ldb-ac-footer a:hover {
    background: #EEF4F0;
    color: var(--ldb-price-promo-value, #B8923A);
}

/* Desktop header search */
header#site-header #search.ldb-search-wrap {
    position: relative;
}

header#site-header #search .ldb-autocomplete-panel {
    border-radius: 16px;
}

@media (min-width: 992px) {
    .ldb-autocomplete-panel {
        min-width: 100%;
    }
}
