/* =====================================================
   "Inspirado en lo último que viste" (includes/inspirado-ultimo-visto.php)
   Estilo Mercado Libre: caja blanca con carrusel de productos,
   etiqueta verde de % OFF, precio con centavos arriba,
   flechas redondas y puntos de página.
   ===================================================== */

.rn-inspirado { padding: 18px 0 10px; }

.rn-inspirado__caja {
    padding: 24px 24px 28px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 6px 18px rgba(0, 0, 0, .06);
}

.rn-inspirado__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}
.rn-inspirado__head h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    color: #1f2328;
}

/* Puntos de página */
.rn-inspirado__puntos { display: flex; gap: 5px; }
.rn-inspirado__puntos span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d9d9d9;
    transition: background .2s ease;
}
.rn-inspirado__puntos span.activo { background: #06a3da; }

/* Carrusel */
.rn-inspirado__marco { position: relative; }

.rn-inspirado__pista {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 5 * 24px) / 6);
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.rn-inspirado__pista::-webkit-scrollbar { display: none; }

.rn-insp-item {
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    color: #1f2328;
}
.rn-insp-item:hover { color: #1f2328; }

.rn-insp-item__img {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    margin-bottom: 14px;
    background: #f5f5f5;
    overflow: hidden;
    font-size: 64px;
    color: #d1d5db;
}
.rn-insp-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.rn-insp-item:hover .rn-insp-item__img img { transform: scale(1.05); }

.rn-insp-item__nombre {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
    margin-bottom: 6px;
    font-size: 15px;
    line-height: 1.4;
    color: #333;
    text-transform: capitalize;
}
.rn-insp-item:hover .rn-insp-item__nombre { color: #06a3da; }

.rn-insp-item__oferta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.rn-insp-item__off {
    padding: 1px 4px;
    border-radius: 3px;
    background: #00a650;
    color: #fff;
    font-weight: 600;
}
.rn-insp-item__oferta del { color: #737373; }

.rn-insp-item__precio {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 6px;
    margin-top: 2px;
    font-size: 26px;
    line-height: 1.2;
    color: #1f2328;
}
.rn-insp-item__precio sup {
    top: -.7em;
    margin-left: 1px;
    font-size: 13px;
}
.rn-insp-item__precio small {
    font-size: 13px;
    color: #737373;
}

.rn-insp-item__tienda { margin-top: 8px; }
.rn-insp-item__tienda span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 3px 7px;
    border-radius: 3px;
    background: #e6f7ee;
    color: #00a650;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Flechas */
.rn-inspirado__flecha {
    position: absolute;
    z-index: 3;
    top: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #06a3da;
    font-size: 22px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
    cursor: pointer;
    transition: opacity .2s ease, transform .2s ease;
}
.rn-inspirado__flecha:hover { transform: scale(1.05); }
.rn-inspirado__flecha--prev { left: -46px; }
.rn-inspirado__flecha--next { right: -46px; }
.rn-inspirado__flecha.oculta { opacity: 0; pointer-events: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1399px) {
    .rn-inspirado__pista { grid-auto-columns: calc((100% - 4 * 20px) / 5); gap: 20px; }
}
@media (max-width: 1199px) {
    .rn-inspirado__pista { grid-auto-columns: calc((100% - 3 * 20px) / 4); }
    .rn-inspirado__flecha--prev { left: -20px; }
    .rn-inspirado__flecha--next { right: -20px; }
}
@media (max-width: 991px) {
    .rn-inspirado__pista { grid-auto-columns: calc((100% - 2 * 16px) / 3); gap: 16px; }
}
@media (max-width: 767px) {
    .rn-inspirado__caja { padding: 18px 14px 20px; }
    .rn-inspirado__head h3 { font-size: 18px; }
    .rn-inspirado__pista { grid-auto-columns: 44%; gap: 12px; }
    .rn-insp-item__nombre { font-size: 13px; min-height: 36px; }
    .rn-insp-item__precio { font-size: 20px; }
    .rn-insp-item__tienda span { font-size: 11px; }
    .rn-inspirado__flecha { display: none; }
}
