/* =====================================================
   Banner principal: Top tiendas (includes/banner-top-tiendas.php)
   Mezcla de estilos:
   - Mercado Libre: fondo amarillo con brillo, "HASTA XX% OFF"
     gigante en azul, producto estrella sobre un podio y
     etiquetas tipo cupón.
   - Amazon: tarjeta "Ofertas que se acaban" con 4 productos
     en cuadrícula y etiqueta roja de descuento.
   ===================================================== */

.rn-top-slide {
    --rn-azul: #1b1fa8;
    --rn-azul-osc: #0b0f6b;
    --rn-azul: #06a3da;
    --rn-rosa: #ec1c7c;
    position: relative;
    overflow: hidden;
    height: 440px;
    border-radius: 18px;
    background: #fff;
    color: var(--rn-azul-osc);
    box-shadow: 0 15px 40px rgba(0, 0, 0, .12);
}

/* Portada del negocio de fondo, suave */
.rn-top-slide__fondo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .22;
    transition: transform 3.5s ease;
}
.rn-top-tiendas .owl-item.active .rn-top-slide__fondo { transform: scale(1.06); }

/* Velo blanco para que el texto siempre se lea */
.rn-top-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, .95) 0%,
        rgba(255, 255, 255, .80) 45%,
        rgba(255, 255, 255, .60) 100%);
    pointer-events: none;
}

/* Brillo de luz detrás del producto */
.rn-top-slide__brillo {
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    width: 520px;
    height: 520px;
    margin: -260px 0 0 -200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 163, 218, .22) 0%, rgba(6, 163, 218, .08) 40%, rgba(6, 163, 218, 0) 70%);
    pointer-events: none;
}

.rn-top-slide__contenido {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.15fr .85fr 330px;
    align-items: center;
    gap: 24px;
    height: 100%;
    padding: 22px 80px;
}

/* ---------- 1. Tienda + gran descuento ---------- */
.rn-top-slide__marca {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    padding: 5px 16px 5px 5px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #f1f1f1;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
    transform: rotate(-3deg);
    transition: transform .25s ease;
}
.rn-top-slide__marca:hover { transform: rotate(0) scale(1.03); }

.rn-top-slide__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e6f6fc;
    overflow: hidden;
    font-size: 22px;
    color: #0587b5;
}
.rn-top-slide__logo img { width: 100%; height: 100%; object-fit: cover; }

.rn-top-slide__nombre {
    font-size: 26px;
    font-weight: 800;
    font-style: italic;
    color: var(--rn-rosa);
    text-transform: capitalize;
    letter-spacing: -.5px;
    text-shadow: 0 2px 0 rgba(236, 28, 124, .15);
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* "HASTA 25% OFF" */
.rn-top-slide__oferta {
    display: flex;
    align-items: center;
    line-height: .85;
    margin: 6px 0 18px;
}
.rn-top-slide__hasta {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin-right: 6px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--rn-azul);
}
.rn-top-slide__porcentaje {
    font-size: 120px;
    font-weight: 900;
    letter-spacing: -6px;
    background: linear-gradient(180deg, #4b2bd6 0%, var(--rn-azul) 45%, var(--rn-azul-osc) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.rn-top-slide__off {
    align-self: flex-end;
    margin-left: 8px;
    margin-bottom: 8px;
    font-size: 46px;
    font-weight: 900;
    color: var(--rn-azul-osc);
}
.rn-top-slide__oferta { min-height: 110px; }
.rn-top-slide__oferta--texto .rn-top-slide__porcentaje {
    font-size: 64px;
    letter-spacing: -2px;
    line-height: .95;
}

/* Etiquetas tipo cupón */
.rn-top-slide__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.rn-chip-azul,
.rn-chip-blanco {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    line-height: 1.05;
}
.rn-chip-azul {
    background: var(--rn-azul-osc);
    color: #fff;
}
.rn-chip-azul i { font-size: 18px; color: var(--rn-azul); }
.rn-chip-azul strong { font-size: 30px; font-weight: 900; }
.rn-chip-azul small { max-width: 90px; font-size: 11px; font-weight: 700; }

.rn-chip-blanco {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: var(--rn-azul-osc);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .1);
    transition: transform .2s ease;
}
.rn-chip-blanco:hover { transform: translateY(-2px); color: var(--rn-azul); }
.rn-chip-blanco small { font-size: 11px; color: #6b7280; }
.rn-chip-blanco strong { font-size: 18px; font-weight: 900; }

/* ---------- 2. Producto estrella sobre podio ---------- */
.rn-top-slide__podio { display: flex; justify-content: center; }

.rn-podio {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 280px;
}
.rn-podio img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 280px;
    object-fit: contain;
    border-radius: 16px;
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .25));
    transition: transform .4s ease;
}
.rn-podio:hover img { transform: translateY(-8px) scale(1.03); }

