.lr-product-search {
    position: relative;
    z-index: 20;
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 42px;
    padding: 28px 15px 0;
    font-family: inherit;
}

.lr-product-search__form {
    position: relative;
    margin: 0;
}

.lr-product-search__header {
    display: block;
}

.lr-product-search__label {
    display: block;
    margin: 0 0 10px;
    color: #d10d24;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.lr-product-search__close {
    display: none;
}

.lr-product-search__control {
    position: relative;
}

.lr-product-search__icon {
    position: absolute;
    top: 50%;
    left: 18px;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    fill: none;
    stroke: #d10d24;
    stroke-linecap: round;
    stroke-width: 2;
    pointer-events: none;
}

.lr-product-search__input {
    width: 100%;
    height: 56px;
    padding: 0 52px 0 54px;
    border: 2px solid #dedede;
    border-radius: 8px;
    background: #fff;
    color: #242424;
    font: inherit;
    font-size: 17px;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.lr-product-search__input::placeholder {
    color: #737373;
    opacity: 1;
}

.lr-product-search__input:focus {
    border-color: #d10d24;
    box-shadow: 0 0 0 3px rgba(209, 13, 36, 0.14);
}

.lr-product-search__clear {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 38px;
    height: 38px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #696969;
    font-size: 28px;
    line-height: 36px;
    cursor: pointer;
}

.lr-product-search__clear:hover,
.lr-product-search__clear:focus-visible {
    background: #f3f3f3;
    color: #d10d24;
}

.lr-product-search__results {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 50;
    width: 100%;
    max-height: 430px;
    overflow-y: auto;
    border: 1px solid #dedede;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(35, 35, 35, 0.16);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Mantiene el contacto flotante visible sin poner el buscador debajo de la grilla. */
.whatsapp-btn {
    z-index: 80 !important;
}

.lr-product-search__item {
    display: flex;
    align-items: center;
    min-height: 76px;
    padding: 10px 14px;
    border-bottom: 1px solid #ededed;
    color: #242424;
    text-decoration: none;
    transition: background-color 120ms ease;
}

.lr-product-search__item:last-child {
    border-bottom: 0;
}

.lr-product-search__item:hover,
.lr-product-search__item[aria-selected="true"] {
    background: #fff4f4;
    color: #242424;
    text-decoration: none;
}

.lr-product-search__item img {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    margin: 0 14px 0 0;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    object-fit: contain;
    background: #fff;
}

.lr-product-search__copy {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.lr-product-search__title-row {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
}

.lr-product-search__copy strong {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    color: #343434;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lr-product-search__category {
    flex: 0 0 auto;
    padding: 3px 7px;
    border: 1px solid rgba(209, 13, 36, 0.24);
    border-radius: 4px;
    background: #fff3f3;
    color: #a8191e;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
}

.lr-product-search__meta {
    color: #d10d24;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
}

.lr-product-search__meta .amount,
.lr-product-search__meta bdi {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.lr-product-search__unit {
    margin-left: 5px;
    font-size: 12px;
    font-weight: 600;
}

.lr-product-search__arrow {
    flex: 0 0 auto;
    margin-left: 12px;
    color: #d10d24;
    font-size: 22px;
}

.lr-product-search__status {
    padding: 18px;
    color: #5f5f5f;
    font-size: 15px;
    text-align: center;
}

.lr-stock-legal.stock {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: calc(100% - 30px);
    margin: 42px 15px 30px;
    padding: 10px;
    border: 0;
    border-radius: 5px;
    background: #f4bc01;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
}

.lr-stock-legal.stock svg {
    width: 30px;
    min-width: 30px;
    height: auto;
    margin-right: 0;
    margin-left: 0;
    fill: #fff;
}

.lr-product-search--single {
    margin-bottom: 28px;
    padding-right: 0;
    padding-left: 0;
}

.lr-stock-legal--single.stock {
    justify-content: flex-start;
    width: 100%;
    margin-top: 5px;
    margin-right: 0;
    margin-left: 0;
    text-align: left;
}

@media (min-width: 768px) {
    .lr-product-search {
        padding-right: 2px;
    }
}

@media (max-width: 767px) {
    body.lr-product-search-modal-open {
        position: fixed;
        width: 100%;
        overflow: hidden;
    }

    body.lr-product-search-modal-open .whatsapp-btn {
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    body.lr-product-search-near-whatsapp .whatsapp-btn::before {
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .lr-product-search {
        margin-bottom: 4px;
        padding: 20px 0 0;
    }

    .lr-product-search--modal {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 2147483000;
        width: 100vw;
        height: 100vh;
        min-height: 100vh;
        margin: 0;
        padding: 0;
        overflow: hidden;
        background: #fff;
        isolation: isolate;
    }

    .lr-product-search--modal .lr-product-search__form {
        position: absolute;
        top: var(--lr-mobile-search-top, 0);
        right: 0;
        left: 0;
        display: flex;
        box-sizing: border-box;
        width: 100%;
        height: var(--lr-mobile-search-height, 100dvh);
        min-height: 0;
        padding: 20px 16px max(16px, env(safe-area-inset-bottom));
        flex-direction: column;
        background: #fff;
    }

    .lr-product-search--modal .lr-product-search__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 12px;
    }

    .lr-product-search__label {
        font-size: 19px;
    }

    .lr-product-search--modal .lr-product-search__label {
        margin: 0;
        font-size: 22px;
    }

    .lr-product-search--modal .lr-product-search__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: #f5f1f1;
        color: #a8191e;
        font: inherit;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
    }

    .lr-product-search__input {
        height: 52px;
        padding-left: 48px;
        font-size: 16px;
    }

    .lr-product-search__input:placeholder-shown {
        padding-right: 12px;
    }

    .lr-product-search__icon {
        left: 15px;
        width: 20px;
        height: 20px;
    }

    .lr-product-search--modal .lr-product-search__results {
        position: static;
        flex: 1 1 auto;
        box-sizing: border-box;
        width: 100%;
        min-height: 0;
        max-height: none;
        margin-top: 12px;
        padding-bottom: var(--lr-mobile-keyboard-inset, 0px);
        overflow-y: auto;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .lr-product-search--modal .lr-product-search__item {
        border-right: 1px solid #dedede;
        border-left: 1px solid #dedede;
        background: #fff;
    }

    .lr-product-search--modal .lr-product-search__item:first-child {
        border-top: 1px solid #dedede;
        border-radius: 8px 8px 0 0;
    }

    .lr-product-search--modal .lr-product-search__item:last-child {
        border-bottom: 1px solid #dedede;
        border-radius: 0 0 8px 8px;
    }

    .lr-product-search--modal .lr-product-search__item:only-child {
        border-radius: 8px;
    }

    .lr-product-search--modal .lr-product-search__status {
        border: 1px solid #dedede;
        border-radius: 8px;
        background: #fff;
    }

    .lr-product-search__item {
        min-height: 70px;
        padding: 8px 10px;
    }

    .lr-product-search__item img {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
        margin-right: 11px;
    }

    .lr-product-search__copy strong {
        font-size: 17px;
        font-weight: 600;
    }

    .lr-product-search__meta {
        font-size: 13px;
        font-weight: 600;
    }

    .lr-product-search__unit {
        font-size: 11px;
    }

    .lr-product-search__arrow {
        display: none;
    }

    .lr-stock-legal.stock {
        margin-top: 28px;
        margin-bottom: 24px;
        font-size: 16px;
    }

    .lr-product-search--single {
        margin-bottom: 20px;
    }

    .lr-stock-legal--single.stock {
        margin-top: 0;
        margin-right: 0;
        margin-left: 0;
    }
}

@media (max-width: 360px) {
    .lr-product-search__input {
        padding-left: 44px;
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lr-product-search__input,
    .lr-product-search__item {
        transition: none;
    }
}
