/* ============================================================
   TIENDA.CSS — Estilos de la tienda PZVerse
   Patricia Alonso · patriciaalonso.es
   ============================================================ */

/* ============================================================
   PÁGINA TIENDA
   ============================================================ */
.tienda-page {
    max-width: 1200px;
    margin: 30px auto 80px;
    padding: 0 16px;
}

.titulo-tienda {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: #7B5FE0;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 0 10px #7B5FE0, 0 0 20px #9146FF;
}

/* ============================================================
   PESTAÑAS
   ============================================================ */
.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.tab-btn {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    padding: 10px 28px;
    border-radius: 10px;
    border: 2px solid rgba(123, 95, 224, 0.4);
    background: rgba(20, 20, 40, 0.6);
    color: #ccc;
    cursor: pointer;
    transition: all 0.25s ease;
}

.tab-btn:hover {
    border-color: #7B5FE0;
    color: #7B5FE0;
}

.tab-btn.activo {
    background: rgba(123, 95, 224, 0.2);
    border-color: #7B5FE0;
    color: #7B5FE0;
    box-shadow: 0 0 12px rgba(123, 95, 224, 0.5);
    text-shadow: 0 0 6px #7B5FE0;
}

.tab-content { display: none; }
.tab-content.activo { display: block; }

/* ============================================================
   SECCIÓN TÍTULO
   ============================================================ */
.seccion-titulo {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: #7B5FE0;
    text-shadow: 0 0 8px #7B5FE0;
    margin: 30px 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.seccion-titulo::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(123, 95, 224, 0.5), transparent);
}

/* ============================================================
   GRID DE PRODUCTOS
   ============================================================ */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ============================================================
   TARJETA DE PRODUCTO
   ============================================================ */
