/* ==========================================
   PUBLIC CSS - Moderno y Vibrante
   Páginas Públicas (Perfil, Búsqueda, Blog)
   ========================================== */

/* ===== BANNER PORTADA ===== */
.perfil-banner {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, var(--primary) 0%, #00D4FF 50%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    position: relative;
    overflow: hidden;
}

.perfil-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
}

.perfil-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== HEADER DE NEGOCIO ===== */
.perfil-header {
    background: white;
    border-bottom: 2px solid var(--border);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.perfil-info {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: start;
}

.perfil-logo {
    width: 110px;
    height: 110px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.2);
}

.perfil-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.perfil-detalles h1 {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 28px;
    font-weight: 800;
}

.perfil-categoria {
    font-size: 13px;
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.perfil-desc {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

.perfil-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    font-size: 14px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-value {
    color: var(--primary);
    font-weight: 700;
}

.btn-contactar {
    background: linear-gradient(135deg, var(--secondary), #FF8C42);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-contactar:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

/* ===== GRID DE PRODUCTOS ===== */
.productos-public-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 2rem;
}

.producto-public-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    animation: slideInUp 0.5s ease-out;
}

.producto-public-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    border-color: var(--secondary);
}

.producto-public-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--primary) 0%, #00D4FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
    overflow: hidden;
}

.producto-public-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s;
}

.producto-public-card:hover .producto-public-image img {
    transform: scale(1.08);
}

.producto-public-body {
    padding: 1.5rem;
}

.producto-public-nombre {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.producto-public-precio {
    font-size: 24px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 10px;
}

.producto-public-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
}

.btn-comprar {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 11px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-comprar:hover {
    background: #003DA3;
    transform: translateY(-2px);
}

/* ===== BÚSQUEDA Y FILTROS ===== */
.buscar-header {
    background: linear-gradient(135deg, var(--primary) 0%, #00D4FF 50%, var(--secondary) 100%);
    color: white;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.buscar-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(20px); }
}

.buscar-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.buscar-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.buscar-input-group {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.buscar-input-group input {
    padding: 14px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.buscar-input-group button {
    background: var(--accent);
    color: var(--primary);
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.buscar-input-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

/* ===== CATEGORÍAS FILTRO ===== */
.categorias-filter {
    display: flex;
    gap: 12px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.categoria-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.categoria-btn:hover,
.categoria-btn.active {
    background: white;
    color: var(--primary);
    border-color: white;
    transform: scale(1.05);
}

/* ===== BLOG ARTÍCULOS ===== */
.articulos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 2rem;
}

.articulo-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    animation: slideInUp 0.5s ease-out;
}

.articulo-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    border-color: var(--secondary);
}

.articulo-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.articulo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.articulo-body {
    padding: 1.5rem;
}

.articulo-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.articulo-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 14px;
}

.articulo-meta {
    font-size: 13px;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.articulo-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
}

.articulo-link:hover {
    color: var(--primary);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    background: linear-gradient(135deg, #F8FAFC 0%, #F0F4FF 100%);
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    color: #999;
    border: 2px dashed var(--border);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 1rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .perfil-banner {
        height: 150px;
    }
    
    .perfil-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .perfil-logo {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    .buscar-input-group {
        grid-template-columns: 1fr;
    }
    
    .productos-public-grid,
    .articulos-grid {
        grid-template-columns: 1fr;
    }
    
    .buscar-title {
        font-size: 24px;
    }
    
    .categorias-filter {
        gap: 8px;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}