/*
 * REGGAETON LAB
 * Corrección visual del buscador / selector de ordenamiento.
 *
 * El select nativo estaba usando su flecha propia y podía desbordar
 * el contenedor. Aquí se elimina esa flecha y se dibuja una controlada
 * dentro del bloque.
 */

.catalog-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 330px);
}

.sort-box {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-left: 1px solid var(--soft-line);
}

.sort-box span {
    flex: 0 0 auto;
    padding-left: 18px;
    padding-right: 10px;
    white-space: nowrap;
}

.sort-box select {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 60px;
    margin: 0;
    padding: 0 44px 0 8px;
    border: 0;
    outline: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
    line-height: 1.2;

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.sort-box select::-ms-expand {
    display: none;
}

.sort-box::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 18px;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--ink);
    border-bottom: 1.5px solid var(--ink);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.sort-box:focus-within {
    background: #fafafa;
}

@media (max-width: 640px) {
    .catalog-toolbar {
        grid-template-columns: 1fr;
    }

    .sort-box {
        border-left: 0;
        border-top: 1px solid var(--soft-line);
    }
}

/* =========================================================
   BUSCADOR Y PRECIO — MEJORAS DE JERARQUÍA VISUAL
   ========================================================= */

.search-box {
    position: relative;
    min-width: 0;
    padding: 0 20px;
    background: #fafafa;
    transition:
        background .18s ease,
        box-shadow .18s ease;
}

.search-box::after {
    content: "";
    position: absolute;
    right: 20px;
    bottom: 0;
    left: 54px;
    height: 2px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .2s ease;
}

.search-box:hover {
    background: #f7f7f7;
}

.search-box:focus-within {
    z-index: 2;
    background: #ffffff;
    box-shadow: inset 0 0 0 2px var(--ink);
}

.search-box:focus-within::after {
    transform: scaleX(1);
}

.search-box svg {
    width: 19px;
    height: 19px;
    margin-right: 16px;
    stroke-width: 1.8;
    transition: transform .18s ease;
}

.search-box:focus-within svg {
    transform: scale(1.08);
}

.search-box input {
    min-width: 0;
    height: 60px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -.01em;
}

.search-box input::placeholder {
    color: #7a7a7a;
    font-weight: 500;
}

.product-card__footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--soft-line);
    align-items: center;
}

.product-card__price {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    font-size: 31px;
    line-height: .92;
    font-weight: 900;
    letter-spacing: -.055em;
}

.product-card__price::before {
    content: "PRECIO";
    color: var(--muted);
    font-size: 8px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .15em;
}

@media (max-width: 640px) {
    .search-box {
        padding-inline: 16px;
    }

    .search-box::after {
        right: 16px;
        left: 50px;
    }

    .product-card__price {
        font-size: 28px;
    }
}