.rn-podio__base {
    position: relative;
    z-index: 1;
    width: 110%;
    height: 46px;
    margin-top: -26px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, #06a3da 0%, #06a3da 55%, #046c91 100%);
    box-shadow: 0 10px 0 #035a78, 0 18px 30px rgba(0, 0, 0, .18);
}
.rn-podio__precio {
    position: absolute;
    z-index: 3;
    top: 8px;
    right: -6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--rn-rosa);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(236, 28, 124, .35);
    transform: rotate(6deg);
}
.rn-podio--icono {
    font-size: 110px;
    color: rgba(11, 15, 107, .25);
}

/* ---------- 3. Tarjeta 2x2 (estilo Amazon) ---------- */
.rn-top-slide__productos { display: flex; justify-content: flex-end; }

.rn-top-card {
    width: 100%;
    padding: 14px 14px 14px;
    border-radius: 18px;
    background: linear-gradient(160deg, #046c91 0%, #06a3da 100%);
    box-shadow: 0 14px 32px rgba(0, 0, 0, .18);
}
.rn-top-card--popular { background: linear-gradient(160deg, #7c3aed 0%, #a855f7 100%); }

.rn-top-card h4 {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.5px;
    color: #fff;
}

.rn-top-card__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.rn-top-prod {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: 8px;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    font-size: 42px;
    color: #c7c7c7;
    transition: transform .25s ease, box-shadow .25s ease;
}
.rn-top-prod:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0, 0, 0, .18); }
.rn-top-prod img { width: 100%; height: 100%; object-fit: contain; }

.rn-top-prod__badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    background: #cc0c39;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.rn-top-prod--vacio { background: rgba(255, 255, 255, .55); color: rgba(255, 255, 255, .9); }

/* ---------- Flechas y puntos del carrusel ---------- */
.rn-top-tiendas .owl-dots { position: relative; z-index: 3; }

#homepage-6 .ps-home-banner .rn-top-tiendas .owl-nav {
    left: 0;
    width: 100%;
    max-width: none;
    padding: 0 16px;
    box-sizing: border-box;
    transform: translateY(-50%);
    z-index: 5;
}
#homepage-6 .ps-home-banner .rn-top-tiendas .owl-nav > * {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: #fff !important;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

/* ---------- Responsivo ---------- */
@media (max-width: 1399px) {
    .rn-top-slide__contenido { grid-template-columns: 1.1fr .8fr 310px; padding: 22px 70px; }
    .rn-top-slide__porcentaje { font-size: 100px; }
    .rn-top-slide__off { font-size: 38px; }
}

@media (max-width: 1199px) {
    .rn-top-slide__contenido { grid-template-columns: 1fr 300px; }
    .rn-top-slide__podio { display: none; }
    .rn-top-slide__brillo { left: 35%; }
}

@media (max-width: 991px) {
    .rn-top-slide { height: 700px; }
    .rn-top-slide__contenido { grid-template-columns: 1fr; align-content: center; padding: 30px 60px 46px; }
    .rn-top-slide__productos { justify-content: flex-start; }
    .rn-top-card { max-width: 380px; }
}

@media (max-width: 767px) {
    .rn-top-slide { border-radius: 12px; height: 700px; }
    .rn-top-slide__contenido { align-content: start; padding: 22px 16px 44px; gap: 18px; }
    .rn-top-slide__nombre { max-width: 220px; }
    .rn-top-slide__nombre { font-size: 20px; }
    .rn-top-slide__logo { width: 36px; height: 36px; font-size: 18px; }
    .rn-top-slide__porcentaje { font-size: 76px; letter-spacing: -4px; }
    .rn-top-slide__hasta { font-size: 15px; }
    .rn-top-slide__off { font-size: 30px; }
    .rn-top-slide__oferta { min-height: 110px; }
.rn-top-slide__oferta--texto .rn-top-slide__porcentaje { font-size: 44px; }
    .rn-chip-azul strong { font-size: 24px; }
    .rn-chip-blanco strong { font-size: 15px; }
    .rn-top-card { max-width: none; padding: 14px 12px 12px; }
    .rn-top-card h4 { font-size: 22px; }
    .rn-top-prod__badge { font-size: 12px; left: 6px; bottom: 6px; }
    .rn-top-tiendas .owl-nav { display: none; }
}
