body {
    background-color: #f5f5f5;
    color: #333;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* Evitar el scroll horizontal */
}

p {
    margin: 0 0 0 0;
}
h1, h2, h3 {
    margin: 0;
}
h2 {
    font-size: 1.5rem;
}
header {
    text-align: center;
    height: auto;
    min-height: 10vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    padding-top: 0.25vh;
    padding-bottom: 1vh;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

.header-gradient {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(90deg, rgba(255, 0, 102, 0) 20%, rgba(255, 0, 102, 0.0980392) 20%, rgba(255, 0, 102, 0.0980392) 40%, rgba(255, 0, 102, 0.2) 40%, rgba(255, 0, 102, 0.2) 60%, rgba(255, 0, 102, 0.4) 60%, rgba(255, 0, 102, 0.4) 80%, rgba(255, 0, 102, 0.6) 80%),
        linear-gradient(180deg, rgba(255, 0, 102, 0) 20%, rgba(255, 0, 102, 0.0980392) 20%, rgba(255, 0, 102, 0.0980392) 40%, rgba(255, 0, 102, 0.2) 40%, rgba(255, 0, 102, 0.2) 60%, rgba(255, 0, 102, 0.4) 60%, rgba(255, 0, 102, 0.4) 80%, rgba(255, 0, 102, 0.6) 80%),
        rgb(255, 204, 0);
    background: -moz-linear-gradient(0deg, rgba(255, 0, 102, 0) 20%, rgba(255, 0, 102, 0.0980392) 20%, rgba(255, 0, 102, 0.0980392) 40%, rgba(255, 0, 102, 0.2) 40%, rgba(255, 0, 102, 0.2) 60%, rgba(255, 0, 102, 0.4) 60%, rgba(255, 0, 102, 0.4) 80%, rgba(255, 0, 102, 0.6) 80%), -moz-linear-gradient(-90deg, rgba(255, 0, 102, 0) 20%, rgba(255, 0, 102, 0.0980392) 20%, rgba(255, 0, 102, 0.0980392) 40%, rgba(255, 0, 102, 0.2) 40%, rgba(255, 0, 102, 0.2) 60%, rgba(255, 0, 102, 0.4) 60%, rgba(255, 0, 102, 0.4) 80%, rgba(255, 0, 102, 0.6) 80%), rgb(255, 204, 0);
    background: linear-gradient(0deg, rgba(255, 0, 102, 0) 20%, rgba(255, 0, 102, 0.0980392) 20%, rgba(255, 0, 102, 0.0980392) 40%, rgba(255, 0, 102, 0.2) 40%, rgba(255, 0, 102, 0.2) 60%, rgba(255, 0, 102, 0.4) 60%, rgba(255, 0, 102, 0.4) 80%, rgba(255, 0, 102, 0.6) 80%), linear-gradient(-90deg, rgba(255, 0, 102, 0) 20%, rgba(255, 0, 102, 0.0980392) 20%, rgba(255, 0, 102, 0.0980392) 40%, rgba(255, 0, 102, 0.2) 40%, rgba(255, 0, 102, 0.2) 60%, rgba(255, 0, 102, 0.4) 60%, rgba(255, 0, 102, 0.4) 80%, rgba(255, 0, 102, 0.6) 80%), rgb(255, 204, 0);
    background-size: cover;
}

.logo {
    position: relative;
    z-index: 1;
    margin-bottom: 1vh;
    font-family: "Rubik", sans-serif;
    font-weight: 900;
    font-style: normal;
    font-size: 4rem;
    /* Ajustar el tamaño a 4rem */
    color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-shadow: 0px -0.16rem 0 #212121,
        0px -0.16rem 0 #212121,
        0px 0.16rem 0 #212121,
        0px 0.16rem 0 #212121,
        -0.16rem 0px 0 #212121,
        0.16rem 0px 0 #212121,
        -0.16rem 0px 0 #212121,
        0.16rem 0px 0 #212121,
        -0.16rem -0.16rem 0 #212121,
        0.16rem -0.16rem 0 #212121,
        -0.16rem 0.16rem 0 #212121,
        0.16rem 0.16rem 0 #212121,
        -0.16rem 0.48rem 0 #212121,
        0px 0.48rem 0 #212121,
        0.16rem 0.48rem 0 #212121,
        0 0.5rem 0.026rem rgba(0, 0, 0, .1),
        0 0 0.16rem rgba(0, 0, 0, .1),
        0 0.16rem 0.08rem rgba(0, 0, 0, .3),
        0 0.32rem 0.16rem rgba(0, 0, 0, .2),
        0 0.48rem 0.48rem rgba(0, 0, 0, .25),
        0 0.64rem 0.64rem rgba(0, 0, 0, .2),
        0 0.96rem 0.96rem rgba(0, 0, 0, .15);
}

.search-container {
    text-align: center;
    margin-bottom: 1.5vh;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 1.5rem;
    box-shadow: inset 0 0.2rem 0.4rem rgba(0, 0, 0, 0.1);
    padding: 0.3rem;
    background-color: #fff;
}

.search-input {
    padding: 0.5rem;
    border: none;
    border-radius: 1.5rem;
    width: 65%;
    max-width: 12rem;
    font-size: 1.2rem;
    box-sizing: border-box;
    outline: none;
}

.search-btn {
    padding: 0.7rem 1.7rem;
    border-radius: 1.5rem;
    border: none;
    background: rgba(255, 151, 38, 1.0);
    background: linear-gradient(135deg, rgba(255, 151, 38, 1.0), rgba(255, 99, 1, 1.0));
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
    display: inline-flex;
    align-items: center;
    margin-left: -1rem;
}

.search-btn:hover {
    background: linear-gradient(135deg, rgba(255, 171, 58, 1.0), rgba(255, 119, 21, 1.0));
}

.search-btn:active {
    background: linear-gradient(135deg, rgba(235, 131, 18, 1.0), rgba(205, 79, 0, 1.0));
}

.search-btn .material-icons {
    margin-right: 0.3rem;
    font-size: 1.2rem;
}

.ui-autocomplete {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 1rem;
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
    max-height: 30rem;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    padding: 0.5rem;
}

.ui-autocomplete .ui-menu-item:hover,
.ui-autocomplete .ui-menu-item-focus {
    background-color: #ff8c00;
    color: #fff;
    font-weight: 800;
    border-radius: 1rem;
    border: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.ui-helper-hidden-accessible {
    display: none;
}

.custom-autocomplete .ui-menu-item {
    cursor: pointer;
}

.custom-autocomplete .ui-menu-item:hover {
    background-color: #ff8c00;
    color: #fff;
    font-weight: 800;
    border-radius: 1rem;
    border: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.custom-autocomplete .ui-menu-item-focus {
    background-color: #ff8c00;
    color: #fff;
    font-weight: 800;
    border: none;
}

.ui-state-active {
    background-color: #ff8c00 !important;
    color: #fff !important;
    border-radius: 1rem;
    border: none !important;
    font-weight: 800;
}

.grayscale {
    filter: grayscale(100%);
    opacity: 0.5;
}

.ribbon-2 {
    --f: 1rem;
    --r: 1.5rem;
    --t: 1rem;

    position: absolute;
    top: var(--t);
    right: calc(-1 * var(--f));
    padding: 0 1rem var(--f) calc(1rem + var(--r));
    clip-path:
        polygon(0 0, 100% 0, 100% calc(100% - var(--f)), calc(100% - var(--f)) 100%,
            calc(100% - var(--f)) calc(100% - var(--f)), 0 calc(100% - var(--f)),
            var(--r) calc(50% - var(--f) / 2));
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 calc(-1 * var(--f)) 0 inset #0005;
    text-shadow: 0.05rem 0.05rem 0.05rem #000000;
    
}

.ribbon-green {
    background: #ffc107;
}

.ribbon-yellow {
    background: #fc7a00;
}

.ribbon-red {
    background: #dc3545;
}

.titulo-celda {
    font-size: 1.2rem;
    /* Tamaño de texto ligeramente mayor */
    font-weight: bold;
    color: #333;
    margin-bottom: 0.1rem;
    margin-top: 0.25rem;
}


.tipo-categoria {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.tipo-categoria i {
    vertical-align: middle;
    margin-right: 0.5rem;
    font-size: 1rem;
    color: #ff0066;
    margin-top: 0.15rem;
}

.tipo-categoria h3 {
    font-size: 0.9rem;
    color: #ff0066;

}

.tipo-categoria p {
    margin: 0;
    font-size: 0.9rem;
    color: #ff0066;
    margin-top: 0.15rem;
}

.tipo-categoria h3 {
    font-size: 0.9rem;
    color: #ff0066;
}

.descripcion-celda {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    position: relative;
    max-height: 4.5em;
    line-height: 1.5em;
    overflow: hidden;
}

.descripcion-celda::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.5em;
    background: linear-gradient(to bottom, rgba(245, 245, 245, 0), #FFFFFF);
    display: none;
}

.descripcion-celda.long-text::before {
    display: block;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr));
    gap: 2rem;
    padding: 1rem;
    justify-content: center;
    margin: 0 auto;
    box-sizing: border-box;
}

.grid-item {
    border: 1px solid #ccc;
    margin: 0 auto;
    box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.1);
    max-width: 20rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #fff;
    border-radius: 0.5rem;
    transition: border-color 0.3s ease;
    cursor: pointer;
    padding: 1.5rem;
    position: relative;
}


.grid-item:hover {
    border-color: #ffa533;
}

.grid-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.precio-celda {
    color: #333;
    font-size: 1.5rem;
}

.precio-celda p {
    margin: 0;
}

.precio-celda p span {
    font-weight: bold;
}

.precio-celda p span.precio-original {
    color: #ff2155;
    text-decoration: line-through;
}

.precio-celda p span.precio-descuento {
    color: green;
}

.fecha-celda {
    text-align: center;
    color: #777;
    font-size: 1rem;
    margin-top: 1rem;
}

#load-more-btn {
    padding: 0.8rem 1.8rem;
    border-radius: 2rem;
    border: none;
    background: rgba(255, 151, 38, 1.0);
    background: linear-gradient(135deg, rgba(255, 151, 38, 1.0), rgba(255, 99, 1, 1.0));
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
    display: inline-flex;
    align-items: center;
    margin: 2rem auto;
    justify-content: center;
}

