/* Estilos extraídos del inline de home.blade para el bloque finder */
.block-finder__image {
    display: none;
}
.block-finder__carousel {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 1;
}
.block-finder__carousel .owl-stage-outer,
.block-finder__carousel .owl-stage,
.block-finder__carousel .owl-item {
    height: 100%;
}
.block-finder__slide {
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    width: 100%;
    height: 100%;
    aspect-ratio: 1903 / 640;
    border-radius: 30px;
    transition: all 0.3s ease-in-out;
}
.block-finder__carousel .owl-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    text-align: center;
    z-index: 2;
}
.block-finder__carousel .owl-dots .owl-dot span {
    width: 10px;
    height: 10px;
    display: inline-block;
    margin: 0 4px;
    background: #f25900; /* corregido color */
    opacity: 0.5;
    border-radius: 50%;
}
.block-finder__carousel .owl-dots .owl-dot.active span {
    opacity: 1;
}
.block-finder__controls {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 3;
    pointer-events: none;
}
.block-finder__arrow {
    position: absolute;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    pointer-events: auto;
}
[dir="ltr"] .block-finder__arrow--prev {
    left: 12px;
}
[dir="ltr"] .block-finder__arrow--next {
    right: 12px;
}
[dir="rtl"] .block-finder__arrow--prev {
    right: 12px;
}
[dir="rtl"] .block-finder__arrow--next {
    left: 12px;
}

/* -------------------------------
   Categorías (grid inferior)
   Evitar que los nombres desborden el cuadro
-------------------------------- */
.block-brands__item {
    overflow: hidden;
}
.block-brands__item-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 10px;
}
.block-brands__item-name {
    margin-top: 6px;
    padding: 0 6px;
    line-height: 1.25;
    max-height: calc(1.25em * 2); /* 2 líneas */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* Ajustes móviles: finder 2x2 y features 2x2 */
@media (max-width: 767.98px) {
    /* Finder en 2 columnas */
    .block-finder__form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 22px;
        padding: 12px 12px 16px;
    }
    .block-finder__form-control {
        margin: 0 !important;
        width: 100% !important;
        -ms-flex-preferred-size: auto !important;
        flex-basis: auto !important;
    }
    .block-finder__form-control--button {
        grid-column: 1 / -1;
        width: 100%;
        height: 40px;
        border-radius: 10px;
        font-weight: 600;
    }
    /* Select2 compacto y legible */
    .block-finder__form-control--select .select2-container {
        width: 100% !important;
    }
    .block-finder__form-control--select .select2-selection--single {
        height: 40px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        border: 1px solid #e5e7eb;
        box-shadow: none;
    }
    .block-finder__form-control--select .select2-selection__rendered {
        line-height: 40px;
        padding-left: 12px;
        font-size: 13px;
    }
    .block-finder__form-control--select .select2-selection__arrow {
        height: 40px;
    }
    .block-finder__form-control--select select {
        font-size: 13px;
    }
    .block-finder__form .select2-container .select2-results__option {
        font-size: 13px;
        padding: 6px 10px;
    }
    .block-finder__form .select2-dropdown .select2-search__field {
        font-size: 13px;
    }

    /* Features en 2x2 */
    .block-features__list {
        display: masonry;
        grid-template-columns: 1fr 1fr;
        gap: 12px 16px;
    }
    .block-features__item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 8px;
        border-radius: 12px;
        background: #ffffff;
    }
    .block-features__item-icon svg {
        width: 36px;
        height: 36px;
    }
    .block-features__item-title {
        font-size: 13px;
        line-height: 1.25;
    }
}

@media (max-width: 575.98px) {
    .block-brands__item-name {
        -webkit-line-clamp: 2;
        line-clamp: 2;
        max-height: calc(1.25em * 2);
        font-size: 0.75rem;
    }
    .block-features__list {
        display: masonry;
        grid-template-columns: 1fr 1fr;
        gap: 12px 16px;
    }
    .block-features__item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 8px;
        border-radius: 12px;
        background: #ffffff;
    }
    .block-features__item-icon svg {
        width: 30px;
        height: 30px;
    }
    .block-features__item-title {
        font-size: 10px;
        line-height: 1.25;
    }
}

@media (max-width: 400px) {
    .block-brands__item-name {
        -webkit-line-clamp: 2;
        line-clamp: 2;
        max-height: calc(1.25em * 2);
        font-size: 0.75rem;
    }
    .block-features__list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px 16px;
    }
    .block-features__item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 8px;
        border-radius: 12px;
        background: #ffffff;
    }
    .block-features__item-icon svg {
        width: 30px;
        height: 30px;
    }
    .block-features__item-title {
        font-size: 10px;
        line-height: 1.25;
    }
}

