
/* ================================= */
/* 1. ENCABEZADO */
/* ================================= */

.perfil-nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.perfil-nav a { text-decoration: none; transition: opacity 0.2s ease; }
.perfil-nav a:hover { opacity: 0.6; }
.enlace-volver { font-weight: 600; }

/* ================================= */
/* 2. PORTADA ANIMADA */
/* ================================= */

.perfil-portada {
    --p1: #050303; --p2: #3a1c2b; --p3: var(--morado);   /* los cambia perfil.js */
    position: relative;
    height: 270px;
    overflow: hidden;
    background: linear-gradient(120deg, var(--p1), var(--p2), var(--p3), var(--p2), var(--p1));
    background-size: 300% 300%;
    animation: portadaMover 14s ease infinite;
    transition: filter 0.4s ease;
}

@keyframes portadaMover {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.perfil-portada .forma {
    position: absolute;
    border-radius: 50%;
    background: var(--p3);
    filter: blur(60px);
    opacity: 0.45;
    animation: blobMover 12s ease-in-out infinite alternate;
}

.forma.f1 { width: 320px; height: 320px; top: -120px; right: 8%; }
.forma.f2 { width: 240px; height: 240px; bottom: -110px; left: 14%; animation-delay: -4s; }
.forma.f3 { width: 180px; height: 180px; top: 20px; left: 52%; opacity: 0.3; animation-delay: -8s; }

/* ================================= */
/* 3. CABECERA */
/* ================================= */

.perfil-cabecera {
    position: relative;
    z-index: 2;
    max-width: 1120px;
    margin: -84px auto 0;
    padding: 0 48px;
    display: flex;
    align-items: flex-end;
    gap: 30px;
    flex-wrap: wrap;
}

/* Marco con borde de color que gira (la foto no gira) */
.perfil-avatar-marco {
    position: relative;
    flex-shrink: 0;
    width: 172px;
    height: 172px;
    animation: avatarSube 0.9s cubic-bezier(0.2, 1.2, 0.3, 1) both;
}

@keyframes avatarSube { from { opacity: 0; transform: translateY(40px) scale(0.7); } }

.perfil-avatar-marco::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--acento), #ffb36b, var(--acento), #ffb36b, var(--acento));
    animation: fabGiro 5s linear infinite;
}

.perfil-avatar-marco > img {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--blanco);
    background: var(--hueso);
}

/* El chulito: sello de vendedora verificada */
.insignia {
    position: absolute;
    right: 4px;
    bottom: 10px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--acento);
    color: #fff;
    border: 4px solid var(--blanco);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: checkPop 0.8s 0.8s cubic-bezier(0.2, 1.8, 0.4, 1) both, insigniaLatido 3s 2s ease-in-out infinite;
}

@keyframes checkPop { from { transform: scale(0) rotate(-90deg); } }
@keyframes insigniaLatido { 50% { box-shadow: 0 0 0 10px rgba(var(--morado-rgb), 0.15); } }

.btn-camara {
    position: absolute;
    left: 4px;
    bottom: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--negro);
    color: var(--blanco);
    border: 3px solid var(--blanco);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.2, 1.5, 0.4, 1);
}

.btn-camara:hover { transform: scale(1.18) rotate(-8deg); }

.perfil-identidad { flex: 1; min-width: 260px; padding-bottom: 8px; animation: aparecer 0.8s 0.3s ease both; }

.perfil-identidad h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; margin: 54px 0 12px; }

/* Pastilla "Vendedora de sus propias creaciones" con brillo que la cruza */
.perfil-verificada {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 8px;
    border-radius: 30px;
    background: var(--hueso);
    border: 1px solid var(--linea-oscura);
    font-size: 13px;
    font-weight: 600;
}

.perfil-verificada::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    left: -80px;
    background: linear-gradient(90deg, transparent, rgba(var(--morado-rgb), 0.3), transparent);
    animation: franjaBrillo 4.5s ease-in-out infinite;
}

.perfil-verificada .chulo {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--acento);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
}

.perfil-verificada.en-revision .chulo { background: var(--niebla); }

.perfil-meta { margin-top: 12px; font-size: 14px; color: var(--niebla); }

.perfil-acciones { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 12px; animation: aparecer 0.8s 0.5s ease both; }

/* ================================= */
/* 4. ESTADÍSTICAS, BLOQUES Y PIEZAS */
/* ================================= */

.perfil-cuerpo { max-width: 1120px; margin: 0 auto; padding: 40px 48px 120px; }

.perfil-aviso {
    background: var(--acento-suave);
    border-left: 3px solid var(--acento);
    padding: 14px 18px;
    font-size: 14px;
    margin-bottom: 30px;
}

.perfil-aviso .btn-texto { cursor: pointer; color: var(--negro); font-weight: 600; margin-left: 6px; }

.perfil-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 50px; }

.stat {
    border: 1px solid var(--linea-oscura);
    padding: 24px 26px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.stat:hover { transform: translateY(-5px); border-color: var(--acento); box-shadow: 0 16px 36px rgba(var(--morado-rgb), 0.12); }

.stat strong { display: block; font-family: var(--serif); font-size: 44px; font-weight: 500; line-height: 1; margin-bottom: 8px; }
.stat span { font-size: 13px; color: var(--niebla); }

.perfil-columnas { display: grid; grid-template-columns: 1.4fr 1fr; gap: 50px; margin-bottom: 60px; }

.perfil-bloque h2,
.perfil-piezas h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin-bottom: 16px; }

.perfil-texto { color: var(--grafito); line-height: 1.75; font-size: 16px; white-space: pre-line; }
.perfil-texto.vacia { color: var(--niebla); font-style: italic; }

.perfil-instagram {
    display: inline-block;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.perfil-piezas { margin-bottom: 70px; }

.perfil-piezas-titulo { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.perfil-piezas-titulo a { font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.perfil-piezas .galeria-productos { margin-top: 20px; }
.perfil-piezas .tarjeta-producto { text-decoration: none; color: inherit; }

.perfil-cuenta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 30px; border-top: 1px solid var(--linea-oscura); }
.perfil-cuenta .btn-texto { cursor: pointer; margin-left: auto; }

/* ================================= */
/* 5. EDITOR LATERAL */
/* ================================= */

.drawer-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }

.portadas-opciones { display: flex; gap: 12px; flex-wrap: wrap; }

.portada-opcion {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 3px solid var(--blanco);
    box-shadow: 0 0 0 1px var(--linea-oscura);
    transition: transform 0.3s cubic-bezier(0.2, 1.5, 0.4, 1), box-shadow 0.25s ease;
}

.portada-opcion:hover { transform: scale(1.12); }
.portada-opcion.activo { box-shadow: 0 0 0 2px var(--acento); transform: scale(1.12); }

/* ================================= */
/* 6. RESPONSIVE */
/* ================================= */

@media (max-width: 860px) {
    .perfil-columnas { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 720px) {
    .perfil-portada { height: 200px; }
    .perfil-cabecera { padding: 0 22px; margin-top: -70px; gap: 18px; flex-direction: column; align-items: flex-start; }
    .perfil-avatar-marco { width: 140px; height: 140px; }
    .perfil-identidad h1 { margin-top: 10px; }
    .perfil-cuerpo { padding: 30px 22px 130px; }
    .perfil-stats { grid-template-columns: 1fr; }
    .stat strong { font-size: 36px; }
    .perfil-nav { gap: 16px; }
}