#load-more-btn:hover {
    background: linear-gradient(135deg, rgba(255, 171, 58, 1.0), rgba(255, 119, 21, 1.0));
}

#load-more-btn:active {
    background: linear-gradient(135deg, rgba(235, 131, 18, 1.0), rgba(205, 79, 0, 1.0));
}

#load-more-btn .material-icons {
    margin-right: 0.8rem;
    font-size: 2rem;
}

.load-more-container {
    display: flex;
    justify-content: center;
}

@media screen and (max-width: 600px) {
    .grid-item {
        margin: 0 auto;
    }

    .logo {
        position: relative;
        z-index: 1;
        margin-bottom: 1vh;
        font-family: "Roboto", sans-serif;
        font-weight: 900;
        font-style: normal;
        font-size: 3.5rem;
        /* Reducir el tamaño a 3.5rem */
        color: #FFFFFF;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-shadow: 0px -0.14rem 0 #212121,
            0px -0.14rem 0 #212121,
            0px 0.14rem 0 #212121,
            0px 0.14rem 0 #212121,
            -0.14rem 0px 0 #212121,
            0.14rem 0px 0 #212121,
            -0.14rem 0px 0 #212121,
            0.14rem 0px 0 #212121,
            -0.14rem -0.14rem 0 #212121,
            0.14rem -0.14rem 0 #212121,
            -0.14rem 0.14rem 0 #212121,
            0.14rem 0.14rem 0 #212121,
            -0.14rem 0.42rem 0 #212121,
            0px 0.42rem 0 #212121,
            0.14rem 0.42rem 0 #212121,
            0 0.45rem 0.024rem rgba(0, 0, 0, .1),
            0 0 0.14rem rgba(0, 0, 0, .1),
            0 0.14rem 0.07rem rgba(0, 0, 0, .3),
            0 0.28rem 0.14rem rgba(0, 0, 0, .2),
            0 0.42rem 0.42rem rgba(0, 0, 0, .25),
            0 0.56rem 0.56rem rgba(0, 0, 0, .2),
            0 0.84rem 0.84rem rgba(0, 0, 0, .15);
    }

    .grid-container {
        margin-right: 0;
    }

    header {
        margin-bottom: 2rem;
    }
}

@media (max-height: 600px) and (min-width: 600px) {
    header {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        /* Centra el contenido horizontalmente */
        padding: 1vh 2vh;
        min-height: 3rem;
        gap: 2rem;
        /* Añade un espacio entre el logo y el buscador */
    }

    .logo {
        font-size: 3.5rem;
        text-align: center;
        /* Centra el texto del logo */
        margin-bottom: 0;
    }

    .search-container {
        margin-bottom: 0;
        text-align: right;
    }
}