.producto-card {
    background: rgba(20, 20, 40, 0.8);
    border: 1px solid rgba(123, 95, 224, 0.4);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(123, 95, 224, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.producto-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 20px rgba(123, 95, 224, 0.5);
}

.producto-card img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.producto-sin-imagen {
    width: 100%;
    height: 160px;
    background: rgba(123, 95, 224, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

/* ============================================================
   MINIATURAS DE UN PACK (varios elementos en una tarjeta)
   ============================================================ */
.producto-previews {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.2);
}

.preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 6px;
    background: rgba(123, 95, 224, 0.08);
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.preview-lupa {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    cursor: pointer;
}

.form-eliminar-preview {
    position: absolute;
    top: 3px;
    right: 3px;
}

.btn-eliminar-preview {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.65);
    color: #ff6666;
    font-size: 0.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

/* ============================================================
   LIGHTBOX: miniatura del pack ampliada
   ============================================================ */
.lightbox-preview {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(5, 2, 12, 0.92);
    align-items: center;
    justify-content: center;
}

.lightbox-preview.abierto { display: flex; }

.lightbox-media {
    display: none;
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(123, 95, 224, 0.5);
}

.lightbox-cerrar {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(123, 95, 224, 0.5);
    background: rgba(20, 20, 40, 0.85);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.lightbox-flecha {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(123, 95, 224, 0.5);
    background: rgba(20, 20, 40, 0.85);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.lightbox-flecha:hover { background: rgba(123, 95, 224, 0.35); }

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-contador {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 40, 0.85);
    border: 1px solid rgba(123, 95, 224, 0.5);
    border-radius: 20px;
    padding: 4px 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    color: #fff;
}

/* ============================================================
   BOTÓN "VER EN GRANDE" (junto al de comprar/descargar)
   ============================================================ */
.btn-ver-previews {
    background: transparent;
    border: 1px solid #7B5FE0;
    color: #d9c9ff;
    box-shadow: none;
}

.btn-ver-previews:hover {
    background: rgba(123, 95, 224, 0.18);
    transform: scale(1.02);
}

.producto-info {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.producto-nombre {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: #7B5FE0;
    text-shadow: 0 0 4px #7B5FE0;
}

.producto-desc {
    font-family: 'Poppins', sans-serif;
    font-size: 0.76rem;
    color: #ccc;
    line-height: 1.4;
    flex: 1;
}

.producto-precio {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: #00C8FF;
    text-shadow: 0 0 6px #00C8FF;
}

.producto-precio.gratis {
    color: #D9A85C;
    text-shadow: 0 0 6px #D9A85C;
}

.producto-envio {
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 2px;
}

/* ============================================================
   BOTÓN COMPRAR
   ============================================================ */
.btn-comprar {
    display: block;
    margin: 0 14px 14px;
    padding: 10px;
    background: linear-gradient(135deg, #7B5FE0, #9146FF);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(123, 95, 224, 0.4);
    transition: transform 0.2s ease;
    width: calc(100% - 28px);
}

.btn-comprar:hover { transform: scale(1.02); }

.btn-descargar {
    background: linear-gradient(135deg, #D9A85C, #C98FC2);
    box-shadow: 0 0 10px rgba(217, 168, 92, 0.4);
    cursor: pointer;
}

.lista-descargas-gratis .btn-descarga-item {
    font-size: 0.7rem;
    margin: 0 14px 8px;
}

/* ============================================================
   ARCHIVOS DEL PACK (vista admin, dentro de la tarjeta)
   ============================================================ */
.lista-archivos-admin {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 14px 8px;
}

.form-eliminar-descarga {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    padding: 4px 8px;
}

.nombre-archivo-admin {
    font-family: 'Poppins', sans-serif;
    font-size: 0.66rem;
    color: #ccc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-eliminar-descarga {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 0, 68, 0.2);
    color: #ff6666;
    font-size: 0.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.btn-descargar.deshabilitado {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
   BOTONES ADMIN EN TARJETA
   ============================================================ */
.producto-admin {
    display: flex;
    gap: 6px;
    padding: 0 14px 12px;
}

.btn-admin-sm {
    flex: 1;
    padding: 6px;
    border: none;
    border-radius: 6px;
    font-size: 0.7rem;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.btn-admin-sm.eliminar {
    background: rgba(255, 0, 68, 0.2);
    border: 1px solid #ff0044;
    color: #ff4444;
}

.vacio-seccion {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    color: rgba(255, 255, 255, 0.55);
    padding: 50px 20px;
    font-size: 0.9rem;
    border: 1px dashed rgba(123, 95, 224, 0.3);
    border-radius: 14px;
    background: rgba(20, 20, 40, 0.35);
}

.vacio-icono {
    font-size: 2.4rem;
    margin-bottom: 12px;
    opacity: 0.7;
}

.vacio-hint {
    font-size: 0.78rem;
    color: #9B82EE;
    margin-top: 8px;
}

/* ============================================================
   PANEL ADMIN AÑADIR PRODUCTO
   ============================================================ */
.panel-admin-tienda {
    margin-top: 50px;
    background: rgba(20, 20, 40, 0.85);
    border: 2px solid #7B5FE0;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 0 20px rgba(123, 95, 224, 0.3);
}

.panel-admin-tienda h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: #7B5FE0;
    text-shadow: 0 0 8px #7B5FE0;
    margin-bottom: 20px;
    text-align: center;
}

.form-producto {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.form-campo {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-campo label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.76rem;
    color: #ccc;
    margin: 0;
}

.form-campo.full { grid-column: 1 / -1; }
.form-campo.doble { grid-column: 2 / -1; }

.form-eliminar-producto { flex: 1; }

.hint-paypal {
    grid-column: 1 / -1;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    color: #888;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border-left: 3px solid #7B5FE0;
}

.btn-crear-producto {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #7B5FE0, #9146FF);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(123, 95, 224, 0.5);
    transition: transform 0.2s ease;
}

.btn-crear-producto:hover { transform: translateY(-2px); }

/* ============================================================
   SEPARADOR
   ============================================================ */
.separador-neon {
    width: 80%;
    max-width: 600px;
    height: 1px;
    background: linear-gradient(to right, transparent, #7B5FE0, #9146FF, transparent);
    margin: 20px auto 36px;
    opacity: 0.4;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .productos-grid { grid-template-columns: repeat(2, 1fr); }
    .form-producto { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    .productos-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .form-producto { grid-template-columns: 1fr; }
    .titulo-tienda { font-size: 1.5rem; }
    .tab-btn { font-size: 0.78rem; padding: 8px 16px; }
}