@media (max-width: 1900px) {
    .block-finder {
        position: relative;
        height: 594px;
        overflow: hidden;
        padding-top: 24px;
        padding-bottom: 60px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        background: #ffffff;
        border-radius: 30px;
        /* margin: 27px; */
        -webkit-border-radius: 30px;
        -moz-border-radius: 30px;
        -ms-border-radius: 30px;
        -o-border-radius: 30px;
        margin-left: 30px;
        margin-right: 30px;
    }
}
@media (max-width: 1800px) {
    .block-finder {
        position: relative;
        height: 562px;
        overflow: hidden;
        padding-top: 24px;
        padding-bottom: 60px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        background: #ffffff;
        border-radius: 30px;
        /* margin: 27px; */
        -webkit-border-radius: 30px;
        -moz-border-radius: 30px;
        -ms-border-radius: 30px;
        -o-border-radius: 30px;
        margin-left: 30px;
        margin-right: 30px;
    }
}
@media (max-width: 1700px) {
    .block-finder {
        position: relative;
        height: 529px;
        overflow: hidden;
        padding-top: 24px;
        padding-bottom: 60px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        background: #ffffff;
        border-radius: 30px;
        /* margin: 27px; */
        -webkit-border-radius: 30px;
        -moz-border-radius: 30px;
        -ms-border-radius: 30px;
        -o-border-radius: 30px;
        margin-left: 30px;
        margin-right: 30px;
    }
}
@media (max-width: 1600px) {
    .block-finder {
        position: relative;
        height: 489px;
        overflow: hidden;
        padding-top: 24px;
        padding-bottom: 60px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        background: #ffffff;
        border-radius: 30px;
        /* margin: 27px; */
        -webkit-border-radius: 30px;
        -moz-border-radius: 30px;
        -ms-border-radius: 30px;
        -o-border-radius: 30px;
        margin-left: 30px;
        margin-right: 30px;
    }
}
@media (max-width: 1500px) {
    .block-finder {
        position: relative;
        height: 434px;
        overflow: hidden;
        padding-top: 24px;
        padding-bottom: 60px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        background: #ffffff;
        border-radius: 30px;
        /* margin: 27px; */
        -webkit-border-radius: 30px;
        -moz-border-radius: 30px;
        -ms-border-radius: 30px;
        -o-border-radius: 30px;
        margin-left: 30px;
        margin-right: 30px;
    }
}
/* Mostrar imágenes completas (sin recorte) en móviles */
@media (max-width: 1300px) {
    /* .block-finder__form-control {
        height: 21px;
        min-height: 31px;
    }
    .block-finder__form-control--button {
        margin-top: 9px;
    } */
    /* Un poco más compacto en teléfonos pequeños */
    .block-finder {
        position: relative;
        height: 409px;
        overflow: hidden;
        padding-top: 24px;
        padding-bottom: 60px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        background: #ffffff;
        border-radius: 30px;
        /*margin: 27px;*/
        -webkit-border-radius: 30px;
        -moz-border-radius: 30px;
        -ms-border-radius: 30px;
        -o-border-radius: 30px;
        margin-left: 0px;
        margin-right: 0px;
    }
    .block-finder__slide {
        background-position: center;
        background-repeat: no-repeat;
        background-size: contain;
        width: 100%;
        height: auto;
        aspect-ratio: 1903 / 640;
        border-radius: 16px;
        transition: all 0.3s ease-in-out;
        -webkit-transition: all 0.3s ease-in-out;
        -moz-transition: all 0.3s ease-in-out;
        -ms-transition: all 0.3s ease-in-out;
        -o-transition: all 0.3s ease-in-out;
    }
}
/* Mostrar imágenes completas (sin recorte) en móviles */
@media (max-width: 991.98px) {
    /* .block-finder__form-control {
        height: 21px;
        min-height: 31px;
    }
    .block-finder__form-control--button {
        margin-top: 9px;
    } */
    /* Un poco más compacto en teléfonos pequeños */
    .block-finder {
        position: relative;
        height: 327px;
        overflow: hidden;
        padding-top: 24px;
        padding-bottom: 60px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        background: #ffffff;
        border-radius: 30px;
        /*margin: 27px;*/
        -webkit-border-radius: 30px;
        -moz-border-radius: 30px;
        -ms-border-radius: 30px;
        -o-border-radius: 30px;
        margin-left: 0px;
        margin-right: 0px;
    }
    .block-finder__slide {
        background-position: center;
        background-repeat: no-repeat;
        background-size: contain;
        width: 100%;
        height: auto;
        aspect-ratio: 1903 / 640;
        border-radius: 16px;
        transition: all 0.3s ease-in-out;
        -webkit-transition: all 0.3s ease-in-out;
        -moz-transition: all 0.3s ease-in-out;
        -ms-transition: all 0.3s ease-in-out;
        -o-transition: all 0.3s ease-in-out;
    }
}
@media (max-width: 700px) {
    .block-finder__form-control {
        height: 21px;
        min-height: 31px;
    }
    .block-finder__form-control--button {
        margin-top: 9px;
    }
    /* Un poco más compacto en teléfonos pequeños */
    .block-finder {
        position: relative;
        height: 216px;
        overflow: hidden;
        padding-top: 0px;
        padding-bottom: 0px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        background: #ffffff;
        border-radius: 30px;
        /*margin: 27px;*/
        -webkit-border-radius: 30px;
        -moz-border-radius: 30px;
        -ms-border-radius: 30px;
        -o-border-radius: 30px;
        margin-left: 0px;
        margin-right: 0px;
    }

    .block-finder__slide {
        background-position: center;
        background-repeat: no-repeat;
        background-size: contain;
        width: 100%;
        height: 225px;
        aspect-ratio: 1903 / 878;
        border-radius: 16px;
        transition: all 0.3s ease-in-out;
        -webkit-transition: all 0.3s ease-in-out;
        -moz-transition: all 0.3s ease-in-out;
        -ms-transition: all 0.3s ease-in-out;
        -o-transition: all 0.3s ease-in-out;
    }
}
@media (max-width: 575.98px) {
    .block-finder__form-control {
        height: 21px;
        min-height: 31px;
    }
    .block-finder__form-control--button {
        margin-top: 9px;
    }
    /* Un poco más compacto en teléfonos pequeños */
    .block-finder {
        position: relative;
        height: 145px;
        overflow: hidden;
        padding-top: 0px;
        padding-bottom: 0px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        background: #ffffff;
        border-radius: 30px;
        margin: 0px !important;
        -webkit-border-radius: 30px;
        -moz-border-radius: 30px;
        -ms-border-radius: 30px;
        -o-border-radius: 30px;
        margin-left: 0px;

        margin-right: 0px;
    }
    .block-finder__slide {
        background-position: center;
        background-repeat: no-repeat;
        background-size: contain;
        width: 100%;
        height: 146px;
        aspect-ratio: 1903 / 640;
        border-radius: 16px;
        transition: all 0.3s ease-in-out;
        -webkit-transition: all 0.3s ease-in-out;
        -moz-transition: all 0.3s ease-in-out;
        -ms-transition: all 0.3s ease-in-out;
        -o-transition: all 0.3s ease-in-out;
    }
    .block-finder__form-control {
        -ms-flex-negative: 0;
        flex-shrink: 0;
        -webkit-box-flex: 0;
        -ms-flex-positive: 0;
        flex-grow: 0;
        width: 260px;
        -ms-flex-preferred-size: 260px;
        flex-basis: 175px;
        margin-top: 22px;
    }
}

