/* =============================================
   Explore.css - Página estilo TikTok / Reels
   Usa paleta de verdes y estilos Hero del proyecto
   ============================================= */

/* --- Overlay fullscreen --- */
.explore-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: #000;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.explore-overlay::-webkit-scrollbar { display: none; }

/* --- Barra superior --- */
.explore-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, transparent 100%);
    pointer-events: none;
}

.explore-topbar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.explore-close-btn {
    pointer-events: all;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.25);
    color: #fff;
    border-radius: 50%;
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background 0.2s, transform 0.15s;
}

.explore-close-btn:hover { background: rgba(255,255,255,0.25); transform: scale(1.1); }

/* --- Cada card ocupa toda la pantalla --- */
.explore-card {
    scroll-snap-align: start;
    height: 100dvh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: #0a0a0a;
}

/* Imagen de fondo con parallax-like blur */
.explore-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(18px) brightness(0.45);
    transform: scale(1.08);
    transition: transform 8s ease-in-out;
    will-change: transform;
}

.explore-card.card-enter .explore-card-bg {
    transform: scale(1.15);
}

/* Imagen principal centrada */
.explore-card-img-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.explore-card-img {
    max-height: 70vh;
    max-width: 85vw;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 8px 48px rgba(0,0,0,0.65);
    transform: scale(0.92) translateY(18px);
    opacity: 0;
    transition: transform 0.55s cubic-bezier(.22,1,.36,1), opacity 0.45s ease;
}

.explore-card.card-enter .explore-card-img {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Degradado inferior */
.explore-card-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, transparent 100%);
    pointer-events: none;
}

/* Contenido inferior */
.explore-card-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 1rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Nombre del producto */
.explore-product-name {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    line-height: 1.2;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s 0.1s cubic-bezier(.22,1,.36,1), opacity 0.4s 0.1s;
}

.explore-card.card-enter .explore-product-name {
    transform: translateY(0);
    opacity: 1;
}

/* Precio */
.explore-price-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s 0.18s cubic-bezier(.22,1,.36,1), opacity 0.4s 0.18s;
}

.explore-card.card-enter .explore-price-row {
    transform: translateY(0);
    opacity: 1;
}

.explore-price {
    font-size: clamp(1rem, 3vw, 1.45rem);
    font-weight: 700;
    color: #4caf7a;
    text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}

.explore-price-original {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.55);
    text-decoration: line-through;
}

.explore-discount-badge {
    background: #e53935;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

/* Categoria + vendedor */
.explore-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s 0.25s cubic-bezier(.22,1,.36,1), opacity 0.4s 0.25s;
}

.explore-card.card-enter .explore-meta {
    transform: translateY(0);
    opacity: 1;
}

.explore-category-pill {
    background: rgba(76,175,122,0.25);
    border: 1px solid rgba(76,175,122,0.5);
    color: #a5d6a7;
    font-size: 0.78rem;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.explore-free-send {
    background: rgba(33,150,243,0.2);
    border: 1px solid rgba(33,150,243,0.4);
    color: #90caf9;
    font-size: 0.75rem;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
}

/* Seller */
.explore-seller {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s 0.3s cubic-bezier(.22,1,.36,1), opacity 0.4s 0.3s;
}

.explore-card.card-enter .explore-seller {
    transform: translateY(0);
    opacity: 1;
}

.explore-seller-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(76,175,122,0.6);
}

.explore-seller-initial {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2e7d52, #4caf7a);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(76,175,122,0.6);
}

.explore-seller-name {
    font-size: 0.83rem;
    color: rgba(255,255,255,0.78);
}

/* Botones de acción derecha */
.explore-actions {
    position: absolute;
    right: 1rem;
    bottom: 6.5rem;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: center;
}

.explore-action-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    backdrop-filter: blur(8px);
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.explore-action-btn:hover { transform: scale(1.12); box-shadow: 0 4px 18px rgba(76,175,122,0.5); }

.btn-buy {
    background: linear-gradient(135deg, #2e7d52, #4caf7a);
    color: #fff;
}

.btn-cart {
    background: rgba(255,255,255,0.13);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.22);
}

.btn-detail {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.18);
}

/* Barra de progreso / timer */
.explore-timer-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.15);
    z-index: 4;
}

.explore-timer-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4caf7a, #81c784);
    transition: width 1s linear;
    box-shadow: 0 0 6px rgba(76,175,122,0.7);
}

/* Label del timer */
.explore-timer-label {
    position: absolute;
    bottom: 0.6rem;
    right: 5rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.72rem;
    z-index: 3;
    font-variant-numeric: tabular-nums;
}

/* Nav arrows laterales */
.explore-nav {
    position: fixed;
    z-index: 1300;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: all;
}

.explore-nav-btn {
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background 0.2s, transform 0.15s;
    font-size: 0.9rem;
}

.explore-nav-btn:hover { background: rgba(76,175,122,0.35); transform: scale(1.1); }

/* Partículas de shimmer en cards activos */
@keyframes shimmer-float {
    0% { opacity: 0; transform: translateY(0) scale(0.8); }
    50% { opacity: 0.7; }
    100% { opacity: 0; transform: translateY(-60px) scale(1.2); }
}

.explore-shimmer-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4caf7a;
    animation: shimmer-float 2.5s ease-in-out infinite;
    pointer-events: none;
}

.btn-next {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.15);
}

/* Carrito flotante */
.explore-cart-badge {
    position: fixed;
    top: 0.85rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1400;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: linear-gradient(135deg, #2e7d52, #4caf7a);
    color: #fff;
    border-radius: 30px;
    padding: 0.35rem 1rem 0.35rem 0.75rem;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(76,175,122,0.45);
    animation: cart-pop 0.35s cubic-bezier(.22,1,.36,1);
    pointer-events: all;
}

@keyframes cart-pop {
    from { transform: translateX(-50%) scale(0.7); opacity: 0; }
    to   { transform: translateX(-50%) scale(1);   opacity: 1; }
}

.explore-cart-count {
    background: #fff;
    color: #2e7d52;
    border-radius: 50%;
    width: 1.35rem;
    height: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.explore-cart-link {
    color: #fff;
    text-decoration: none;
    border-left: 1px solid rgba(255,255,255,0.35);
    padding-left: 0.55rem;
    margin-left: 0.1rem;
}

.explore-cart-link:hover { text-decoration: underline; }

/* Bloquear interacción del overlay cuando el dialog está abierto */
.explore-overlay--blocked {
    pointer-events: none;
}

/* Dialog de producto: elevar por encima del overlay fullscreen */
.explore-overlay ~ .dialogproduct-container,
.dialogproduct-container {
    z-index: 3000 !important;
}

.explore-loading {
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 1rem;
    flex-direction: column;
    gap: 1rem;
}

.explore-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid rgba(76,175,122,0.25);
    border-top-color: #4caf7a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Indicador de paginación lateral */
.explore-dots {
    position: fixed;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    display: none; /* oculto en mobile, se muestra en desktop */
    flex-direction: column;
    gap: 0.35rem;
    z-index: 1250;
}

@media (min-width: 768px) {
    .explore-dots { display: flex; }
    .explore-nav { display: none; }
}

.explore-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transition: background 0.3s, transform 0.3s;
    cursor: pointer;
}

.explore-dot.active {
    background: #4caf7a;
    transform: scale(1.5);
    box-shadow: 0 0 6px rgba(76,175,122,0.8);
}

/* Responsive tweaks */
@media (max-width: 480px) {
    .explore-card-img { max-height: 60vh; }
    .explore-actions { bottom: 7rem; }
}
