/* Inicio (index.php) en celular / tablet: carrusel adaptado + beneficios + "Comprá por Categoría" +
   banner de venta mayorista + título de ofertas. En desktop .kd-inicio-movil no se muestra (las categorías están
   en el sidebar). Colores iguales al header (css/header.css). */

.kd-inicio-movil {
    display: none;
}

/* Puntos del carrusel (todas las pantallas) */
.kd-hero .kd-hero-puntos {
    bottom: 10px;
    margin-bottom: 0;
}

.kd-hero .kd-hero-puntos li,
.kd-hero .kd-hero-puntos li.active {
    width: 9px;
    height: 9px;
    margin: 0 3px;
    border: 0;
    background: rgba(255, 255, 255, .75);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

.kd-hero .kd-hero-puntos li.active {
    background: #f07b1d;
}

@media screen and (max-width: 1100px) {
    /* Carrusel: el alto sigue la proporción de las imágenes (1600x639) para que no se recorten los costados */
    #derecha .kd-hero {
        width: auto !important;
        margin: 8px 8px 0 8px !important;
        padding: 0;
        overflow: hidden;
        border-radius: 12px 12px 0 0;
    }

    #derecha .kd-hero div.item {
        height: auto;
        aspect-ratio: 1600 / 639;
        background-position: center center;
        background-size: cover;
    }

    #derecha .kd-hero .carousel-control {
        display: none;
    }

    .kd-inicio-movil {
        display: block;
        padding: 0 8px 4px 8px;
        font-family: 'Poppins', Arial, sans-serif;
        text-align: left;
    }

    .kd-inicio-movil * {
        box-sizing: border-box;
    }

    /* Franja de beneficios, pegada debajo del carrusel */
    .kd-im-beneficios {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin: 0;
        padding: 12px 4px;
        border-radius: 0 0 12px 12px;
        background: #15171c;
        list-style: none;
    }

    .kd-im-beneficios li {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        min-width: 0;
        padding: 0 4px;
        color: #e6e8ec;
        font-size: 12px;
        line-height: 1.25;
    }

    .kd-im-beneficios li + li {
        border-left: 1px solid rgba(255, 255, 255, .16);
    }

    .kd-im-beneficios .fa {
        flex: 0 0 auto;
        color: #fff;
        font-size: 22px;
    }

    /* Títulos de sección con subrayado naranja */
    .kd-inicio-movil .kd-im-titulo {
        margin: 22px 4px 14px 4px;
        padding: 0;
        color: #15171c;
        font-family: inherit;
        font-size: 21px;
        font-weight: 700;
        line-height: 1.2;
    }

    .kd-inicio-movil .kd-im-titulo::after {
        content: "";
        display: block;
        width: 54px;
        height: 3px;
        margin-top: 7px;
        border-radius: 2px;
        background: #f07b1d;
    }

    /* Tarjetas de categorías */
    .kd-im-cats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .kd-im-cat {
        position: relative;
        overflow: hidden;
        aspect-ratio: 6 / 5;
        border-radius: 10px;
        background-color: #e9ebef;
        background-position: center 22%;
        background-repeat: no-repeat;
        background-size: cover;
        box-shadow: 0 3px 10px rgba(16, 24, 40, .14);
        cursor: pointer;
        transition: transform .15s ease;
    }

    .kd-im-cat:active {
        transform: scale(.97);
    }

    /* Degradé para que el nombre se lea sobre cualquier foto */
    .kd-im-cat::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .25) 38%, rgba(0, 0, 0, 0) 62%);
    }

    .kd-im-cat-nombre {
        position: absolute;
        right: 38px;
        bottom: 9px;
        left: 10px;
        color: #fff;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.15;
        text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
        -webkit-hyphens: auto;
        hyphens: auto; /* <html lang="es-AR">: corta palabras largas con guion en vez de partirlas */
    }

    .kd-im-largo .kd-im-cat-nombre {
        font-size: 13px;
    }

    .kd-im-flecha {
        position: absolute;
        right: 8px;
        bottom: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: #f07b1d;
        color: #fff;
        font-size: 12px;
    }

    /* Banner "También venta mayorista" */
    .kd-im-mayorista {
        position: relative;
        display: flex;
        align-items: center;
        gap: 12px;
        overflow: hidden;
        margin: 16px 0 8px 0;
        padding: 12px 14px;
        min-height: 78px;
        border-radius: 10px;
        background: linear-gradient(105deg, #15171c 0%, #1f2229 64%, #343944 64.3%, #2a2e36 100%);
        box-shadow: 0 4px 12px rgba(16, 24, 40, .22);
        color: #fff;
        text-decoration: none;
    }

    .kd-im-mayorista:hover,
    .kd-im-mayorista:focus {
        color: #fff;
        text-decoration: none;
    }

    .kd-im-may-icono {
        position: relative;
        z-index: 1;
        flex: 0 0 auto;
        color: #f07b1d;
        font-size: 36px;
        line-height: 1;
    }

    .kd-im-may-texto {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
        line-height: 1.05;
    }

    .kd-im-may-texto small {
        color: #fff;
        font-size: 15px;
        font-style: italic;
        font-weight: 800;
        letter-spacing: .5px;
        text-transform: uppercase;
    }

    .kd-im-may-texto strong {
        color: #fff;
        font-size: 21px;
        font-style: italic;
        font-weight: 800;
        letter-spacing: .3px;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .kd-im-may-texto em {
        color: #f07b1d;
        font-style: italic;
    }

    .kd-im-may-texto span {
        margin-top: 5px;
        color: #d4d8de;
        font-size: 11.5px;
        white-space: nowrap;
    }

    .kd-im-may-cajas {
        position: absolute;
        right: 12px;
        bottom: 8px;
        display: flex;
        align-items: flex-end;
        gap: 2px;
        color: #c9995c;
        line-height: 1;
    }

    .kd-im-may-cajas .fa:first-child {
        font-size: 30px;
        color: #b5864d;
    }

    .kd-im-may-cajas .fa:last-child {
        font-size: 44px;
    }

    /* "Nuevas Ofertas" con el mismo formato de título de sección */
    #derecha .titulo_inicio {
        box-sizing: border-box;
        margin-top: 6px;
        padding: 0 12px;
        color: #15171c;
        font-family: 'Poppins', Arial, sans-serif;
        font-size: 21px;
        font-weight: 700;
        line-height: 1.2;
        text-align: left;
        text-transform: none;
    }

    #derecha .titulo_inicio::after {
        content: "";
        display: block;
        width: 54px;
        height: 3px;
        margin-top: 7px;
        border-radius: 2px;
        background: #f07b1d;
    }
}

/* Tablet: 4 columnas para que las tarjetas no queden enormes */
@media screen and (min-width: 700px) and (max-width: 1100px) {
    .kd-im-cats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .kd-im-mayorista {
        max-width: 760px;
    }
}

@media screen and (max-width: 420px) {
    .kd-im-cat-nombre {
        right: 34px;
        left: 8px;
        font-size: 13.5px;
    }

    .kd-im-largo .kd-im-cat-nombre {
        font-size: 12px;
    }

    .kd-im-flecha {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .kd-im-may-icono {
        font-size: 30px;
    }

    .kd-im-may-texto small {
        font-size: 13px;
    }

    .kd-im-may-texto strong {
        font-size: 18px;
    }

    .kd-im-may-texto span {
        font-size: 10.5px;
    }

    .kd-im-beneficios li {
        gap: 6px;
        font-size: 10.5px;
    }

    .kd-im-beneficios .fa {
        font-size: 18px;
    }

    .kd-im-may-cajas .fa:first-child {
        font-size: 24px;
    }

    .kd-im-may-cajas .fa:last-child {
        font-size: 36px;
    }
}
