/* =========================================
   VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================= */
:root {
    --color-bg: #fdfbf7;
    --color-surface: #ffffff;
    --color-pastel-pink: #fbcfe8;
    --color-pastel-pink-dark: #f472b6;
    --color-pastel-blue: #e0f2fe;
    --color-pastel-blue-dark: #38bdf8;
    --color-text-main: #374151;
    --color-text-muted: #6b7280;
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: var(--color-text-main);
    background-color: var(--color-bg);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
   BARRA DE NAVEGACIÓN (NAVBAR)
   ========================================= */
.navbar {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-pastel-pink-dark);
    text-decoration: none;
    font-style: italic;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--color-pastel-pink-dark);
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info-text {
    font-weight: 600;
    color: var(--color-pastel-pink-dark);
}

/* =========================================
   BOTONES GLOBALES
   ========================================= */
.btn-primary, .btn-secondary, .btn-outline, .btn-buy, .btn-tier-buy {
    padding: 10px 22px;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-block;
}

.btn-primary {
    background-color: var(--color-pastel-pink);
    color: #4c0519;
}

.btn-primary:hover {
    background-color: var(--color-pastel-pink-dark);
    color: #ffffff;
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-main);
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 99px;
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.btn-outline:hover {
    background: #ffffff;
    color: var(--color-text-main);
}

/* =========================================
   PORTADA / HERO SECTION
   ========================================= */
.hero {
    background: linear-gradient(135deg, #fbcfe8 0%, #e0f2fe 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    margin-top: 60px;
}

.hero-tagline {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #be185d;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 12px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #1c1917;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.25rem;
    color: #44403c;
    max-width: 650px;
    margin: 0 auto 36px auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* =========================================
   ESTRUCTURA DE SECCIONES
   ========================================= */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
    width: 100%;
}

.page-container {
    max-width: 1200px;
    margin: 100px auto 60px auto;
    padding: 0 20px;
    flex-grow: 1;
}

.bg-pastel {
    background-color: #f5f3ff;
    max-width: 100%;
    border-radius: var(--border-radius);
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 60px;
    font-size: 1.1rem;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--color-text-main);
    letter-spacing: -0.04em;
    margin-bottom: 8px;
}

/* =========================================
   SUSCRIPCIONES (TIERS)
   ========================================= */
.grid-tiers {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.card-tier {
    background: var(--color-surface);
    border-radius: var(--border-radius);
    padding: 40px;
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    border: 2px solid #f3f4f6;
    position: relative;
    display: flex;
    flex-direction: column;
}

.card-tier.tier-premium {
    border-color: var(--color-pastel-pink);
    transform: scale(1.03);
}

.tier-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--color-pastel-blue);
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
}

.tier-badge.premium {
    background-color: var(--color-pastel-pink);
}

.card-tier h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 32px;
}

.price span {
    font-size: 1rem;
    color: var(--color-text-muted);
}

.tier-features {
    list-style: none;
    margin-bottom: 40px;
    flex-grow: 1;
}

.tier-features li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 24px;
}

.tier-features li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--color-pastel-pink-dark);
}

.btn-tier-buy {
    width: 100%;
    background-color: #f3f4f6;
    color: var(--color-text-main);
}

.btn-tier-buy.premium {
    background-color: var(--color-text-main);
    color: white;
}