/* Ajustes para tablet chica (576px–991.98px):
   - Finder mantiene 2 columnas, con controles un poco más altos y legibles
   - Select2 con tipografía 14px y altura 44px
   - Features en 2x2 con espacios un poco mayores */
@media (min-width: 576px) and (max-width: 991.98px) {
    /* Finder en 2 columnas y espaciado cómodo */
    .block-finder__form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px 20px;
        padding: 16px 16px 20px;
    }
    .block-finder__form-control {
        margin: 0 !important;
        width: 100% !important;
        -ms-flex-preferred-size: auto !important;
        flex-basis: auto !important;
    }
    .block-finder__form-control--button {
        grid-column: 1 / -1;
        width: 100%;
        height: 44px;
        border-radius: 12px;
        font-weight: 600;
        font-size: 15px;
    }

    /* Select2 ligeramente más grande para tablet */
    .block-finder__form-control--select .select2-container {
        width: 100% !important;
    }
    .block-finder__form-control--select .select2-selection--single {
        height: 44px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        border: 1px solid #e5e7eb;
        box-shadow: none;
    }
    .block-finder__form-control--select .select2-selection__rendered {
        line-height: 44px;
        padding-left: 12px;
        font-size: 14px;
    }
    .block-finder__form-control--select .select2-selection__arrow {
        height: 44px;
    }
    .block-finder__form-control--select select {
        font-size: 14px;
    }
    .block-finder__form .select2-container .select2-results__option {
        font-size: 14px;
        padding: 7px 10px;
    }
    .block-finder__form .select2-dropdown .select2-search__field {
        font-size: 14px;
    }

    /* Features en 2 columnas con mejor ritmo visual */
    .block-features__list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .block-features__item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        border-radius: 12px;
        background: #ffffff;
    }
    .block-features__item-icon svg {
        width: 32px;
        height: 32px;
    }
    .block-features__item-title {
        font-size: 14px;
        line-height: 1.3;
    }
}