/* =========================================
   TIENDA Y PRODUCTOS
   ========================================= */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.btn-filter {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 8px 20px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-filter:hover, .btn-filter.active {
    background-color: var(--color-pastel-pink);
    border-color: var(--color-pastel-pink-dark);
    color: #4c0519;
}

/* =========================================
   TIENDA Y PRODUCTOS (GRID ACTUALIZADO)
   ========================================= */
.grid-productos {
    display: grid;
    /* Fuerza exactamente 4 columnas iguales en ordenador */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px; /* Espacio limpio entre tarjetas */
    width: 100%;
}

/* =========================================
   ADAPTACIÓN RESPONSIVA (MEDIA QUERIES)
   ========================================= */

/* Para pantallas medianas (Portátiles pequeños o Tablets en horizontal) */
@media (max-width: 1024px) {
    .grid-productos {
        /* Pasa a 3 columnas si la pantalla es más estrecha */
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}

/* Para Tablets en vertical */
@media (max-width: 768px) {
    .grid-productos {
        /* Pasa a 2 columnas para que no se vea todo tan apretado */
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

/* Para Teléfonos Móviles */
@media (max-width: 480px) {
    .grid-productos {
        /* Fuerza exactamente 1 columna (un objeto por fila) */
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 20px;
    }
    
    /* Opcional: Hace que las tarjetas ocupen un espacio visual más cómodo en móvil */
    .tarjeta-producto {
        max-width: 100%;
        margin: 0 auto;
    }
}
.tarjeta-producto {
    background: var(--color-surface);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid #f3f4f6;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.tarjeta-producto:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.04);
}

.img-container {
    background-color: #f9fafb;
    border-radius: calc(var(--border-radius) - 4px);
    overflow: hidden;
    margin-bottom: 16px;
}

.img-placeholder {
    width: 100%;
    height: 260px;
    background: linear-gradient(45deg, #fef2f2, #eff6ff);
}

.category-tag {
    display: inline-block;
    background-color: var(--color-pastel-blue);
    color: #0369a1;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 99px;
    margin-bottom: 12px;
    text-transform: uppercase;
    align-self: flex-start;
}

.tarjeta-producto h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.tarjeta-producto .precio {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 16px;
    margin-top: auto;
}

.btn-buy {
    width: 100%;
    background-color: var(--color-pastel-blue);
    color: #0369a1;
}

.btn-buy:hover {
    background-color: var(--color-pastel-blue-dark);
    color: white;
}

/* =========================================
   CLUB SECRETO (FEED EXCLUSIVO)
   ========================================= */
.feed-container {
    max-width: 750px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.club-post {
    background-color: var(--color-surface);
    border-radius: var(--border-radius);
    padding: 32px;
    border: 1px solid #f3f4f6;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
    position: relative;
    overflow: hidden;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tier-tag {
    background-color: #f3f4f6;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
}

.tier-tag.pink {
    background-color: var(--color-pastel-pink);
    color: #4c0519;
}

.post-date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.club-post h2 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.post-interactive-box {
    background-color: #fafaf9;
    border: 2px dashed #e7e5e4;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
    color: var(--color-text-muted);
}

/* Sistema de Bloqueo del Club */
.club-post.locked {
    user-select: none;
}

.blur-content {
    filter: blur(6px);
    opacity: 0.4;
    pointer-events: none;
}

.post-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: rgba(255, 255, 255, 0.3);
}

.lock-message {
    text-align: center;
    background: #ffffff;
    padding: 24px 32px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid #f3f4f6;
    max-width: 90%;
}

.lock-message span {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.lock-message h3 {
    margin-bottom: 6px;
}

.lock-message .btn-primary {
    display: inline-block;
    margin-top: 16px;
}

/* =========================================
   PÁGINA DE AUTENTICACIÓN (LOGIN/REGISTRO)
   ========================================= */
.bg-auth {
    background: linear-gradient(135deg, #fef2f2 0%, #f0fdf4 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background-color: var(--color-surface);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 440px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
    text-align: center;
}

.auth-logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-pastel-pink-dark);
    text-decoration: none;
    font-style: italic;
    display: block;
    margin-bottom: 24px;
}

.auth-subtitle {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.btn-google {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    padding: 12px;
    border-radius: 99px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-google:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.btn-google img {
    width: 18px;
    height: 18px;
}

.auth-divider {
    margin: 24px 0;
    position: relative;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #e5e7eb;
    z-index: 1;
}

.auth-divider span {
    background-color: var(--color-surface);
    padding: 0 12px;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    position: relative;
    z-index: 2;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-text-main);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--color-pastel-pink-dark);
    box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.15);
}

.btn-auth-action {
    width: 100%;
    background-color: var(--color-text-main);
    color: #ffffff;
    padding: 14px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    transition: var(--transition);
}

.btn-auth-action:hover {
    background-color: #1f2937;
}

.auth-toggle-mode {
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.auth-toggle-mode a {
    color: var(--color-pastel-pink-dark);
    font-weight: 600;
    text-decoration: none;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background-color: #fafaf9;
    border-top: 1px solid #f5f5f4;
    padding: 32px 20px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: auto;
}

/* =========================================
   DISEÑO RESPONSIVO BÁSICO
   ========================================= */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* En un proyecto real aquí iría un menú hamburguesa */
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .price {
        font-size: 2rem;
    }
}

/* =========================================
   ESTILOS PARA EL MENÚ DESPLEGABLE DEL PERFIL
   ========================================= */
.profile-dropdown-container {
    position: relative;
    display: inline-block;
}

.btn-profile {
    background-color: var(--color-pastel-pink);
    color: #4c0519;
    padding: 10px 22px;
    border-radius: 99px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-profile:hover {
    background-color: var(--color-pastel-pink-dark);
    color: #ffffff;
}

/* Contenedor del menú oculto por defecto */
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--color-surface);
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    border: 1px solid #f3f4f6;
    padding: 8px 0;
    margin-top: 8px;
    z-index: 1100;
    text-align: left;
}

/* Clase activa manejada con JavaScript */
.dropdown-content.show {
    display: block;
}

.dropdown-content a {
    color: var(--color-text-main);
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
    background-color: var(--color-bg);
    color: var(--color-pastel-pink-dark);
}

/* Línea divisoria dentro del menú */
.dropdown-divider {
    border: 0;
    height: 1px;
    background: #e5e7eb;
    margin: 6px 0;
}

/* Estilo para el botón de salir */
.dropdown-content a.logout-link {
    color: #ef4444;
}

.dropdown-content a.logout-link:hover {
    background-color: #fef2f2;
    color: #b91c1c;
}

/* =========================================
   SECCIÓN SEGUIMIENTO DE OBJETIVOS (KO-FI)
   ========================================= */
.kofi-goal-section {
    max-width: 600px;
    margin: 60px auto 0 auto;
    text-align: center;
    background: var(--color-surface);
    padding: 35px 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    border: 2px solid #f3f4f6;
    transition: var(--transition);
}

.kofi-goal-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.04);
}

.badge-upcoming {
    background-color: #f3f4f6;
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}

.kofi-goal-section h3 {
    margin-top: 16px;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-text-main);
    letter-spacing: -0.02em;
}

.kofi-goal-section p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

/* Contenedor e indicador de la barra de progreso */
.progress-container {
    background-color: #f3f4f6;
    border-radius: 99px;
    height: 26px;
    width: 100%;
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    background: linear-gradient(90deg, var(--color-pastel-pink) 0%, var(--color-pastel-blue) 100%);
    height: 100%;
    width: 0%; /* El porcentaje se actualizará desde JS o manualmente */
    border-radius: 99px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    text-align: center;
    line-height: 26px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-text-main);
}

/* Metas de cantidades */
.goal-amounts {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-text-main);
    margin-bottom: 28px;
    padding: 0 4px;
}

/* Botón estilizado estilo Ko-fi integrado con la paleta */
.btn-kofi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #29abe2; /* Azul corporativo de Ko-fi */
    color: #ffffff;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(41, 171, 226, 0.3);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-kofi:hover {
    background-color: #1a94cb;
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(41, 171, 226, 0.4);
}

.btn-kofi img {
    height: 18px;
    vertical-align: middle;
    margin-right: 10px;
}

/* Adaptación responsiva para móviles */
@media (max-width: 480px) {
    .kofi-goal-section {
        padding: 24px 16px;
        margin-top: 40px;
    }
    
    .goal-amounts {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
    
    .btn-kofi {
        width: 100%;
    }
}

